From 663d6f2815c6160f17b547431690f16777b38952 Mon Sep 17 00:00:00 2001 From: SGenheden Date: Thu, 19 Dec 2024 08:40:04 +0000 Subject: [PATCH] deploy: 335bcb68f796b8360bd4524e80df6f4218321ccd --- .buildinfo | 4 + .nojekyll | 0 _images/sample_reaction.PNG | Bin 0 -> 13013 bytes _sources/index.rst.txt | 65 + _sources/modules.rst.txt | 7 + _sources/ord.rst.txt | 106 + _sources/pipeline.rst.txt | 140 ++ _sources/routes.rst.txt | 68 + _sources/rxnutils.chem.features.rst.txt | 29 + _sources/rxnutils.chem.rinchi.rst.txt | 29 + _sources/rxnutils.chem.rst.txt | 62 + _sources/rxnutils.data.ord.rst.txt | 29 + _sources/rxnutils.data.rst.txt | 54 + _sources/rxnutils.data.uspto.rst.txt | 45 + _sources/rxnutils.pipeline.actions.rst.txt | 45 + _sources/rxnutils.pipeline.rst.txt | 37 + _sources/rxnutils.routes.deepset.rst.txt | 29 + _sources/rxnutils.routes.retro_bleu.rst.txt | 29 + _sources/rxnutils.routes.rst.txt | 64 + _sources/rxnutils.routes.ted.rst.txt | 37 + _sources/rxnutils.routes.utils.rst.txt | 21 + _sources/rxnutils.rst.txt | 21 + _sources/templates.rst.txt | 104 + _sources/uspto.rst.txt | 94 + _static/alabaster.css | 714 ++++++ _static/basic.css | 925 +++++++ _static/custom.css | 1 + _static/doctools.js | 156 ++ _static/documentation_options.js | 13 + _static/file.png | Bin 0 -> 286 bytes _static/language_data.js | 199 ++ _static/minus.png | Bin 0 -> 90 bytes _static/plus.png | Bin 0 -> 90 bytes _static/pygments.css | 84 + _static/searchtools.js | 620 +++++ _static/sphinx_highlight.js | 154 ++ genindex.html | 1720 +++++++++++++ index.html | 153 ++ modules.html | 160 ++ objects.inv | Bin 0 -> 4287 bytes ord.html | 210 ++ pipeline.html | 231 ++ py-modindex.html | 378 +++ routes.html | 166 ++ rxnutils.chem.features.html | 204 ++ rxnutils.chem.html | 1285 ++++++++++ rxnutils.chem.rinchi.html | 218 ++ rxnutils.data.html | 472 ++++ rxnutils.data.ord.html | 237 ++ rxnutils.data.uspto.html | 314 +++ rxnutils.html | 432 ++++ rxnutils.pipeline.actions.html | 2385 +++++++++++++++++++ rxnutils.pipeline.html | 715 ++++++ rxnutils.routes.deepset.html | 370 +++ rxnutils.routes.html | 1008 ++++++++ rxnutils.routes.retro_bleu.html | 311 +++ rxnutils.routes.ted.html | 415 ++++ rxnutils.routes.utils.html | 254 ++ search.html | 125 + searchindex.js | 1 + templates.html | 190 ++ uspto.html | 195 ++ 62 files changed, 16134 insertions(+) create mode 100644 .buildinfo create mode 100644 .nojekyll create mode 100644 _images/sample_reaction.PNG create mode 100644 _sources/index.rst.txt create mode 100644 _sources/modules.rst.txt create mode 100644 _sources/ord.rst.txt create mode 100644 _sources/pipeline.rst.txt create mode 100644 _sources/routes.rst.txt create mode 100644 _sources/rxnutils.chem.features.rst.txt create mode 100644 _sources/rxnutils.chem.rinchi.rst.txt create mode 100644 _sources/rxnutils.chem.rst.txt create mode 100644 _sources/rxnutils.data.ord.rst.txt create mode 100644 _sources/rxnutils.data.rst.txt create mode 100644 _sources/rxnutils.data.uspto.rst.txt create mode 100644 _sources/rxnutils.pipeline.actions.rst.txt create mode 100644 _sources/rxnutils.pipeline.rst.txt create mode 100644 _sources/rxnutils.routes.deepset.rst.txt create mode 100644 _sources/rxnutils.routes.retro_bleu.rst.txt create mode 100644 _sources/rxnutils.routes.rst.txt create mode 100644 _sources/rxnutils.routes.ted.rst.txt create mode 100644 _sources/rxnutils.routes.utils.rst.txt create mode 100644 _sources/rxnutils.rst.txt create mode 100644 _sources/templates.rst.txt create mode 100644 _sources/uspto.rst.txt create mode 100644 _static/alabaster.css create mode 100644 _static/basic.css create mode 100644 _static/custom.css create mode 100644 _static/doctools.js create mode 100644 _static/documentation_options.js create mode 100644 _static/file.png create mode 100644 _static/language_data.js create mode 100644 _static/minus.png create mode 100644 _static/plus.png create mode 100644 _static/pygments.css create mode 100644 _static/searchtools.js create mode 100644 _static/sphinx_highlight.js create mode 100644 genindex.html create mode 100644 index.html create mode 100644 modules.html create mode 100644 objects.inv create mode 100644 ord.html create mode 100644 pipeline.html create mode 100644 py-modindex.html create mode 100644 routes.html create mode 100644 rxnutils.chem.features.html create mode 100644 rxnutils.chem.html create mode 100644 rxnutils.chem.rinchi.html create mode 100644 rxnutils.data.html create mode 100644 rxnutils.data.ord.html create mode 100644 rxnutils.data.uspto.html create mode 100644 rxnutils.html create mode 100644 rxnutils.pipeline.actions.html create mode 100644 rxnutils.pipeline.html create mode 100644 rxnutils.routes.deepset.html create mode 100644 rxnutils.routes.html create mode 100644 rxnutils.routes.retro_bleu.html create mode 100644 rxnutils.routes.ted.html create mode 100644 rxnutils.routes.utils.html create mode 100644 search.html create mode 100644 searchindex.js create mode 100644 templates.html create mode 100644 uspto.html diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 0000000..77e34fd --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: f8344ad5ac41bfce5daca8488cebaee9 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/_images/sample_reaction.PNG b/_images/sample_reaction.PNG new file mode 100644 index 0000000000000000000000000000000000000000..9c32efe1a2cfc68f98bae396a6c2de422d1494e0 GIT binary patch literal 13013 zcmcJ0bySqm*X{sHN+=>-Qi>uWA>An_6KKq>g>}Nj&zfqRO$ECo9Kp^wW zxGd$R#5G)@yYo1%8sk?t_Cvp_&5M4{8(r1EQSAtMSm=BCeu;gl^AIEJab4zOdc~3~Bw59XDSKvPB%Ep$Hmbx$gNSp|pOyUu`AAI#9V=v9It)D~wLrjt&EC#jh zHV~V%H)q1!-KQslN_8y42G)S*cLdR`?GQ*S2At#H3xtLaj`r_uA3}fc--|C6_N|-X z5fa13`1i7eCPDV^1wu&F_FpfqzW+B%1rThkc6}A`T8(aSj$u?Fk-OR4mVB ze@T36uDZ{_` z=7g1a3YaQP@m`4DL=Q8_bd?#lM_5P(-i!9wLujSD|9N^i`oFD(tpkCOD9Jmvnd{MN zQMA=bCRLnXhqC9Qs9|ug7uNmkjf&om2i?+v7lAdS%7RL~)-xvFMo}(O_(Bh-l(%c3 z=(FcbSFOx~W&H#b$0F2kmwEn$>4RjVouKoK0^U2Px@hl~YbpqY_0wZFF7pJvmC?cx&`5y{|FaCdFtAA+4rQ5fEM>#pyyI`u}bUjNw=$v>wb zSzsF{jHU@8{zOBsx@t%X*&E8TJiF4-?{R@}S%0 zIg~!^&uBs9^LJ&Lc9h!!P0uB^Q%}VnpFW0{3mf#DUqK)pDd|LIEO(t!a%T|-aE|lh z!wsyDwbfWXnd#3El9=>#n{U28U=jJiOzBe57K>44 zM?%P(=_zYHx4_;%wQyvdWjIJ2-zjndr>~X8$f@$2Ldf;~QKC*{Vqnb(`Xk}WuZyLk z1>9Qi?E_wJS10VAu0$q$(=1ZRkqPfBf2??)eDs4 zhjV0K+t`%2J%m7{Bx|pr$~t(S-|!d|!D70{Prw94WkRC3|x==#z{a<(eMI;lh7KSI53r z7`er@+^nB4d{pr~0X;l#Y)qqobU>aZjWL#4iAxg#d2EL9C8jQ6y23QH%3`#0+9ut3 zLVE<^0n%P%k_+gU&jGAe0cVx=YhK}`<}&?*L=6r zfATw++pz79Sw!L^HXS(~o#aAv2od>w$6a3MpO~D>G=tsU(f1i-ULD44xv0Syu?VQ1 zG{W|HUqc|izc*sOMkl`qh}%sk>1p52{&sArLWF-C7%GWfP53sNQ;Ck}-&52O~T<5Z`L9Jvyel zAj6xL$8s#{V=3b8M2X(VZxD#9F>w1}GbggAuppiF7d0%^@vJ`pk2F~p4I=gxL|TA_ zW2VOXSr8#DuO=O*5TW67eB&yXund+Jwt>n)k!{b<8Q$j>>S(`Td%!JR3o|JBC@p2& zdEY0DqDriny_tPi_kUo~cBR19w0ML z#D>xXP_v%w!>)(@d})hWz>a+M4iz^^GOs3~MZ(s_iBf%bga_)2rbeE{hZkWAX1mAaev{;wVOt6sUxv$h;Zg`H1nb~@nZ|t~5fg88DIh>QWtLBf1uekO^?=HB* zsTa9j%c+;DY_teV5i$TMe64$1tiz-Qb<2D2eYSS+lT<&Eb%{+P(IJu7I$5LWt&$Dm z`0aG{$Am)k@&fuWns+3V3b^l_zD5)9hvaS~K~H$+22t5tYl~Xn-x)%2d@J5neh5Ew zvs`RO6jGT=Cce@6SFj(IHlKg1EZ!N(3oV2!Jcd6l_(kKPs4TE$MJ{wot&V0?DkN-} zjbqpuNy~oxXZ)}!&FA`TptH;ag3Br(Z zx;FLF%7VMxNg`eih3E_PU~%@AOPN2DwzQ{osJQBnJ|Mqpny4b;umxb!?Sc4f-zx`V z>K!+dS$)l=iQ6{4(y%&jFR(Y{O&7?f`aBajSB$$1JWZ$>I&Y^XyoO$x; z-^!b*aMV03qq3ih*D4WMNe2)1(`&5ARWHzX7**Qq*~qYcsY&PZ7{?IQs;2^%a<-_= zVFo)65~1XZ+pN@UR!$QL=w(t^`?H!2$tINt-vUG6su`5GeZU~Ut-q$6 zKG&Z7drgO{=i8+T;go#ItVBL=4o)twbN51BSe?*eA3DG1>1VK^_jm1bhln~yhNKCH ztN>smwwU;??a)bXCI{{>lUZJLB|4qq0UY9xTNjd!cBV(CZA4IWjv%3F=@r9P*VhHn z!Z0~0x*)+uL5ydHpH;Pmu1{A6w)ZAWGYTP}H7w{Am$Hof$@EOk34w7w+5(RGLTa^0 zPU}CEwuwv-i0Sb>Y_Yp~68el(&nepTWZEo0+4U|Kp@MtDi;C^0LtNcQ7o8-S^osYk z-Y`Aiv)bNVw2i~LU}(%8htH|LXF z1$=#7(M5`P_X7v+=Cp?%6^%fc$tB6gTYP-XjHjwUYN?|U;YcKgu)N34srn#Eb|nBi zGG|E~hH_E9W%@uXwQ+*(Ym##@z@}3bMXVyE%B-Af{w>(hqm?R=t zioLL*%<jx1Ge0PtQuv8p zLtnH^cxP9(w5}3~827>9VV;)(Lk?xDVS8ZGf9zg%Z!@3D&I&CK!ZV!1!k>A{#eF%H ze32>c(e_=tLP{iqm(5D|m1#&At>9akFtYnKAZ@({JW8!+YhqGTK0>8A;N@sx3pIwJ z&4Dz+pGqZdx8v&}bkW>W&EQHgZS_S9*shtbG!xvG(}M-La7;Q+hLQi6brCM=T~|zI z#KL&iY_5ZBa2^;8=7rm1&AT9w(8(ao<$WxP#8*ke9yz0w>)k9H-F_IdFd2xH%|er# z+95dNKV-s9Q0x65L0)~FEQz)pcY5`hUQzn~3%IJlUg!W?j${nzsCL99?U#ctGP9bT zM8Lg1^GduAR0buU(>a%oMe3S|FiOZJ^LuP!ozU@f?wMsdr1N+0@rxb=)R`T_2i#OS z&0eH};(e>#KRCT1*(jU6g^|Om(bXa?C?^Tz=X9NY_iWtQZWFXJSrK2cZ^kMJ4M)|B2xF4@_ zBz(tIsB+$>u$Zn0xksajt*#0OZrd?>DM~+R+qBlTo#hn);CP}qWt1{MgI~^W@3K)p zNTj8iz{>_)n%?WsjBj?^1Mf;ys%u~8CVX`X;-IjZJuWWMvM!aCAiJT52UqefoR(JE ziYj$R>Kn5{vg3t4>t0%DcgCtDNg|5`xJ9G8ww>Q_>FVXA!!vms#oe;&tH*5=@Jm-!( z!JUM1*1PNNKu`h`h!QhpG9L!`U*A9u0dd<55j-XqmO%|1Ltk@Kr#+;VYlUnCHwnZB ze8B^+p?y%2dkzOh_jWF~(ZubsAns9_Sa|0Gkk&{i>aFHgpC^>wb&^O|{>z`F6^&3~ zeh&NWhpQX156g(!P6_G5umGfn$Y78ntU(Nh`I|iJFCR?p=ki*!y74Yxz4=Up`8J!7 z0v8w8WTwiZ!fKjJUS6J46C&oed$S>GdNY)z7L}rFIixqU0v&oLT)$C+llH!j>oKq% zlU+c(G>{ExDDRD9cyMrF(wE4&PP1gIje+^<+5Qmu3K~&c+$5!K)AG@hm{nhfsQ!R3 z>b=EKrk~YZ-LM84WG%YZG?XfpOB$Denv2AzA{H+w@P)gYCTi{Yqp39Z3L0hGlPk+0 zrhq^W<4#ZNDOGaKe3!L&mF@u21=jIzX>2TMPHG*yw{0!Jkx*rkGn45uL;phoyRlnT zu800C(s_F#3HJfp-Y;5H+ukn~8_6G6_hXpyamDVp#m#@ZizmerJ6_{;;i4|>b_|OA zS;~JEc}7yNn?K{t4Y0izp^w{+tDmZEOkFxD%TBa7I77yOM7*+Ol-p*B=E;&0yR^E>0))Ca?uNwcKJ8bCoc3w zgPh34&P(;XF+qClQvkp6Sj^TGhf(q=b8&I?srlC8R#YAdkma$O8k$~O0GE3{x@gy8 zi~h)NpjppDb?J(Cb#_@ofUc_e&`+T*{vB*8HNE0x)5*-ofyL^7eIz4cBlJlL=z`=h z?~#d>TDT&IWNEvRy)R-B)-zqv^NmX5v{gZ&Cr(eFnhY1-CGa{3uGgvuVWZ=QtGc&H z25kixDrV!;2u)2#2^|ed=A(n%*XMWKQ0QSwctx4+nPKhvhHJJxY*2FtY~1bF@60!9 zCG*+7U`cn)R!n_0tl_t6Fo_pk^&0(xX}-ZZR)uxTkEtnPxF}&q2=(49dqD~}EhCU9 z-vrJP=>5W$#&5*@aMb$yZDQBZ6tQOXzJ6~wUS zjY@OWF9^qh{S-lb8-300=0R@9ej6nKxVSz4zQ)eEC5IFzip+}C)YX-$58hRn1aFd1 zImyo5a&!IDQGc5Fk?yw$b~ImUT`>Ad5Xjn-%d^3lzel4ny+dDe#j%Nj)6v7}%%=m5|db_);oUQ6g_5Wla~my)zKH!00+Wsmjz-lw^(CrSU|o3r!(4s$k@J^}|ig5R(y zOUr1ir5xHou>f#G4roSRR&jBIgY#MtS+^20XFF3>D0FjqxZZ-^F))$`+Si-U_pKS( zOE)i{bE>~tdLR6>Sc%e1UpGj6msaRq#LkrABW(5)B8V=2y?b+JW%B;<-y=w(v$R&Gn9QDHX0>UGjdT4|~n4rgY;(N0n zMhVk8&0}!z!tp72yN)OI**ES^3?6O_@@clV%*}o^pVc-?VEwbdQpkk7~F;jcobcnKHt_ zZ0LP`X14X<^hW4>Gbccau=&W*S=)dCS+Y&SG$k*c4Nl2MKi{IsY)GylxCUwj{BnMY zc%65JkUZ;Cfi(S{hdJhXp#E^#88FBz%^Q7Nt91MYJ6P*7Te}d|-@3zbLE|pxAadR% zq%)S)>J5`YAx#?`EbP(ngbj(}yJK5m%=5dmeEckn6rhQ%q#x#|1Qk=U`hXt(mv0s? zzba{xc%E`Sl)X7hukn%-t(H~;4g&q^(z@fbN9s$18hkQ4|JBtyEKRTDOemP^41RoS z^Z&X#TbsiAoBr9e*U07zn+@Aytq8Qsz7kReOLtYgdDw?}KdBUIXzA+~Z=bkkYn7-x!bMiB&WQL=J64q)s&1m!PeAGI0xSam?75fUN`7k6%l@2b z5a@dA*)PlQy&JSEQGnNs`PFr%>9T||@lErYSvwc+zF*PzWS)=fm-sYptM}FYGB$st z(u~DFtS~v=)*>4*Iof$Dh(Q_D=7OxhKfmZYz<;o}cqx+%YHxH}iFq;N~=iOyn zC{$-j;xrCi-PlNB^6Qvw_Ns0=HQH_Ey?8L)jfd#>^uwgZW>Mr+!4TQMTasPfJgyaPj~C+6An!Kj|rd+oNoKj zv?8gUC#G$AAqqiin@QoRsZ=0FQj~3*tA-vaJh5Y9q3hd&e&IbG%u1`ae*XOp&f7BM z*ZV=DU4USFP6~C+`p)`c$I3Le53u?Pzxgkf8qe}U*Ph$od<+{Yo-GZn(t;M6HA|*O zNwr!7eS$BP%CKFr8cwD9SC~#x5YC|Y&w^+NCfQL<>`uux)Ri# zgl>NSXm4>*19DSlHf!DWphqNqvl0m?r;0=Vk={(n+aZSIHBFlH$7HF?bMH}lS%IT2 z!uCjw3eOkOt^ykB8-Wd=oZu8L>k1?t4WtS73%A~Iy@d5H{ZLvf^%3UDCg$`wv5F&q znH~>Cyl`ksp_kNog)nUEzI4em5xT0%eeYgK+?so{YdesO_)Gwp7{t+tSvJC;GxBCY zBPKK65UN`_zr77B>rFMxto04#YSW00H& zlv=sfB&=pK6e%?QHl2oJZF!@G`0`iam;fgqgpT*^cUOG@n22&9eq&_^F?T3w%hS?k zcSPmlQ0ZdzfDp$8igtFKk!_dd%ypudYo%GB;@W56OO*#Q8Up|@+53P{Bm+35a;#MJ zaT&wkXp;|}Tjx7CL+oXh-v#9&MX&3?z`$_uTTmdIJ7lwh92 zc2Ezac3S|O?%P-GflfgR{z+FCKAe%R{zRC=bh((mr>+}m5eH`*IjOx`q-NU_>}&NK z*L3OyCvnt*5xY`R39wiDFJ*dK{le3(LY7tDGw60U(;SaSzIg~@ms_y$YWcN4W{%1A zC9P7m(Nv9f3b)0G)NQ|-#PjhB7(iqT8*w|8vvJ4Cb0dx%K>wOXC*$EqcP1s!x8Akh zKj1}O`Q13dc`Uw}ijCF zE%S|Lmq(7Gi*@$0`jHC+Uhe@AMJ8@s?;VN%YUYWT~0TWbl=))VW%Xhcv@u2{GBLyS&l7+~@lTCR3&^XykTE1b9As!MYPo1CT~ zJaYo^D5y5G-E}4JQrf&bPxQ#Y3A33Gfd|jz-<&y_VRg+5z)C1C10mEd8grUaP8;&S z+@7HvNl-Hq`jOE4^hfnrbIv22rK-BfK>Q!JxKFkhyGJf42mmR{{n>4|ddXTt$Q!@V z+F;W=<0E^?n{#hMt;k$0GBBV*veebC%;>)L=zk>Z|3yCb`h|+nUtP1a<@VWEe)o)m zh?p^XZ4~2ME=|7y2%YcGCb1lcINI zSWD$lQZDVkDMmZ#y`bh&97D*dW*spPZyZjV;0p%h1kcOA5VyZSi&B4K5m>F>lkVxw z2{QVAzpX>;=9*TnSjTIvxVD))KEwh!SFZ*}MHW+Kh6Wqnp@rz5I{`pt)6#Q}ca)A= z+eu_$6W(;lpe7W4qK>rtfr(cGeZQ$nQ`1{!oh7KZoZd?yKT^v2rBqh>0ya{XCmWel z>Q9vK;PyM1#q++}ERpJB%d+{>Zvs7_9ypChQkvtD=nM{uKF*Q3`Z?{hIl7^iBz%$A zdXfa4{VRd3u8jBSdGxaq^QW+dXN!dtgjWzDT7!XX zQ&bYUw@%nldd0GPXR9upV~qn)OlBLInniD8teMHa-@_!J+PqvybGF46OKL(bc&Jrd zYSwR;G%`MW)~lf!UDtls15$_;dP1lAQ{ZT-+&H|_pT}kAc80R)xFudB>^t5Na=aaU zhyLCicW(39dP*K_Z{gr%)>cr-qx~UjVXQ$}(`-@nTx1y4nKYJL z0h*^H`0%8;KjW3~(G~SM`B*8^`3^+N=w}EDW4mo4CPnx1uEq|P18*1rm@A!VcT~Z0Hn5uUysEoBc-zw-m+8R}=c9=qV)N)(TXebLGYn(0lXA=vceSRNA zK#fjW$I1oN0_x(@YVScdMFt3#JufnsNVGG$a({fk8>9{9PXwR!rcuBGd#EeEtiugK z)}9AyJL2aaB-7zti??4G`6zwaZYitJ)pn@~z~}4HFN z38ivLY;_qh_JI+kH@NItvc~t;*{`hDtwh9v)F3YBh(_o7x{t#Uz?5)hJ+8Ed)aP^ z`{_O>cwi*VX$z)V9zQlej-#3zS;BscVToC|?4CpOmA!P_PlOhyk%W{k37%KZ!}Lf2 z{ubpCT6Yr0ylTG1CiMuaZu~}XO?Um;{+fY?r!JtmS^`igMyJ|RzCW4AG=M;{Bv-&? zXY-CK5WN7FcGw-nI&DxjL&Qt*?vutC2{O8*071DSn**1wWRfEPJG;9Nie77wlD5@h zs1(mG24GM_e)8KHWITVz@$US%XxnP<0#(W$N=k_TU7xG}fwVLYgs{5 zsBVj;m{kzN)Bg%1=50xL92#Tq!>r}f2F%HOyB~M`NLm>xyszBV?-GTBX}1C(DDps^ z_Y2=NQoq|1NQ6nExhXDTZ)Ric7G>bkQO7ckPg)bl1GlH0+qCw`00u38f6p%;NMOBX zwUObLAJ~^TEUTs#p{GqH5XY9nM~mb%Je}eFO?< z54l+?y;3rFG$8GhEZ2D44on>J#I$b-7aSK_&wX)qwEwo^6QI9!V26j|pDtiS9~#d- z>e)JGV$h{x=zG&YyFS)(`?IXRTK-EJ+iHdO-gkz!jJk{U6!L=!-C~ouI$0&ACcVaq z?%zM#83hH4yBg#tg_ldxzk=LXR+LEe_q&OKJ~b=6BCIzr)~@{E=VQ6lqJs-`Q{(>k zXWOp&q`JW%f1+4du=L~6rU8oW&el!$l@H!k#;-rZ=o(TM78WBFrmr`+zOVe!is+qZ z5WzNlqgqe+Kp_T@#3OpytuJCnt8DBuF~rua=UKHeuzJ$Zk4@#%UYgE?!g><)0~b~1 z8jf51yt+yN?%o>kZcXIeUAx%ZNRo{_?&o{Cc06ett?xbU+1DWN(Nbm;!oCRSIH6m( zdg+aQnXo-pNbJf`cm9z%3i?=8-?-6bmywTeQsb}M(kS`4=)_GDz%V{vu?>A=K&<7# zh?lW`w`P`+hi6>FZxiqh*&`s?*d9#jJrR0?ori_z-3+(f^i#HfHH5}m`w0VUwG~jk z3$wPcK=EsbUbYzi-`4!8_B%bsi_N=SX3C;&$ok}g6Q7~X6qB=qaz9zzPk3<#3r#-V zgQ7m|4NuWL@3(ClH-u#n4%J#sKL%ZV+@JBH-nn{5B@(79AMVuQd|=y%Frf03hXl=s z=+x1&C9yG1wWP6QARSr*zi3~(7bq*AR$TlkVtQGo)^#f=aM$qmhAxp=IvHe?2UpI6 z+4Qs3oXGRnGM&nmQd>@PY6?B>6G}Ksp+wB&1a11R%Xc@HzJj`#kG@8rqacBe5ogmK z!*t85KubWw0d_sS5Iy>KGER54>U~vha)M-gnxMxlI4Gzx(&!Q|nc;0o!)CcMN!#5O zy_>r0Rcq4{9ZXD{km0RkK@+b0Vco_N4;li{6uora+ZnVP0=?nA$qe=6nd*4s{h_Q&zE6@0ofTWgs%0%95I=2!-9xwbi+?P$g%&C3uIs_E?Rn;9dU>PAs3)Kqzud0dTe~>G z75PQU#wKECv1Jm+_~3vbiS>6s>A!jYk=gh+&EC=c1j7fDb|jBlr3#7L2i99*WB1b1(bmE1mChJplh3OKxru*N z&k74;gsl>D7o1{=$2^ahtSj8FpRkAp2blJDzCu_ocwgM0i&h@3*vHYfM?bDI8>E>= zq#$*&$Rh4^Ea=)I){X+}LA7KO?Mos8Lo;t}22D(j_=^n@fLzmc|NW zfR4rP(*h>G$xWtsOs!Xn8#nL4VPw}=RUi9LiJ+;U)wr+nPYWbmXQ$6EOFL@X=GF3I z6bOCVOqbc2?mj`%DF2JMyo*asmF0NP8C4i{(aSlEXnTo7t)iYQ$6LwfzCQ*r^DFug z>p~#v@zzOp<8G47@OiN{-_Tux_aaJeF3 zKHQoep+J?fP$Q{zRMUtRurP^1fEpaauoEVV%q_V4K=wv7OFZm4WBz9FU6ZVDk4a}3 zxx;PIRpOgx6m;3)(9ASB0$JEfi;MnCbW5*+inxIa+B}D2eDv{aQ#d8lcD$C!VD+Rx z?@r^5cXyKTtPq91dcM%sQD73!wwt9a&0hq^dFvnqXWGyQ$toO&vG`W@4_F31;pKK1R zMJ0h8Z^`hvX13eWlyyg4(@r-f8SlG>$YT@ZdvFZAA$}Ny!X~OR`iVQ;;9OLX6&H~X zgt3h2yLWTM6=1@W-M~ygUeKUp71Xxa=nRuZ`;j-uZf#D7!a}F7KEg`TMulyqT|O)GpL~D zZF7e~-@gkV?D^b?ZjG!xJo_E`G(Y6sA@Ii^;z5^*HQ{d1ipD$V8VQk}HcUnmNsAH- zzz2ojM-pL%{Ie2T5y)Y=HF6_&xc;kGU1k17QqmS!0f@eEgi|POyooeyz*glb;J)Eb zwb$ndhw?w4%WaR2uv*xen{*uLPnI{xP(sZgbvP}F3ESnC6f0BTM|`Rl$?tWw_dcIC zqm9CQ@%6E7^O>!>_;V(!R}UbWCRyUI<*^MjZ~gKWmEz*G6?ds|)b}UZU9ut_pUv9H zKISa;xZef@b#gD7_9g0(4cjK5Mg!Y!wKf?e226AD?QO%R)`S&y;Q*}Lfh^v-4N~^> z!i(tl*)!B_=A%${zj?lb>ER7%AjdZVC?M+cX|>BIKuH;=Ab zHre&_JuQ$x|J>pj#F6Dhs+=-OA4b7t@)?YFjekYte|mSTj?Q3xDpsx~H?l7+P0_aL z;PN@<;*SDQLCf6(U$?Q~euTX+0ra-{wFm-3fbCWz1d&lI5rPrK?wnG$rsg9ILK>y2 z1)YL{#&edUX%n@*OXFAU&WNyDvP}wlxfW=TpJpgmgQ(k)J~ST^emN_E4}qLU3c^(z zW(y8~m{&IXo+kp!&X@cNSI5*Ln5ytMcbN6%$vk)CIv;j7%{ZP0vuz~pb4krk}VUU-p#fknVg5{Cr>qQT`N_W+3R zQg+dZXSSs+UL7_X@}!pDigh42BL;cel}qrZiAb?U4$gph6%$#$cp0Qf4Sw2t_pX zr3p@I5X+(r8E~|2uRR>opvM8*CBdt=E<&2PJx}e-Xb)6;&SM=t#=fd5>sFaZJI1gl ze`w(Y%HbLA4QDCh%v+VSZ=wOnX2^aFCMl`Dr~NXH@GP=^gJya=d6Jop?UZLfYV^ws zeCUTp<+P>Mw)*;d>1NSnm(zVimX2Y1S&Fi_PA_z>_qU}Na{sA?5!54qahEOU)+Dj# z=7fo0n%M1&hG7C4ZsinFpJw8=sb@kKC5Dyw#UJT%^mzbz!4rLXdD*rXp05NHJ(qo( z5@hcG>>7e{{M5_V!Jxpme0W>DKC{5ESMpKSNCLy2XUPzz5g?2ZoDu94F1HoB^(3mp zYE#WrY`pE!j37Y2K%A=%`T<)Ql8P!K*NCL;3BF2Oz%zx?s9dGn6xN!pl(A*kZ=S2C zCIlID`(*Y39VcS3#+t*m+=#qwiinBZV0b?dD8>9Xa7FC30~x@y``@$Z5X6z}V-6t} z$Y%LMAC{LD>XAJ^)XJ1h)Cm}Z8lM|)bwPpUva9>&9!Hz@N3d#Q0@;6w1U?;?BnTfa z)%-?fO<}aT0`$+n#oH5;UYaS0i;G7uzTW!Gbd@F{nPl$G4wMwP&zlcfhSIOR2@I=b z!_$amg17(>+)5;pnFW%U#r6|8&I^^>O$U!qwxRT988sh1Yc_Sw3KMEP+DSPnF7Bba zDDV5nw_60B&z%2R_W$^63_wEv=0DMZtmV=xerKU#{?7;hzy5B-|HEIi_@AYSV2^KT YE%f7xou~rzZ+(}SR+cJ}F!=Pp0N_;T)Bpeg literal 0 HcmV?d00001 diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 0000000..9981c85 --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,65 @@ +rxnutils documentation +============================ + +rxnutils is a collection of routines for working with reactions, reaction templates and template extraction + +Introduction +------------ + +The package is divided into (currently) three sub-packages: + +* `chem` - chemistry routines like template extraction or reaction cleaning +* `data` - routines for manipulating various reaction data sources +* `pipeline` - routines for building and executing simple pipelines for modifying and analyzing reactions +* `routes` - routines for handling synthesis routes + +Auto-generated API documentation is available, as well as guides for common tasks. See the menu to the left. + +Installation +------------ + +For most users it is as simple as + +.. code-block:: + + pip install reaction-utils + + +`For developers`, first clone the repository using Git. + +Then execute the following commands in the root of the repository + +.. code-block:: + + conda env create -f env-dev.yml + conda activate rxn-env + poetry install + + +the `rxnutils` package is now installed in editable mode. + +Lastly, make sure to install pre-commits that are run on every commit + +.. code-block:: + + pre-commit install + + +Limitations +----------- + +* Some old RDKit wheels on pypi did not include the `Contrib` folder, preventing the usage of the `rdkit_RxnRoleAssignment` action +* The pipeline for the Open reaction database requires some additional dependencies, see the documentation for this pipeline +* Using the data piplines for the USPTO and Open reaction database requires you to setup a second python environment +* The RInChI capabilities are not supported on MacOS + + +.. toctree:: + :hidden: + + templates + uspto + ord + pipeline + routes + rxnutils \ No newline at end of file diff --git a/_sources/modules.rst.txt b/_sources/modules.rst.txt new file mode 100644 index 0000000..bce038b --- /dev/null +++ b/_sources/modules.rst.txt @@ -0,0 +1,7 @@ +rxnutils +======== + +.. toctree:: + :maxdepth: 4 + + rxnutils diff --git a/_sources/ord.rst.txt b/_sources/ord.rst.txt new file mode 100644 index 0000000..c27b383 --- /dev/null +++ b/_sources/ord.rst.txt @@ -0,0 +1,106 @@ +Open reaction database +======================= + +``rxnutils`` contain two pipelines that together imports and prepares the reaction data from the `Open reaction database `_ so that it can be used on modelling. + +It is a complete end-to-end pipeline that is designed to be transparent and reproducible. + +Pre-requisites +-------------- + +The reason the pipeline is divided into two blocks is because the dependencies of the atom-mapper package (``rxnmapper``) is incompatible with +the dependencies ``rxnutils`` package. Therefore, to be able to use to full pipeline, you need to setup two python environment. + +1. Install ``rxnutils`` according to the instructions in the `README`-file + +2. Install the ``ord-schema`` package in the `` rxnutils`` environment + + conda activate rxn-env + python -m pip install ord-schema + +3. Download/Clone the ``ord-data`` repository according to the instructions here: https://github.com/Open-Reaction-Database/ord-data + + git clone https://github.com/open-reaction-database/ord-data.git . + +Note down the path to the repository as this needs to be given to the preparation pipeline + +4. Install ``rxnmapper`` according to the instructions in the repo: https://github.com/rxn4chemistry/rxnmapper + + +.. code-block:: + + conda create -n rxnmapper python=3.6 -y + conda activate rxnmapper + conda install -c rdkit rdkit=2020.03.3.0 + python -m pip install rxnmapper + + +5. Install ``Metaflow`` and ``rxnutils`` in the new environment + + +.. code-block:: + + python -m pip install metaflow + python -m pip install --no-deps --ignore-requires-python . + + +Usage +----- + +Create a folder for the ORD data and in that folder execute this command in the ``rxnutils`` environment + + +.. code-block:: + + conda activate rxn-env + python -m rxnutils.data.ord.preparation_pipeline run --nbatches 200 --max-workers 8 --max-num-splits 200 --ord-data ORD_DATA_REPO_PATH + + +and then in the environment with the ``rxnmapper`` run + + +.. code-block:: + + conda activate rxnmapper + python -m rxnutils.data.mapping_pipeline run --data-prefix ord --nbatches 200 --max-workers 8 --max-num-splits 200 + + +The ``-max-workers`` flag should be set to the number of CPUs available. + +On 8 CPUs and 1 GPU the pipeline takes a couple of hours. + + +Artifacts +--------- + +The pipelines creates a number of `tab-separated` CSV files: + + * `ord_data.csv` is the imported ORD data + * `ord_data_cleaned.csv` is the cleaned and filter data + * `ord_data_mapped.csv` is the atom-mapped, modelling-ready data + + +The cleaning is done to be able to atom-map the reactions and are performing the following tasks: + * Ignore extended SMILES information in the SMILES strings + * Remove molecules not sanitizable by RDKit + * Remove reactions without any reactants or products + * Move all reagents to reactants + * Remove the existing atom-mapping + * Remove reactions with more than 200 atoms when summing reactants and products + +(the last is a requisite for ``rxnmapper`` that was trained on a maximum token size roughly corresponding to 200 atoms) + + +The ``ord_data_mapped.csv`` files will have the following columns: + + * ID - unique ID from the original database + * Dataset - the name of the dataset from which this is reaction is taken + * Date - the date of the experiment as given in the database + * ReactionSmiles - the original reaction SMILES + * Yield - the yield of the first product of the first outcome, if provided + * ReactionSmilesClean - the reaction SMILES after cleaning + * BadMolecules - molecules not sanitizable by RDKit + * ReactantSize - number of atoms in reactants + * ProductSize - number of atoms in products + * mapped_rxn - the mapped reaction SMILES + * confidence - the confidence of the mapping as provided by ``rxnmapper`` diff --git a/_sources/pipeline.rst.txt b/_sources/pipeline.rst.txt new file mode 100644 index 0000000..11431eb --- /dev/null +++ b/_sources/pipeline.rst.txt @@ -0,0 +1,140 @@ +Pipeline +======== + +``rxnutils`` provide a simple pipeline to perform simple tasks on reaction SMILES and templates in a CSV-file. + + +The pipeline works on `tab-separated` CSV files (TSV files) + + +Usage +----- + +To exemplify the pipeline capabilities, we will have a look at the pipeline used to clean the USPTO data. + +The input to the pipeline is a simple YAML-file that specifies each action to take. The actions will be executed +sequentially, one after the other and each action takes a number of input arguments. + +This is the YAML-file used to clean the USPTO data: + +.. code-block:: yaml + + trim_rxn_smiles: + in_column: ReactionSmiles + out_column: ReactionSmilesClean + remove_unsanitizable: + in_column: ReactionSmilesClean + out_column: ReactionSmilesClean + reagents2reactants: + in_column: ReactionSmilesClean + out_column: ReactionSmilesClean + remove_atom_mapping: + in_column: ReactionSmilesClean + out_column: ReactionSmilesClean + reactantsize: + in_column: ReactionSmilesClean + productsize: + in_column: ReactionSmilesClean + query_dataframe1: + query: "ReactantSize>0" + query_dataframe2: + query: "ProductSize>0" + query_dataframe3: + query: "ReactantSize+ProductSize<200" + + +The first action is called ``trim_rxn_smiles`` and two arguments are given: ``in_column`` specifying which column to use as input and ``out_column`` specifying which column +to use as output. + +The following actions ``remove_unsanitizable``, ``reagents2reactants``, ``remove_atom_mapping``, ``reactantsize``, ``productsize`` works the same way, but might use other columns to specified for output. + +The last three actions are actually the same action but executed with different arguments. They therefore have to be postfixed with 1, 2 and 3. +The action ``query_dataframe`` takes a ``query`` argument and removes a number of rows not matching the query. + +If we save this to ``clean_pipeline.yml`` and given that we have a tab-separated file with USPTO data called ``uspto_data.csv`` we can run the following command + +.. code-block:: + + python -m rxnutils.pipeline.runner --pipeline clean_pipeline.yml --data uspto_data.csv --output uspto_cleaned.csv + + +or we can alternatively run it from a python method like this + +.. code-block:: + + from rxnutils.pipeline.runner import main as validation_runner + + validation_runner( + [ + "--pipeline", + "clean_pipeline.yml", + "--data", + "uspto_data.csv", + "--output", + "uspto_cleaned.csv", + ] + ) + +Actions +------- + +To find out what actions are available, you can type + +.. code-block:: + + python -m rxnutils.pipeline.runner --list + +Development +----------- + +New actions can easily be added to the pipeline framework. All of the actions are implemented in one of four modules + + + * ``rxnutils.pipeline.actions.dataframe_mod`` - actions that modify the dataframe, e.g., removing rows or columns + * ``rxnutils.pipeline.actions.reaction_mod`` - actions that modify reaction SMILES + * ``rxnutils.pipeline.actions.dataframe_props`` - actions that compute properties from reaction SMILES + * ``rxnutils.pipeline.actions.templates`` - actions that process reaction templates + + +To exemplify, let's have a look at the ``productsize`` action + + +.. code-block:: python + + @action + @dataclass + class ProductSize: + """Action for counting product size""" + + pretty_name: ClassVar[str] = "productsize" + in_column: str + out_column: str = "ProductSize" + + def __call__(self, data: pd.DataFrame) -> pd.DataFrame: + smiles_col = global_apply(data, self._row_action, axis=1) + return data.assign(**{self.out_column: smiles_col}) + + def __str__(self) -> str: + return f"{self.pretty_name} (number of heavy atoms in product)" + + def _row_action(self, row: pd.Series) -> str: + _, _, products = row[self.in_column].split(">") + products_mol = Chem.MolFromSmiles(products) + + if products_mol: + product_atom_count = products_mol.GetNumHeavyAtoms() + else: + product_atom_count = 0 + + return product_atom_count + +The action is defined as a class ``ProductSize`` that has two class-decorators. +The first ``@action`` will register the action in a global action list and second ``@dataclass`` is dataclass decorator from the standard library. +The ``pretty_name`` class variable is used to identify the action in the pipeline, that is what you are specifying in the YAML-file. +The other two ``in_column`` and ``out_column`` are the arguments you can specify in the YAML file for executing the action, they can have default +values in case they don't need to be specified in the YAML file. + +When the action is executed by the pipeline the ``__call__`` method is invoked with the current Pandas dataframe as the only argument. This method +should return the modified dataframe. + +Lastly, it is nice to implement a ``__str__`` method which is used by the pipeline to print useful information about the action that is executed. diff --git a/_sources/routes.rst.txt b/_sources/routes.rst.txt new file mode 100644 index 0000000..ac7a0a6 --- /dev/null +++ b/_sources/routes.rst.txt @@ -0,0 +1,68 @@ +Routes +====== + +``rxnutils`` contains routines to analyse synthesis routes. There are a number of readers that can be used to read routes from a number of +formats, and there are routines to score the different routes. + +Reading +------- + +The simplest route format supported is a text file, where each reaction is written as a reaction SMILES in a line. +Routes are separated by new-line + +For instance: + +.. code-block:: + + CC(C)N.Clc1cccc(Nc2ccoc2)n1>>CC(C)Nc1cccc(Nc2ccoc2)n1 + Brc1ccoc1.Nc1cccc(Cl)n1>>Clc1cccc(Nc2ccoc2)n1 + + Nc1cccc(NC(C)C)n1.Brc1ccoc1>>CC(C)Nc1cccc(Nc2ccoc2)n1 + CC(C)N.Nc1cccc(Cl)n1>>Nc1cccc(NC(C)C)n1 + + +If this is saved to ``routes.txt``, these can be read into route objects with + +.. code-block:: + + from rxnutils.routes.readers import read_reaction_lists + routes = read_reaction_lists("reactions.txt") + + +If you have an environment with ``rxnmapper`` installed and the NextMove software ``namerxn`` in your PATH then you can +add atom-mapping and reaction classes to these routes with + +.. code-block:: + + # This can be set on the command-line as well + import os + os.environ["RXNMAPPER_ENV_PATH"] = "/home/username/miniconda/envs/rxnmapper/" + + for route in routes: + route.assign_atom_mapping(only_rxnmapper=True) + routes[1].remap(routes[0]) + + +The last line of code also make sure that the second route shares mapping with the first route. + + +Other readers are available + +* ``read_aizynthcli_dataframe`` - for reading routes from aizynthcli output dataframe +* ``read_reactions_dataframe`` - for reading routes stored as reactions in a dataframe + + +For instance, to read routes from a dataframe with reactions. You can do something like what follows. +The dataframe has column ``reaction_smiles`` that holds the reaction SMILES, and the individual routes +are identified by a ``target_smiles`` and ``route_id`` column. The dataframe also has a column ``classification``, +holding the NextMove classification. The dataframe is called ``data``. + +.. code-block:: + + from rxnutils.routes.readers import read_reactions_dataframe + routes = read_reactions_dataframe( + data, + "reaction_smiles", + group_by=["target_smiles", "route_id"], + metadata_columns=["classification"] + ) diff --git a/_sources/rxnutils.chem.features.rst.txt b/_sources/rxnutils.chem.features.rst.txt new file mode 100644 index 0000000..5343ba6 --- /dev/null +++ b/_sources/rxnutils.chem.features.rst.txt @@ -0,0 +1,29 @@ +rxnutils.chem.features package +============================== + +Submodules +---------- + +rxnutils.chem.features.rxnfp\_runner module +------------------------------------------- + +.. automodule:: rxnutils.chem.features.rxnfp_runner + :members: + :undoc-members: + :show-inheritance: + +rxnutils.chem.features.sc\_score module +--------------------------------------- + +.. automodule:: rxnutils.chem.features.sc_score + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.chem.features + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.chem.rinchi.rst.txt b/_sources/rxnutils.chem.rinchi.rst.txt new file mode 100644 index 0000000..565a824 --- /dev/null +++ b/_sources/rxnutils.chem.rinchi.rst.txt @@ -0,0 +1,29 @@ +rxnutils.chem.rinchi package +============================ + +Submodules +---------- + +rxnutils.chem.rinchi.download\_rinchi module +-------------------------------------------- + +.. automodule:: rxnutils.chem.rinchi.download_rinchi + :members: + :undoc-members: + :show-inheritance: + +rxnutils.chem.rinchi.rinchi\_api module +--------------------------------------- + +.. automodule:: rxnutils.chem.rinchi.rinchi_api + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.chem.rinchi + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.chem.rst.txt b/_sources/rxnutils.chem.rst.txt new file mode 100644 index 0000000..83d2c69 --- /dev/null +++ b/_sources/rxnutils.chem.rst.txt @@ -0,0 +1,62 @@ +rxnutils.chem package +===================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + rxnutils.chem.features + rxnutils.chem.rinchi + +Submodules +---------- + +rxnutils.chem.augmentation module +--------------------------------- + +.. automodule:: rxnutils.chem.augmentation + :members: + :undoc-members: + :show-inheritance: + +rxnutils.chem.cgr module +------------------------ + +.. automodule:: rxnutils.chem.cgr + :members: + :undoc-members: + :show-inheritance: + +rxnutils.chem.reaction module +----------------------------- + +.. automodule:: rxnutils.chem.reaction + :members: + :undoc-members: + :show-inheritance: + +rxnutils.chem.template module +----------------------------- + +.. automodule:: rxnutils.chem.template + :members: + :undoc-members: + :show-inheritance: + +rxnutils.chem.utils module +-------------------------- + +.. automodule:: rxnutils.chem.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.chem + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.data.ord.rst.txt b/_sources/rxnutils.data.ord.rst.txt new file mode 100644 index 0000000..6394e6b --- /dev/null +++ b/_sources/rxnutils.data.ord.rst.txt @@ -0,0 +1,29 @@ +rxnutils.data.ord package +========================= + +Submodules +---------- + +rxnutils.data.ord.import\_ord\_dataset module +--------------------------------------------- + +.. automodule:: rxnutils.data.ord.import_ord_dataset + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.ord.preparation\_pipeline module +---------------------------------------------- + +.. automodule:: rxnutils.data.ord.preparation_pipeline + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.data.ord + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.data.rst.txt b/_sources/rxnutils.data.rst.txt new file mode 100644 index 0000000..7d9b977 --- /dev/null +++ b/_sources/rxnutils.data.rst.txt @@ -0,0 +1,54 @@ +rxnutils.data package +===================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + rxnutils.data.ord + rxnutils.data.uspto + +Submodules +---------- + +rxnutils.data.base\_pipeline module +----------------------------------- + +.. automodule:: rxnutils.data.base_pipeline + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.batch\_utils module +--------------------------------- + +.. automodule:: rxnutils.data.batch_utils + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.mapping module +---------------------------- + +.. automodule:: rxnutils.data.mapping + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.mapping\_pipeline module +-------------------------------------- + +.. automodule:: rxnutils.data.mapping_pipeline + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.data + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.data.uspto.rst.txt b/_sources/rxnutils.data.uspto.rst.txt new file mode 100644 index 0000000..9a660d2 --- /dev/null +++ b/_sources/rxnutils.data.uspto.rst.txt @@ -0,0 +1,45 @@ +rxnutils.data.uspto package +=========================== + +Submodules +---------- + +rxnutils.data.uspto.combine module +---------------------------------- + +.. automodule:: rxnutils.data.uspto.combine + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.uspto.download module +----------------------------------- + +.. automodule:: rxnutils.data.uspto.download + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.uspto.preparation\_pipeline module +------------------------------------------------ + +.. automodule:: rxnutils.data.uspto.preparation_pipeline + :members: + :undoc-members: + :show-inheritance: + +rxnutils.data.uspto.uspto\_yield module +--------------------------------------- + +.. automodule:: rxnutils.data.uspto.uspto_yield + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.data.uspto + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.pipeline.actions.rst.txt b/_sources/rxnutils.pipeline.actions.rst.txt new file mode 100644 index 0000000..4f89310 --- /dev/null +++ b/_sources/rxnutils.pipeline.actions.rst.txt @@ -0,0 +1,45 @@ +rxnutils.pipeline.actions package +================================= + +Submodules +---------- + +rxnutils.pipeline.actions.dataframe\_mod module +----------------------------------------------- + +.. automodule:: rxnutils.pipeline.actions.dataframe_mod + :members: + :undoc-members: + :show-inheritance: + +rxnutils.pipeline.actions.reaction\_mod module +---------------------------------------------- + +.. automodule:: rxnutils.pipeline.actions.reaction_mod + :members: + :undoc-members: + :show-inheritance: + +rxnutils.pipeline.actions.reaction\_props module +------------------------------------------------ + +.. automodule:: rxnutils.pipeline.actions.reaction_props + :members: + :undoc-members: + :show-inheritance: + +rxnutils.pipeline.actions.templates module +------------------------------------------ + +.. automodule:: rxnutils.pipeline.actions.templates + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.pipeline.actions + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.pipeline.rst.txt b/_sources/rxnutils.pipeline.rst.txt new file mode 100644 index 0000000..1a83a29 --- /dev/null +++ b/_sources/rxnutils.pipeline.rst.txt @@ -0,0 +1,37 @@ +rxnutils.pipeline package +========================= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + rxnutils.pipeline.actions + +Submodules +---------- + +rxnutils.pipeline.base module +----------------------------- + +.. automodule:: rxnutils.pipeline.base + :members: + :undoc-members: + :show-inheritance: + +rxnutils.pipeline.runner module +------------------------------- + +.. automodule:: rxnutils.pipeline.runner + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.pipeline + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.routes.deepset.rst.txt b/_sources/rxnutils.routes.deepset.rst.txt new file mode 100644 index 0000000..ef115a2 --- /dev/null +++ b/_sources/rxnutils.routes.deepset.rst.txt @@ -0,0 +1,29 @@ +rxnutils.routes.deepset package +=============================== + +Submodules +---------- + +rxnutils.routes.deepset.featurizers module +------------------------------------------ + +.. automodule:: rxnutils.routes.deepset.featurizers + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.deepset.scoring module +-------------------------------------- + +.. automodule:: rxnutils.routes.deepset.scoring + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.routes.deepset + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.routes.retro_bleu.rst.txt b/_sources/rxnutils.routes.retro_bleu.rst.txt new file mode 100644 index 0000000..0ca6319 --- /dev/null +++ b/_sources/rxnutils.routes.retro_bleu.rst.txt @@ -0,0 +1,29 @@ +rxnutils.routes.retro\_bleu package +=================================== + +Submodules +---------- + +rxnutils.routes.retro\_bleu.ngram\_collection module +---------------------------------------------------- + +.. automodule:: rxnutils.routes.retro_bleu.ngram_collection + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.retro\_bleu.scoring module +------------------------------------------ + +.. automodule:: rxnutils.routes.retro_bleu.scoring + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.routes.retro_bleu + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.routes.rst.txt b/_sources/rxnutils.routes.rst.txt new file mode 100644 index 0000000..b922473 --- /dev/null +++ b/_sources/rxnutils.routes.rst.txt @@ -0,0 +1,64 @@ +rxnutils.routes package +======================= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + rxnutils.routes.deepset + rxnutils.routes.retro_bleu + rxnutils.routes.ted + rxnutils.routes.utils + +Submodules +---------- + +rxnutils.routes.base module +--------------------------- + +.. automodule:: rxnutils.routes.base + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.comparison module +--------------------------------- + +.. automodule:: rxnutils.routes.comparison + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.image module +---------------------------- + +.. automodule:: rxnutils.routes.image + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.readers module +------------------------------ + +.. automodule:: rxnutils.routes.readers + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.scoring module +------------------------------ + +.. automodule:: rxnutils.routes.scoring + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.routes + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.routes.ted.rst.txt b/_sources/rxnutils.routes.ted.rst.txt new file mode 100644 index 0000000..6cf3084 --- /dev/null +++ b/_sources/rxnutils.routes.ted.rst.txt @@ -0,0 +1,37 @@ +rxnutils.routes.ted package +=========================== + +Submodules +---------- + +rxnutils.routes.ted.distances\_calculator module +------------------------------------------------ + +.. automodule:: rxnutils.routes.ted.distances_calculator + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.ted.reactiontree module +--------------------------------------- + +.. automodule:: rxnutils.routes.ted.reactiontree + :members: + :undoc-members: + :show-inheritance: + +rxnutils.routes.ted.utils module +-------------------------------- + +.. automodule:: rxnutils.routes.ted.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.routes.ted + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.routes.utils.rst.txt b/_sources/rxnutils.routes.utils.rst.txt new file mode 100644 index 0000000..4ccc8d7 --- /dev/null +++ b/_sources/rxnutils.routes.utils.rst.txt @@ -0,0 +1,21 @@ +rxnutils.routes.utils package +============================= + +Submodules +---------- + +rxnutils.routes.utils.validation module +--------------------------------------- + +.. automodule:: rxnutils.routes.utils.validation + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: rxnutils.routes.utils + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/rxnutils.rst.txt b/_sources/rxnutils.rst.txt new file mode 100644 index 0000000..be04fc9 --- /dev/null +++ b/_sources/rxnutils.rst.txt @@ -0,0 +1,21 @@ +rxnutils package +================ + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + rxnutils.chem + rxnutils.data + rxnutils.pipeline + rxnutils.routes + +Module contents +--------------- + +.. automodule:: rxnutils + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/templates.rst.txt b/_sources/templates.rst.txt new file mode 100644 index 0000000..570a195 --- /dev/null +++ b/_sources/templates.rst.txt @@ -0,0 +1,104 @@ +Templates +========= + +`reaction utils` contains routines for extracting reaction templates using the `RDchiral` package. +This code is based on the work of Thakkar et al. (Chem. Sci., 2019) but with some re-factoring and +other additions. + +Template extraction +------------------- + +Let's start with this atom-mapped reaction + +.. image:: sample_reaction.PNG + +.. code-block:: + + CCN(CC)CC.CCOCC.Cl[S:3]([CH2:2][CH3:1])(=[O:4])=[O:5].[OH:6][CH2:7][CH2:8][Br:9]>>[CH3:1][CH2:2][S:3](=[O:4])(=[O:5])[O:6][CH2:7][CH2:8][Br:9] + + +First we create a ``ChemicalReaction`` object that is encapsulating the reaction and provides some +simple curation routines. + + +.. code-block:: + + from rxnutils.chem.reaction import ChemicalReaction + + reaction = "CCN(CC)CC.CCOCC.Cl[S:3]([CH2:2][CH3:1])(=[O:4])=[O:5].[OH:6][CH2:7][CH2:8][Br:9]>>[CH3:1][CH2:2][S:3](=[O:4])(=[O:5])[O:6][CH2:7][CH2:8][Br:9]" + rxn = ChemicalReaction(reaction) + +if you inspect the ``reactants_list`` property, you will see that two of the reactants from the reaction +SMILES have been moved to the list of agents because they are not mapped. + + +.. code-block:: + + rxn.reactants_list + >> ['Cl[S:3]([CH2:2][CH3:1])(=[O:4])=[O:5]', '[OH:6][CH2:7][CH2:8][Br:9]'] + + rxn.agents_list + >> ['CCN(CC)CC', 'CCOCC'] + + +Now we can extract a reaction template + + +.. code-block:: + + rxn.generate_reaction_template(radius=1) + + rxn.retro_template + >> + + rxn.retro_template.smarts + >> '[C:2]-[S;H0;D4;+0:1](=[O;D1;H0:3])(=[O;D1;H0:4])-[O;H0;D2;+0:6]-[C:5]>>Cl-[S;H0;D4;+0:1](-[C:2])(=[O;D1;H0:3])=[O;D1;H0:4].[C:5]-[OH;D1;+0:6]' + + +The ``radius`` is an optional argument, specifying the radius of the template. + + +Template manipulation +--------------------- + +The reaction template, either the canonical (forward) or retro template is encapulsated in a +`ReactionTemplate` object that can be used to apply the template to a molecule or to generate +fingerprints or hash strings. + +Let's see if the template generated above is capable of re-generating the expected reactants. + +.. code-block:: + + smiles="CCS(=O)(=O)OCCBr" + reactant_list = rxn.retro_template.apply(smiles) + reactant_list + >> (('CCS(=O)(=O)Cl', 'OCCBr'),) + +we see that returned list (technically a tuple) contains one item, implying that the template +was specific and only produced one set of reactants. These reactants as you see are identical +to the reactants in the reaction SMILES above. + +To create a hash string for the template, there are a number of routines + +.. code-block:: + + rxn.retro_template.hash_from_bits() + >> 'a1727cc9ed68a6411bfd02873c1615c22baa1af4957f14ae942e2c85caf9adb5' + + rxn.retro_template.hash_from_smarts() + >> '4cb9be0738a3a84e7ed4fb661d2efb73c099fc7d6c532a4b294c8d0d' + + rxn.retro_template.hash_from_smiles() + >> '5b2ff2a69fb7bd6a032938e468684773bcc668928b037bbec0ac8335' + +The first one is creating the hash string from the fingerprint bits that are one, whereas the +other two creates it by hashing the SMARTS and the SMILES string, respectively. + + +A Morgan fingerprint can be computed for a reaction template: + +.. code-block:: + + rxn.retro_template.fingerprint_vector(radius=2, nbits=1024) + >> array([0., 0., 0., ..., 0., 0., 0.]) + diff --git a/_sources/uspto.rst.txt b/_sources/uspto.rst.txt new file mode 100644 index 0000000..840076b --- /dev/null +++ b/_sources/uspto.rst.txt @@ -0,0 +1,94 @@ +USPTO +===== + +``rxnutils`` contain two pipelines that together downloads and prepares the USPTO reaction data so that it can be used on modelling. + +It is a complete end-to-end pipeline that is designed to be transparent and reproducible. + +Pre-requisites +-------------- + +The reason the pipeline is divided into two blocks is because the dependencies of the atom-mapper package (``rxnmapper``) is incompatible with +the dependencies ``rxnutils`` package. Therefore, to be able to use to full pipeline, you need to setup two python environment. + +1. Install ``rxnutils`` according to the instructions in the `README`-file + +2. Install ``rxnmapper`` according to the instructions in the repo: https://github.com/rxn4chemistry/rxnmapper + + +.. code-block:: + + conda create -n rxnmapper python=3.6 -y + conda activate rxnmapper + conda install -c rdkit rdkit=2020.03.3.0 + python -m pip install rxnmapper + + +3. Install ``Metaflow`` and ``rxnutils`` in the new environment + + +.. code-block:: + + python -m pip install metaflow + python -m pip install --no-deps --ignore-requires-python . + + +Usage +----- + +Create a folder for the USPTO data and in that folder execute this command in the ``rxnutils`` environment + + +.. code-block:: + + conda activate rxn-env + python -m rxnutils.data.uspto.preparation_pipeline run --nbatches 200 --max-workers 8 --max-num-splits 200 + + +and then in the environment with the ``rxnmapper`` run + + +.. code-block:: + + conda activate rxnmapper + python -m rxnutils.data.mapping_pipeline run --data-prefix uspto --nbatches 200 --max-workers 8 --max-num-splits 200 + + +The ``-max-workers`` flag should be set to the number of CPUs available. + +On 8 CPUs and 1 GPU the pipeline takes a couple of hours. + + +Artifacts +--------- + +The pipelines creates a number of `tab-separated` CSV files: + + * `1976_Sep2016_USPTOgrants_smiles.rsmi` and `2001_Sep2016_USPTOapplications_smiles.rsmi` is the original USPTO data downloaded from Figshare + * `uspto_data.csv` is the combined USPTO data, with selected columns and a unique ID for each reaction + * `uspto_data_cleaned.csv` is the cleaned and filter data + * `uspto_data_mapped.csv` is the atom-mapped, modelling-ready data + + +The cleaning is done to be able to atom-map the reactions and are performing the following tasks: + * Ignore extended SMILES information in the SMILES strings + * Remove molecules not sanitizable by RDKit + * Remove reactions without any reactants or products + * Move all reagents to reactants + * Remove the existing atom-mapping + * Remove reactions with more than 200 atoms when summing reactants and products + +(the last is a requisite for ``rxnmapper`` that was trained on a maximum token size roughly corresponding to 200 atoms) + + +The ``uspo_data_mapped.csv`` files will have the following columns: + + * ID - unique ID created by concatenated patent number, paragraph and row index in the original data file + * Year - the year of the patent filing + * ReactionSmiles - the original reaction SMILES + * ReactionSmilesClean - the reaction SMILES after cleaning + * BadMolecules - molecules not sanitizable by RDKit + * ReactantSize - number of atoms in reactants + * ProductSize - number of atoms in products + * mapped_rxn - the mapped reaction SMILES + * confidence - the confidence of the mapping as provided by ``rxnmapper`` diff --git a/_static/alabaster.css b/_static/alabaster.css new file mode 100644 index 0000000..75b472a --- /dev/null +++ b/_static/alabaster.css @@ -0,0 +1,714 @@ +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar { + max-height: 100%; + overflow-y: auto; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 160px; +} + +div.sphinxsidebar .search > div { + display: table-cell; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin-left: 0; + margin-right: 0; + margin-top: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: -20px -30px 20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} +@media screen and (min-width: 876px) { + div.sphinxsidebar { + position: fixed; + margin-left: 0; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Hide ugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} \ No newline at end of file diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 0000000..e5179b7 --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: inherit; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/custom.css b/_static/custom.css new file mode 100644 index 0000000..2a924f1 --- /dev/null +++ b/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 0000000..4d67807 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 0000000..a46edcb --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '1.8.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 0000000000000000000000000000000000000000..a858a410e4faa62ce324d814e4b816fff83a6fb3 GIT binary patch literal 286 zcmV+(0pb3MP)s`hMrGg#P~ix$^RISR_I47Y|r1 z_CyJOe}D1){SET-^Amu_i71Lt6eYfZjRyw@I6OQAIXXHDfiX^GbOlHe=Ae4>0m)d(f|Me07*qoM6N<$f}vM^LjV8( literal 0 HcmV?d00001 diff --git a/_static/language_data.js b/_static/language_data.js new file mode 100644 index 0000000..367b8ed --- /dev/null +++ b/_static/language_data.js @@ -0,0 +1,199 @@ +/* + * language_data.js + * ~~~~~~~~~~~~~~~~ + * + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; + + +/* Non-minified version is copied as a separate JS file, if available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..d96755fdaf8bb2214971e0db9c1fd3077d7c419d GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^+#t*WBp7;*Yy1LIik>cxAr*|t7R?Mi>2?kWtu=nj kDsEF_5m^0CR;1wuP-*O&G^0G}KYk!hp00i_>zopr08q^qX#fBK literal 0 HcmV?d00001 diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 0000000000000000000000000000000000000000..7107cec93a979b9a5f64843235a16651d563ce2d GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^+#t*WBp7;*Yy1LIik>cxAr*|t7R?Mi>2?kWtu>-2 m3q%Vub%g%s<8sJhVPMczOq}xhg9DJoz~JfX=d#Wzp$Pyb1r*Kz literal 0 HcmV?d00001 diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 0000000..04a4174 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,84 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #004461; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #582800 } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902 } /* Comment.Preproc */ +.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .ges { color: #000000 } /* Generic.EmphStrong */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #745334 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #990000 } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #004461 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #888888 } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */ +.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ +.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ +.highlight .mb { color: #990000 } /* Literal.Number.Bin */ +.highlight .mf { color: #990000 } /* Literal.Number.Float */ +.highlight .mh { color: #990000 } /* Literal.Number.Hex */ +.highlight .mi { color: #990000 } /* Literal.Number.Integer */ +.highlight .mo { color: #990000 } /* Literal.Number.Oct */ +.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 0000000..b08d58c --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,620 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score + boost, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 0000000..8a96c69 --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/genindex.html b/genindex.html new file mode 100644 index 0000000..41d428d --- /dev/null +++ b/genindex.html @@ -0,0 +1,1720 @@ + + + + + + + Index — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ + +

Index

+ +
+ A + | B + | C + | D + | E + | F + | G + | H + | I + | J + | K + | L + | M + | N + | O + | P + | Q + | R + | S + | T + | U + | V + | W + +
+

A

+ + + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

J

+ + + +
+ +

K

+ + + +
+ +

L

+ + + +
+ +

M

+ + + +
+ +

N

+ + + +
+ +

O

+ + + +
+ +

P

+ + + +
+ +

Q

+ + + +
+ +

R

+ + + +
    +
  • + rxnutils.chem.template + +
  • +
  • + rxnutils.chem.utils + +
  • +
  • + rxnutils.data + +
  • +
  • + rxnutils.data.base_pipeline + +
  • +
  • + rxnutils.data.batch_utils + +
  • +
  • + rxnutils.data.mapping + +
  • +
  • + rxnutils.data.mapping_pipeline + +
  • +
  • + rxnutils.data.ord + +
  • +
  • + rxnutils.data.ord.import_ord_dataset + +
  • +
  • + rxnutils.data.ord.preparation_pipeline + +
  • +
  • + rxnutils.data.uspto + +
  • +
  • + rxnutils.data.uspto.combine + +
  • +
  • + rxnutils.data.uspto.download + +
  • +
  • + rxnutils.data.uspto.preparation_pipeline + +
  • +
  • + rxnutils.data.uspto.uspto_yield + +
  • +
  • + rxnutils.pipeline + +
  • +
  • + rxnutils.pipeline.actions + +
  • +
  • + rxnutils.pipeline.actions.dataframe_mod + +
  • +
  • + rxnutils.pipeline.actions.reaction_mod + +
  • +
  • + rxnutils.pipeline.actions.reaction_props + +
  • +
  • + rxnutils.pipeline.actions.templates + +
  • +
  • + rxnutils.pipeline.base + +
  • +
  • + rxnutils.pipeline.runner + +
  • +
  • + rxnutils.routes + +
  • +
  • + rxnutils.routes.base + +
  • +
  • + rxnutils.routes.comparison + +
  • +
  • + rxnutils.routes.deepset + +
  • +
  • + rxnutils.routes.deepset.featurizers + +
  • +
  • + rxnutils.routes.deepset.scoring + +
  • +
  • + rxnutils.routes.image + +
  • +
  • + rxnutils.routes.readers + +
  • +
  • + rxnutils.routes.retro_bleu + +
  • +
  • + rxnutils.routes.retro_bleu.ngram_collection + +
  • +
  • + rxnutils.routes.retro_bleu.scoring + +
  • +
  • + rxnutils.routes.scoring + +
  • +
  • + rxnutils.routes.ted + +
  • +
  • + rxnutils.routes.ted.distances_calculator + +
  • +
  • + rxnutils.routes.ted.reactiontree + +
  • +
  • + rxnutils.routes.ted.utils + +
  • +
  • + rxnutils.routes.utils + +
  • +
  • + rxnutils.routes.utils.validation + +
  • +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

V

+ + +
+ +

W

+ + +
+ + + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..a246819 --- /dev/null +++ b/index.html @@ -0,0 +1,153 @@ + + + + + + + + rxnutils documentation — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils documentation

+

rxnutils is a collection of routines for working with reactions, reaction templates and template extraction

+
+

Introduction

+

The package is divided into (currently) three sub-packages:

+
    +
  • chem - chemistry routines like template extraction or reaction cleaning

  • +
  • data - routines for manipulating various reaction data sources

  • +
  • pipeline - routines for building and executing simple pipelines for modifying and analyzing reactions

  • +
  • routes - routines for handling synthesis routes

  • +
+

Auto-generated API documentation is available, as well as guides for common tasks. See the menu to the left.

+
+
+

Installation

+

For most users it is as simple as

+
pip install reaction-utils
+
+
+

For developers, first clone the repository using Git.

+

Then execute the following commands in the root of the repository

+
conda env create -f env-dev.yml
+conda activate rxn-env
+poetry install
+
+
+

the rxnutils package is now installed in editable mode.

+

Lastly, make sure to install pre-commits that are run on every commit

+
pre-commit install
+
+
+
+
+

Limitations

+
    +
  • Some old RDKit wheels on pypi did not include the Contrib folder, preventing the usage of the rdkit_RxnRoleAssignment action

  • +
  • The pipeline for the Open reaction database requires some additional dependencies, see the documentation for this pipeline

  • +
  • Using the data piplines for the USPTO and Open reaction database requires you to setup a second python environment

  • +
  • The RInChI capabilities are not supported on MacOS

  • +
+
+
+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/modules.html b/modules.html new file mode 100644 index 0000000..217232e --- /dev/null +++ b/modules.html @@ -0,0 +1,160 @@ + + + + + + + + rxnutils — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000000000000000000000000000000000000..78ada7e1df814909708c34794078ff3f9af6bdc6 GIT binary patch literal 4287 zcmV;w5J2xEAX9K?X>NERX>N99Zgg*Qc_4OWa&u{KZXhxWBOp+6Z)#;@bUGkXWnp7< zX>V>-bZKmJ3L_v^WpZ8b#rNMXCQiPX<{x4c-qBX%W~tm72W$QT$OB_m6_%2y5*jXYsT%4 z<*rm#D2Rk4#3aA~pl$Wn2O#(WCB94oR~uU*sdFxHE-o$}B*i-`6iwxAe)=urNs*G< zf82`dV02Vj`Zs&{)8B7D-83iSBgy)IV$O{JF2cnjBTQjMIr9P%Ny-i>L4x2|VW!YI z!@gi~`T3VVj!W?PAQl^@e;aK$O9+!B`KQ47@yVD~SrVsM$`6<^02S@@VTpEvzmO6) z7d$6IoxDNEN6Zc+34*=nBJ&QNP^q<#2~xb&j;JF~Jm4y>aEfB>PDIEhHtz{mg&=ao zqv}g0T&uZEAKvFk6pRrO2sX+v9dA2b^buGYBN=l+JX%^qM%&G{hVE}#Q&tM6aV~1_ zH9)k{-)M}}#m#*XDZ&TseiEhH#g};CFmQ|+XXXe}B+FB*NN9Ydi$a9?zzY@gjC{PY z4%0Q*#wW^33xZx>(y26GEJrL+j)kJS(lVUqx@+?ce<*56baXovG_;>LZcUQ@(W)lWFcxr5G8n^u+_y58nVu) zBuR-r@k*6fmk;4Pt<#{C+aMJLTpqdb>^l-Os_4&he4t|iiC){_hLjWN2tFc;?;i7FlLG!wiN^Q{oj{BrjCgG)`&KP8u!4 zt}!3D?q^L?SnR^*ND)@L@RYq`K~2iz(MStjb$^t2hxQ8SvEhwkuWoof=J5~m7fRaLDpjOe1-bfUIu1=xXkPIHn{M*N^eclyv5edPC)zxAf0E#gO@qCHO&+xzs6 zN*AKC9ag$#r6=6)g5+3~S-r8h1b-B?<&M`~)1|y1jw$t_^r#}0< zc&14WTr6LGL+aciKOrmxKKX{0S|%-ChP4>)-oS0N_gE9mc-CqZZC27+wFJ#gznA!5 z_50DewHf^DBj7nu^z_ai?6E~5U;=M-PnJZ|PbD@y_h|DobQ~=272Gk(;L*{JuOMvFw8pbiS3nzVpMJ`cNEQScE~QCS~3a&+mpIo*l;hGtUa< z-f71}x_7#{f!#at>}czsc_QY{AT0l)6D6si;N;+0yZ>W8ZVG`1_i`>UwFf$iaT?pR zDCTLAvDK|?f{+&qh)I!m<)LWf@x5`kL7AH??1Z75z^Sg9k5^j17k08V35y=x37&7t z%9Ooc*-x~PA&Oh3Ufuk%=_sPq2{D|Jz>IfAp3)ds%S3@Hu_cMjMmCtbbV%W<^NGKO ztVjbNQI?o;aRF43B`Hi5{z*vSHtjF~v}u7-<>{7NF5F96rw`>)TU&5;AQoxAUVVse@dS(Pv?x9E(1(46>xmNki zC@_A3a-R;f9)6k)Lm{Y}tuP@*0xo#;S@G-v=g;_XM`g?zBjvd*RsQ zPI*`EQGIat5c>DRGZF~5JEwfnLmDKxnXs%TOJR5+BHKA9h~wOszPl~ADu(eImjS|M zI(!hibqHZZlU(tf+_QZs%~}Ew$y_@78I&_Cw}%OGAn!1QAa3dKL3?E+i(TmY{H6=@ z^v=RGfC?PK`D-ecA^i(Lx)_X$=gopoSRxQV|JK~J5jfxKAp&v89$JWi)yE4W=+oVw zRB88l;=!csP(X;-C4`W#%LpS}{a}-4{$w9C6iU8JA`lUKXhEdx;e`^kWGi{C3Bd$C zCjt`mf)+^73tk{W&8=|N)JVO{J%pTRG%#YGlfp=O&I%~x*LU4R1F3n=1t;kRGn}p$ z)PUmJ8H{j~3g;|vf;yaVQaYr7BK~02BV)f;Pr?hSq?goi%3gAV3S2)nZI_a; z;yOgp4kuu>>+%9RluHZgOfD~sBiY*o?Oo{s+^2>I5w9Twk*r~Z70NslIx9b!$Gc{j z1zgVDnnyg0K0Vnl1%#J$2}A8W8=(YomuEpU?K0cu*;D?N>rg-_*Cm8#<6TC0;iBs4 zD%I`<%92p4DCPlcGTiQ{5T3ii=~$=OQ|rfn}fl+e6jYQwXfvoN#gy);0=o{`!NDnZRN;;&~y`$YDu z+F;*jaRn2uDZy3i{)&|j8BxBbBnuu-Y7)R`(oh0*4joP)0sp`<B*DY7$j7;wFOg3y^7mRBh;q~5*!*Oojg zpVAw?1|IPH6J-ZGUJ2!A9TJ!@(xrs)rYD zuj|#o8%_8d9RId@t3W^xGZdg+RT9Dk3YQVecgxq&)oT~J+c^f)?}7P_hm)!U#OV4^A07HcslVjYf29|2`8Sz0VJNw2qd0M2`HZ73)=D=4mj}|MmX^rNZ9p#&{g)i!#xPQ*QHGGwmw5sK4b@{ZF2i9KNikn|H)T*DD$;GKrOWLFSf!tOup z=e~--_MQnKfh)3W2wYQNL*SbG3IabCO45XcyZd005?<_c1K=e;w*XvtL2NEB!wcR} zK?~gyLkrw8Ur*S`z6=-H8z&`L`TxLjbEE>N)e{iHI@mcIq>o*2L%P`oIjEHcphYmn`J=;!KdfV);E znF2Y>G;h#5CT7qFy=h_|f3W)|rs;#Xndpfq!E5FxQmO5;OPj$Jk@uXKr*7xLgUf9AHKwc3rFr^6FxxG<7vtNBroPwU&W4H0Nm1kp&D0xm-jcW!OcadS zo%*Xh-olK&FL=H+=3nPk!5@SZx@Q@Ai!@vgsqV0+4K0;FYWDfSWeiv>g zPNX5|fg!AThO+i4dzUW02)stE`*<@_7;8sMNaCY*6pwf`!*=h4Cpa_ZnURFr&ZS^V zh5`2pE0N@BweaBwG9`HLz4#jR)n~bDSLNId_hx8IggUK7XHt>eD`L~8%&V{bRYL>I z4gzN~0I=^EAc&T31)R0#SIXieeIcizeqsts4dpd;}< zM|T)D*J$Y^YM4BBDZhK{cv_{v0~jdqsFi$A;jV&0>7EMVo90%nrWRw zx)L+1-cx}T_hDiUCmTGu6i_#xWGcK(X<1=3O;P?T>XFV0lgj@H)1M|`h*OFZ_jS>} zfcNIHc|r$|Sb2dJ$zF$_)Q^o#Y-{F6yg^DI)u{wWyOb28-qT(-!;zXx%LEoxogv?K4hhU&JOP(B8a(L-N^+sd;!$n2(R)w>vq^bM2XoEPNIM9yIk9AH-*66* z)vBAg@5Oo-uvvw9)?fZDh94fk#M(aartT1}JY+DodE`COg+t(dwarK}pOBxt66o;H9P51D|vKdBfSB9#%Dt3$!Rc(lil-t@DygTn$-` z6V{?`wO1!tB)_*aG&4s2Gr^7W+F~^^f%0**=*#2tA5%Ho0@#PgzrJpM{PlGk0Q>3d z=gsr|2D + + + + + + + Open reaction database — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

Open reaction database

+

rxnutils contain two pipelines that together imports and prepares the reaction data from the Open reaction database so that it can be used on modelling.

+

It is a complete end-to-end pipeline that is designed to be transparent and reproducible.

+
+

Pre-requisites

+

The reason the pipeline is divided into two blocks is because the dependencies of the atom-mapper package (rxnmapper) is incompatible with +the dependencies rxnutils package. Therefore, to be able to use to full pipeline, you need to setup two python environment.

+
    +
  1. Install rxnutils according to the instructions in the README-file

  2. +
  3. Install the ord-schema package in the `` rxnutils`` environment

    +
    +

    conda activate rxn-env +python -m pip install ord-schema

    +
    +
  4. +
  5. Download/Clone the ord-data repository according to the instructions here: https://github.com/Open-Reaction-Database/ord-data

    +
    +
    +
  6. +
+

Note down the path to the repository as this needs to be given to the preparation pipeline

+
    +
  1. Install rxnmapper according to the instructions in the repo: https://github.com/rxn4chemistry/rxnmapper

  2. +
+
conda create -n rxnmapper python=3.6 -y
+conda activate rxnmapper
+conda install -c rdkit rdkit=2020.03.3.0
+python -m pip install rxnmapper
+
+
+
    +
  1. Install Metaflow and rxnutils in the new environment

  2. +
+
python -m pip install metaflow
+python -m pip install --no-deps --ignore-requires-python .
+
+
+
+
+

Usage

+

Create a folder for the ORD data and in that folder execute this command in the rxnutils environment

+
conda activate rxn-env
+python -m rxnutils.data.ord.preparation_pipeline run --nbatches 200  --max-workers 8 --max-num-splits 200 --ord-data ORD_DATA_REPO_PATH
+
+
+

and then in the environment with the rxnmapper run

+
conda activate rxnmapper
+python -m rxnutils.data.mapping_pipeline run --data-prefix ord --nbatches 200  --max-workers 8 --max-num-splits 200
+
+
+

The -max-workers flag should be set to the number of CPUs available.

+

On 8 CPUs and 1 GPU the pipeline takes a couple of hours.

+
+
+

Artifacts

+

The pipelines creates a number of tab-separated CSV files:

+
+
    +
  • ord_data.csv is the imported ORD data

  • +
  • ord_data_cleaned.csv is the cleaned and filter data

  • +
  • ord_data_mapped.csv is the atom-mapped, modelling-ready data

  • +
+
+
+
The cleaning is done to be able to atom-map the reactions and are performing the following tasks:
    +
  • Ignore extended SMILES information in the SMILES strings

  • +
  • Remove molecules not sanitizable by RDKit

  • +
  • Remove reactions without any reactants or products

  • +
  • Move all reagents to reactants

  • +
  • Remove the existing atom-mapping

  • +
  • Remove reactions with more than 200 atoms when summing reactants and products

  • +
+
+
+

(the last is a requisite for rxnmapper that was trained on a maximum token size roughly corresponding to 200 atoms)

+

The ord_data_mapped.csv files will have the following columns:

+
+
    +
  • ID - unique ID from the original database

  • +
  • Dataset - the name of the dataset from which this is reaction is taken

  • +
  • Date - the date of the experiment as given in the database

  • +
  • ReactionSmiles - the original reaction SMILES

  • +
  • Yield - the yield of the first product of the first outcome, if provided

  • +
  • ReactionSmilesClean - the reaction SMILES after cleaning

  • +
  • BadMolecules - molecules not sanitizable by RDKit

  • +
  • ReactantSize - number of atoms in reactants

  • +
  • ProductSize - number of atoms in products

  • +
  • mapped_rxn - the mapped reaction SMILES

  • +
  • confidence - the confidence of the mapping as provided by rxnmapper

  • +
+
+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/pipeline.html b/pipeline.html new file mode 100644 index 0000000..777741e --- /dev/null +++ b/pipeline.html @@ -0,0 +1,231 @@ + + + + + + + + Pipeline — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

Pipeline

+

rxnutils provide a simple pipeline to perform simple tasks on reaction SMILES and templates in a CSV-file.

+

The pipeline works on tab-separated CSV files (TSV files)

+
+

Usage

+

To exemplify the pipeline capabilities, we will have a look at the pipeline used to clean the USPTO data.

+

The input to the pipeline is a simple YAML-file that specifies each action to take. The actions will be executed +sequentially, one after the other and each action takes a number of input arguments.

+

This is the YAML-file used to clean the USPTO data:

+
trim_rxn_smiles:
+    in_column: ReactionSmiles
+    out_column: ReactionSmilesClean
+remove_unsanitizable:
+    in_column: ReactionSmilesClean
+    out_column: ReactionSmilesClean
+reagents2reactants:
+    in_column: ReactionSmilesClean
+    out_column: ReactionSmilesClean
+remove_atom_mapping:
+    in_column: ReactionSmilesClean
+    out_column: ReactionSmilesClean
+reactantsize:
+    in_column: ReactionSmilesClean
+productsize:
+    in_column: ReactionSmilesClean
+query_dataframe1:
+    query: "ReactantSize>0"
+query_dataframe2:
+    query: "ProductSize>0"
+query_dataframe3:
+    query: "ReactantSize+ProductSize<200"
+
+
+

The first action is called trim_rxn_smiles and two arguments are given: in_column specifying which column to use as input and out_column specifying which column +to use as output.

+

The following actions remove_unsanitizable, reagents2reactants, remove_atom_mapping, reactantsize, productsize works the same way, but might use other columns to specified for output.

+

The last three actions are actually the same action but executed with different arguments. They therefore have to be postfixed with 1, 2 and 3. +The action query_dataframe takes a query argument and removes a number of rows not matching the query.

+

If we save this to clean_pipeline.yml and given that we have a tab-separated file with USPTO data called uspto_data.csv we can run the following command

+
python -m rxnutils.pipeline.runner --pipeline clean_pipeline.yml --data uspto_data.csv --output uspto_cleaned.csv
+
+
+

or we can alternatively run it from a python method like this

+
from rxnutils.pipeline.runner import main as validation_runner
+
+validation_runner(
+    [
+        "--pipeline",
+        "clean_pipeline.yml",
+        "--data",
+        "uspto_data.csv",
+        "--output",
+        "uspto_cleaned.csv",
+    ]
+)
+
+
+
+
+

Actions

+

To find out what actions are available, you can type

+
python -m rxnutils.pipeline.runner --list
+
+
+
+
+

Development

+

New actions can easily be added to the pipeline framework. All of the actions are implemented in one of four modules

+
+
    +
  • rxnutils.pipeline.actions.dataframe_mod - actions that modify the dataframe, e.g., removing rows or columns

  • +
  • rxnutils.pipeline.actions.reaction_mod - actions that modify reaction SMILES

  • +
  • rxnutils.pipeline.actions.dataframe_props - actions that compute properties from reaction SMILES

  • +
  • rxnutils.pipeline.actions.templates - actions that process reaction templates

  • +
+
+

To exemplify, let’s have a look at the productsize action

+
@action
+@dataclass
+class ProductSize:
+"""Action for counting product size"""
+
+pretty_name: ClassVar[str] = "productsize"
+in_column: str
+out_column: str = "ProductSize"
+
+def __call__(self, data: pd.DataFrame) -> pd.DataFrame:
+    smiles_col = global_apply(data, self._row_action, axis=1)
+    return data.assign(**{self.out_column: smiles_col})
+
+def __str__(self) -> str:
+    return f"{self.pretty_name} (number of heavy atoms in product)"
+
+def _row_action(self, row: pd.Series) -> str:
+    _, _, products = row[self.in_column].split(">")
+    products_mol = Chem.MolFromSmiles(products)
+
+    if products_mol:
+        product_atom_count = products_mol.GetNumHeavyAtoms()
+    else:
+        product_atom_count = 0
+
+    return product_atom_count
+
+
+

The action is defined as a class ProductSize that has two class-decorators. +The first @action will register the action in a global action list and second @dataclass is dataclass decorator from the standard library. +The pretty_name class variable is used to identify the action in the pipeline, that is what you are specifying in the YAML-file. +The other two in_column and out_column are the arguments you can specify in the YAML file for executing the action, they can have default +values in case they don’t need to be specified in the YAML file.

+

When the action is executed by the pipeline the __call__ method is invoked with the current Pandas dataframe as the only argument. This method +should return the modified dataframe.

+

Lastly, it is nice to implement a __str__ method which is used by the pipeline to print useful information about the action that is executed.

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 0000000..ee32e52 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,378 @@ + + + + + + + Python Module Index — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ + +

Python Module Index

+ +
+ r +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ r
+ rxnutils +
    + rxnutils.chem +
    + rxnutils.chem.augmentation +
    + rxnutils.chem.cgr +
    + rxnutils.chem.features +
    + rxnutils.chem.features.rxnfp_runner +
    + rxnutils.chem.features.sc_score +
    + rxnutils.chem.reaction +
    + rxnutils.chem.rinchi +
    + rxnutils.chem.rinchi.download_rinchi +
    + rxnutils.chem.rinchi.rinchi_api +
    + rxnutils.chem.template +
    + rxnutils.chem.utils +
    + rxnutils.data +
    + rxnutils.data.base_pipeline +
    + rxnutils.data.batch_utils +
    + rxnutils.data.mapping +
    + rxnutils.data.mapping_pipeline +
    + rxnutils.data.ord +
    + rxnutils.data.ord.import_ord_dataset +
    + rxnutils.data.ord.preparation_pipeline +
    + rxnutils.data.uspto +
    + rxnutils.data.uspto.combine +
    + rxnutils.data.uspto.download +
    + rxnutils.data.uspto.preparation_pipeline +
    + rxnutils.data.uspto.uspto_yield +
    + rxnutils.pipeline +
    + rxnutils.pipeline.actions +
    + rxnutils.pipeline.actions.dataframe_mod +
    + rxnutils.pipeline.actions.reaction_mod +
    + rxnutils.pipeline.actions.reaction_props +
    + rxnutils.pipeline.actions.templates +
    + rxnutils.pipeline.base +
    + rxnutils.pipeline.runner +
    + rxnutils.routes +
    + rxnutils.routes.base +
    + rxnutils.routes.comparison +
    + rxnutils.routes.deepset +
    + rxnutils.routes.deepset.featurizers +
    + rxnutils.routes.deepset.scoring +
    + rxnutils.routes.image +
    + rxnutils.routes.readers +
    + rxnutils.routes.retro_bleu +
    + rxnutils.routes.retro_bleu.ngram_collection +
    + rxnutils.routes.retro_bleu.scoring +
    + rxnutils.routes.scoring +
    + rxnutils.routes.ted +
    + rxnutils.routes.ted.distances_calculator +
    + rxnutils.routes.ted.reactiontree +
    + rxnutils.routes.ted.utils +
    + rxnutils.routes.utils +
    + rxnutils.routes.utils.validation +
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/routes.html b/routes.html new file mode 100644 index 0000000..ee142a1 --- /dev/null +++ b/routes.html @@ -0,0 +1,166 @@ + + + + + + + + Routes — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

Routes

+

rxnutils contains routines to analyse synthesis routes. There are a number of readers that can be used to read routes from a number of +formats, and there are routines to score the different routes.

+
+

Reading

+

The simplest route format supported is a text file, where each reaction is written as a reaction SMILES in a line. +Routes are separated by new-line

+

For instance:

+
CC(C)N.Clc1cccc(Nc2ccoc2)n1>>CC(C)Nc1cccc(Nc2ccoc2)n1
+Brc1ccoc1.Nc1cccc(Cl)n1>>Clc1cccc(Nc2ccoc2)n1
+
+Nc1cccc(NC(C)C)n1.Brc1ccoc1>>CC(C)Nc1cccc(Nc2ccoc2)n1
+CC(C)N.Nc1cccc(Cl)n1>>Nc1cccc(NC(C)C)n1
+
+
+

If this is saved to routes.txt, these can be read into route objects with

+
from rxnutils.routes.readers import read_reaction_lists
+routes = read_reaction_lists("reactions.txt")
+
+
+

If you have an environment with rxnmapper installed and the NextMove software namerxn in your PATH then you can +add atom-mapping and reaction classes to these routes with

+
# This can be set on the command-line as well
+import os
+os.environ["RXNMAPPER_ENV_PATH"] = "/home/username/miniconda/envs/rxnmapper/"
+
+for route in routes:
+    route.assign_atom_mapping(only_rxnmapper=True)
+routes[1].remap(routes[0])
+
+
+

The last line of code also make sure that the second route shares mapping with the first route.

+

Other readers are available

+
    +
  • read_aizynthcli_dataframe - for reading routes from aizynthcli output dataframe

  • +
  • read_reactions_dataframe - for reading routes stored as reactions in a dataframe

  • +
+

For instance, to read routes from a dataframe with reactions. You can do something like what follows. +The dataframe has column reaction_smiles that holds the reaction SMILES, and the individual routes +are identified by a target_smiles and route_id column. The dataframe also has a column classification, +holding the NextMove classification. The dataframe is called data.

+
from rxnutils.routes.readers import read_reactions_dataframe
+routes = read_reactions_dataframe(
+    data,
+    "reaction_smiles",
+    group_by=["target_smiles", "route_id"],
+    metadata_columns=["classification"]
+)
+
+
+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.chem.features.html b/rxnutils.chem.features.html new file mode 100644 index 0000000..23c3862 --- /dev/null +++ b/rxnutils.chem.features.html @@ -0,0 +1,204 @@ + + + + + + + + rxnutils.chem.features package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.chem.features package

+
+

Submodules

+
+
+

rxnutils.chem.features.rxnfp_runner module

+

Module containing script to calculate RXNFP for a set of reactions

+
+
+rxnutils.chem.features.rxnfp_runner.main(input_args=None)
+

Function for command-line tool

+
+
Parameters:
+

input_args (Sequence[str] | None)

+
+
Return type:
+

None

+
+
+
+ +
+
+

rxnutils.chem.features.sc_score module

+

Module containing the implementation of the SC-score model for synthetic complexity scoring.

+
+
+class rxnutils.chem.features.sc_score.SCScore(model_path, fingerprint_length=1024, fingerprint_radius=2)
+

Bases: object

+

Encapsulation of the SCScore model

+

Re-write of the SCScorer from the scscorer package using ONNX

+

The predictions of the score is made with a sanitized instance of an RDKit molecule

+
mol = Chem.MolFromSmiles(CCC)
+scscorer = SCScorer("path_to_model")
+score = scscorer(mol)
+
+
+
+
Parameters:
+
    +
  • model_path (str) – the filename of the model weights and biases

  • +
  • fingerprint_length (int) – the number of bits in the fingerprint

  • +
  • fingerprint_radius (int) – the radius of the fingerprint

  • +
+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.chem.html b/rxnutils.chem.html new file mode 100644 index 0000000..015ef6e --- /dev/null +++ b/rxnutils.chem.html @@ -0,0 +1,1285 @@ + + + + + + + + rxnutils.chem package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.chem package

+
+

Subpackages

+ +
+
+

Submodules

+
+
+

rxnutils.chem.augmentation module

+

Routines for augmenting chemical reactions

+
+
+rxnutils.chem.augmentation.single_reactant_augmentation(smiles, classification)
+

Augment single-reactant reaction with additional reagent if possible +based on the classification of the reaction +:param smiles: the reaction SMILES to augment +:param classification: the classification of the reaction or an empty string +:return: the processed SMILES

+
+
Parameters:
+
    +
  • smiles (str)

  • +
  • classification (str)

  • +
+
+
Return type:
+

str

+
+
+
+ +
+
+

rxnutils.chem.cgr module

+

Wrapper class for the CGRTools library

+
+
+class rxnutils.chem.cgr.CondensedGraphReaction(reaction)
+

Bases: object

+

The Condensed Graph of Reaction (CGR) representation of a reaction

+
+
Variables:
+
    +
  • reaction_container – the CGRTools container of the reaction

  • +
  • cgr_container – the CGRTools container of the CGR

  • +
+
+
Parameters:
+

reaction (ChemicalReaction) – the reaction composed of RDKit molecule to start from

+
+
Raises:
+

ValueError – if it is not possible to create the CGR from the reaction

+
+
+
+
+property bonds_broken: int
+

Returns the number of broken bonds in the reaction

+
+ +
+
+property bonds_changed: int
+

Returns the number of broken or formed bonds in the reaction

+
+ +
+
+property bonds_formed: int
+

Returns the number of formed bonds in the reaction

+
+ +
+
+property total_centers: int
+

Returns the number of atom and bond centers in the reaction

+
+ +
+
+distance_to(other)
+

Returns the chemical distance between two reactions, i.e. the absolute difference +between the total number of centers.

+

Used for some atom-mapping comparison statistics

+
+
Parameters:
+

other (CondensedGraphReaction) – the reaction to compare to

+
+
Returns:
+

the computed distance

+
+
Return type:
+

int

+
+
+
+ +
+ +
+
+

rxnutils.chem.reaction module

+

Module containing a class to handle chemical reactions

+
+
+exception rxnutils.chem.reaction.ReactionException
+

Bases: Exception

+

Custom exception raised when failing operations on a chemical reaction

+
+ +
+
+class rxnutils.chem.reaction.ChemicalReaction(smiles, id_=None, clean_smiles=True)
+

Bases: object

+

Representation of chemical reaction

+
+
Parameters:
+
    +
  • smiles (str) – the reaction SMILES

  • +
  • id – an optional database ID of the reaction

  • +
  • clean_smiles (bool) – if True, will standardize the reaction SMILES

  • +
  • id_ (str)

  • +
+
+
+
+
+property agents_list: List[str]
+

Gives all the agents as strings

+
+ +
+
+property canonical_template: ReactionTemplate
+

Gives the canonical (forward) template

+
+ +
+
+property products_list: List[str]
+

Gives all products as strings

+
+ +
+
+property pseudo_rinchi: str
+

Gives pseudo RInChI

+
+ +
+
+property pseudo_rinchi_key: str
+

Gives a pseudo reaction InChI key

+
+ +
+
+property hashed_rid: str
+

Gives a reaction hashkey based on Reaction SMILES & reaction id.

+
+ +
+
+property reactants_list: List[str]
+

Gives all reactants as strings

+
+ +
+
+property retro_template: ReactionTemplate
+

Gives the retro template

+
+ +
+
+property rinchi: str
+

Gives the reaction InChI

+
+ +
+
+property rinchi_key_long: str
+

Gives the long reaction InChI key

+
+ +
+
+property rinchi_key_short: str
+

Gives the short reaction InChI key

+
+ +
+
+generate_coreagent()
+

Extract un-mapped product atoms as extra ractant fragments

+
+ +
+
+generate_reaction_template(radius=1, expand_ring=False, expand_hetero=False)
+

Extracts the forward(canonical) and retro reaction template with the specified radius.

+
+
Uses a modified version of:

https://github.com/connorcoley/ochem_predict_nn/blob/master/data/generate_reaction_templates.py +https://github.com/connorcoley/rdchiral/blob/master/templates/template_extractor.py

+
+
+
+
Parameters:
+
    +
  • radius (int) – the radius refers to the number of atoms away from the reaction +centre to be extracted (the enivronment) i.e. radius = 1 (default) +returns the first neighbours around the reaction centre

  • +
  • expand_ring (bool) – if True will include all atoms in the same ring as the reaction centre in the template

  • +
  • expand_hetero (bool) – if True will extend the template with all bonded hetero atoms

  • +
+
+
Returns:
+

the canonical and retrosynthetic templates

+
+
Return type:
+

Tuple[ReactionTemplate, ReactionTemplate]

+
+
+
+ +
+
+has_partial_mapping()
+

Check product atom mapping.

+
+
Return type:
+

bool

+
+
+
+ +
+
+is_complete()
+

Check that the product is not among the reactants

+
+
Return type:
+

bool

+
+
+
+ +
+
+no_change()
+

Checks to see if the product appears in the reactant set.

+

Compares InChIs to rule out possible variations in SMILES notation.

+
+
Returns:
+

True the product is present in the reactants set, else False

+
+
Return type:
+

bool

+
+
+
+ +
+
+is_fuzzy()
+

Checks to see if there is fuzziness in the reaction.

+
+
Returns:
+

True if there is fuzziness, False otherwise

+
+
Return type:
+

bool

+
+
+
+ +
+
+sanitization_check()
+

Checks if the reactant and product mol objects can be sanitized in RDKit.

+

The actualy sanitization is carried out when the reaction is instansiated, +this method will only check that all molecules objects were created.

+
+
Returns:
+

True if all the molecule objects were successfully created, else False

+
+
Return type:
+

bool

+
+
+
+ +
+
+canonical_template_generate_outcome()
+

Checks whether the canonical template produces

+
+
Return type:
+

bool

+
+
+
+ +
+
+retro_template_generate_outcome()
+

Checks whether the retrosynthetic template produces an outcome

+
+
Return type:
+

bool

+
+
+
+ +
+
+retro_template_selectivity()
+

Checks whether the recorded reactants belong to the set of generated precursors.

+
+
Returns:
+

selectivity, i.e. the fraction of generated precursors matching the recorded precursors +i.e. 1.0 - match or match.match or match.match.match etc.

+
+

0.5 - match.none or match.none.match.none etc. +0.0 - none

+
+

+
+
Return type:
+

float

+
+
+
+ +
+ +
+
+

rxnutils.chem.template module

+

Module containing useful representations of templates

+
+
+class rxnutils.chem.template.TemplateMolecule(rd_mol=None, smarts=None)
+

Bases: object

+

Representation of a molecule created from a SMARTS string

+
+
Parameters:
+
    +
  • rd_mol (Mol) – the RDKit molecule to be represented by this class

  • +
  • smarts (str)

  • +
+
+
+
+
+atoms()
+

Generate the atom object of this molecule

+
+
Yield:
+

the next atom object

+
+
Return type:
+

Iterator[Atom]

+
+
+
+ +
+
+atom_invariants()
+

Calculate invariants on similar properties as in RDKit but ignore mass and add aromaticity

+
+
Returns:
+

a list of the atom invariants

+
+
Return type:
+

List[int]

+
+
+
+ +
+
+atom_properties()
+

Return a dictionary with atomic properties

+
+
Example:

import pandas +pandas.DataFrame(my_mol.atom_properties())

+
+
+
+
Return type:
+

Dict[str, List[object]]

+
+
+
+ +
+
+fingerprint_bits(radius=2, use_chirality=True)
+

Calculate the unique fingerprint bits

+

Will sanitize molecule if necessary

+
+
Parameters:
+
    +
  • radius (int) – the radius of the Morgan calculation

  • +
  • use_chirality (bool) – determines if chirality should be taken into account

  • +
+
+
Returns:
+

the set of unique bits

+
+
Return type:
+

Set[int]

+
+
+
+ +
+
+fingerprint_vector(radius=2, nbits=1024, use_chirality=True)
+

Calculate the finger bit vector

+

Will sanitize molecule if necessary

+
+
Parameters:
+
    +
  • radius (int) – the radius of the Morgan calculation

  • +
  • nbits (int) – the length of the bit vector

  • +
  • use_chirality (bool) – determines if chirality should be taken into account

  • +
+
+
Returns:
+

the bit vector

+
+
Return type:
+

ndarray

+
+
+
+ +
+
+fix_atom_properties()
+

Copy over some properties from the SMARTS specification to the atom object +1. Set IsAromatic flag is lower-case a is in the SMARTS +2. Fix formal charges +3. Explicit number of hydrogen atoms

+

Also extract explicit degree from SMARTS and is stored in +the comp_degree property.

+
+
Return type:
+

None

+
+
+
+ +
+
+hash_from_smiles()
+

Create a hash of the template based on a cleaned-up template SMILES string

+
+
Returns:
+

the hash string

+
+
Return type:
+

str

+
+
+
+ +
+
+hash_from_smarts()
+

Create a hash of the template based on a cleaned-up template SMARTS string

+
+
Returns:
+

the hash string

+
+
Return type:
+

str

+
+
+
+ +
+
+remove_atom_mapping()
+

Remove the atom mappings from the molecule

+
+
Return type:
+

None

+
+
+
+ +
+
+sanitize()
+

Will do selective sanitation - skip some procedures that causes problems due to “hanging” aromatic atoms

+
+
All possible flags:

SANITIZE_ADJUSTHS +SANITIZE_ALL +SANITIZE_CLEANUP +SANITIZE_CLEANUPCHIRALITY +SANITIZE_FINDRADICALS +SANITIZE_KEKULIZE +SANITIZE_NONE +SANITIZE_PROPERTIES +SANITIZE_SETAROMATICITY +SANITIZE_SETCONJUGATION +SANITIZE_SETHYBRIDIZATION +SANITIZE_SYMMRINGS

+
+
+
+
Return type:
+

None

+
+
+
+ +
+ +
+
+class rxnutils.chem.template.ReactionTemplate(smarts, direction='canonical')
+

Bases: object

+

Representation of a reaction template created with RDChiral

+
+
Parameters:
+
    +
  • smarts (str) – the SMARTS string representation of the reaction

  • +
  • direction (str) – if equal to “retro” reverse the meaning of products and reactants

  • +
+
+
+
+
+apply(mols)
+

Applies the template on the given molecule

+
+
Parameters:
+

mols (str) – the molecule as a SMILES

+
+
Returns:
+

the list of reactants

+
+
Return type:
+

Tuple[Tuple[str, …], …]

+
+
+
+ +
+
+fingerprint_bits(radius=2, use_chirality=True)
+

Calculate the difference count of the fingerprint bits set of the reactants and products

+
+
Parameters:
+
    +
  • radius (int) – the radius of the Morgan calculation

  • +
  • use_chirality (bool) – determines if chirality should be taken into account

  • +
+
+
Returns:
+

a dictionary of the difference count for each bit

+
+
Return type:
+

Dict[int, int]

+
+
+
+ +
+
+fingerprint_vector(radius=2, nbits=1024, use_chirality=True)
+

Calculate the difference fingerprint vector

+
+
Parameters:
+
    +
  • radius (int) – the radius of the Morgan calculation

  • +
  • nbits (int) – the length of the bit vector

  • +
  • use_chirality (bool) – determines if chirality should be taken into account

  • +
+
+
Returns:
+

the bit vector

+
+
Return type:
+

ndarray

+
+
+
+ +
+
+hash_from_bits(radius=2, use_chirality=True)
+

Create a hash of the template based on the difference counts of the fingerprint bits

+
+
Parameters:
+
    +
  • radius (int) – the radius of the Morgan calculation

  • +
  • use_chirality (bool) – determines if chirality should be taken into account

  • +
+
+
Returns:
+

the hash string

+
+
Return type:
+

str

+
+
+
+ +
+
+hash_from_smiles()
+

Create a hash of the template based on a cleaned-up template SMILES string

+
+
Returns:
+

the hash string

+
+
Return type:
+

str

+
+
+
+ +
+
+hash_from_smarts()
+

Create a hash of the template based on a cleaned-up template SMARTS string

+
+
Returns:
+

the hash string

+
+
Return type:
+

str

+
+
+
+ +
+
+rdkit_validation()
+

Checks if the template is valid in RDKit

+
+
Return type:
+

bool

+
+
+
+ +
+ +
+
+

rxnutils.chem.utils module

+

Module containing various chemical utility routines

+
+
+rxnutils.chem.utils.get_symmetric_sites(mol, candidate_atoms)
+

Get all symmetric sites (atoms) of each atom in the list of atoms defined by their +atomic index (not atom-map number). Symmetry is assessed with respect to the molecule. +Symmetric atoms will have different atom inds but the same rank index from +CanonicalRankAtoms.

+
+
Parameters:
+
    +
  • mol (Mol) – RdKit molecule

  • +
  • candidate_atoms (List[int]) – Indices of the atoms that will be checked for symmetry.

  • +
+
+
Returns:
+

A list of all symmetric sites (list of atom-ids) that include the candidate +atoms. Returns empty list if no atoms have symmetric sites.

+
+
Return type:
+

List[List[int]]

+
+
+
+ +
+
+rxnutils.chem.utils.get_mol_weight(smiles)
+

Calculate molecule’s exact molecular weight. +:param smiles: Molecule’s SMILES. +:return: Molecule’s exact molecular weight.

+
+
Parameters:
+

smiles (str)

+
+
Return type:
+

float | None

+
+
+
+ +
+
+rxnutils.chem.utils.get_special_groups(mol)
+

Given an RDKit molecule, this function returns a list of tuples, where +each tuple contains the AtomIdx’s for a special group of atoms which should +be included in a fragment all together. This should only be done for the +reactants, otherwise the products might end up with mapping mismatches +We draw a distinction between atoms in groups that trigger that whole +group to be included, and “unimportant” atoms in the groups that will not +be included if another atom matches.

+
+
Return type:
+

List[Tuple[Tuple[int, …], Tuple[int, …]]]

+
+
+
+ +
+
+rxnutils.chem.utils.has_atom_mapping(smiles, is_smarts=False, sanitize=True)
+

Returns True if a molecule has atom mapping, else False.

+
+
Parameters:
+
    +
  • smiles (str) – the SMILES/SMARTS representing the molecule

  • +
  • is_smarts (bool) – if True, will interpret the SMILES as a SMARTS

  • +
  • sanitize (bool) – if True, will sanitize the molecule

  • +
+
+
Returns:
+

True if the SMILES string has atom-mapping, else False

+
+
Return type:
+

bool

+
+
+
+ +
+
+rxnutils.chem.utils.canonicalize_tautomer(smiles)
+

Returns the canonical tautomeric form of the input SMILES.

+
+
Parameters:
+

smiles (str)

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.enumerate_tautomers(smiles)
+

Returns (sorted) collection of tautomers for the input SMILES.

+
+
Parameters:
+

smiles (str)

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+rxnutils.chem.utils.is_valid_mol(smiles)
+

Check if the molecule structure is valid.

+
+
Parameters:
+

smiles (str) – Molecule in SMILES.

+
+
Returns:
+

Return True if molecule structure is valid, return False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+
+rxnutils.chem.utils.remove_stereochemistry(smiles)
+

Removing stereo-chemistry information from a SMILES.

+
+
Parameters:
+

smiles (str)

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.remove_atom_mapping(smiles, is_smarts=False, sanitize=True, canonical=True)
+

Returns a molecule without atom mapping

+
+
Parameters:
+
    +
  • smiles (str) – the SMILES/SMARTS representing the molecule

  • +
  • is_smarts (bool) – if True, will interpret the SMILES as a SMARTS

  • +
  • sanitize (bool) – if True, will sanitize the molecule

  • +
  • canonical (bool) – if False, will not canonicalize (applies to SMILES)

  • +
+
+
Returns:
+

the molecule without atom-mapping

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.remove_atom_mapping_template(template_smarts)
+

Remove atom mapping from a template SMARTS string

+
+
Parameters:
+

template_smarts (str)

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.neutralize_molecules(smiles_list)
+

Neutralize a set of molecules using RDKit routines

+
+
Parameters:
+

smiles_list (List[str]) – the molecules as SMILES

+
+
Returns:
+

the neutralized molecules

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+rxnutils.chem.utils.desalt_molecules(smiles_list, keep_something=False)
+

Remove salts from a set of molecules using RDKit routines

+
+
Parameters:
+
    +
  • smiles_list (List[str]) – the molecules as SMILES

  • +
  • keep_something (bool) – if True will keep at least one salt

  • +
+
+
Returns:
+

the desalted molecules

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+rxnutils.chem.utils.same_molecule(mol1, mol2)
+

Test if two molecules are the same. +First number of atoms and bonds are compared to guard the potentially more expensive +substructure match. If mol1 is a substructure of mol2 and vice versa, the molecules +are considered to be the same.

+
+
Parameters:
+
    +
  • mol1 – First molecule

  • +
  • mol2 – Second molecule for comparison

  • +
+
+
Returns:
+

if the molecules match

+
+
Return type:
+

bool

+
+
+
+ +
+
+rxnutils.chem.utils.atom_mapping_numbers(smiles)
+

Return the numbers in the atom mapping

+
+
Parameters:
+

smiles (str) – the molecule as SMILES

+
+
Returns:
+

the atom mapping numbers

+
+
Return type:
+

List[int]

+
+
+
+ +
+
+rxnutils.chem.utils.reassign_rsmi_atom_mapping(rsmi, as_smiles=False)
+

Reassign reaction’s atom mapping. +Remove atom maps for atoms in reactants and reactents not found in product’s atoms.

+
+
Parameters:
+
    +
  • rsmi (str) – Reaction SMILES

  • +
  • as_smiles (bool) – Return reaction SMILES or SMARTS, defaults to False

  • +
+
+
Returns:
+

Reaction SMILES or SMARTS

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.split_rsmi(rsmi)
+

Split a reaction SMILES into components SMILES

+
+
Parameters:
+

rsmi (str) – the reaction SMILES

+
+
Returns:
+

the SMILES of the components

+
+
Return type:
+

Tuple[str, str, str]

+
+
+
+ +
+
+rxnutils.chem.utils.join_smiles_from_reaction(smiles_list)
+

Join a part of reaction SMILES, e.g. reactants and products into components. +Intra-molecular complexes are bracketed with parenthesis

+
+
Parameters:
+

smiles_list (List[str]) – the SMILES components

+
+
Returns:
+

the joined list

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.split_smiles_from_reaction(smiles)
+

Split a part of reaction SMILES, e.g. reactants or products +into components. Taking care of intra-molecular complexes

+

Taken from RDKit: +https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/ChemReactions/DaylightParser.cpp

+
+
Parameters:
+

smiles (str) – the SMILES/SMARTS

+
+
Returns:
+

the individual components.

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+rxnutils.chem.utils.recreate_rsmi(rsmi)
+

Recreate Reactions SMILES by removing intra-molecular complexes.

+
+
Parameters:
+

rsmi (str) – the original reaction smiles

+
+
Returns:
+

the updated reaction smiles without intra-molecular complexes

+
+
Return type:
+

str

+
+
+
+ +
+
+rxnutils.chem.utils.reaction_centres(rxn)
+

Return reaction centre atoms, provided that the bonding partners +actually change when comparing the environment in the reactant and the product

+

inspired by code from Greg Landrum’s tutorial +set up array to remove atoms from the reaction centers +by comparing the atom mapping in the reactant vs the products

+

Original implementation by Christoph Bauer

+
+
Parameters:
+

rxn (ChemicalReaction) – the initialized RDKit reaction

+
+
Returns:
+

tuple of reaction centre atoms, filtered by connectivity criterion

+
+
Return type:
+

Tuple[List[int], …]

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.chem.rinchi.html b/rxnutils.chem.rinchi.html new file mode 100644 index 0000000..6e7e9d7 --- /dev/null +++ b/rxnutils.chem.rinchi.html @@ -0,0 +1,218 @@ + + + + + + + + rxnutils.chem.rinchi package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.chem.rinchi package

+
+

Submodules

+
+
+

rxnutils.chem.rinchi.download_rinchi module

+

Module for downloading InChI Trust Reaction InChI.

+
+
+exception rxnutils.chem.rinchi.download_rinchi.RInChIError
+

Bases: Exception

+

Exception raised by RInChI API

+
+ +
+
+rxnutils.chem.rinchi.download_rinchi.main()
+

Check if Reaction InchI application is present. +Download it if it’s required to do so.

+
+
Returns:
+

Path of the folder containing the appropriate +command line executable based on system type.

+
+
Return type:
+

str

+
+
+
+ +
+
+

rxnutils.chem.rinchi.rinchi_api module

+

Module containing an API to the Reaction InChI program

+
+
+rxnutils.chem.rinchi.rinchi_api.RInChIStructure
+

alias of RInChI

+
+ +
+
+rxnutils.chem.rinchi.rinchi_api.generate_rinchi(reaction_smiles)
+

Generate RInChI from Reaction SMILES.

+
+
Parameters:
+

reaction_smiles (str) – Reaction SMILES

+
+
Raises:
+

RInChIError – When there is an error with RInChI generation.

+
+
Returns:
+

Namedtuple with the generated RInChI.

+
+
Return type:
+

RInChI

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.data.html b/rxnutils.data.html new file mode 100644 index 0000000..1661a15 --- /dev/null +++ b/rxnutils.data.html @@ -0,0 +1,472 @@ + + + + + + + + rxnutils.data package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.data package

+
+

Subpackages

+ +
+
+

Submodules

+
+
+

rxnutils.data.base_pipeline module

+

Module containing base class for data pipelines

+
+
+class rxnutils.data.base_pipeline.DataBaseFlow(use_cli=True)
+

Bases: FlowSpec

+

Base-class for pipelines for processing data

+
+
+nbatches = metaflow.Parameter(name=nbatches, kwargs={})
+
+ +
+
+folder = metaflow.Parameter(name=folder, kwargs={})
+
+ +
+ +
+
+class rxnutils.data.base_pipeline.DataPreparationBaseFlow(use_cli=True)
+

Bases: DataBaseFlow

+

Base pipeline for preparing datasets and doing clean-up

+
+
+data_prefix = ''
+
+ +
+ +
+
+

rxnutils.data.batch_utils module

+
+
+rxnutils.data.batch_utils.nlines(filename)
+

Count and return the number of lines in a file

+
+
Parameters:
+

filename (str)

+
+
Return type:
+

int

+
+
+
+ +
+
+rxnutils.data.batch_utils.combine_batches(filename, nbatches, read_func, write_func, combine_func)
+
+
Parameters:
+
    +
  • filename (str)

  • +
  • nbatches (int)

  • +
  • read_func (Any)

  • +
  • write_func (Any)

  • +
  • combine_func (Any)

  • +
+
+
Return type:
+

None

+
+
+
+ +
+
+rxnutils.data.batch_utils.combine_csv_batches(filename, nbatches)
+

Combine CSV batches to one master file

+

The batch files are removed from disc

+
+
Parameters:
+
    +
  • filename (str) – the filename of the master file

  • +
  • nbatches (int) – the number of batches

  • +
+
+
Return type:
+

None

+
+
+
+ +
+
+rxnutils.data.batch_utils.combine_numpy_array_batches(filename, nbatches)
+

Combine numpy array batches to one master file +The batch files are removed from disc +:param filename: the filename of the master file +:param nbatches: the number of batches

+
+
Parameters:
+
    +
  • filename (str)

  • +
  • nbatches (int)

  • +
+
+
Return type:
+

None

+
+
+
+ +
+
+rxnutils.data.batch_utils.combine_sparse_matrix_batches(filename, nbatches)
+

Combine sparse matrix batches to one master file

+

The batch files are removed from disc

+
+
Parameters:
+
    +
  • filename (str) – the filename of the master file

  • +
  • nbatches (int) – the number of batches

  • +
+
+
Return type:
+

None

+
+
+
+ +
+
+rxnutils.data.batch_utils.create_csv_batches(filename, nbatches, output_filename=None)
+

Create batches for reading a splitted CSV-file

+
+
The batches will be in the form of a tuple with three indices:
    +
  • Batch index

  • +
  • Start index

  • +
  • End index

  • +
+
+
+
+
Parameters:
+
    +
  • filename (str) – the CSV file to make batches of

  • +
  • nbatches (int) – the number of batches

  • +
  • output_filename (str | None)

  • +
+
+
Returns:
+

the created batches

+
+
Return type:
+

List[Tuple[int, int, int]]

+
+
+
+ +
+
+rxnutils.data.batch_utils.read_csv_batch(filename, batch=None, **kwargs)
+

Read parts of a CSV file as specified by a batch

+
+
Parameters:
+
    +
  • filename (str) – the path to the CSV file on disc

  • +
  • batch (Tuple[int, ...]) – the batch specification as returned by create_csv_batches

  • +
  • kwargs (Any)

  • +
+
+
Return type:
+

DataFrame

+
+
+
+ +
+
+

rxnutils.data.mapping module

+

Module containing script to atom-map USPTO or ORD reactions

+
+
+rxnutils.data.mapping.main(input_args=None)
+

Function for command-line tool

+
+
Parameters:
+

input_args (Sequence[str] | None)

+
+
Return type:
+

None

+
+
+
+ +
+
+

rxnutils.data.mapping_pipeline module

+

Module containing pipeline for mapping with rxnmapper +This needs to be run in an environment with rxnmapper installed

+
+
+class rxnutils.data.mapping_pipeline.RxnMappingFlow(use_cli=True)
+

Bases: DataBaseFlow

+

Pipeline for atom-map USPTO or ORD data with rxnmapper

+
+
+data_prefix = metaflow.Parameter(name=data-prefix, kwargs={})
+
+ +
+
+start()
+

Setup batches for mapping

+
+ +
+
+do_mapping()
+

Perform atom-mapping of reactions

+
+ +
+
+join_mapping(_)
+

Join batches from mapping

+
+ +
+
+end()
+

Final step, just print information

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.data.ord.html b/rxnutils.data.ord.html new file mode 100644 index 0000000..1e4ea1f --- /dev/null +++ b/rxnutils.data.ord.html @@ -0,0 +1,237 @@ + + + + + + + + rxnutils.data.ord package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.data.ord package

+
+

Submodules

+
+
+

rxnutils.data.ord.import_ord_dataset module

+

Module containing script to import ORD dataset to a CSV file

+
+
+rxnutils.data.ord.import_ord_dataset.main(input_args=None)
+

Function for command-line tool

+
+
Parameters:
+

input_args (Sequence[str] | None)

+
+
Return type:
+

None

+
+
+
+ +
+
+

rxnutils.data.ord.preparation_pipeline module

+

Module containing pipeline for extracting, transforming and cleaning Open reaction database data +This needs to be run in an environment with rxnutils installed

+
+
+class rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow(use_cli=True)
+

Bases: DataPreparationBaseFlow

+

Pipeline for extracting ORD data and do some clean-up

+
+
+ord_data = metaflow.Parameter(name=ord-data, kwargs={})
+
+ +
+
+data_prefix = 'ord'
+
+ +
+
+start()
+

Import ORD data

+
+ +
+
+setup_cleaning()
+

Setup cleaning

+
+ +
+
+do_cleaning()
+

Perform cleaning of data

+
+ +
+
+join_cleaning(_)
+

Combined cleaned batches of data

+
+ +
+
+end()
+

Final step, just print information

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.data.uspto.html b/rxnutils.data.uspto.html new file mode 100644 index 0000000..2403016 --- /dev/null +++ b/rxnutils.data.uspto.html @@ -0,0 +1,314 @@ + + + + + + + + rxnutils.data.uspto package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.data.uspto package

+
+

Submodules

+
+
+

rxnutils.data.uspto.combine module

+

Module containing script to combine raw USPTO files

+
+
It will:
    +
  • preserve the ReactionSmiles and Year columns

  • +
  • create an ID from PatentNumber and ParagraphNum and row index in the original file

  • +
+
+
+
+
+rxnutils.data.uspto.combine.main(args=None)
+

Function for command-line tool

+
+
Parameters:
+

args (Sequence[str] | None)

+
+
Return type:
+

None

+
+
+
+ +
+
+

rxnutils.data.uspto.download module

+

Module containing a script to download USPTO files Figshare

+
+
+rxnutils.data.uspto.download.main(args=None)
+

Function for command-line tool

+
+
Parameters:
+

args (Sequence[str] | None)

+
+
Return type:
+

None

+
+
+
+ +
+
+

rxnutils.data.uspto.preparation_pipeline module

+

Module containing pipeline for downloading, transforming and cleaning USPTO data +This needs to be run in an environment with rxnutils installed

+
+
+class rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow(use_cli=True)
+

Bases: DataPreparationBaseFlow

+

Pipeline for download UPSTO source file, combining them and do some clean-up

+
+
+data_prefix = 'uspto'
+
+ +
+
+start()
+

Download USPTO data from Figshare

+
+ +
+
+combine_files()
+

Combine USPTO data files and add IDs

+
+ +
+
+setup_cleaning()
+

Setup cleaning

+
+ +
+
+do_cleaning()
+

Perform cleaning of data

+
+ +
+
+join_cleaning(_)
+

Combined cleaned batches of data

+
+ +
+
+end()
+

Final step, just print information

+
+ +
+ +
+
+

rxnutils.data.uspto.uspto_yield module

+

Code for curating USPTO yields.

+

Inspiration from this code: https://github.com/DocMinus/Yield_curation_USPTO

+

This could potentially be an action, but since it only make sens to use it +with USPTO data, it resides here for now.

+
+
+class rxnutils.data.uspto.uspto_yield.UsptoYieldCuration(text_yield_column='TextMinedYield', calc_yield_column='CalculatedYield', out_column='CuratedYield')
+

Bases: object

+

Action for curating USPTO yield columns

+
+
Parameters:
+
    +
  • text_yield_column (str)

  • +
  • calc_yield_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+text_yield_column: str = 'TextMinedYield'
+
+ +
+
+calc_yield_column: str = 'CalculatedYield'
+
+ +
+
+out_column: str = 'CuratedYield'
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.html b/rxnutils.html new file mode 100644 index 0000000..3311eae --- /dev/null +++ b/rxnutils.html @@ -0,0 +1,432 @@ + + + + + + + + rxnutils package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils package

+
+

Subpackages

+
+ +
+
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.pipeline.actions.html b/rxnutils.pipeline.actions.html new file mode 100644 index 0000000..50a1a74 --- /dev/null +++ b/rxnutils.pipeline.actions.html @@ -0,0 +1,2385 @@ + + + + + + + + rxnutils.pipeline.actions package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.pipeline.actions package

+
+

Submodules

+
+
+

rxnutils.pipeline.actions.dataframe_mod module

+

Module containing actions that modify the dataframe in some way

+
+
+class rxnutils.pipeline.actions.dataframe_mod.DropColumns(columns)
+

Bases: object

+

Drops columns specified in ‘columns’

+

yaml example:

+
+
drop_columns:
+
columns:
    +
  • NRingChange

  • +
  • RingBondMade

  • +
+
+
+
+
+
+
Parameters:
+

columns (list[str])

+
+
+
+
+pretty_name: ClassVar[str] = 'drop_columns'
+
+ +
+
+columns: list[str]
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.DropDuplicates(key_columns)
+

Bases: object

+

Action for dropping duplicates from dataframe

+
+
Parameters:
+

key_columns (list[str])

+
+
+
+
+pretty_name: ClassVar[str] = 'drop_duplicates'
+
+ +
+
+key_columns: list[str]
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.DropRows(indicator_columns)
+

Bases: object

+

Drops rows according to boolean in ‘indicator_columns’. +True => Keep, False => Drop.

+

yaml example:

+
+
drop_rows:
+
indicator_columns:
    +
  • is_sanitizable

  • +
  • is_sanitizable2

  • +
+
+
+
+
+
+
Parameters:
+

indicator_columns (list[str])

+
+
+
+
+pretty_name: ClassVar[str] = 'drop_rows'
+
+ +
+
+indicator_columns: list[str]
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.KeepColumns(columns)
+

Bases: object

+

Drops columns not specified in ‘columns’

+

yaml example:

+
+
keep_columns:
+
columns:
    +
  • id

  • +
  • classification

  • +
  • rsmi_processed

  • +
+
+
+
+
+
+
Parameters:
+

columns (list[str])

+
+
+
+
+pretty_name: ClassVar[str] = 'keep_columns'
+
+ +
+
+columns: list[str]
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.RenameColumns(in_columns, out_columns)
+

Bases: object

+

Renames columns specified in ‘in_columns’ to the names specified in ‘out_columns’

+

yaml example:

+
+
rename_columns:
+
in_columns:
    +
  • column1

  • +
  • column2

  • +
+
+
out_columns:
    +
  • column1_renamed

  • +
  • column2_renamed

  • +
+
+
+
+
+
+
Parameters:
+
    +
  • in_columns (list[str])

  • +
  • out_columns (list[str])

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'rename_columns'
+
+ +
+
+in_columns: list[str]
+
+ +
+
+out_columns: list[str]
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.QueryDataframe(query)
+

Bases: object

+

Uses dataframe query to produce a new (smaller) dataframe. Query must conform to pandas.query()

+

yaml file example: Keeping only rows where the has_stereo columns is True:

+
+
query_dataframe:

query: has_stereo == True

+
+
+
+
Parameters:
+

query (str)

+
+
+
+
+pretty_name: ClassVar[str] = 'query_dataframe'
+
+ +
+
+query: str
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.StackColumns(in_columns, out_column='StackedColumns')
+

Bases: object

+

Stacks the specified in_columns under a new column name (out_column), +multiplies the rest of the columns as appropriate

+

yaml control file example:

+
+
stack_columns:
+
in_columns:
    +
  • rsmi_processed

  • +
  • rsmi_inverted_stereo

  • +
+
+
+

out_column: rsmi_processed

+
+
+
+
Parameters:
+
    +
  • in_columns (list[str])

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stack_columns'
+
+ +
+
+in_columns: list[str]
+
+ +
+
+out_column: str = 'StackedColumns'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns(stack_columns, target_columns)
+

Bases: object

+

Stacks the specified target_columns on top of the stack_columns after renaming.

+

Example Yaml:

+
+
stack_multi_columns:
+
stack_columns:
    +
  • rsmi_inverted_stereo

  • +
  • PseudoHash_inverted_stereo

  • +
+
+
target_columns:
    +
  • rsmi_processed

  • +
  • PseudoHash

  • +
+
+
+
+
+
+
Parameters:
+
    +
  • stack_columns (list[str])

  • +
  • target_columns (list[str])

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stack_multi_columns'
+
+ +
+
+stack_columns: list[str]
+
+ +
+
+target_columns: list[str]
+
+ +
+ +
+
+

rxnutils.pipeline.actions.reaction_mod module

+

Module containing actions on reactions that modify the reaction in some way

+
+
+class rxnutils.pipeline.actions.reaction_mod.DesaltMolecules(in_column, out_column='RxnDesalted', keep_something=False)
+

Bases: ReactionActionMixIn

+

Action for desalting molecules

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
  • keep_something (bool)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'desalt_molecules'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnDesalted'
+
+ +
+
+keep_something: bool = False
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.NameRxn(in_column, options='', nm_rxn_column='NextMoveRxnSmiles', nmc_column='NMC')
+

Bases: object

+

Action for calling namrxn

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • options (str)

  • +
  • nm_rxn_column (str)

  • +
  • nmc_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'namerxn'
+
+ +
+
+in_column: str
+
+ +
+
+options: str = ''
+
+ +
+
+nm_rxn_column: str = 'NextMoveRxnSmiles'
+
+ +
+
+nmc_column: str = 'NMC'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules(in_column, out_column='RxnNeutralized')
+

Bases: ReactionActionMixIn

+

Action for neutralizing molecules

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'neutralize_molecules'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnNeutralized'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents(in_column, out_column='RxnSmilesWithTrueReagents')
+

Bases: ReactionActionMixIn

+

Action for converting reactants to reagents

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'reactants2reagents'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmilesWithTrueReagents'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants(in_column, out_column='RxnSmilesAllReactants')
+

Bases: object

+

Action for converting reagents to reactants

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'reagents2reactants'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmilesAllReactants'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping(in_column, out_column='RxnSmilesNoAtomMap')
+

Bases: ReactionActionMixIn

+

Action for removing all atom mapping

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'remove_atom_mapping'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmilesNoAtomMap'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo(in_column, out_column='RxnSmilesNoStereo')
+

Bases: object

+

Action for removing stero information

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'remove_stereo_info'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmilesNoStereo'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.InvertStereo(in_column, out_column='RxnSmilesInvertedStereo')
+

Bases: object

+

Action for inverting stero information

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'invert_stereo'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmilesInvertedStereo'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.IsotopeInfo(in_column, isotope_column='Isotope', out_column='RxnSmilesWithoutIsotopes', match_regex='\\[(?P<mass>[0-9]+)(?P<symbol>[A-Za-z][a-z]*)(?P<spec>[^\\]]+)*\\]', sub_regex='[\\g<symbol>\\g<spec>]')
+

Bases: object

+

Action creating and modifying isotope information

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • isotope_column (str)

  • +
  • out_column (str)

  • +
  • match_regex (str)

  • +
  • sub_regex (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'isotope_info'
+
+ +
+
+in_column: str
+
+ +
+
+isotope_column: str = 'Isotope'
+
+ +
+
+out_column: str = 'RxnSmilesWithoutIsotopes'
+
+ +
+
+match_regex: str = '\\[(?P<mass>[0-9]+)(?P<symbol>[A-Za-z][a-z]*)(?P<spec>[^\\]]+)*\\]'
+
+ +
+
+sub_regex: str = '[\\g<symbol>\\g<spec>]'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping(in_column, out_column='RxnSmilesReassignedAtomMap')
+

Bases: ReactionActionMixIn

+

Action for removing extra atom mapping

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'remove_extra_atom_mapping'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmilesReassignedAtomMap'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts(in_column, out_column='RxnNoUnchangedProd')
+

Bases: ReactionActionMixIn

+

Compares the products with the reagents and reactants and remove unchanged products.

+

Protonation is considered a difference, As example, if there’s a HCl in the reagents and +a Cl- in the products, it will not be removed.

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'remove_unchanged_products'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnNoUnchangedProd'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable(in_column, out_column='RxnSanitizable', bad_column='BadMolecules')
+

Bases: ReactionActionMixIn

+

Action for removing unsanitizable reactions

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
  • bad_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'remove_unsanitizable'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSanitizable'
+
+ +
+
+bad_column: str = 'BadMolecules'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles(in_column, out_column='RxnRoleAssigned')
+

Bases: object

+

Action for assigning roles based on RDKit algorithm

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'rdkit_RxnRoleAssignment'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnRoleAssigned'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.RxnMapper(in_column, out_column='RxnmapperRxnSmiles', rxnmapper_command='conda run -p ${RXNMAPPER_ENV_PATH} python /home/runner/work/reaction_utils/reaction_utils/rxnutils/data/mapping.py')
+

Bases: object

+

Action for mapping reactions with the RXNMapper tool

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
  • rxnmapper_command (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'rxnmapper'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnmapperRxnSmiles'
+
+ +
+
+rxnmapper_command: str = 'conda run -p ${RXNMAPPER_ENV_PATH} python /home/runner/work/reaction_utils/reaction_utils/rxnutils/data/mapping.py'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.SplitReaction(in_column, out_columns)
+

Bases: ReactionActionMixIn

+

Action for splitting reaction into components

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_columns (list[str])

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'split_reaction'
+
+ +
+
+in_column: str
+
+ +
+
+out_columns: list[str]
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite(in_column='RxnSmilesClean', out_column='products_atom_map_tagged')
+

Bases: ReactionActionMixIn

+

Action for tagging disconnection site in products with atom-map ‘[<atom>:1]’.

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'atom_map_tag_disconnection_site'
+
+ +
+
+in_column: str = 'RxnSmilesClean'
+
+ +
+
+out_column: str = 'products_atom_map_tagged'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag(in_column='products_atom_map_tagged', out_column_tagged='products_tagged', out_column_reconstructed='products_reconstructed')
+

Bases: ReactionActionMixIn

+

Action for converting atom-map tagging to exclamation mark tagging.

+

yaml example:

+
+
convert_atom_map_disconnection_tag:

in_column_tagged: products_atom_map_tagged +in_column_untagged: products +out_column_tagged: products_tagged +out_column_reconstructed: products_reconstructed

+
+
+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column_tagged (str)

  • +
  • out_column_reconstructed (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'convert_atom_map_disconnection_tag'
+
+ +
+
+in_column: str = 'products_atom_map_tagged'
+
+ +
+
+out_column_tagged: str = 'products_tagged'
+
+ +
+
+out_column_reconstructed: str = 'products_reconstructed'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles(in_column, out_column='RxnSmiles', smiles_column_index=0)
+

Bases: object

+

Action from trimming reaction SMILES

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
  • smiles_column_index (int)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'trim_rxn_smiles'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnSmiles'
+
+ +
+
+smiles_column_index: int = 0
+
+ +
+ +
+
+

rxnutils.pipeline.actions.reaction_props module

+

Module containing actions on reactions that doesn’t modify the reactions only compute properties of them

+
+
+class rxnutils.pipeline.actions.reaction_props.CountComponents(in_column, nreactants_column='NReactants', nmapped_reactants_column='NMappedReactants', nreagents_column='NReagents', nmapped_reagents_column='NMappedReagents', nproducts_column='NProducts', nmapped_products_column='NMappedProducts')
+

Bases: ReactionActionMixIn

+

Action for counting reaction components

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • nreactants_column (str)

  • +
  • nmapped_reactants_column (str)

  • +
  • nreagents_column (str)

  • +
  • nmapped_reagents_column (str)

  • +
  • nproducts_column (str)

  • +
  • nmapped_products_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'count_components'
+
+ +
+
+in_column: str
+
+ +
+
+nreactants_column: str = 'NReactants'
+
+ +
+
+nmapped_reactants_column: str = 'NMappedReactants'
+
+ +
+
+nreagents_column: str = 'NReagents'
+
+ +
+
+nmapped_reagents_column: str = 'NMappedReagents'
+
+ +
+
+nproducts_column: str = 'NProducts'
+
+ +
+
+nmapped_products_column: str = 'NMappedProducts'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.CountElements(in_column, out_column='ElementCount')
+

Bases: object

+

Action for counting elements in reactants

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'count_elements'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'ElementCount'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.HasStereoInfo(in_column, out_column='HasStereo')
+

Bases: object

+

Action for checking stereo info

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'has_stereo_info'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'HasStereo'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom(in_column, out_column='HasUnmappedRadicalAtom')
+

Bases: object

+

Action for flagging if reaction has any unmapped radical atoms

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'hasunmappedradicalatom'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'HasUnmappedRadicalAtom'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants(rsmi_column, bad_columns, out_column='HasUnsanitizableReactants')
+

Bases: object

+

Action for flagging if reaction has any unsanitizable reactants

+
+
Parameters:
+
    +
  • rsmi_column (str)

  • +
  • bad_columns (List[str])

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'unsanitizablereactants'
+
+ +
+
+rsmi_column: str
+
+ +
+
+bad_columns: List[str]
+
+ +
+
+out_column: str = 'HasUnsanitizableReactants'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.CgrCreated(in_column, out_column='CGRCreated')
+

Bases: object

+

Action for determining if a CGR can be created from the reaction smiles

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+in_column: str
+
+ +
+
+pretty_name: ClassVar[str] = 'cgr_created'
+
+ +
+
+out_column: str = 'CGRCreated'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds(in_column, out_column='NDynamicBonds')
+

Bases: object

+

Action for calculating the number of dynamic bonds

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+in_column: str
+
+ +
+
+pretty_name: ClassVar[str] = 'cgr_dynamic_bonds'
+
+ +
+
+out_column: str = 'NDynamicBonds'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats(in_column, unmapped_column='UnmappedProdAtoms', widow_column='WidowAtoms')
+

Bases: object

+

Action for collecting statistics of product atom mapping

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • unmapped_column (str)

  • +
  • widow_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'product_atommapping_stats'
+
+ +
+
+in_column: str
+
+ +
+
+unmapped_column: str = 'UnmappedProdAtoms'
+
+ +
+
+widow_column: str = 'WidowAtoms'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.ProductSize(in_column, out_column='ProductSize')
+

Bases: object

+

Action for counting product size

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'productsize'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'ProductSize'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.PseudoReactionHash(in_column, out_column='PseudoHash', no_reagents=False)
+

Bases: object

+

Action for creating a reaction hash based on InChI keys

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
  • no_reagents (bool)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'pseudo_reaction_hash'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'PseudoHash'
+
+ +
+
+no_reagents: bool = False
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash(in_column, out_column='PseudoSmilesHash')
+

Bases: object

+

Action for creating a reaction hash based on SMILES

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'pseudo_smiles_hash'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'PseudoSmilesHash'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance(in_column, out_column='RxnAtomBalance')
+

Bases: object

+

Action for computing atom balance

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'atombalance'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RxnAtomBalance'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.ReactantSize(in_column, out_column='ReactantSize')
+

Bases: object

+

Action for counting reactant size

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'reactantsize'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'ReactantSize'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.MaxRingNumber(in_column, out_column='MaxRings')
+

Bases: object

+

Action for calculating the maximum number of rings in either the product or reactant +For a reaction without reactants or products, it will return 0 to enable easy arithmetic comparison

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'maxrings'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'MaxRings'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.RingNumberChange(in_column, out_column='NRingChange')
+

Bases: object

+

Action for calculating if reaction has change in number of rings

+

A positive number from this action implies that a ring was formed during the reaction

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'ringnumberchange'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'NRingChange'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.RingBondMade(in_column, out_column='RingBondMade')
+

Bases: object

+

Action for flagging if reaction has made a ring bond in the product

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'ringbondmade'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RingBondMade'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.RingMadeSize(in_column, out_column='RingMadeSize')
+

Bases: object

+

Action for computing the size of a newly formed ring

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'ringmadesize'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'RingMadeSize'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.SmilesLength(in_column, out_column='SmilesLength')
+

Bases: object

+

Action for counting SMILES length

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'smiles_length'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'SmilesLength'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.SmilesSanitizable(in_column, out_column='SmilesSanitizable')
+

Bases: object

+

Action for checking if SMILES are sanitizable

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'smiles_sanitizable'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'SmilesSanitizable'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoInvention(in_column, out_column='StereoInvention')
+

Bases: object

+

Flags reactions where non-stereo compounds (No “@”s in SMILES) +turn into stereo compounds (containing “@”)

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stereo_invention'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'StereoInvention'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoCentreChanges(in_column, out_column='HasStereoChanges', stereo_changes_column='StereoChanges')
+

Bases: object

+

Action for checking if stereogenic centre in reaction center is changing +during the reaction

+
+
Will create two columns:
    +
  1. A boolean column indicating True or False if it has stereochanges

  2. +
  3. A description of the stereo information before and after the reaction

  4. +
+
+
+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
  • stereo_changes_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stereo_centre_changes'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'HasStereoChanges'
+
+ +
+
+stereo_changes_column: str = 'StereoChanges'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent(in_column, out_column='HasChiralReagent')
+

Bases: object

+

Action for checking if reagent has stereo centres

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stereo_chiral_reagent'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'HasChiralReagent'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated(in_column='StereoChanges', out_column='StereoCentreCreated')
+

Bases: object

+

Action for checking if stereo centre is created during reaction

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stereo_centre_created'
+
+ +
+
+in_column: str = 'StereoChanges'
+
+ +
+
+out_column: str = 'StereoCentreCreated'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved(in_column='StereoChanges', out_column='StereoCentreRemoved')
+

Bases: object

+

Action for checking if stereo centre is removed during reaction

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stereo_centre_removed'
+
+ +
+
+in_column: str = 'StereoChanges'
+
+ +
+
+out_column: str = 'StereoCentreRemoved'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential(in_column, out_column='PotentialStereoCentre')
+

Bases: object

+

Action for checking if there is a potential stereo centre in the reaction

+

Do not consider changes to bond stereochemistry

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'potential_stereo_center'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'PotentialStereoCentre'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction(in_column, out_column='StereoOutside')
+

Bases: object

+

Action for checking if there is a stereo centre outside the reaction centre

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'stereo_centre_outside'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'StereoOutside'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.reaction_props.StereoMesoProduct(in_column, out_column='MesoProduct')
+

Bases: object

+

Action for checking if the product is a meso compound

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • out_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'meso_product'
+
+ +
+
+in_column: str
+
+ +
+
+out_column: str = 'MesoProduct'
+
+ +
+ +
+
+

rxnutils.pipeline.actions.templates module

+

Module containing template validation actions

+
+
+class rxnutils.pipeline.actions.templates.CountTemplateComponents(in_column, nreactants_column='nreactants', nreagents_column='nreagents', nproducts_column='nproducts')
+

Bases: object

+

Action for counting template components

+
+
Parameters:
+
    +
  • in_column (str)

  • +
  • nreactants_column (str)

  • +
  • nreagents_column (str)

  • +
  • nproducts_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'count_template_components'
+
+ +
+
+in_column: str
+
+ +
+
+nreactants_column: str = 'nreactants'
+
+ +
+
+nreagents_column: str = 'nreagents'
+
+ +
+
+nproducts_column: str = 'nproducts'
+
+ +
+ +
+
+class rxnutils.pipeline.actions.templates.RetroTemplateReproduction(template_column, smiles_column, expected_reactants_column='TemplateGivesTrueReactants', other_reactants_column='TemplateGivesOtherReactants', noutcomes_column='TemplateGivesNOutcomes')
+

Bases: object

+

Action for checking template reproduction

+
+
Parameters:
+
    +
  • template_column (str)

  • +
  • smiles_column (str)

  • +
  • expected_reactants_column (str)

  • +
  • other_reactants_column (str)

  • +
  • noutcomes_column (str)

  • +
+
+
+
+
+pretty_name: ClassVar[str] = 'retro_template_reproduction'
+
+ +
+
+template_column: str
+
+ +
+
+smiles_column: str
+
+ +
+
+expected_reactants_column: str = 'TemplateGivesTrueReactants'
+
+ +
+
+other_reactants_column: str = 'TemplateGivesOtherReactants'
+
+ +
+
+noutcomes_column: str = 'TemplateGivesNOutcomes'
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.pipeline.html b/rxnutils.pipeline.html new file mode 100644 index 0000000..8173034 --- /dev/null +++ b/rxnutils.pipeline.html @@ -0,0 +1,715 @@ + + + + + + + + rxnutils.pipeline package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.pipeline package

+
+

Subpackages

+
+ +
+
+
+

Submodules

+
+
+

rxnutils.pipeline.base module

+

Module containing routines for the validation framework

+
+
+rxnutils.pipeline.base.action(obj)
+

Decorator that register a callable as a validation action.

+

An action will be called with a pandas.DataFrame object +and return a new pandas.DataFrame object.

+

An action needs to have an attribute pretty_name.

+
+
Parameters:
+

obj (Callable[[DataFrame], DataFrame]) – the callable to register as an action

+
+
Returns:
+

the same as obj.

+
+
Return type:
+

Callable[[DataFrame], DataFrame]

+
+
+
+ +
+
+rxnutils.pipeline.base.list_actions(short=False)
+

List all available actions in a nice table

+
+
Parameters:
+

short (bool)

+
+
Return type:
+

None

+
+
+
+ +
+
+rxnutils.pipeline.base.create_action(pretty_name, *args, **kwargs)
+

Create an action that can be called

+
+
Parameters:
+
    +
  • pretty_name (str) – the name of the action

  • +
  • args (Any)

  • +
  • kwargs (Any)

  • +
+
+
Returns:
+

the instantiated actions

+
+
Return type:
+

Callable[[DataFrame], DataFrame]

+
+
+
+ +
+
+class rxnutils.pipeline.base.ReactionActionMixIn
+

Bases: object

+

Mixin class with standard routines for splitting and joining reaction SMILES

+
+
+join_lists(reactants_list, reagents_list, products_list)
+

Join list of components into a reaction SMILES

+
+
Parameters:
+
    +
  • reactants_list (List[str]) – the list of reactant SMILES

  • +
  • reagents_list (List[str]) – the list of reagent SMILES

  • +
  • products_list (List[str]) – the list of product SMILES

  • +
+
+
Returns:
+

the concatenated reaction SMILES

+
+
Return type:
+

str

+
+
+
+ +
+
+join_smiles(reactants, reagents, products)
+

Join component SMILES into a reaction SMILES

+
+
Parameters:
+
    +
  • reactants (str) – the reactant SMILES

  • +
  • reagents (str) – the reagent SMILES

  • +
  • products (str) – the product SMILES

  • +
+
+
Returns:
+

the concatenated reaction SMILES

+
+
Return type:
+

str

+
+
+
+ +
+
+split_lists(row)
+

Split a reaction SMILES into list of component SMILES

+
+
Parameters:
+

row (Series) – the row with the SMILES

+
+
Returns:
+

the list of SMILES of the components

+
+
Return type:
+

Tuple[List[str], List[str], List[str]]

+
+
+
+ +
+
+split_smiles(row)
+

Split a reaction SMILES into components SMILES

+
+
Parameters:
+

row (Series) – the row with the SMILES

+
+
Returns:
+

the SMILES of the components

+
+
Return type:
+

Tuple[str, str, str]

+
+
+
+ +
+ +
+
+

rxnutils.pipeline.runner module

+

Module containg routines and interface to run pipelines

+
+
+rxnutils.pipeline.runner.run_pipeline(data, pipeline, filename, save_intermediates=True)
+

Run a given pipeline on a dataset

+

The actions are applied sequentials as they are defined in the pipeline

+

The intermediate results of the pipeline will be written to separate +tab-separated CSV files.

+
+
Parameters:
+
    +
  • data (DataFrame) – the dataset

  • +
  • pipeline (Dict[str, Any]) – the action specifications

  • +
  • filename (str) – path to the final output file

  • +
  • save_intermediates (bool) – if True will save intermediate results

  • +
+
+
Returns:
+

the dataset after completing the pipeline

+
+
Return type:
+

DataFrame

+
+
+
+ +
+
+rxnutils.pipeline.runner.main(args=None)
+

Function for command line argument

+
+
Parameters:
+

args (Sequence[str] | None)

+
+
Return type:
+

None

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.routes.deepset.html b/rxnutils.routes.deepset.html new file mode 100644 index 0000000..94db14e --- /dev/null +++ b/rxnutils.routes.deepset.html @@ -0,0 +1,370 @@ + + + + + + + + rxnutils.routes.deepset package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.routes.deepset package

+
+

Submodules

+
+
+

rxnutils.routes.deepset.featurizers module

+

Module with featurizers for molecules and reactions

+
+
+rxnutils.routes.deepset.featurizers.collect_reaction_features(reaction_data, target_fingerprint, reaction_class_ranks, featurizer, prefactor=1.1, default_rank=5, default_cls='0.0')
+

Collect all reaction features and compute the prior reaction feasibility score

+
+
Params reaction_data:
+

the reactions of the route

+
+
Params target_fingerprint:
+

the precomputed fingerprint of the target

+
+
Params reaction_class_ranks:
+

the ranks of the reaction classes

+
+
Params featurizer:
+

the featurizer to use for reactions

+
+
Params prefactor:
+

the factor for the feasibility score

+
+
Params default_rank:
+

the rank of reactions not parameterized

+
+
Params default_cls:
+

the class of reactions not parameterized

+
+
Returns:
+

the prior feasibility score

+
+
Returns:
+

the reaction features

+
+
Parameters:
+
    +
  • reaction_data (List[Dict[str, Any]])

  • +
  • target_fingerprint (ndarray)

  • +
  • reaction_class_ranks (Dict[str, int])

  • +
  • featurizer (Callable[[Dict[str, Any]], ndarray])

  • +
  • prefactor (float)

  • +
  • default_rank (int)

  • +
  • default_cls (str)

  • +
+
+
Return type:
+

Tuple[float, ndarray]

+
+
+
+ +
+
+rxnutils.routes.deepset.featurizers.default_reaction_featurizer(reaction_data, radius=2, numbits=64)
+

Given an item of reaction data, returned by the reaction_data method +of SynthesisRoute this features the reaction using a difference ECFP

+

Currently it featurizes the reaction in the retro-sense

+
+
Params reaction_data:
+

the reaction as a dictionary

+
+
Params radius:
+

the radius of the fingerprint

+
+
Params numbits:
+

the number of bits

+
+
Returns:
+

the fingerprint

+
+
Parameters:
+
    +
  • reaction_data (Dict[str, Any])

  • +
  • radius (int)

  • +
  • numbits (int)

  • +
+
+
Return type:
+

ndarray

+
+
+
+ +
+
+rxnutils.routes.deepset.featurizers.ecfp_fingerprint(mol, radius=2, numbits=64)
+

Computes a ECFP with a given radius and length

+
+
Params mol:
+

the RDKit molecule

+
+
Params radius:
+

the radius of the fingerprint

+
+
Params numbits:
+

the number of bits

+
+
Returns:
+

the fingerprint

+
+
Parameters:
+
    +
  • mol (Mol)

  • +
  • radius (int)

  • +
  • numbits (int)

  • +
+
+
Return type:
+

ndarray

+
+
+
+ +
+
+rxnutils.routes.deepset.featurizers.reaction_difference_fingerprint(reaction, radius=2, numbits=64)
+

Computes the difference fingerprint of given reaction

+
+
Params reaction:
+

the reaction to featurize

+
+
Params radius:
+

the radius of the fingerprint

+
+
Params numbits:
+

the number of bits

+
+
Returns:
+

the fingerprint

+
+
Parameters:
+
+
+
Return type:
+

ndarray

+
+
+
+ +
+
+

rxnutils.routes.deepset.scoring module

+

Module containing routines for Deepset route scoring

+

This is an implementation of the code used in the following publication, +original implementation by Guo Yujia

+

Yujia G, Kabeshov M, Le THD, Genheden S, Bergonzini G, Engkvist O, et al. +A Deep Learning with Expert Augmentation Approach for Route Scoring in Organic Synthesis. ChemRxiv. 2024; +doi:10.26434/chemrxiv-2024-tp7rh

+
+
+class rxnutils.routes.deepset.scoring.DeepsetModelClient(model_path)
+

Bases: object

+

Interface for an in-memory instance of a Deepset model for route scoring

+
+
Params model_path:
+

the path to an ONNX model file

+
+
Parameters:
+

model_path (str)

+
+
+
+ +
+
+rxnutils.routes.deepset.scoring.deepset_route_score(route, model_client, scscorer, reaction_class_ranks)
+

Scores a synthesis route using a Deepset model

+

Currently, it uses defaults for featurizers as +described in the original publication.

+
+
Params route:
+

the route to score

+
+
Params model_client:
+

the interface to the model

+
+
Params scscorer:
+

the interface to the SCScore

+
+
Params reaction_class_ranks:
+

the lookup from reaction class to rank

+
+
Returns:
+

the computed score

+
+
Parameters:
+
+
+
Return type:
+

float

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.routes.html b/rxnutils.routes.html new file mode 100644 index 0000000..6fba01e --- /dev/null +++ b/rxnutils.routes.html @@ -0,0 +1,1008 @@ + + + + + + + + rxnutils.routes package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.routes package

+
+

Subpackages

+
+ +
+
+
+

Submodules

+
+
+

rxnutils.routes.base module

+

Contains a class encapsulating a synthesis route, +as well as routines for assigning proper atom-mapping +and drawing the route

+
+
+class rxnutils.routes.base.SynthesisRoute(reaction_tree)
+

Bases: object

+

This encapsulates a synthesis route or a reaction tree. +It provide convinient methods for assigning atom-mapping +to the reactions, and for providing reaction-level data +of the route

+

It is typically initiallized by one of the readers in the +rxnutils.routes.readers module.

+

The tree depth and the forward step is automatically assigned +to each reaction node.

+

The max_depth attribute holds the longest-linear-sequence (LLS)

+
+
Parameters:
+

reaction_tree (Dict[str, Any]) – the tree structure representing the route

+
+
+
+
+property mapped_root_smiles: str
+

Return the atom-mapped SMILES of the root compound

+

Will raise an exception if the route is a just a single +compound, or if the route has not been assigned atom-mapping.

+
+ +
+
+property nsteps: int
+

Return the number of reactions in the route

+
+ +
+
+atom_mapped_reaction_smiles()
+

Returns a list of the atom-mapped reaction SMILES in the route

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+assign_atom_mapping(overwrite=False, only_rxnmapper=False)
+

Assign atom-mapping to each reaction in the route and +ensure that is is consistent from root compound and throughout +the route.

+

It will use NameRxn to assign classification and possiblty atom-mapping, +as well as rxnmapper to assign atom-mapping in case NameRxn cannot classify +a reaction.

+
+
Parameters:
+
    +
  • overwrite (bool) – if True will overwrite existing mapping

  • +
  • only_rxnmapper (bool) – if True will disregard NameRxn mapping and use only rxnmapper

  • +
+
+
Return type:
+

None

+
+
+
+ +
+
+chains(complexity_func)
+

Returns linear sequences or chains extracted from the route.

+

Each chain is a list of a dictionary representing the molecules, only the most +complex molecule is kept for each reaction - making the chain a sequence of molecule +to molecule transformation.

+

The first chain will be the longest linear sequence (LLS), and the second chain +will be longest branch if this is a convergent route. This branch will be processed +further, but the other branches can probably be discarded as they have not been +investigated thoroughly.

+
+
Parameters:
+

complexity_func (Callable[[str], float]) – a function that takes a SMILES and returns a +complexity metric of the molecule

+
+
Returns:
+

a list of chains where each chain is a list of molecules

+
+
Return type:
+

List[List[Dict[str, Any]]]

+
+
+
+ +
+
+image(show_atom_mapping=False, factory_kwargs=None)
+

Depict the route.

+
+
Parameters:
+
    +
  • show_atom_mapping (bool) – if True, will show the atom-mapping

  • +
  • factory_kwargs (Dict[str, Any]) – additional keyword arguments sent to the RouteImageFactory

  • +
+
+
Returns:
+

the image of the route

+
+
Return type:
+

Image

+
+
+
+ +
+
+intermediate_counts()
+

Extract the counts of all intermediates

+

return: the counts

+
+
Return type:
+

Dict[str, int]

+
+
+
+ +
+
+intermediates()
+

Extract a set with the SMILES of all the intermediates nodes

+
+
Returns:
+

a set of SMILES strings

+
+
Return type:
+

Set[str]

+
+
+
+ +
+
+is_solved()
+

Find if this route is solved, i.e. if all starting material +is in stock.

+

To be accurate, each molecule node need to have an extra +boolean property called in_stock.

+
+
Return type:
+

bool

+
+
+
+ +
+
+leaf_counts()
+

Extract the counts of all leaf nodes, i.e. starting material

+

return: the counts

+
+
Return type:
+

Dict[str, int]

+
+
+
+ +
+
+leaves()
+

Extract a set with the SMILES of all the leaf nodes, i.e. +starting material

+
+
Returns:
+

a set of SMILES strings

+
+
Return type:
+

Set[str]

+
+
+
+ +
+
+reaction_data()
+

Returns a list of dictionaries for each reaction +in the route. This is metadata of the reactions +augmented with reaction SMILES and depth of the reaction

+
+
Return type:
+

List[Dict[str, Any]]

+
+
+
+ +
+
+reaction_ngrams(nitems, metadata_key)
+

Extract an n-gram representation of the route by building up n-grams +of the reaction metadata.

+
+
Parameters:
+
    +
  • nitems (int) – the length of the gram

  • +
  • metadata_key (str) – the metadata to extract

  • +
+
+
Returns:
+

the collected n-grams

+
+
Return type:
+

List[Tuple[Any, …]]

+
+
+
+ +
+
+reaction_smiles(augment=False)
+

Returns a list of the un-mapped reaction SMILES +:param augment: if True will add reagents to single-reactant

+
+

reagents whenever possible

+
+
+
Parameters:
+

augment (bool)

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+remap(other)
+

Remap the reaction so that it follows the mapping of a +1) root compound in a reference route, 2) a ref compound given +as a SMILES, or 3) using a raw mapping

+
+
Parameters:
+

other (SynthesisRoute | str | Dict[int, int]) – the reference for re-mapping

+
+
Return type:
+

None

+
+
+
+ +
+ +
+
+rxnutils.routes.base.smiles2inchikey(smiles, ignore_stereo=False)
+

Converts a SMILES to an InChI key

+
+
Parameters:
+
    +
  • smiles (str)

  • +
  • ignore_stereo (bool)

  • +
+
+
Return type:
+

str

+
+
+
+ +
+
+

rxnutils.routes.comparison module

+

Contains routines for computing route similarities

+
+
+rxnutils.routes.comparison.simple_route_similarity(routes)
+

Returns the geometric mean of the simple bond forming similarity, and +the atom matching bonanza similarity

+
+
Parameters:
+

routes (Sequence[SynthesisRoute]) – the sequence of routes to compare

+
+
Returns:
+

the pairwise similarity

+
+
Return type:
+

ndarray

+
+
+
+ +
+
+rxnutils.routes.comparison.atom_matching_bonanza_similarity(routes)
+

Calculates the pairwise similarity of a sequence of routes +based on the overlap of the atom-mapping numbers of the compounds +in the routes.

+
+
Parameters:
+

routes (Sequence[SynthesisRoute]) – the sequence of routes to compare

+
+
Returns:
+

the pairwise similarity

+
+
Return type:
+

ndarray

+
+
+
+ +
+
+rxnutils.routes.comparison.simple_bond_forming_similarity(routes)
+

Calculates the pairwise similarity of a sequence of routes +based on the overlap of formed bonds in the reactions.

+
+
Parameters:
+

routes (Sequence[SynthesisRoute]) – the sequence of routes to compare

+
+
Returns:
+

the pairwise similarity

+
+
Return type:
+

ndarray

+
+
+
+ +
+
+rxnutils.routes.comparison.route_distances_calculator(model, **kwargs)
+

Return a callable that given a list routes as dictionaries +calculate the squared distance matrix

+
+
Parameters:
+
    +
  • model (str) – the route distance model name

  • +
  • kwargs (Any) – additional keyword arguments for the model

  • +
+
+
Returns:
+

the appropriate route distances calculator

+
+
Return type:
+

Callable[[Sequence[SynthesisRoute]], ndarray]

+
+
+
+ +
+
+

rxnutils.routes.image module

+

This module contains a collection of routines to produce pretty images

+
+
+rxnutils.routes.image.molecule_to_image(mol, frame_color, size=300)
+

Create a pretty image of a molecule, +with a colored frame around it

+
+
Parameters:
+
    +
  • mol (Chem.rdchem.Mol) – the molecule

  • +
  • frame_color (PilColor) – the color of the frame

  • +
  • size (int) – the size of the image

  • +
+
+
Returns:
+

the produced image

+
+
Return type:
+

PilImage

+
+
+
+ +
+
+rxnutils.routes.image.molecules_to_images(mols, frame_colors, size=300, draw_kwargs=None)
+

Create pretty images of molecules with a colored frame around each one of them.

+

The molecules will be resized to be of similar sizes.

+
+
Parameters:
+
    +
  • smiles_list – the molecules

  • +
  • frame_colors (Sequence[PilColor]) – the color of the frame for each molecule

  • +
  • size (int) – the sub-image size

  • +
  • draw_kwargs (Dict[str, Any]) – additional keyword-arguments sent to MolsToGridImage

  • +
  • mols (Sequence[Chem.rdchem.Mol])

  • +
+
+
Returns:
+

the produced images

+
+
Return type:
+

List[PilImage]

+
+
+
+ +
+
+rxnutils.routes.image.crop_image(img, margin=20)
+

Crop an image by removing white space around it

+
+
Parameters:
+
    +
  • img (PilImage) – the image to crop

  • +
  • margin (int) – padding, defaults to 20

  • +
+
+
Returns:
+

the cropped image

+
+
Return type:
+

PilImage

+
+
+
+ +
+
+rxnutils.routes.image.draw_rounded_rectangle(img, color, arc_size=20)
+

Draw a rounded rectangle around an image

+
+
Parameters:
+
    +
  • img (PilImage) – the image to draw upon

  • +
  • color (PilColor) – the color of the rectangle

  • +
  • arc_size (int) – the size of the corner, defaults to 20

  • +
+
+
Returns:
+

the new image

+
+
Return type:
+

PilImage

+
+
+
+ +
+
+class rxnutils.routes.image.RouteImageFactory(route, in_stock_colors=None, show_all=True, margin=100, mol_size=300, mol_draw_kwargs=None, replace_mol_func=None)
+

Bases: object

+

Factory class for drawing a route

+
+
Parameters:
+
    +
  • route (Dict[str, Any]) – the dictionary representation of the route

  • +
  • in_stock_colors (FrameColors) – the colors around molecules, defaults to {True: “green”, False: “orange”}

  • +
  • show_all (bool) – if True, also show nodes that are marked as hidden

  • +
  • margin (int) – the margin between images

  • +
  • mol_size (int) – the size of the molecule

  • +
  • mol_draw_kwargs (Dict[str, Any]) – additional arguments sent to the drawing routine

  • +
  • replace_mol_func (Callable[[Dict[str, Any]], None]) – an optional function to replace molecule images

  • +
+
+
+
+ +
+
+

rxnutils.routes.readers module

+

Routines for reading routes from various formats

+
+
+rxnutils.routes.readers.read_reaction_lists(filename)
+

Read one or more simple lists of reactions into one or more +retrosynthesis trees.

+

Each list of reactions should be separated by an empty line. +Each row of each reaction should contain the reaction SMILES (reactants>>products) +and nothing else.

+

Example: +A.B>>C +D.E>>B

+

A.X>>Y +Z>>X

+
+
defines two retrosynthesis trees, and the first being

A

+
+
C -> D
+
B ->

E

+
+
+
+
+
+
Params filename:
+

the path to the file with the reactions

+
+
Returns:
+

the list of the created trees

+
+
Parameters:
+

filename (str)

+
+
Return type:
+

List[SynthesisRoute]

+
+
+
+ +
+
+rxnutils.routes.readers.read_aizynthcli_dataframe(data)
+

Read routes as produced by the aizynthcli tool of the AiZynthFinder package.

+
+
Parameters:
+

data (DataFrame) – the dataframe as output by aizynthcli

+
+
Returns:
+

the created routes

+
+
Return type:
+

Series

+
+
+
+ +
+
+rxnutils.routes.readers.read_aizynthfinder_dict(tree)
+

Read a single aizynthfinder dictionary

+
+
Parameters:
+

tree (Dict[str, Any]) – the aizynthfinder structure

+
+
Returns:
+

the created routes

+
+
Return type:
+

SynthesisRoute

+
+
+
+ +
+
+rxnutils.routes.readers.read_reactions_dataframe(data, smiles_column, group_by, metadata_columns=None)
+

Read routes from reactions stored in a pandas dataframe. The different +routes are groupable by one or more column. Additional metadata columns +can be extracted from the dataframe as well.

+

The dataframe is grouped by the columns specified by group_by and +then one routes is extracted from each subset dataframe. The function +returns a series with the routes, which is indexable by the columns +in the group_by list.

+
+
Parameters:
+
    +
  • data (DataFrame) – the dataframe with reaction data

  • +
  • smiles_column (str) – the column with the reaction SMILES

  • +
  • group_by (List[str]) – the columns that uniquely identifies each route

  • +
  • metadata_column – additional columns to be added as metadata to each route

  • +
  • metadata_columns (List[str])

  • +
+
+
Returns:
+

the created series with route.

+
+
Return type:
+

Series

+
+
+
+ +
+
+rxnutils.routes.readers.reactions2route(reactions, metadata=None)
+

Convert a list of reactions into a retrosynthesis tree

+

This is based on matching partial InChI keys of the reactants in one +reaction with the partial InChI key of a product.

+
+
Params reactions:
+

list of reaction SMILES

+
+
Returns:
+

the created trees

+
+
Parameters:
+
    +
  • reactions (Sequence[str])

  • +
  • metadata (Sequence[Dict[str, Any]])

  • +
+
+
Return type:
+

SynthesisRoute

+
+
+
+ +
+
+rxnutils.routes.readers.read_rdf_file(filename)
+
+
Parameters:
+

filename (str)

+
+
Return type:
+

SynthesisRoute

+
+
+
+ +
+
+

rxnutils.routes.scoring module

+

Routines for scoring synthesis routes

+
+
+rxnutils.routes.scoring.route_sorter(routes, scorer, **kwargs)
+

Scores and sort a list of routes. +Returns a tuple of the sorted routes and their scores.

+
+
Parameters:
+
    +
  • routes (List[SynthesisRoute]) – the routes to score

  • +
  • scorer (Callable[[...], float]) – the scorer function

  • +
  • kwargs (Any) – additional argument given to the scorer

  • +
+
+
Returns:
+

the sorted routes and their scores

+
+
Return type:
+

Tuple[List[SynthesisRoute], List[float]]

+
+
+
+ +
+
+rxnutils.routes.scoring.route_ranks(scores)
+

Compute the rank of route scores. Rank starts at 1

+
+
Parameters:
+

scores (List[float]) – the route scores

+
+
Returns:
+

a list of ranks for each route

+
+
Return type:
+

List[int]

+
+
+
+ +
+
+rxnutils.routes.scoring.badowski_route_score(route, mol_costs=None, average_yield=0.8, reaction_cost=1.0)
+

Calculate the score of route using the method from +(Badowski et al. Chem Sci. 2019, 10, 4640).

+

The reaction cost is constant and the yield is an average yield. +The starting materials are assigned a cost based on whether they are in +stock or not. By default starting material in stock is assigned a +cost of 1 and starting material not in stock is assigned a cost of 10.

+

To be accurate, each molecule node need to have an extra +boolean property called in_stock.

+
+
Parameters:
+
    +
  • route (SynthesisRoute) – the route to analyze

  • +
  • mol_costs (Dict[bool, float]) – the starting material cost

  • +
  • average_yield (float) – the average yield, defaults to 0.8

  • +
  • reaction_cost (float) – the reaction cost, defaults to 1.0

  • +
+
+
Returns:
+

the computed cost

+
+
Return type:
+

float

+
+
+
+ +
+
+rxnutils.routes.scoring.reaction_class_rank_score(route, reaction_class_ranks, preferred_classes, non_preferred_factor=0.25)
+

Calculates a score of a route based on the reaction class rank score, i.e. +how likely a particular reaction class is to succeed.

+
+
Each step in the route is scored based on the following factors:
    +
  • The reaction class rank

  • +
  • The step in the synthesis sequence

  • +
  • The preference of the reaction class

  • +
+
+
+

The score is min-max normalized relative to the maximum depth of the three +and the max/min of the class ranks.

+
+
Parameters:
+
    +
  • route (SynthesisRoute) – the route to score

  • +
  • reaction_class_ranks (Dict[str, int]) – the rank score of NextMove classes

  • +
  • preferred_classes (List[str]) – the preferred reaction classes

  • +
  • non_preferred_factor (float) – steps with non-preferred classes are multiplied by this

  • +
+
+
Returns:
+

the computed score

+
+
Return type:
+

float

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.routes.retro_bleu.html b/rxnutils.routes.retro_bleu.html new file mode 100644 index 0000000..404597b --- /dev/null +++ b/rxnutils.routes.retro_bleu.html @@ -0,0 +1,311 @@ + + + + + + + + rxnutils.routes.retro_bleu package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.routes.retro_bleu package

+
+

Submodules

+
+
+

rxnutils.routes.retro_bleu.ngram_collection module

+

Contains routines for creating, reading, and writing n-gram collections

+

Can be run as a module to create a collection from a set of routes:

+
+

python -m rxnutils.routes.retro_bleu.ngram_collection –filename routes.json –output ngrams.json –nitems 2 –metadata template_hash

+
+
+
+class rxnutils.routes.retro_bleu.ngram_collection.NgramCollection(nitems, metadata_key, ngrams)
+

Bases: object

+

Class to create, read, and write a collection of n-grams

+
+
Parameters:
+
    +
  • nitems (int) – the length of each n-gram

  • +
  • metadata_key (str) – the key used to extract the n-grams from the reactions

  • +
  • ngrams (Set[Tuple[str, ...]]) – the extracted n-grams

  • +
+
+
+
+
+nitems: int
+
+ +
+
+metadata_key: str
+
+ +
+
+ngrams: Set[Tuple[str, ...]]
+
+ +
+
+classmethod from_file(filename)
+

Read an n-gram collection from a JSON-file

+
+
Parameters:
+

filename (str) – the path to the file

+
+
Returns:
+

the n-gram collection

+
+
Return type:
+

NgramCollection

+
+
+
+ +
+
+classmethod from_tree_collection(filename, nitems, metadata_key)
+

Make a n-gram collection by extracting them from a collection of +synthesis routes.

+
+
Parameters:
+
    +
  • filename (str) – the path to a file with a list of synthesis routes

  • +
  • nitems (int) – the length of the gram

  • +
  • metadata_key (str) – the metadata to extract

  • +
+
+
Returns:
+

the n-gram collection

+
+
Return type:
+

NgramCollection

+
+
+
+ +
+
+save_to_file(filename)
+

Save an n-gram collection to a JSON-file

+
+
Parameters:
+

filename (str) – the path to the file

+
+
Return type:
+

None

+
+
+
+ +
+ +
+
+

rxnutils.routes.retro_bleu.scoring module

+

Contains routine to score routes according to Retro-BLEU paper

+
+
+rxnutils.routes.retro_bleu.scoring.ngram_overlap_score(route, ref)
+

Calculate the fractional n-gram overlap of the n-grams in the given +route and the reference n-gram collection

+
+
Parameters:
+
+
+
Returns:
+

the calculated score

+
+
Return type:
+

float

+
+
+
+ +
+
+rxnutils.routes.retro_bleu.scoring.retro_bleu_score(route, ref, ideal_steps=3)
+

Calculate the Retro-BLEU score according to the paper:

+

Li, Junren, Lei Fang, och Jian-Guang Lou. +”Retro-BLEU: quantifying chemical plausibility of retrosynthesis routes through reaction template sequence analysis”. +Digital Discovery 3, nr 3 (2024): 482–90. https://doi.org/10.1039/D3DD00219E.

+
+
Parameters:
+
    +
  • route (SynthesisRoute) – the route to score

  • +
  • ref (NgramCollection) – the reference n-gram collection

  • +
  • ideal_steps (int) – a length-penalization hyperparameter (see Eq 2 in ref)

  • +
+
+
Returns:
+

the calculated score

+
+
Return type:
+

float

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.routes.ted.html b/rxnutils.routes.ted.html new file mode 100644 index 0000000..ab01051 --- /dev/null +++ b/rxnutils.routes.ted.html @@ -0,0 +1,415 @@ + + + + + + + + rxnutils.routes.ted package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.routes.ted package

+
+

Submodules

+
+
+

rxnutils.routes.ted.distances_calculator module

+

Module contain method to compute distance matrix using TED

+
+
+rxnutils.routes.ted.distances_calculator.ted_distances_calculator(routes, content='both', timeout=None)
+

Compute the TED distances between each pair of routes

+
+
Parameters:
+
    +
  • routes (Sequence[SynthesisRoute]) – the routes to calculate pairwise distance on

  • +
  • content (str) – determine what part of the synthesis trees to include in the calculation, +options ‘molecules’, ‘reactions’ and ‘both’, default ‘both’

  • +
  • timeout (int) – if given, raises an exception if timeout is taking longer time

  • +
+
+
Returns:
+

the square distance matrix

+
+
Return type:
+

ndarray

+
+
+
+ +
+
+

rxnutils.routes.ted.reactiontree module

+

Module containing helper classes to compute the distance between to reaction trees using the APTED method +Since APTED is based on ordered trees and the reaction trees are unordered, plenty of +heuristics are implemented to deal with this.

+
+
+class rxnutils.routes.ted.reactiontree.ReactionTreeWrapper(route, content=TreeContent.MOLECULES, exhaustive_limit=20, fp_factory=None, dist_func=None)
+

Bases: object

+

Wrapper for a reaction tree that can calculate distances between +trees.

+
+
Parameters:
+
    +
  • route (SynthesisRoute) – the synthesis route to wrap

  • +
  • content (Union[str, TreeContent]) – the content of the route to consider in the distance calculation, default ‘molecules’

  • +
  • exhaustive_limit (int) – if the number of possible ordered trees are below this limit create them all, default 20

  • +
  • fp_factory (Callable[[StrDict, Optional[StrDict]], None]) – the factory of the fingerprint, Morgan fingerprint for molecules and reactions by default

  • +
  • dist_func (Callable[[np.ndarray, np.ndarray], float]) – the distance function to use when renaming nodes

  • +
+
+
+
+
+property info: Dict[str, Any]
+

Return a dictionary with internal information about the wrapper

+
+ +
+
+property first_tree: Dict[str, Any]
+

Return the first created ordered tree

+
+ +
+
+property trees: List[Dict[str, Any]]
+

Return a list of all created ordered trees

+
+ +
+
+distance_iter(other, exhaustive_limit=20)
+

Iterate over all distances computed between this and another tree

+

There are three possible enumeration of distances possible dependent +on the number of possible ordered trees for the two routes that are compared

+
    +
  • If the product of the number of possible ordered trees for both routes are +below exhaustive_limit compute the distance between all pair of trees

  • +
  • If both self and other has been fully enumerated (i.e. all ordered trees has been created) +compute the distances between all trees of the route with the most ordered trees and +the first tree of the other route

  • +
  • Compute exhaustive_limit number of distances by shuffling the child order for +each of the routes.

  • +
+

The rules are applied top-to-bottom.

+
+
Parameters:
+
    +
  • other (ReactionTreeWrapper) – another tree to calculate distance to

  • +
  • exhaustive_limit (int) – used to determine what type of enumeration to do

  • +
+
+
Yield:
+

the next computed distance between self and other

+
+
Return type:
+

Iterable[float]

+
+
+
+ +
+
+distance_to(other, exhaustive_limit=20)
+

Calculate the minimum distance from this route to another route

+

Enumerate the distances using distance_iter.

+
+
Parameters:
+
    +
  • other (ReactionTreeWrapper) – another tree to calculate distance to

  • +
  • exhaustive_limit (int) – used to determine what type of enumeration to do

  • +
+
+
Returns:
+

the minimum distance

+
+
Return type:
+

float

+
+
+
+ +
+
+distance_to_with_sorting(other)
+

Compute the distance to another tree, by simpling sorting the children +of both trees. This is not guaranteed to return the minimum distance.

+
+
Parameters:
+

other (ReactionTreeWrapper) – another tree to calculate distance to

+
+
Returns:
+

the distance

+
+
Return type:
+

float

+
+
+
+ +
+ +
+
+

rxnutils.routes.ted.utils module

+

Module containing utilities for TED calculations

+
+
+class rxnutils.routes.ted.utils.TreeContent(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
+

Bases: str, Enum

+

Possibilities for distance calculations on reaction trees

+
+
+MOLECULES = 'molecules'
+
+ +
+
+REACTIONS = 'reactions'
+
+ +
+
+BOTH = 'both'
+
+ +
+ +
+
+class rxnutils.routes.ted.utils.AptedConfig(randomize=False, sort_children=False, dist_func=None)
+

Bases: Config

+

This is a helper class for the tree edit distance +calculation. It defines how the substitution +cost is calculated and how to obtain children nodes.

+
+
Parameters:
+
    +
  • randomize (bool) – if True, the children will be shuffled

  • +
  • sort_children (bool) – if True, the children will be sorted

  • +
  • dist_func (Callable[[np.ndarray, np.ndarray], float]) – the distance function used for renaming nodes, Jaccard by default

  • +
+
+
+
+
+rename(node1, node2)
+

Calculates the cost of renaming the label of the source node +to the label of the destination node

+
+
Parameters:
+
    +
  • node1 (Dict[str, Any])

  • +
  • node2 (Dict[str, Any])

  • +
+
+
Return type:
+

float

+
+
+
+ +
+
+children(node)
+

Returns children of node

+
+
Parameters:
+

node (Dict[str, Any])

+
+
Return type:
+

List[Dict[str, Any]]

+
+
+
+ +
+ +
+
+class rxnutils.routes.ted.utils.StandardFingerprintFactory(radius=2, nbits=2048)
+

Bases: object

+

Calculate Morgan fingerprint for molecules, and difference fingerprints for reactions

+
+
Parameters:
+
    +
  • radius (int) – the radius of the fingerprint

  • +
  • nbits (int) – the fingerprint lengths

  • +
+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/rxnutils.routes.utils.html b/rxnutils.routes.utils.html new file mode 100644 index 0000000..02076cd --- /dev/null +++ b/rxnutils.routes.utils.html @@ -0,0 +1,254 @@ + + + + + + + + rxnutils.routes.utils package — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

rxnutils.routes.utils package

+
+

Submodules

+
+
+

rxnutils.routes.utils.validation module

+

Module containing routes to validate AiZynthFinder-like input dictionaries

+
+
+class rxnutils.routes.utils.validation.ReactionNode(**data)
+

Bases: BaseModel

+

Node representing a reaction

+
+
Parameters:
+

data (Any)

+
+
+
+
+type: Annotated[str, StringConstraints(pattern='^reaction$')]
+
+ +
+
+children: List[MoleculeNode]
+
+ +
+
+model_config: ClassVar[ConfigDict] = {}
+

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

+
+ +
+ +
+
+class rxnutils.routes.utils.validation.MoleculeNode(*, smiles, type, children=None)
+

Bases: BaseModel

+

Node representing a molecule

+
+
Parameters:
+
    +
  • smiles (str)

  • +
  • type (Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^mol$)])

  • +
  • children (Annotated[List[ReactionNode], Len(min_length=1, max_length=1)] | None)

  • +
+
+
+
+
+smiles: str
+
+ +
+
+type: Annotated[str, StringConstraints(pattern='^mol$')]
+
+ +
+
+children: conlist(ReactionNode, min_length=1, max_length=1) | None
+
+ +
+
+model_config: ClassVar[ConfigDict] = {}
+

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

+
+ +
+ +
+
+rxnutils.routes.utils.validation.validate_dict(dict_)
+

Check that the route dictionary is a valid structure

+
+
Parameters:
+
    +
  • dict – the route as dictionary

  • +
  • dict_ (Dict[str, Any])

  • +
+
+
Return type:
+

None

+
+
+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/search.html b/search.html new file mode 100644 index 0000000..0134a74 --- /dev/null +++ b/search.html @@ -0,0 +1,125 @@ + + + + + + + Search — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +

Search

+ + + + +

+ Searching for multiple words only shows matches that contain + all words. +

+ + +
+ + + +
+ + +
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 0000000..3c4728e --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles": {"Actions": [[3, "actions"]], "Artifacts": [[2, "artifacts"], [20, "artifacts"]], "Development": [[3, "development"]], "Installation": [[0, "installation"]], "Introduction": [[0, "introduction"]], "Limitations": [[0, "limitations"]], "Module contents": [[5, "module-rxnutils"], [6, "module-rxnutils.chem"], [7, "module-rxnutils.chem.features"], [8, "module-rxnutils.chem.rinchi"], [9, "module-rxnutils.data"], [10, "module-rxnutils.data.ord"], [11, "module-rxnutils.data.uspto"], [12, "module-rxnutils.pipeline"], [13, "module-rxnutils.pipeline.actions"], [14, "module-rxnutils.routes"], [15, "module-rxnutils.routes.deepset"], [16, "module-rxnutils.routes.retro_bleu"], [17, "module-rxnutils.routes.ted"], [18, "module-rxnutils.routes.utils"]], "Open reaction database": [[2, null]], "Pipeline": [[3, null]], "Pre-requisites": [[2, "pre-requisites"], [20, "pre-requisites"]], "Reading": [[4, "reading"]], "Routes": [[4, null]], "Submodules": [[6, "submodules"], [7, "submodules"], [8, "submodules"], [9, "submodules"], [10, "submodules"], [11, "submodules"], [12, "submodules"], [13, "submodules"], [14, "submodules"], [15, "submodules"], [16, "submodules"], [17, "submodules"], [18, "submodules"]], "Subpackages": [[5, "subpackages"], [6, "subpackages"], [9, "subpackages"], [12, "subpackages"], [14, "subpackages"]], "Template extraction": [[19, "template-extraction"]], "Template manipulation": [[19, "template-manipulation"]], "Templates": [[19, null]], "USPTO": [[20, null]], "Usage": [[2, "usage"], [3, "usage"], [20, "usage"]], "rxnutils": [[1, null]], "rxnutils documentation": [[0, null]], "rxnutils package": [[5, null]], "rxnutils.chem package": [[6, null]], "rxnutils.chem.augmentation module": [[6, "module-rxnutils.chem.augmentation"]], "rxnutils.chem.cgr module": [[6, "module-rxnutils.chem.cgr"]], "rxnutils.chem.features package": [[7, null]], "rxnutils.chem.features.rxnfp_runner module": [[7, "module-rxnutils.chem.features.rxnfp_runner"]], "rxnutils.chem.features.sc_score module": [[7, "module-rxnutils.chem.features.sc_score"]], "rxnutils.chem.reaction module": [[6, "module-rxnutils.chem.reaction"]], "rxnutils.chem.rinchi package": [[8, null]], "rxnutils.chem.rinchi.download_rinchi module": [[8, "module-rxnutils.chem.rinchi.download_rinchi"]], "rxnutils.chem.rinchi.rinchi_api module": [[8, "module-rxnutils.chem.rinchi.rinchi_api"]], "rxnutils.chem.template module": [[6, "module-rxnutils.chem.template"]], "rxnutils.chem.utils module": [[6, "module-rxnutils.chem.utils"]], "rxnutils.data package": [[9, null]], "rxnutils.data.base_pipeline module": [[9, "module-rxnutils.data.base_pipeline"]], "rxnutils.data.batch_utils module": [[9, "module-rxnutils.data.batch_utils"]], "rxnutils.data.mapping module": [[9, "module-rxnutils.data.mapping"]], "rxnutils.data.mapping_pipeline module": [[9, "module-rxnutils.data.mapping_pipeline"]], "rxnutils.data.ord package": [[10, null]], "rxnutils.data.ord.import_ord_dataset module": [[10, "module-rxnutils.data.ord.import_ord_dataset"]], "rxnutils.data.ord.preparation_pipeline module": [[10, "module-rxnutils.data.ord.preparation_pipeline"]], "rxnutils.data.uspto package": [[11, null]], "rxnutils.data.uspto.combine module": [[11, "module-rxnutils.data.uspto.combine"]], "rxnutils.data.uspto.download module": [[11, "module-rxnutils.data.uspto.download"]], "rxnutils.data.uspto.preparation_pipeline module": [[11, "module-rxnutils.data.uspto.preparation_pipeline"]], "rxnutils.data.uspto.uspto_yield module": [[11, "module-rxnutils.data.uspto.uspto_yield"]], "rxnutils.pipeline package": [[12, null]], "rxnutils.pipeline.actions package": [[13, null]], "rxnutils.pipeline.actions.dataframe_mod module": [[13, "module-rxnutils.pipeline.actions.dataframe_mod"]], "rxnutils.pipeline.actions.reaction_mod module": [[13, "module-rxnutils.pipeline.actions.reaction_mod"]], "rxnutils.pipeline.actions.reaction_props module": [[13, "module-rxnutils.pipeline.actions.reaction_props"]], "rxnutils.pipeline.actions.templates module": [[13, "module-rxnutils.pipeline.actions.templates"]], "rxnutils.pipeline.base module": [[12, "module-rxnutils.pipeline.base"]], "rxnutils.pipeline.runner module": [[12, "module-rxnutils.pipeline.runner"]], "rxnutils.routes package": [[14, null]], "rxnutils.routes.base module": [[14, "module-rxnutils.routes.base"]], "rxnutils.routes.comparison module": [[14, "module-rxnutils.routes.comparison"]], "rxnutils.routes.deepset package": [[15, null]], "rxnutils.routes.deepset.featurizers module": [[15, "module-rxnutils.routes.deepset.featurizers"]], "rxnutils.routes.deepset.scoring module": [[15, "module-rxnutils.routes.deepset.scoring"]], "rxnutils.routes.image module": [[14, "module-rxnutils.routes.image"]], "rxnutils.routes.readers module": [[14, "module-rxnutils.routes.readers"]], "rxnutils.routes.retro_bleu package": [[16, null]], "rxnutils.routes.retro_bleu.ngram_collection module": [[16, "module-rxnutils.routes.retro_bleu.ngram_collection"]], "rxnutils.routes.retro_bleu.scoring module": [[16, "module-rxnutils.routes.retro_bleu.scoring"]], "rxnutils.routes.scoring module": [[14, "module-rxnutils.routes.scoring"]], "rxnutils.routes.ted package": [[17, null]], "rxnutils.routes.ted.distances_calculator module": [[17, "module-rxnutils.routes.ted.distances_calculator"]], "rxnutils.routes.ted.reactiontree module": [[17, "module-rxnutils.routes.ted.reactiontree"]], "rxnutils.routes.ted.utils module": [[17, "module-rxnutils.routes.ted.utils"]], "rxnutils.routes.utils package": [[18, null]], "rxnutils.routes.utils.validation module": [[18, "module-rxnutils.routes.utils.validation"]]}, "docnames": ["index", "modules", "ord", "pipeline", "routes", "rxnutils", "rxnutils.chem", "rxnutils.chem.features", "rxnutils.chem.rinchi", "rxnutils.data", "rxnutils.data.ord", "rxnutils.data.uspto", "rxnutils.pipeline", "rxnutils.pipeline.actions", "rxnutils.routes", "rxnutils.routes.deepset", "rxnutils.routes.retro_bleu", "rxnutils.routes.ted", "rxnutils.routes.utils", "templates", "uspto"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst", "modules.rst", "ord.rst", "pipeline.rst", "routes.rst", "rxnutils.rst", "rxnutils.chem.rst", "rxnutils.chem.features.rst", "rxnutils.chem.rinchi.rst", "rxnutils.data.rst", "rxnutils.data.ord.rst", "rxnutils.data.uspto.rst", "rxnutils.pipeline.rst", "rxnutils.pipeline.actions.rst", "rxnutils.routes.rst", "rxnutils.routes.deepset.rst", "rxnutils.routes.retro_bleu.rst", "rxnutils.routes.ted.rst", "rxnutils.routes.utils.rst", "templates.rst", "uspto.rst"], "indexentries": {"action() (in module rxnutils.pipeline.base)": [[12, "rxnutils.pipeline.base.action", false]], "agents_list (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.agents_list", false]], "apply() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.apply", false]], "aptedconfig (class in rxnutils.routes.ted.utils)": [[17, "rxnutils.routes.ted.utils.AptedConfig", false]], "assign_atom_mapping() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.assign_atom_mapping", false]], "atom_invariants() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.atom_invariants", false]], "atom_mapped_reaction_smiles() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.atom_mapped_reaction_smiles", false]], "atom_mapping_numbers() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.atom_mapping_numbers", false]], "atom_matching_bonanza_similarity() (in module rxnutils.routes.comparison)": [[14, "rxnutils.routes.comparison.atom_matching_bonanza_similarity", false]], "atom_properties() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.atom_properties", false]], "atommaptagdisconnectionsite (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite", false]], "atoms() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.atoms", false]], "bad_column (rxnutils.pipeline.actions.reaction_mod.removeunsanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable.bad_column", false]], "bad_columns (rxnutils.pipeline.actions.reaction_props.hasunsanitizablereactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants.bad_columns", false]], "badowski_route_score() (in module rxnutils.routes.scoring)": [[14, "rxnutils.routes.scoring.badowski_route_score", false]], "bonds_broken (rxnutils.chem.cgr.condensedgraphreaction property)": [[6, "rxnutils.chem.cgr.CondensedGraphReaction.bonds_broken", false]], "bonds_changed (rxnutils.chem.cgr.condensedgraphreaction property)": [[6, "rxnutils.chem.cgr.CondensedGraphReaction.bonds_changed", false]], "bonds_formed (rxnutils.chem.cgr.condensedgraphreaction property)": [[6, "rxnutils.chem.cgr.CondensedGraphReaction.bonds_formed", false]], "both (rxnutils.routes.ted.utils.treecontent attribute)": [[17, "rxnutils.routes.ted.utils.TreeContent.BOTH", false]], "calc_yield_column (rxnutils.data.uspto.uspto_yield.usptoyieldcuration attribute)": [[11, "rxnutils.data.uspto.uspto_yield.UsptoYieldCuration.calc_yield_column", false]], "canonical_template (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.canonical_template", false]], "canonical_template_generate_outcome() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.canonical_template_generate_outcome", false]], "canonicalize_tautomer() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.canonicalize_tautomer", false]], "cgrcreated (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrCreated", false]], "cgrnumberofdynamicbonds (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds", false]], "chains() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.chains", false]], "chemicalreaction (class in rxnutils.chem.reaction)": [[6, "rxnutils.chem.reaction.ChemicalReaction", false]], "children (rxnutils.routes.utils.validation.moleculenode attribute)": [[18, "rxnutils.routes.utils.validation.MoleculeNode.children", false]], "children (rxnutils.routes.utils.validation.reactionnode attribute)": [[18, "rxnutils.routes.utils.validation.ReactionNode.children", false]], "children() (rxnutils.routes.ted.utils.aptedconfig method)": [[17, "rxnutils.routes.ted.utils.AptedConfig.children", false]], "collect_reaction_features() (in module rxnutils.routes.deepset.featurizers)": [[15, "rxnutils.routes.deepset.featurizers.collect_reaction_features", false]], "columns (rxnutils.pipeline.actions.dataframe_mod.dropcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropColumns.columns", false]], "columns (rxnutils.pipeline.actions.dataframe_mod.keepcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.KeepColumns.columns", false]], "combine_batches() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.combine_batches", false]], "combine_csv_batches() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.combine_csv_batches", false]], "combine_files() (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow method)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.combine_files", false]], "combine_numpy_array_batches() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.combine_numpy_array_batches", false]], "combine_sparse_matrix_batches() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.combine_sparse_matrix_batches", false]], "condensedgraphreaction (class in rxnutils.chem.cgr)": [[6, "rxnutils.chem.cgr.CondensedGraphReaction", false]], "convertatommapdisconnectiontag (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag", false]], "countcomponents (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents", false]], "countelements (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.CountElements", false]], "counttemplatecomponents (class in rxnutils.pipeline.actions.templates)": [[13, "rxnutils.pipeline.actions.templates.CountTemplateComponents", false]], "create_action() (in module rxnutils.pipeline.base)": [[12, "rxnutils.pipeline.base.create_action", false]], "create_csv_batches() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.create_csv_batches", false]], "crop_image() (in module rxnutils.routes.image)": [[14, "rxnutils.routes.image.crop_image", false]], "data_prefix (rxnutils.data.base_pipeline.datapreparationbaseflow attribute)": [[9, "rxnutils.data.base_pipeline.DataPreparationBaseFlow.data_prefix", false]], "data_prefix (rxnutils.data.mapping_pipeline.rxnmappingflow attribute)": [[9, "rxnutils.data.mapping_pipeline.RxnMappingFlow.data_prefix", false]], "data_prefix (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow attribute)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.data_prefix", false]], "data_prefix (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow attribute)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.data_prefix", false]], "databaseflow (class in rxnutils.data.base_pipeline)": [[9, "rxnutils.data.base_pipeline.DataBaseFlow", false]], "datapreparationbaseflow (class in rxnutils.data.base_pipeline)": [[9, "rxnutils.data.base_pipeline.DataPreparationBaseFlow", false]], "deepset_route_score() (in module rxnutils.routes.deepset.scoring)": [[15, "rxnutils.routes.deepset.scoring.deepset_route_score", false]], "deepsetmodelclient (class in rxnutils.routes.deepset.scoring)": [[15, "rxnutils.routes.deepset.scoring.DeepsetModelClient", false]], "default_reaction_featurizer() (in module rxnutils.routes.deepset.featurizers)": [[15, "rxnutils.routes.deepset.featurizers.default_reaction_featurizer", false]], "desalt_molecules() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.desalt_molecules", false]], "desaltmolecules (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.DesaltMolecules", false]], "distance_iter() (rxnutils.routes.ted.reactiontree.reactiontreewrapper method)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper.distance_iter", false]], "distance_to() (rxnutils.chem.cgr.condensedgraphreaction method)": [[6, "rxnutils.chem.cgr.CondensedGraphReaction.distance_to", false]], "distance_to() (rxnutils.routes.ted.reactiontree.reactiontreewrapper method)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper.distance_to", false]], "distance_to_with_sorting() (rxnutils.routes.ted.reactiontree.reactiontreewrapper method)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper.distance_to_with_sorting", false]], "do_cleaning() (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow method)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.do_cleaning", false]], "do_cleaning() (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow method)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.do_cleaning", false]], "do_mapping() (rxnutils.data.mapping_pipeline.rxnmappingflow method)": [[9, "rxnutils.data.mapping_pipeline.RxnMappingFlow.do_mapping", false]], "draw_rounded_rectangle() (in module rxnutils.routes.image)": [[14, "rxnutils.routes.image.draw_rounded_rectangle", false]], "dropcolumns (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropColumns", false]], "dropduplicates (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropDuplicates", false]], "droprows (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropRows", false]], "ecfp_fingerprint() (in module rxnutils.routes.deepset.featurizers)": [[15, "rxnutils.routes.deepset.featurizers.ecfp_fingerprint", false]], "end() (rxnutils.data.mapping_pipeline.rxnmappingflow method)": [[9, "rxnutils.data.mapping_pipeline.RxnMappingFlow.end", false]], "end() (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow method)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.end", false]], "end() (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow method)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.end", false]], "enumerate_tautomers() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.enumerate_tautomers", false]], "expected_reactants_column (rxnutils.pipeline.actions.templates.retrotemplatereproduction attribute)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction.expected_reactants_column", false]], "fingerprint_bits() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.fingerprint_bits", false]], "fingerprint_bits() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.fingerprint_bits", false]], "fingerprint_vector() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.fingerprint_vector", false]], "fingerprint_vector() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.fingerprint_vector", false]], "first_tree (rxnutils.routes.ted.reactiontree.reactiontreewrapper property)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper.first_tree", false]], "fix_atom_properties() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.fix_atom_properties", false]], "folder (rxnutils.data.base_pipeline.databaseflow attribute)": [[9, "rxnutils.data.base_pipeline.DataBaseFlow.folder", false]], "from_file() (rxnutils.routes.retro_bleu.ngram_collection.ngramcollection class method)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection.from_file", false]], "from_tree_collection() (rxnutils.routes.retro_bleu.ngram_collection.ngramcollection class method)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection.from_tree_collection", false]], "generate_coreagent() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.generate_coreagent", false]], "generate_reaction_template() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.generate_reaction_template", false]], "generate_rinchi() (in module rxnutils.chem.rinchi.rinchi_api)": [[8, "rxnutils.chem.rinchi.rinchi_api.generate_rinchi", false]], "get_mol_weight() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.get_mol_weight", false]], "get_special_groups() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.get_special_groups", false]], "get_symmetric_sites() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.get_symmetric_sites", false]], "has_atom_mapping() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.has_atom_mapping", false]], "has_partial_mapping() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.has_partial_mapping", false]], "hash_from_bits() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.hash_from_bits", false]], "hash_from_smarts() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.hash_from_smarts", false]], "hash_from_smarts() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.hash_from_smarts", false]], "hash_from_smiles() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.hash_from_smiles", false]], "hash_from_smiles() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.hash_from_smiles", false]], "hashed_rid (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.hashed_rid", false]], "hasstereoinfo (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.HasStereoInfo", false]], "hasunmappedradicalatom (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom", false]], "hasunsanitizablereactants (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants", false]], "image() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.image", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.atommaptagdisconnectionsite attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.convertatommapdisconnectiontag attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.desaltmolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.DesaltMolecules.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.invertstereo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.InvertStereo.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.isotopeinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.namerxn attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NameRxn.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.neutralizemolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.rdkitrxnroles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.reactantstoreagents attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.reagentstoreactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.removeatommapping attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.removeextraatommapping attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.removestereoinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.removeunchangedproducts attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.removeunsanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.rxnmapper attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RxnMapper.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.splitreaction attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.SplitReaction.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_mod.trimrxnsmiles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.cgrcreated attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrCreated.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.cgrnumberofdynamicbonds attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.countelements attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountElements.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.hasstereoinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasStereoInfo.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.hasunmappedradicalatom attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.maxringnumber attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.MaxRingNumber.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.productatommappingstats attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.productsize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductSize.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.pseudoreactionhash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoReactionHash.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.pseudosmileshash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.reactantproductatombalance attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.reactantsize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantSize.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.ringbondmade attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingBondMade.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.ringmadesize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingMadeSize.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.ringnumberchange attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingNumberChange.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.smileslength attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesLength.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.smilessanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesSanitizable.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereocenterinreactantpotential attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereocenteriscreated attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereocenterisremoved attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereocenteroutsidereaction attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereocentrechanges attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCentreChanges.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereohaschiralreagent attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereoinvention attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoInvention.in_column", false]], "in_column (rxnutils.pipeline.actions.reaction_props.stereomesoproduct attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoMesoProduct.in_column", false]], "in_column (rxnutils.pipeline.actions.templates.counttemplatecomponents attribute)": [[13, "rxnutils.pipeline.actions.templates.CountTemplateComponents.in_column", false]], "in_columns (rxnutils.pipeline.actions.dataframe_mod.renamecolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.RenameColumns.in_columns", false]], "in_columns (rxnutils.pipeline.actions.dataframe_mod.stackcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackColumns.in_columns", false]], "indicator_columns (rxnutils.pipeline.actions.dataframe_mod.droprows attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropRows.indicator_columns", false]], "info (rxnutils.routes.ted.reactiontree.reactiontreewrapper property)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper.info", false]], "intermediate_counts() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.intermediate_counts", false]], "intermediates() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.intermediates", false]], "invertstereo (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.InvertStereo", false]], "is_complete() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.is_complete", false]], "is_fuzzy() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.is_fuzzy", false]], "is_solved() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.is_solved", false]], "is_valid_mol() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.is_valid_mol", false]], "isotope_column (rxnutils.pipeline.actions.reaction_mod.isotopeinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo.isotope_column", false]], "isotopeinfo (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo", false]], "join_cleaning() (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow method)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.join_cleaning", false]], "join_cleaning() (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow method)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.join_cleaning", false]], "join_lists() (rxnutils.pipeline.base.reactionactionmixin method)": [[12, "rxnutils.pipeline.base.ReactionActionMixIn.join_lists", false]], "join_mapping() (rxnutils.data.mapping_pipeline.rxnmappingflow method)": [[9, "rxnutils.data.mapping_pipeline.RxnMappingFlow.join_mapping", false]], "join_smiles() (rxnutils.pipeline.base.reactionactionmixin method)": [[12, "rxnutils.pipeline.base.ReactionActionMixIn.join_smiles", false]], "join_smiles_from_reaction() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.join_smiles_from_reaction", false]], "keep_something (rxnutils.pipeline.actions.reaction_mod.desaltmolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.DesaltMolecules.keep_something", false]], "keepcolumns (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.KeepColumns", false]], "key_columns (rxnutils.pipeline.actions.dataframe_mod.dropduplicates attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropDuplicates.key_columns", false]], "leaf_counts() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.leaf_counts", false]], "leaves() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.leaves", false]], "list_actions() (in module rxnutils.pipeline.base)": [[12, "rxnutils.pipeline.base.list_actions", false]], "main() (in module rxnutils.chem.features.rxnfp_runner)": [[7, "rxnutils.chem.features.rxnfp_runner.main", false]], "main() (in module rxnutils.chem.rinchi.download_rinchi)": [[8, "rxnutils.chem.rinchi.download_rinchi.main", false]], "main() (in module rxnutils.data.mapping)": [[9, "rxnutils.data.mapping.main", false]], "main() (in module rxnutils.data.ord.import_ord_dataset)": [[10, "rxnutils.data.ord.import_ord_dataset.main", false]], "main() (in module rxnutils.data.uspto.combine)": [[11, "rxnutils.data.uspto.combine.main", false]], "main() (in module rxnutils.data.uspto.download)": [[11, "rxnutils.data.uspto.download.main", false]], "main() (in module rxnutils.pipeline.runner)": [[12, "rxnutils.pipeline.runner.main", false]], "mapped_root_smiles (rxnutils.routes.base.synthesisroute property)": [[14, "rxnutils.routes.base.SynthesisRoute.mapped_root_smiles", false]], "match_regex (rxnutils.pipeline.actions.reaction_mod.isotopeinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo.match_regex", false]], "maxringnumber (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.MaxRingNumber", false]], "metadata_key (rxnutils.routes.retro_bleu.ngram_collection.ngramcollection attribute)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection.metadata_key", false]], "model_config (rxnutils.routes.utils.validation.moleculenode attribute)": [[18, "rxnutils.routes.utils.validation.MoleculeNode.model_config", false]], "model_config (rxnutils.routes.utils.validation.reactionnode attribute)": [[18, "rxnutils.routes.utils.validation.ReactionNode.model_config", false]], "module": [[5, "module-rxnutils", false], [6, "module-rxnutils.chem", false], [6, "module-rxnutils.chem.augmentation", false], [6, "module-rxnutils.chem.cgr", false], [6, "module-rxnutils.chem.reaction", false], [6, "module-rxnutils.chem.template", false], [6, "module-rxnutils.chem.utils", false], [7, "module-rxnutils.chem.features", false], [7, "module-rxnutils.chem.features.rxnfp_runner", false], [7, "module-rxnutils.chem.features.sc_score", false], [8, "module-rxnutils.chem.rinchi", false], [8, "module-rxnutils.chem.rinchi.download_rinchi", false], [8, "module-rxnutils.chem.rinchi.rinchi_api", false], [9, "module-rxnutils.data", false], [9, "module-rxnutils.data.base_pipeline", false], [9, "module-rxnutils.data.batch_utils", false], [9, "module-rxnutils.data.mapping", false], [9, "module-rxnutils.data.mapping_pipeline", false], [10, "module-rxnutils.data.ord", false], [10, "module-rxnutils.data.ord.import_ord_dataset", false], [10, "module-rxnutils.data.ord.preparation_pipeline", false], [11, "module-rxnutils.data.uspto", false], [11, "module-rxnutils.data.uspto.combine", false], [11, "module-rxnutils.data.uspto.download", false], [11, "module-rxnutils.data.uspto.preparation_pipeline", false], [11, "module-rxnutils.data.uspto.uspto_yield", false], [12, "module-rxnutils.pipeline", false], [12, "module-rxnutils.pipeline.base", false], [12, "module-rxnutils.pipeline.runner", false], [13, "module-rxnutils.pipeline.actions", false], [13, "module-rxnutils.pipeline.actions.dataframe_mod", false], [13, "module-rxnutils.pipeline.actions.reaction_mod", false], [13, "module-rxnutils.pipeline.actions.reaction_props", false], [13, "module-rxnutils.pipeline.actions.templates", false], [14, "module-rxnutils.routes", false], [14, "module-rxnutils.routes.base", false], [14, "module-rxnutils.routes.comparison", false], [14, "module-rxnutils.routes.image", false], [14, "module-rxnutils.routes.readers", false], [14, "module-rxnutils.routes.scoring", false], [15, "module-rxnutils.routes.deepset", false], [15, "module-rxnutils.routes.deepset.featurizers", false], [15, "module-rxnutils.routes.deepset.scoring", false], [16, "module-rxnutils.routes.retro_bleu", false], [16, "module-rxnutils.routes.retro_bleu.ngram_collection", false], [16, "module-rxnutils.routes.retro_bleu.scoring", false], [17, "module-rxnutils.routes.ted", false], [17, "module-rxnutils.routes.ted.distances_calculator", false], [17, "module-rxnutils.routes.ted.reactiontree", false], [17, "module-rxnutils.routes.ted.utils", false], [18, "module-rxnutils.routes.utils", false], [18, "module-rxnutils.routes.utils.validation", false]], "molecule_to_image() (in module rxnutils.routes.image)": [[14, "rxnutils.routes.image.molecule_to_image", false]], "moleculenode (class in rxnutils.routes.utils.validation)": [[18, "rxnutils.routes.utils.validation.MoleculeNode", false]], "molecules (rxnutils.routes.ted.utils.treecontent attribute)": [[17, "rxnutils.routes.ted.utils.TreeContent.MOLECULES", false]], "molecules_to_images() (in module rxnutils.routes.image)": [[14, "rxnutils.routes.image.molecules_to_images", false]], "namerxn (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.NameRxn", false]], "nbatches (rxnutils.data.base_pipeline.databaseflow attribute)": [[9, "rxnutils.data.base_pipeline.DataBaseFlow.nbatches", false]], "neutralize_molecules() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.neutralize_molecules", false]], "neutralizemolecules (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules", false]], "ngram_overlap_score() (in module rxnutils.routes.retro_bleu.scoring)": [[16, "rxnutils.routes.retro_bleu.scoring.ngram_overlap_score", false]], "ngramcollection (class in rxnutils.routes.retro_bleu.ngram_collection)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection", false]], "ngrams (rxnutils.routes.retro_bleu.ngram_collection.ngramcollection attribute)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection.ngrams", false]], "nitems (rxnutils.routes.retro_bleu.ngram_collection.ngramcollection attribute)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection.nitems", false]], "nlines() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.nlines", false]], "nm_rxn_column (rxnutils.pipeline.actions.reaction_mod.namerxn attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NameRxn.nm_rxn_column", false]], "nmapped_products_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.nmapped_products_column", false]], "nmapped_reactants_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.nmapped_reactants_column", false]], "nmapped_reagents_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.nmapped_reagents_column", false]], "nmc_column (rxnutils.pipeline.actions.reaction_mod.namerxn attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NameRxn.nmc_column", false]], "no_change() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.no_change", false]], "no_reagents (rxnutils.pipeline.actions.reaction_props.pseudoreactionhash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoReactionHash.no_reagents", false]], "noutcomes_column (rxnutils.pipeline.actions.templates.retrotemplatereproduction attribute)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction.noutcomes_column", false]], "nproducts_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.nproducts_column", false]], "nproducts_column (rxnutils.pipeline.actions.templates.counttemplatecomponents attribute)": [[13, "rxnutils.pipeline.actions.templates.CountTemplateComponents.nproducts_column", false]], "nreactants_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.nreactants_column", false]], "nreactants_column (rxnutils.pipeline.actions.templates.counttemplatecomponents attribute)": [[13, "rxnutils.pipeline.actions.templates.CountTemplateComponents.nreactants_column", false]], "nreagents_column (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.nreagents_column", false]], "nreagents_column (rxnutils.pipeline.actions.templates.counttemplatecomponents attribute)": [[13, "rxnutils.pipeline.actions.templates.CountTemplateComponents.nreagents_column", false]], "nsteps (rxnutils.routes.base.synthesisroute property)": [[14, "rxnutils.routes.base.SynthesisRoute.nsteps", false]], "options (rxnutils.pipeline.actions.reaction_mod.namerxn attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NameRxn.options", false]], "ord_data (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow attribute)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.ord_data", false]], "orddatapreparationflow (class in rxnutils.data.ord.preparation_pipeline)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow", false]], "other_reactants_column (rxnutils.pipeline.actions.templates.retrotemplatereproduction attribute)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction.other_reactants_column", false]], "out_column (rxnutils.data.uspto.uspto_yield.usptoyieldcuration attribute)": [[11, "rxnutils.data.uspto.uspto_yield.UsptoYieldCuration.out_column", false]], "out_column (rxnutils.pipeline.actions.dataframe_mod.stackcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackColumns.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.atommaptagdisconnectionsite attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.desaltmolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.DesaltMolecules.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.invertstereo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.InvertStereo.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.isotopeinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.neutralizemolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.rdkitrxnroles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.reactantstoreagents attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.reagentstoreactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.removeatommapping attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.removeextraatommapping attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.removestereoinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.removeunchangedproducts attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.removeunsanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.rxnmapper attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RxnMapper.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_mod.trimrxnsmiles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.cgrcreated attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrCreated.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.cgrnumberofdynamicbonds attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.countelements attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountElements.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.hasstereoinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasStereoInfo.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.hasunmappedradicalatom attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.hasunsanitizablereactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.maxringnumber attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.MaxRingNumber.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.productsize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductSize.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.pseudoreactionhash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoReactionHash.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.pseudosmileshash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.reactantproductatombalance attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.reactantsize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantSize.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.ringbondmade attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingBondMade.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.ringmadesize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingMadeSize.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.ringnumberchange attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingNumberChange.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.smileslength attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesLength.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.smilessanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesSanitizable.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereocenterinreactantpotential attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereocenteriscreated attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereocenterisremoved attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereocenteroutsidereaction attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereocentrechanges attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCentreChanges.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereohaschiralreagent attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereoinvention attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoInvention.out_column", false]], "out_column (rxnutils.pipeline.actions.reaction_props.stereomesoproduct attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoMesoProduct.out_column", false]], "out_column_reconstructed (rxnutils.pipeline.actions.reaction_mod.convertatommapdisconnectiontag attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag.out_column_reconstructed", false]], "out_column_tagged (rxnutils.pipeline.actions.reaction_mod.convertatommapdisconnectiontag attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag.out_column_tagged", false]], "out_columns (rxnutils.pipeline.actions.dataframe_mod.renamecolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.RenameColumns.out_columns", false]], "out_columns (rxnutils.pipeline.actions.reaction_mod.splitreaction attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.SplitReaction.out_columns", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.dropcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropColumns.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.dropduplicates attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropDuplicates.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.droprows attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.DropRows.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.keepcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.KeepColumns.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.querydataframe attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.QueryDataframe.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.renamecolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.RenameColumns.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.stackcolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackColumns.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.dataframe_mod.stackmulticolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.atommaptagdisconnectionsite attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.convertatommapdisconnectiontag attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.desaltmolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.DesaltMolecules.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.invertstereo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.InvertStereo.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.isotopeinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.namerxn attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NameRxn.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.neutralizemolecules attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.rdkitrxnroles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.reactantstoreagents attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.reagentstoreactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.removeatommapping attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.removeextraatommapping attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.removestereoinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.removeunchangedproducts attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.removeunsanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.rxnmapper attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RxnMapper.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.splitreaction attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.SplitReaction.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_mod.trimrxnsmiles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.cgrcreated attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrCreated.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.cgrnumberofdynamicbonds attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.countcomponents attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountComponents.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.countelements attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.CountElements.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.hasstereoinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasStereoInfo.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.hasunmappedradicalatom attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.hasunsanitizablereactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.maxringnumber attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.MaxRingNumber.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.productatommappingstats attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.productsize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductSize.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.pseudoreactionhash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoReactionHash.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.pseudosmileshash attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.reactantproductatombalance attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.reactantsize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantSize.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.ringbondmade attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingBondMade.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.ringmadesize attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingMadeSize.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.ringnumberchange attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.RingNumberChange.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.smileslength attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesLength.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.smilessanitizable attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesSanitizable.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereocenterinreactantpotential attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereocenteriscreated attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereocenterisremoved attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereocenteroutsidereaction attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereocentrechanges attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCentreChanges.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereohaschiralreagent attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereoinvention attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoInvention.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.reaction_props.stereomesoproduct attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoMesoProduct.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.templates.counttemplatecomponents attribute)": [[13, "rxnutils.pipeline.actions.templates.CountTemplateComponents.pretty_name", false]], "pretty_name (rxnutils.pipeline.actions.templates.retrotemplatereproduction attribute)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction.pretty_name", false]], "productatommappingstats (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats", false]], "products_list (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.products_list", false]], "productsize (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductSize", false]], "pseudo_rinchi (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.pseudo_rinchi", false]], "pseudo_rinchi_key (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.pseudo_rinchi_key", false]], "pseudoreactionhash (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoReactionHash", false]], "pseudosmileshash (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash", false]], "query (rxnutils.pipeline.actions.dataframe_mod.querydataframe attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.QueryDataframe.query", false]], "querydataframe (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.QueryDataframe", false]], "rdkit_validation() (rxnutils.chem.template.reactiontemplate method)": [[6, "rxnutils.chem.template.ReactionTemplate.rdkit_validation", false]], "rdkitrxnroles (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles", false]], "reactantproductatombalance (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance", false]], "reactants_list (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.reactants_list", false]], "reactantsize (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.ReactantSize", false]], "reactantstoreagents (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents", false]], "reaction_centres() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.reaction_centres", false]], "reaction_class_rank_score() (in module rxnutils.routes.scoring)": [[14, "rxnutils.routes.scoring.reaction_class_rank_score", false]], "reaction_data() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.reaction_data", false]], "reaction_difference_fingerprint() (in module rxnutils.routes.deepset.featurizers)": [[15, "rxnutils.routes.deepset.featurizers.reaction_difference_fingerprint", false]], "reaction_ngrams() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.reaction_ngrams", false]], "reaction_smiles() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.reaction_smiles", false]], "reactionactionmixin (class in rxnutils.pipeline.base)": [[12, "rxnutils.pipeline.base.ReactionActionMixIn", false]], "reactionexception": [[6, "rxnutils.chem.reaction.ReactionException", false]], "reactionnode (class in rxnutils.routes.utils.validation)": [[18, "rxnutils.routes.utils.validation.ReactionNode", false]], "reactions (rxnutils.routes.ted.utils.treecontent attribute)": [[17, "rxnutils.routes.ted.utils.TreeContent.REACTIONS", false]], "reactions2route() (in module rxnutils.routes.readers)": [[14, "rxnutils.routes.readers.reactions2route", false]], "reactiontemplate (class in rxnutils.chem.template)": [[6, "rxnutils.chem.template.ReactionTemplate", false]], "reactiontreewrapper (class in rxnutils.routes.ted.reactiontree)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper", false]], "read_aizynthcli_dataframe() (in module rxnutils.routes.readers)": [[14, "rxnutils.routes.readers.read_aizynthcli_dataframe", false]], "read_aizynthfinder_dict() (in module rxnutils.routes.readers)": [[14, "rxnutils.routes.readers.read_aizynthfinder_dict", false]], "read_csv_batch() (in module rxnutils.data.batch_utils)": [[9, "rxnutils.data.batch_utils.read_csv_batch", false]], "read_rdf_file() (in module rxnutils.routes.readers)": [[14, "rxnutils.routes.readers.read_rdf_file", false]], "read_reaction_lists() (in module rxnutils.routes.readers)": [[14, "rxnutils.routes.readers.read_reaction_lists", false]], "read_reactions_dataframe() (in module rxnutils.routes.readers)": [[14, "rxnutils.routes.readers.read_reactions_dataframe", false]], "reagentstoreactants (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants", false]], "reassign_rsmi_atom_mapping() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.reassign_rsmi_atom_mapping", false]], "recreate_rsmi() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.recreate_rsmi", false]], "remap() (rxnutils.routes.base.synthesisroute method)": [[14, "rxnutils.routes.base.SynthesisRoute.remap", false]], "remove_atom_mapping() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.remove_atom_mapping", false]], "remove_atom_mapping() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.remove_atom_mapping", false]], "remove_atom_mapping_template() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.remove_atom_mapping_template", false]], "remove_stereochemistry() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.remove_stereochemistry", false]], "removeatommapping (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping", false]], "removeextraatommapping (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping", false]], "removestereoinfo (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo", false]], "removeunchangedproducts (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts", false]], "removeunsanitizable (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable", false]], "rename() (rxnutils.routes.ted.utils.aptedconfig method)": [[17, "rxnutils.routes.ted.utils.AptedConfig.rename", false]], "renamecolumns (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.RenameColumns", false]], "retro_bleu_score() (in module rxnutils.routes.retro_bleu.scoring)": [[16, "rxnutils.routes.retro_bleu.scoring.retro_bleu_score", false]], "retro_template (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.retro_template", false]], "retro_template_generate_outcome() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.retro_template_generate_outcome", false]], "retro_template_selectivity() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.retro_template_selectivity", false]], "retrotemplatereproduction (class in rxnutils.pipeline.actions.templates)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction", false]], "rinchi (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.rinchi", false]], "rinchi_key_long (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.rinchi_key_long", false]], "rinchi_key_short (rxnutils.chem.reaction.chemicalreaction property)": [[6, "rxnutils.chem.reaction.ChemicalReaction.rinchi_key_short", false]], "rinchierror": [[8, "rxnutils.chem.rinchi.download_rinchi.RInChIError", false]], "rinchistructure (in module rxnutils.chem.rinchi.rinchi_api)": [[8, "rxnutils.chem.rinchi.rinchi_api.RInChIStructure", false]], "ringbondmade (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.RingBondMade", false]], "ringmadesize (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.RingMadeSize", false]], "ringnumberchange (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.RingNumberChange", false]], "route_distances_calculator() (in module rxnutils.routes.comparison)": [[14, "rxnutils.routes.comparison.route_distances_calculator", false]], "route_ranks() (in module rxnutils.routes.scoring)": [[14, "rxnutils.routes.scoring.route_ranks", false]], "route_sorter() (in module rxnutils.routes.scoring)": [[14, "rxnutils.routes.scoring.route_sorter", false]], "routeimagefactory (class in rxnutils.routes.image)": [[14, "rxnutils.routes.image.RouteImageFactory", false]], "rsmi_column (rxnutils.pipeline.actions.reaction_props.hasunsanitizablereactants attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants.rsmi_column", false]], "run_pipeline() (in module rxnutils.pipeline.runner)": [[12, "rxnutils.pipeline.runner.run_pipeline", false]], "rxnmapper (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.RxnMapper", false]], "rxnmapper_command (rxnutils.pipeline.actions.reaction_mod.rxnmapper attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.RxnMapper.rxnmapper_command", false]], "rxnmappingflow (class in rxnutils.data.mapping_pipeline)": [[9, "rxnutils.data.mapping_pipeline.RxnMappingFlow", false]], "rxnutils": [[5, "module-rxnutils", false]], "rxnutils.chem": [[6, "module-rxnutils.chem", false]], "rxnutils.chem.augmentation": [[6, "module-rxnutils.chem.augmentation", false]], "rxnutils.chem.cgr": [[6, "module-rxnutils.chem.cgr", false]], "rxnutils.chem.features": [[7, "module-rxnutils.chem.features", false]], "rxnutils.chem.features.rxnfp_runner": [[7, "module-rxnutils.chem.features.rxnfp_runner", false]], "rxnutils.chem.features.sc_score": [[7, "module-rxnutils.chem.features.sc_score", false]], "rxnutils.chem.reaction": [[6, "module-rxnutils.chem.reaction", false]], "rxnutils.chem.rinchi": [[8, "module-rxnutils.chem.rinchi", false]], "rxnutils.chem.rinchi.download_rinchi": [[8, "module-rxnutils.chem.rinchi.download_rinchi", false]], "rxnutils.chem.rinchi.rinchi_api": [[8, "module-rxnutils.chem.rinchi.rinchi_api", false]], "rxnutils.chem.template": [[6, "module-rxnutils.chem.template", false]], "rxnutils.chem.utils": [[6, "module-rxnutils.chem.utils", false]], "rxnutils.data": [[9, "module-rxnutils.data", false]], "rxnutils.data.base_pipeline": [[9, "module-rxnutils.data.base_pipeline", false]], "rxnutils.data.batch_utils": [[9, "module-rxnutils.data.batch_utils", false]], "rxnutils.data.mapping": [[9, "module-rxnutils.data.mapping", false]], "rxnutils.data.mapping_pipeline": [[9, "module-rxnutils.data.mapping_pipeline", false]], "rxnutils.data.ord": [[10, "module-rxnutils.data.ord", false]], "rxnutils.data.ord.import_ord_dataset": [[10, "module-rxnutils.data.ord.import_ord_dataset", false]], "rxnutils.data.ord.preparation_pipeline": [[10, "module-rxnutils.data.ord.preparation_pipeline", false]], "rxnutils.data.uspto": [[11, "module-rxnutils.data.uspto", false]], "rxnutils.data.uspto.combine": [[11, "module-rxnutils.data.uspto.combine", false]], "rxnutils.data.uspto.download": [[11, "module-rxnutils.data.uspto.download", false]], "rxnutils.data.uspto.preparation_pipeline": [[11, "module-rxnutils.data.uspto.preparation_pipeline", false]], "rxnutils.data.uspto.uspto_yield": [[11, "module-rxnutils.data.uspto.uspto_yield", false]], "rxnutils.pipeline": [[12, "module-rxnutils.pipeline", false]], "rxnutils.pipeline.actions": [[13, "module-rxnutils.pipeline.actions", false]], "rxnutils.pipeline.actions.dataframe_mod": [[13, "module-rxnutils.pipeline.actions.dataframe_mod", false]], "rxnutils.pipeline.actions.reaction_mod": [[13, "module-rxnutils.pipeline.actions.reaction_mod", false]], "rxnutils.pipeline.actions.reaction_props": [[13, "module-rxnutils.pipeline.actions.reaction_props", false]], "rxnutils.pipeline.actions.templates": [[13, "module-rxnutils.pipeline.actions.templates", false]], "rxnutils.pipeline.base": [[12, "module-rxnutils.pipeline.base", false]], "rxnutils.pipeline.runner": [[12, "module-rxnutils.pipeline.runner", false]], "rxnutils.routes": [[14, "module-rxnutils.routes", false]], "rxnutils.routes.base": [[14, "module-rxnutils.routes.base", false]], "rxnutils.routes.comparison": [[14, "module-rxnutils.routes.comparison", false]], "rxnutils.routes.deepset": [[15, "module-rxnutils.routes.deepset", false]], "rxnutils.routes.deepset.featurizers": [[15, "module-rxnutils.routes.deepset.featurizers", false]], "rxnutils.routes.deepset.scoring": [[15, "module-rxnutils.routes.deepset.scoring", false]], "rxnutils.routes.image": [[14, "module-rxnutils.routes.image", false]], "rxnutils.routes.readers": [[14, "module-rxnutils.routes.readers", false]], "rxnutils.routes.retro_bleu": [[16, "module-rxnutils.routes.retro_bleu", false]], "rxnutils.routes.retro_bleu.ngram_collection": [[16, "module-rxnutils.routes.retro_bleu.ngram_collection", false]], "rxnutils.routes.retro_bleu.scoring": [[16, "module-rxnutils.routes.retro_bleu.scoring", false]], "rxnutils.routes.scoring": [[14, "module-rxnutils.routes.scoring", false]], "rxnutils.routes.ted": [[17, "module-rxnutils.routes.ted", false]], "rxnutils.routes.ted.distances_calculator": [[17, "module-rxnutils.routes.ted.distances_calculator", false]], "rxnutils.routes.ted.reactiontree": [[17, "module-rxnutils.routes.ted.reactiontree", false]], "rxnutils.routes.ted.utils": [[17, "module-rxnutils.routes.ted.utils", false]], "rxnutils.routes.utils": [[18, "module-rxnutils.routes.utils", false]], "rxnutils.routes.utils.validation": [[18, "module-rxnutils.routes.utils.validation", false]], "same_molecule() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.same_molecule", false]], "sanitization_check() (rxnutils.chem.reaction.chemicalreaction method)": [[6, "rxnutils.chem.reaction.ChemicalReaction.sanitization_check", false]], "sanitize() (rxnutils.chem.template.templatemolecule method)": [[6, "rxnutils.chem.template.TemplateMolecule.sanitize", false]], "save_to_file() (rxnutils.routes.retro_bleu.ngram_collection.ngramcollection method)": [[16, "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection.save_to_file", false]], "scscore (class in rxnutils.chem.features.sc_score)": [[7, "rxnutils.chem.features.sc_score.SCScore", false]], "setup_cleaning() (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow method)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.setup_cleaning", false]], "setup_cleaning() (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow method)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.setup_cleaning", false]], "simple_bond_forming_similarity() (in module rxnutils.routes.comparison)": [[14, "rxnutils.routes.comparison.simple_bond_forming_similarity", false]], "simple_route_similarity() (in module rxnutils.routes.comparison)": [[14, "rxnutils.routes.comparison.simple_route_similarity", false]], "single_reactant_augmentation() (in module rxnutils.chem.augmentation)": [[6, "rxnutils.chem.augmentation.single_reactant_augmentation", false]], "smiles (rxnutils.routes.utils.validation.moleculenode attribute)": [[18, "rxnutils.routes.utils.validation.MoleculeNode.smiles", false]], "smiles2inchikey() (in module rxnutils.routes.base)": [[14, "rxnutils.routes.base.smiles2inchikey", false]], "smiles_column (rxnutils.pipeline.actions.templates.retrotemplatereproduction attribute)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction.smiles_column", false]], "smiles_column_index (rxnutils.pipeline.actions.reaction_mod.trimrxnsmiles attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles.smiles_column_index", false]], "smileslength (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesLength", false]], "smilessanitizable (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.SmilesSanitizable", false]], "split_lists() (rxnutils.pipeline.base.reactionactionmixin method)": [[12, "rxnutils.pipeline.base.ReactionActionMixIn.split_lists", false]], "split_rsmi() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.split_rsmi", false]], "split_smiles() (rxnutils.pipeline.base.reactionactionmixin method)": [[12, "rxnutils.pipeline.base.ReactionActionMixIn.split_smiles", false]], "split_smiles_from_reaction() (in module rxnutils.chem.utils)": [[6, "rxnutils.chem.utils.split_smiles_from_reaction", false]], "splitreaction (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.SplitReaction", false]], "stack_columns (rxnutils.pipeline.actions.dataframe_mod.stackmulticolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns.stack_columns", false]], "stackcolumns (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackColumns", false]], "stackmulticolumns (class in rxnutils.pipeline.actions.dataframe_mod)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns", false]], "standardfingerprintfactory (class in rxnutils.routes.ted.utils)": [[17, "rxnutils.routes.ted.utils.StandardFingerprintFactory", false]], "start() (rxnutils.data.mapping_pipeline.rxnmappingflow method)": [[9, "rxnutils.data.mapping_pipeline.RxnMappingFlow.start", false]], "start() (rxnutils.data.ord.preparation_pipeline.orddatapreparationflow method)": [[10, "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow.start", false]], "start() (rxnutils.data.uspto.preparation_pipeline.usptodatapreparationflow method)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow.start", false]], "stereo_changes_column (rxnutils.pipeline.actions.reaction_props.stereocentrechanges attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCentreChanges.stereo_changes_column", false]], "stereocenterinreactantpotential (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential", false]], "stereocenteriscreated (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated", false]], "stereocenterisremoved (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved", false]], "stereocenteroutsidereaction (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction", false]], "stereocentrechanges (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoCentreChanges", false]], "stereohaschiralreagent (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent", false]], "stereoinvention (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoInvention", false]], "stereomesoproduct (class in rxnutils.pipeline.actions.reaction_props)": [[13, "rxnutils.pipeline.actions.reaction_props.StereoMesoProduct", false]], "sub_regex (rxnutils.pipeline.actions.reaction_mod.isotopeinfo attribute)": [[13, "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo.sub_regex", false]], "synthesisroute (class in rxnutils.routes.base)": [[14, "rxnutils.routes.base.SynthesisRoute", false]], "target_columns (rxnutils.pipeline.actions.dataframe_mod.stackmulticolumns attribute)": [[13, "rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns.target_columns", false]], "ted_distances_calculator() (in module rxnutils.routes.ted.distances_calculator)": [[17, "rxnutils.routes.ted.distances_calculator.ted_distances_calculator", false]], "template_column (rxnutils.pipeline.actions.templates.retrotemplatereproduction attribute)": [[13, "rxnutils.pipeline.actions.templates.RetroTemplateReproduction.template_column", false]], "templatemolecule (class in rxnutils.chem.template)": [[6, "rxnutils.chem.template.TemplateMolecule", false]], "text_yield_column (rxnutils.data.uspto.uspto_yield.usptoyieldcuration attribute)": [[11, "rxnutils.data.uspto.uspto_yield.UsptoYieldCuration.text_yield_column", false]], "total_centers (rxnutils.chem.cgr.condensedgraphreaction property)": [[6, "rxnutils.chem.cgr.CondensedGraphReaction.total_centers", false]], "treecontent (class in rxnutils.routes.ted.utils)": [[17, "rxnutils.routes.ted.utils.TreeContent", false]], "trees (rxnutils.routes.ted.reactiontree.reactiontreewrapper property)": [[17, "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper.trees", false]], "trimrxnsmiles (class in rxnutils.pipeline.actions.reaction_mod)": [[13, "rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles", false]], "type (rxnutils.routes.utils.validation.moleculenode attribute)": [[18, "rxnutils.routes.utils.validation.MoleculeNode.type", false]], "type (rxnutils.routes.utils.validation.reactionnode attribute)": [[18, "rxnutils.routes.utils.validation.ReactionNode.type", false]], "unmapped_column (rxnutils.pipeline.actions.reaction_props.productatommappingstats attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats.unmapped_column", false]], "usptodatapreparationflow (class in rxnutils.data.uspto.preparation_pipeline)": [[11, "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow", false]], "usptoyieldcuration (class in rxnutils.data.uspto.uspto_yield)": [[11, "rxnutils.data.uspto.uspto_yield.UsptoYieldCuration", false]], "validate_dict() (in module rxnutils.routes.utils.validation)": [[18, "rxnutils.routes.utils.validation.validate_dict", false]], "widow_column (rxnutils.pipeline.actions.reaction_props.productatommappingstats attribute)": [[13, "rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats.widow_column", false]]}, "objects": {"": [[5, 0, 0, "-", "rxnutils"]], "rxnutils": [[6, 0, 0, "-", "chem"], [9, 0, 0, "-", "data"], [12, 0, 0, "-", "pipeline"], [14, 0, 0, "-", "routes"]], "rxnutils.chem": [[6, 0, 0, "-", "augmentation"], [6, 0, 0, "-", "cgr"], [7, 0, 0, "-", "features"], [6, 0, 0, "-", "reaction"], [8, 0, 0, "-", "rinchi"], [6, 0, 0, "-", "template"], [6, 0, 0, "-", "utils"]], "rxnutils.chem.augmentation": [[6, 1, 1, "", "single_reactant_augmentation"]], "rxnutils.chem.cgr": [[6, 2, 1, "", "CondensedGraphReaction"]], "rxnutils.chem.cgr.CondensedGraphReaction": [[6, 3, 1, "", "bonds_broken"], [6, 3, 1, "", "bonds_changed"], [6, 3, 1, "", "bonds_formed"], [6, 4, 1, "", "distance_to"], [6, 3, 1, "", "total_centers"]], "rxnutils.chem.features": [[7, 0, 0, "-", "rxnfp_runner"], [7, 0, 0, "-", "sc_score"]], "rxnutils.chem.features.rxnfp_runner": [[7, 1, 1, "", "main"]], "rxnutils.chem.features.sc_score": [[7, 2, 1, "", "SCScore"]], "rxnutils.chem.reaction": [[6, 2, 1, "", "ChemicalReaction"], [6, 5, 1, "", "ReactionException"]], "rxnutils.chem.reaction.ChemicalReaction": [[6, 3, 1, "", "agents_list"], [6, 3, 1, "", "canonical_template"], [6, 4, 1, "", "canonical_template_generate_outcome"], [6, 4, 1, "", "generate_coreagent"], [6, 4, 1, "", "generate_reaction_template"], [6, 4, 1, "", "has_partial_mapping"], [6, 3, 1, "", "hashed_rid"], [6, 4, 1, "", "is_complete"], [6, 4, 1, "", "is_fuzzy"], [6, 4, 1, "", "no_change"], [6, 3, 1, "", "products_list"], [6, 3, 1, "", "pseudo_rinchi"], [6, 3, 1, "", "pseudo_rinchi_key"], [6, 3, 1, "", "reactants_list"], [6, 3, 1, "", "retro_template"], [6, 4, 1, "", "retro_template_generate_outcome"], [6, 4, 1, "", "retro_template_selectivity"], [6, 3, 1, "", "rinchi"], [6, 3, 1, "", "rinchi_key_long"], [6, 3, 1, "", "rinchi_key_short"], [6, 4, 1, "", "sanitization_check"]], "rxnutils.chem.rinchi": [[8, 0, 0, "-", "download_rinchi"], [8, 0, 0, "-", "rinchi_api"]], "rxnutils.chem.rinchi.download_rinchi": [[8, 5, 1, "", "RInChIError"], [8, 1, 1, "", "main"]], "rxnutils.chem.rinchi.rinchi_api": [[8, 6, 1, "", "RInChIStructure"], [8, 1, 1, "", "generate_rinchi"]], "rxnutils.chem.template": [[6, 2, 1, "", "ReactionTemplate"], [6, 2, 1, "", "TemplateMolecule"]], "rxnutils.chem.template.ReactionTemplate": [[6, 4, 1, "", "apply"], [6, 4, 1, "", "fingerprint_bits"], [6, 4, 1, "", "fingerprint_vector"], [6, 4, 1, "", "hash_from_bits"], [6, 4, 1, "", "hash_from_smarts"], [6, 4, 1, "", "hash_from_smiles"], [6, 4, 1, "", "rdkit_validation"]], "rxnutils.chem.template.TemplateMolecule": [[6, 4, 1, "", "atom_invariants"], [6, 4, 1, "", "atom_properties"], [6, 4, 1, "", "atoms"], [6, 4, 1, "", "fingerprint_bits"], [6, 4, 1, "", "fingerprint_vector"], [6, 4, 1, "", "fix_atom_properties"], [6, 4, 1, "", "hash_from_smarts"], [6, 4, 1, "", "hash_from_smiles"], [6, 4, 1, "", "remove_atom_mapping"], [6, 4, 1, "", "sanitize"]], "rxnutils.chem.utils": [[6, 1, 1, "", "atom_mapping_numbers"], [6, 1, 1, "", "canonicalize_tautomer"], [6, 1, 1, "", "desalt_molecules"], [6, 1, 1, "", "enumerate_tautomers"], [6, 1, 1, "", "get_mol_weight"], [6, 1, 1, "", "get_special_groups"], [6, 1, 1, "", "get_symmetric_sites"], [6, 1, 1, "", "has_atom_mapping"], [6, 1, 1, "", "is_valid_mol"], [6, 1, 1, "", "join_smiles_from_reaction"], [6, 1, 1, "", "neutralize_molecules"], [6, 1, 1, "", "reaction_centres"], [6, 1, 1, "", "reassign_rsmi_atom_mapping"], [6, 1, 1, "", "recreate_rsmi"], [6, 1, 1, "", "remove_atom_mapping"], [6, 1, 1, "", "remove_atom_mapping_template"], [6, 1, 1, "", "remove_stereochemistry"], [6, 1, 1, "", "same_molecule"], [6, 1, 1, "", "split_rsmi"], [6, 1, 1, "", "split_smiles_from_reaction"]], "rxnutils.data": [[9, 0, 0, "-", "base_pipeline"], [9, 0, 0, "-", "batch_utils"], [9, 0, 0, "-", "mapping"], [9, 0, 0, "-", "mapping_pipeline"], [10, 0, 0, "-", "ord"], [11, 0, 0, "-", "uspto"]], "rxnutils.data.base_pipeline": [[9, 2, 1, "", "DataBaseFlow"], [9, 2, 1, "", "DataPreparationBaseFlow"]], "rxnutils.data.base_pipeline.DataBaseFlow": [[9, 6, 1, "", "folder"], [9, 6, 1, "", "nbatches"]], "rxnutils.data.base_pipeline.DataPreparationBaseFlow": [[9, 6, 1, "", "data_prefix"]], "rxnutils.data.batch_utils": [[9, 1, 1, "", "combine_batches"], [9, 1, 1, "", "combine_csv_batches"], [9, 1, 1, "", "combine_numpy_array_batches"], [9, 1, 1, "", "combine_sparse_matrix_batches"], [9, 1, 1, "", "create_csv_batches"], [9, 1, 1, "", "nlines"], [9, 1, 1, "", "read_csv_batch"]], "rxnutils.data.mapping": [[9, 1, 1, "", "main"]], "rxnutils.data.mapping_pipeline": [[9, 2, 1, "", "RxnMappingFlow"]], "rxnutils.data.mapping_pipeline.RxnMappingFlow": [[9, 6, 1, "", "data_prefix"], [9, 4, 1, "", "do_mapping"], [9, 4, 1, "", "end"], [9, 4, 1, "", "join_mapping"], [9, 4, 1, "", "start"]], "rxnutils.data.ord": [[10, 0, 0, "-", "import_ord_dataset"], [10, 0, 0, "-", "preparation_pipeline"]], "rxnutils.data.ord.import_ord_dataset": [[10, 1, 1, "", "main"]], "rxnutils.data.ord.preparation_pipeline": [[10, 2, 1, "", "OrdDataPreparationFlow"]], "rxnutils.data.ord.preparation_pipeline.OrdDataPreparationFlow": [[10, 6, 1, "", "data_prefix"], [10, 4, 1, "", "do_cleaning"], [10, 4, 1, "", "end"], [10, 4, 1, "", "join_cleaning"], [10, 6, 1, "", "ord_data"], [10, 4, 1, "", "setup_cleaning"], [10, 4, 1, "", "start"]], "rxnutils.data.uspto": [[11, 0, 0, "-", "combine"], [11, 0, 0, "-", "download"], [11, 0, 0, "-", "preparation_pipeline"], [11, 0, 0, "-", "uspto_yield"]], "rxnutils.data.uspto.combine": [[11, 1, 1, "", "main"]], "rxnutils.data.uspto.download": [[11, 1, 1, "", "main"]], "rxnutils.data.uspto.preparation_pipeline": [[11, 2, 1, "", "UsptoDataPreparationFlow"]], "rxnutils.data.uspto.preparation_pipeline.UsptoDataPreparationFlow": [[11, 4, 1, "", "combine_files"], [11, 6, 1, "", "data_prefix"], [11, 4, 1, "", "do_cleaning"], [11, 4, 1, "", "end"], [11, 4, 1, "", "join_cleaning"], [11, 4, 1, "", "setup_cleaning"], [11, 4, 1, "", "start"]], "rxnutils.data.uspto.uspto_yield": [[11, 2, 1, "", "UsptoYieldCuration"]], "rxnutils.data.uspto.uspto_yield.UsptoYieldCuration": [[11, 6, 1, "", "calc_yield_column"], [11, 6, 1, "", "out_column"], [11, 6, 1, "", "text_yield_column"]], "rxnutils.pipeline": [[13, 0, 0, "-", "actions"], [12, 0, 0, "-", "base"], [12, 0, 0, "-", "runner"]], "rxnutils.pipeline.actions": [[13, 0, 0, "-", "dataframe_mod"], [13, 0, 0, "-", "reaction_mod"], [13, 0, 0, "-", "reaction_props"], [13, 0, 0, "-", "templates"]], "rxnutils.pipeline.actions.dataframe_mod": [[13, 2, 1, "", "DropColumns"], [13, 2, 1, "", "DropDuplicates"], [13, 2, 1, "", "DropRows"], [13, 2, 1, "", "KeepColumns"], [13, 2, 1, "", "QueryDataframe"], [13, 2, 1, "", "RenameColumns"], [13, 2, 1, "", "StackColumns"], [13, 2, 1, "", "StackMultiColumns"]], "rxnutils.pipeline.actions.dataframe_mod.DropColumns": [[13, 6, 1, "", "columns"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.dataframe_mod.DropDuplicates": [[13, 6, 1, "", "key_columns"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.dataframe_mod.DropRows": [[13, 6, 1, "", "indicator_columns"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.dataframe_mod.KeepColumns": [[13, 6, 1, "", "columns"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.dataframe_mod.QueryDataframe": [[13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "query"]], "rxnutils.pipeline.actions.dataframe_mod.RenameColumns": [[13, 6, 1, "", "in_columns"], [13, 6, 1, "", "out_columns"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.dataframe_mod.StackColumns": [[13, 6, 1, "", "in_columns"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.dataframe_mod.StackMultiColumns": [[13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "stack_columns"], [13, 6, 1, "", "target_columns"]], "rxnutils.pipeline.actions.reaction_mod": [[13, 2, 1, "", "AtomMapTagDisconnectionSite"], [13, 2, 1, "", "ConvertAtomMapDisconnectionTag"], [13, 2, 1, "", "DesaltMolecules"], [13, 2, 1, "", "InvertStereo"], [13, 2, 1, "", "IsotopeInfo"], [13, 2, 1, "", "NameRxn"], [13, 2, 1, "", "NeutralizeMolecules"], [13, 2, 1, "", "RDKitRxnRoles"], [13, 2, 1, "", "ReactantsToReagents"], [13, 2, 1, "", "ReagentsToReactants"], [13, 2, 1, "", "RemoveAtomMapping"], [13, 2, 1, "", "RemoveExtraAtomMapping"], [13, 2, 1, "", "RemoveStereoInfo"], [13, 2, 1, "", "RemoveUnchangedProducts"], [13, 2, 1, "", "RemoveUnsanitizable"], [13, 2, 1, "", "RxnMapper"], [13, 2, 1, "", "SplitReaction"], [13, 2, 1, "", "TrimRxnSmiles"]], "rxnutils.pipeline.actions.reaction_mod.AtomMapTagDisconnectionSite": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.ConvertAtomMapDisconnectionTag": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column_reconstructed"], [13, 6, 1, "", "out_column_tagged"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.DesaltMolecules": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "keep_something"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.InvertStereo": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.IsotopeInfo": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "isotope_column"], [13, 6, 1, "", "match_regex"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "sub_regex"]], "rxnutils.pipeline.actions.reaction_mod.NameRxn": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "nm_rxn_column"], [13, 6, 1, "", "nmc_column"], [13, 6, 1, "", "options"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.NeutralizeMolecules": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RDKitRxnRoles": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.ReactantsToReagents": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.ReagentsToReactants": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RemoveAtomMapping": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RemoveExtraAtomMapping": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RemoveStereoInfo": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RemoveUnchangedProducts": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RemoveUnsanitizable": [[13, 6, 1, "", "bad_column"], [13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.RxnMapper": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "rxnmapper_command"]], "rxnutils.pipeline.actions.reaction_mod.SplitReaction": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_columns"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_mod.TrimRxnSmiles": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "smiles_column_index"]], "rxnutils.pipeline.actions.reaction_props": [[13, 2, 1, "", "CgrCreated"], [13, 2, 1, "", "CgrNumberOfDynamicBonds"], [13, 2, 1, "", "CountComponents"], [13, 2, 1, "", "CountElements"], [13, 2, 1, "", "HasStereoInfo"], [13, 2, 1, "", "HasUnmappedRadicalAtom"], [13, 2, 1, "", "HasUnsanitizableReactants"], [13, 2, 1, "", "MaxRingNumber"], [13, 2, 1, "", "ProductAtomMappingStats"], [13, 2, 1, "", "ProductSize"], [13, 2, 1, "", "PseudoReactionHash"], [13, 2, 1, "", "PseudoSmilesHash"], [13, 2, 1, "", "ReactantProductAtomBalance"], [13, 2, 1, "", "ReactantSize"], [13, 2, 1, "", "RingBondMade"], [13, 2, 1, "", "RingMadeSize"], [13, 2, 1, "", "RingNumberChange"], [13, 2, 1, "", "SmilesLength"], [13, 2, 1, "", "SmilesSanitizable"], [13, 2, 1, "", "StereoCenterInReactantPotential"], [13, 2, 1, "", "StereoCenterIsCreated"], [13, 2, 1, "", "StereoCenterIsRemoved"], [13, 2, 1, "", "StereoCenterOutsideReaction"], [13, 2, 1, "", "StereoCentreChanges"], [13, 2, 1, "", "StereoHasChiralReagent"], [13, 2, 1, "", "StereoInvention"], [13, 2, 1, "", "StereoMesoProduct"]], "rxnutils.pipeline.actions.reaction_props.CgrCreated": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.CgrNumberOfDynamicBonds": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.CountComponents": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "nmapped_products_column"], [13, 6, 1, "", "nmapped_reactants_column"], [13, 6, 1, "", "nmapped_reagents_column"], [13, 6, 1, "", "nproducts_column"], [13, 6, 1, "", "nreactants_column"], [13, 6, 1, "", "nreagents_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.CountElements": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.HasStereoInfo": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.HasUnmappedRadicalAtom": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.HasUnsanitizableReactants": [[13, 6, 1, "", "bad_columns"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "rsmi_column"]], "rxnutils.pipeline.actions.reaction_props.MaxRingNumber": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.ProductAtomMappingStats": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "unmapped_column"], [13, 6, 1, "", "widow_column"]], "rxnutils.pipeline.actions.reaction_props.ProductSize": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.PseudoReactionHash": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "no_reagents"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.PseudoSmilesHash": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.ReactantProductAtomBalance": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.ReactantSize": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.RingBondMade": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.RingMadeSize": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.RingNumberChange": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.SmilesLength": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.SmilesSanitizable": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoCenterInReactantPotential": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoCenterIsCreated": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoCenterIsRemoved": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoCenterOutsideReaction": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoCentreChanges": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "stereo_changes_column"]], "rxnutils.pipeline.actions.reaction_props.StereoHasChiralReagent": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoInvention": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.reaction_props.StereoMesoProduct": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "out_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.templates": [[13, 2, 1, "", "CountTemplateComponents"], [13, 2, 1, "", "RetroTemplateReproduction"]], "rxnutils.pipeline.actions.templates.CountTemplateComponents": [[13, 6, 1, "", "in_column"], [13, 6, 1, "", "nproducts_column"], [13, 6, 1, "", "nreactants_column"], [13, 6, 1, "", "nreagents_column"], [13, 6, 1, "", "pretty_name"]], "rxnutils.pipeline.actions.templates.RetroTemplateReproduction": [[13, 6, 1, "", "expected_reactants_column"], [13, 6, 1, "", "noutcomes_column"], [13, 6, 1, "", "other_reactants_column"], [13, 6, 1, "", "pretty_name"], [13, 6, 1, "", "smiles_column"], [13, 6, 1, "", "template_column"]], "rxnutils.pipeline.base": [[12, 2, 1, "", "ReactionActionMixIn"], [12, 1, 1, "", "action"], [12, 1, 1, "", "create_action"], [12, 1, 1, "", "list_actions"]], "rxnutils.pipeline.base.ReactionActionMixIn": [[12, 4, 1, "", "join_lists"], [12, 4, 1, "", "join_smiles"], [12, 4, 1, "", "split_lists"], [12, 4, 1, "", "split_smiles"]], "rxnutils.pipeline.runner": [[12, 1, 1, "", "main"], [12, 1, 1, "", "run_pipeline"]], "rxnutils.routes": [[14, 0, 0, "-", "base"], [14, 0, 0, "-", "comparison"], [15, 0, 0, "-", "deepset"], [14, 0, 0, "-", "image"], [14, 0, 0, "-", "readers"], [16, 0, 0, "-", "retro_bleu"], [14, 0, 0, "-", "scoring"], [17, 0, 0, "-", "ted"], [18, 0, 0, "-", "utils"]], "rxnutils.routes.base": [[14, 2, 1, "", "SynthesisRoute"], [14, 1, 1, "", "smiles2inchikey"]], "rxnutils.routes.base.SynthesisRoute": [[14, 4, 1, "", "assign_atom_mapping"], [14, 4, 1, "", "atom_mapped_reaction_smiles"], [14, 4, 1, "", "chains"], [14, 4, 1, "", "image"], [14, 4, 1, "", "intermediate_counts"], [14, 4, 1, "", "intermediates"], [14, 4, 1, "", "is_solved"], [14, 4, 1, "", "leaf_counts"], [14, 4, 1, "", "leaves"], [14, 3, 1, "", "mapped_root_smiles"], [14, 3, 1, "", "nsteps"], [14, 4, 1, "", "reaction_data"], [14, 4, 1, "", "reaction_ngrams"], [14, 4, 1, "", "reaction_smiles"], [14, 4, 1, "", "remap"]], "rxnutils.routes.comparison": [[14, 1, 1, "", "atom_matching_bonanza_similarity"], [14, 1, 1, "", "route_distances_calculator"], [14, 1, 1, "", "simple_bond_forming_similarity"], [14, 1, 1, "", "simple_route_similarity"]], "rxnutils.routes.deepset": [[15, 0, 0, "-", "featurizers"], [15, 0, 0, "-", "scoring"]], "rxnutils.routes.deepset.featurizers": [[15, 1, 1, "", "collect_reaction_features"], [15, 1, 1, "", "default_reaction_featurizer"], [15, 1, 1, "", "ecfp_fingerprint"], [15, 1, 1, "", "reaction_difference_fingerprint"]], "rxnutils.routes.deepset.scoring": [[15, 2, 1, "", "DeepsetModelClient"], [15, 1, 1, "", "deepset_route_score"]], "rxnutils.routes.image": [[14, 2, 1, "", "RouteImageFactory"], [14, 1, 1, "", "crop_image"], [14, 1, 1, "", "draw_rounded_rectangle"], [14, 1, 1, "", "molecule_to_image"], [14, 1, 1, "", "molecules_to_images"]], "rxnutils.routes.readers": [[14, 1, 1, "", "reactions2route"], [14, 1, 1, "", "read_aizynthcli_dataframe"], [14, 1, 1, "", "read_aizynthfinder_dict"], [14, 1, 1, "", "read_rdf_file"], [14, 1, 1, "", "read_reaction_lists"], [14, 1, 1, "", "read_reactions_dataframe"]], "rxnutils.routes.retro_bleu": [[16, 0, 0, "-", "ngram_collection"], [16, 0, 0, "-", "scoring"]], "rxnutils.routes.retro_bleu.ngram_collection": [[16, 2, 1, "", "NgramCollection"]], "rxnutils.routes.retro_bleu.ngram_collection.NgramCollection": [[16, 4, 1, "", "from_file"], [16, 4, 1, "", "from_tree_collection"], [16, 6, 1, "", "metadata_key"], [16, 6, 1, "", "ngrams"], [16, 6, 1, "", "nitems"], [16, 4, 1, "", "save_to_file"]], "rxnutils.routes.retro_bleu.scoring": [[16, 1, 1, "", "ngram_overlap_score"], [16, 1, 1, "", "retro_bleu_score"]], "rxnutils.routes.scoring": [[14, 1, 1, "", "badowski_route_score"], [14, 1, 1, "", "reaction_class_rank_score"], [14, 1, 1, "", "route_ranks"], [14, 1, 1, "", "route_sorter"]], "rxnutils.routes.ted": [[17, 0, 0, "-", "distances_calculator"], [17, 0, 0, "-", "reactiontree"], [17, 0, 0, "-", "utils"]], "rxnutils.routes.ted.distances_calculator": [[17, 1, 1, "", "ted_distances_calculator"]], "rxnutils.routes.ted.reactiontree": [[17, 2, 1, "", "ReactionTreeWrapper"]], "rxnutils.routes.ted.reactiontree.ReactionTreeWrapper": [[17, 4, 1, "", "distance_iter"], [17, 4, 1, "", "distance_to"], [17, 4, 1, "", "distance_to_with_sorting"], [17, 3, 1, "", "first_tree"], [17, 3, 1, "", "info"], [17, 3, 1, "", "trees"]], "rxnutils.routes.ted.utils": [[17, 2, 1, "", "AptedConfig"], [17, 2, 1, "", "StandardFingerprintFactory"], [17, 2, 1, "", "TreeContent"]], "rxnutils.routes.ted.utils.AptedConfig": [[17, 4, 1, "", "children"], [17, 4, 1, "", "rename"]], "rxnutils.routes.ted.utils.TreeContent": [[17, 6, 1, "", "BOTH"], [17, 6, 1, "", "MOLECULES"], [17, 6, 1, "", "REACTIONS"]], "rxnutils.routes.utils": [[18, 0, 0, "-", "validation"]], "rxnutils.routes.utils.validation": [[18, 2, 1, "", "MoleculeNode"], [18, 2, 1, "", "ReactionNode"], [18, 1, 1, "", "validate_dict"]], "rxnutils.routes.utils.validation.MoleculeNode": [[18, 6, 1, "", "children"], [18, 6, 1, "", "model_config"], [18, 6, 1, "", "smiles"], [18, 6, 1, "", "type"]], "rxnutils.routes.utils.validation.ReactionNode": [[18, 6, 1, "", "children"], [18, 6, 1, "", "model_config"], [18, 6, 1, "", "type"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "property", "Python property"], "4": ["py", "method", "Python method"], "5": ["py", "exception", "Python exception"], "6": ["py", "attribute", "Python attribute"]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:property", "4": "py:method", "5": "py:exception", "6": "py:attribute"}, "terms": {"": [3, 6, 8, 13, 15, 19], "0": [2, 3, 4, 6, 13, 14, 15, 19, 20], "03": [2, 20], "0x7fe4e9488d90": 19, "1": [2, 3, 4, 6, 13, 14, 15, 17, 18, 19, 20], "10": [14, 15, 16], "100": 14, "1024": [6, 7, 19], "1039": 16, "1976_sep2016_usptogrants_smil": 20, "2": [3, 6, 7, 14, 15, 16, 17, 19], "20": [14, 17], "200": [2, 3, 20], "2001_sep2016_usptoapplications_smil": 20, "2019": [14, 19], "2020": [2, 20], "2024": [15, 16], "2048": 17, "25": 14, "26434": 15, "3": [2, 3, 6, 14, 16, 19, 20], "300": 14, "4": 19, "4640": 14, "482": 16, "4cb9be0738a3a84e7ed4fb661d2efb73c099fc7d6c532a4b294c8d0d": 19, "5": [6, 15, 19], "5b2ff2a69fb7bd6a032938e468684773bcc668928b037bbec0ac8335": 19, "6": [2, 19, 20], "64": 15, "7": 19, "8": [2, 14, 19, 20], "9": [13, 19], "90": 16, "A": [6, 13, 14, 15, 19], "As": 13, "By": 14, "For": [0, 4, 13], "If": [3, 4, 6, 17], "It": [2, 11, 14, 17, 20], "No": 13, "On": [2, 20], "The": [0, 2, 3, 4, 6, 7, 9, 12, 14, 17, 19, 20], "Then": 0, "There": [4, 17], "These": 19, "To": [3, 14, 19], "Will": [6, 13, 14], "_": [3, 9, 10, 11], "__call__": 3, "__str__": 3, "_row_act": 3, "a1727cc9ed68a6411bfd02873c1615c22baa1af4957f14ae942e2c85caf9adb5": 19, "abl": [2, 20], "about": [3, 17], "abov": 19, "absolut": 6, "accord": [2, 13, 16, 20], "account": 6, "accur": 14, "action": [0, 5, 11, 12], "activ": [0, 2, 20], "actual": [3, 6], "actuali": 6, "ad": [3, 14], "add": [4, 6, 11, 14], "addit": [0, 6, 14, 19], "after": [2, 3, 12, 13, 20], "agent": [6, 19], "agents_list": [5, 6, 19], "aizynthcli": [4, 14], "aizynthfind": [14, 18], "al": [14, 15, 19], "algorithm": 13, "alia": 8, "all": [2, 3, 6, 12, 13, 14, 15, 17, 20], "also": [4, 6, 14], "altern": 3, "among": 6, "an": [4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 19], "analys": 4, "analysi": 16, "analyz": [0, 14], "ani": [2, 9, 12, 13, 14, 15, 17, 18, 20], "annot": 18, "anoth": [6, 17], "api": [0, 8], "appear": 6, "appli": [5, 6, 12, 17, 19], "applic": 8, "approach": 15, "appropri": [8, 13, 14], "apt": 17, "aptedconfig": [14, 17], "ar": [0, 2, 3, 4, 6, 9, 12, 13, 14, 17, 19, 20], "arc_siz": 14, "arg": [11, 12], "argument": [3, 12, 14, 19], "arithmet": 13, "aromat": 6, "around": [6, 14], "arrai": [6, 9, 19], "as_smil": 6, "assess": 6, "assign": [3, 13, 14], "assign_atom_map": [4, 5, 14], "atom": [2, 3, 4, 5, 6, 9, 13, 14, 19, 20], "atom_invari": [5, 6], "atom_map_tag_disconnection_sit": 13, "atom_mapped_reaction_smil": [5, 14], "atom_mapping_numb": [5, 6], "atom_matching_bonanza_similar": [5, 14], "atom_properti": [5, 6], "atombal": 13, "atomidx": 6, "atommaptagdisconnectionsit": [12, 13], "attribut": [12, 14], "augment": [1, 5, 14, 15], "auto": 0, "automat": 14, "avail": [0, 2, 3, 4, 12, 20], "averag": 14, "average_yield": 14, "awai": 6, "axi": 3, "b": 14, "bad_column": [12, 13], "badmolecul": [2, 13, 20], "badowski": 14, "badowski_route_scor": [5, 14], "balanc": 13, "base": [1, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16, 17, 18, 19], "base_pipelin": [1, 5], "basemodel": 18, "batch": [9, 10, 11], "batch_util": [1, 5], "bauer": 6, "becaus": [2, 19, 20], "been": [14, 17, 19], "befor": 13, "being": 14, "belong": 6, "below": 17, "bergonzini": 15, "between": [6, 14, 17], "bias": 7, "bit": [6, 7, 15, 19], "bleu": 16, "blob": 6, "block": [2, 20], "bonanza": 14, "bond": [6, 13, 14], "bonds_broken": [5, 6], "bonds_chang": [5, 6], "bonds_form": [5, 6], "bool": [6, 12, 13, 14, 17], "boolean": [13, 14], "both": [14, 17], "bottom": 17, "boundari": 17, "br": 19, "bracket": 6, "branch": 14, "brc1ccoc1": 4, "broken": 6, "build": [0, 14], "c": [2, 4, 14, 19, 20], "calc_yield_column": [9, 11], "calcul": [6, 7, 13, 14, 16, 17], "calculatedyield": 11, "call": [3, 4, 12, 13, 14], "callabl": [12, 14, 15, 17], "can": [2, 3, 4, 6, 12, 13, 14, 16, 17, 19, 20], "candid": 6, "candidate_atom": 6, "cannot": 14, "canon": [6, 19], "canonic": 6, "canonical_templ": [5, 6], "canonical_template_generate_outcom": [5, 6], "canonicalize_tautom": [5, 6], "canonicalrankatom": 6, "capabl": [0, 3, 19], "care": 6, "carri": 6, "case": [3, 6, 14], "caus": 6, "cc": [4, 19], "ccc": 7, "ccn": 19, "ccocc": 19, "center": [6, 13], "centr": [6, 13], "cgr": [1, 5, 13], "cgr_contain": 6, "cgr_creat": 13, "cgr_dynamic_bond": 13, "cgrcreat": [12, 13], "cgrnumberofdynamicbond": [12, 13], "cgrtool": 6, "ch2": 19, "ch3": 19, "chain": [5, 14], "chang": [6, 13], "charg": 6, "check": [6, 8, 13, 18], "chem": [0, 1, 3, 5, 14, 19], "chemic": [6, 16], "chemicalreact": [5, 6, 15, 19], "chemistri": [0, 6], "chemreact": 6, "chemrxiv": 15, "child": 17, "children": [14, 17, 18], "chiral": 6, "christoph": 6, "cl": [4, 13, 19], "class": [3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "classif": [4, 6, 13, 14], "classifi": 14, "classmethod": 16, "classvar": [3, 13, 18], "clc1cccc": 4, "clean": [0, 2, 3, 6, 9, 10, 11, 20], "clean_pipelin": 3, "clean_smil": 6, "clone": [0, 2], "code": [4, 6, 11, 15, 19], "collect": [0, 6, 13, 14, 15, 16], "collect_reaction_featur": [14, 15], "color": 14, "column": [2, 3, 4, 11, 12, 13, 14, 20], "column1": 13, "column1_renam": 13, "column2": 13, "column2_renam": 13, "com": [2, 6, 11, 20], "combin": [5, 9, 10, 20], "combine_batch": [5, 9], "combine_csv_batch": [5, 9], "combine_fil": [9, 11], "combine_func": 9, "combine_numpy_array_batch": [5, 9], "combine_sparse_matrix_batch": [5, 9], "command": [0, 2, 3, 4, 7, 8, 9, 10, 11, 12, 20], "commit": 0, "common": 0, "comp_degre": 6, "compar": [6, 13, 14, 17], "comparison": [1, 5, 6, 13], "complet": [2, 12, 20], "complex": [6, 7, 14], "complexity_func": 14, "compon": [6, 12, 13], "compos": 6, "compound": [13, 14], "comput": [3, 6, 13, 14, 15, 17, 19], "concaten": [12, 20], "conda": [0, 2, 13, 20], "condens": 6, "condensedgraphreact": [5, 6], "confid": [2, 20], "config": [17, 18], "configdict": 18, "configur": 18, "conform": [13, 18], "conlist": 18, "connect": 6, "connorcolei": 6, "consid": [6, 13, 17], "consist": 14, "constant": 14, "conta": 12, "contain": [2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "content": 1, "contrib": 0, "control": 13, "converg": 14, "convert": [13, 14], "convert_atom_map_disconnection_tag": 13, "convertatommapdisconnectiontag": [12, 13], "convini": 14, "copi": 6, "corner": 14, "correspond": [2, 20], "cost": [14, 17], "could": 11, "count": [3, 6, 9, 13, 14], "count_compon": 13, "count_el": 13, "count_template_compon": 13, "countcompon": [12, 13], "countel": [12, 13], "counttemplatecompon": [12, 13], "coupl": [2, 20], "cpp": 6, "cpu": [2, 20], "creat": [0, 2, 6, 9, 11, 12, 13, 14, 16, 17, 19, 20], "create_act": [5, 12], "create_csv_batch": [5, 9], "criterion": 6, "crop": 14, "crop_imag": [5, 14], "csv": [2, 3, 9, 10, 12, 20], "curat": [11, 19], "curatedyield": 11, "current": [0, 3, 15], "custom": 6, "d": 14, "d1": 19, "d2": 19, "d3dd00219e": 16, "d4": 19, "data": [0, 1, 2, 3, 4, 5, 6, 12, 13, 14, 15, 18, 20], "data_prefix": [5, 9, 10, 11], "databas": [0, 6, 10], "databaseflow": [5, 9], "dataclass": 3, "datafram": [3, 4, 6, 9, 12, 13, 14], "dataframe_mod": [3, 5, 12], "dataframe_prop": 3, "datapreparationbaseflow": [5, 9, 10, 11], "dataset": [2, 9, 10, 12], "date": 2, "daylightpars": 6, "deal": 17, "decor": [3, 12], "deep": 15, "deepset": [5, 14], "deepset_route_scor": [14, 15], "deepsetmodelcli": [14, 15], "def": 3, "default": [3, 6, 14, 15, 17], "default_cl": 15, "default_rank": 15, "default_reaction_featur": [14, 15], "defin": [3, 6, 12, 14, 17], "degre": 6, "dep": [2, 20], "depend": [0, 2, 17, 20], "depict": 14, "depth": 14, "desalt": [6, 13], "desalt_molecul": [5, 6, 13], "desaltmolecul": [12, 13], "describ": 15, "descript": 13, "design": [2, 20], "destin": 17, "determin": [6, 13, 17], "dev": 0, "develop": 0, "dict": [6, 12, 14, 15, 17, 18], "dict_": 18, "dictionari": [6, 14, 15, 17, 18], "did": 0, "differ": [3, 4, 6, 13, 14, 15, 17], "digit": 16, "direct": 6, "disc": 9, "discard": 14, "disconnect": 13, "discoveri": 16, "disregard": 14, "dist_func": 17, "distanc": [6, 14, 17], "distance_it": [14, 17], "distance_to": [5, 6, 14, 17], "distance_to_with_sort": [14, 17], "distances_calcul": [5, 14], "distinct": 6, "divid": [0, 2, 20], "do": [4, 6, 8, 9, 10, 11, 13, 17], "do_clean": [9, 10, 11], "do_map": [5, 9], "docminu": 11, "doesn": 13, "doi": [15, 16], "don": 3, "done": [2, 6, 20], "down": 2, "download": [2, 5, 8, 9, 20], "download_rinchi": [5, 6], "draw": [6, 14], "draw_kwarg": 14, "draw_rounded_rectangl": [5, 14], "drop": 13, "drop_column": 13, "drop_dupl": 13, "drop_row": 13, "dropcolumn": [12, 13], "dropdupl": [12, 13], "droprow": [12, 13], "due": 6, "duplic": 13, "dure": 13, "dynam": 13, "e": [3, 6, 14, 17], "each": [3, 4, 6, 14, 16, 17, 20], "easi": 13, "easili": 3, "ecfp": 15, "ecfp_fingerprint": [14, 15], "edit": [0, 17], "either": [13, 19], "element": 13, "elementcount": 13, "els": [3, 6, 14], "empti": [6, 14], "enabl": 13, "encapsul": [7, 14, 19], "encapuls": 19, "end": [2, 5, 6, 9, 10, 11, 20], "engkvist": 15, "enivron": 6, "ensur": 14, "enum": 17, "enumer": 17, "enumerate_tautom": [5, 6], "env": [0, 2, 4, 20], "environ": [0, 2, 4, 6, 9, 10, 11, 20], "eq": 16, "equal": 6, "error": 8, "et": [14, 15, 19], "etc": 6, "everi": 0, "exact": 6, "exampl": [6, 13, 14], "except": [6, 8, 14, 17], "exclam": 13, "execut": [0, 2, 3, 8, 20], "exemplifi": 3, "exhaustive_limit": 17, "exist": [2, 14, 20], "expand_hetero": 6, "expand_r": 6, "expect": 19, "expected_reactants_column": [12, 13], "expens": 6, "experi": 2, "expert": 15, "explicit": 6, "extend": [2, 6, 20], "extra": [6, 13, 14], "extract": [0, 6, 10, 14, 16], "f": [0, 3], "factor": [14, 15, 19], "factori": [14, 17], "factory_kwarg": 14, "fail": 6, "fals": [6, 12, 13, 14, 17], "fang": 16, "feasibl": 15, "featur": [5, 6, 14], "figshar": [11, 20], "file": [2, 3, 4, 9, 10, 11, 12, 13, 14, 15, 16, 20], "filenam": [7, 9, 12, 14, 16], "filter": [2, 6, 20], "final": [9, 10, 11, 12], "find": [3, 14], "finger": 6, "fingerprint": [6, 7, 15, 17, 19], "fingerprint_bit": [5, 6], "fingerprint_length": 7, "fingerprint_radiu": 7, "fingerprint_vector": [5, 6, 19], "first": [0, 2, 3, 4, 6, 14, 17, 19], "first_tre": [14, 17], "fix": 6, "fix_atom_properti": [5, 6], "flag": [2, 6, 13, 20], "float": [6, 14, 15, 16, 17], "flowspec": 9, "folder": [0, 2, 5, 8, 9, 20], "follow": [0, 2, 3, 4, 14, 15, 20], "form": [6, 9, 13, 14], "formal": 6, "format": [4, 14], "forward": [6, 14, 19], "found": 6, "four": 3, "fp_factori": 17, "fraction": [6, 16], "fragment": 6, "frame": 14, "frame_color": 14, "framecolor": 14, "framework": [3, 12], "from": [2, 3, 4, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 19, 20], "from_fil": [14, 16], "from_tree_collect": [14, 16], "full": [2, 20], "fulli": 17, "function": [6, 7, 9, 10, 11, 12, 14, 17], "further": 14, "fuzzi": 6, "g": [3, 6, 13, 15], "gener": [0, 6, 8, 19], "generate_coreag": [5, 6], "generate_reaction_templ": [5, 6, 19], "generate_rinchi": [6, 8], "genheden": 15, "geometr": 14, "get": 6, "get_mol_weight": [5, 6], "get_special_group": [5, 6], "get_symmetric_sit": [5, 6], "getnumheavyatom": 3, "git": [0, 2], "github": [2, 6, 11, 20], "give": 6, "given": [2, 3, 6, 12, 14, 15, 16, 17], "global": 3, "global_appli": 3, "gpu": [2, 20], "gram": [14, 16], "graph": 6, "graphmol": 6, "green": 14, "greg": 6, "group": [6, 14], "group_bi": [4, 14], "groupabl": 14, "guang": 16, "guarante": 17, "guard": 6, "guid": 0, "guo": 15, "h0": 19, "ha": [3, 4, 6, 13, 14, 17], "handl": [0, 6], "hang": 6, "has_atom_map": [5, 6], "has_partial_map": [5, 6], "has_stereo": 13, "has_stereo_info": 13, "haschiralreag": 13, "hash": [6, 13, 19], "hash_from_bit": [5, 6, 19], "hash_from_smart": [5, 6, 19], "hash_from_smil": [5, 6, 19], "hashed_rid": [5, 6], "hashkei": 6, "hasstereo": 13, "hasstereochang": 13, "hasstereoinfo": [12, 13], "hasunmappedradicalatom": [12, 13], "hasunsanitizablereact": [12, 13], "have": [2, 3, 4, 6, 12, 14, 19, 20], "hcl": 13, "heavi": 3, "helper": 17, "here": [2, 11], "hetero": 6, "heurist": 17, "hidden": 14, "hold": [4, 14], "home": [4, 13], "hour": [2, 20], "how": [14, 17], "http": [2, 6, 11, 16, 20], "hydrogen": 6, "hyperparamet": 16, "i": [0, 2, 3, 4, 6, 7, 8, 13, 14, 15, 17, 18, 19, 20], "id": [2, 6, 11, 13, 20], "id_": 6, "ideal_step": 16, "ident": 19, "identifi": [3, 4, 14], "ignor": [2, 6, 20], "ignore_stereo": 14, "imag": [1, 5], "img": 14, "implement": [3, 6, 7, 15, 17], "impli": [13, 19], "import": [2, 3, 4, 6, 10, 19], "import_ord_dataset": [5, 9], "in_column": [3, 12, 13], "in_column_tag": 13, "in_column_untag": 13, "in_stock": 14, "in_stock_color": 14, "inchi": [6, 8, 13, 14], "includ": [0, 6, 17], "incompat": [2, 20], "ind": 6, "index": [6, 9, 11, 14, 20], "indic": [6, 9, 13], "indicator_column": [12, 13], "individu": [4, 6], "info": [13, 14, 17], "inform": [2, 3, 6, 9, 10, 11, 13, 17, 20], "initi": 6, "initial": 14, "input": [3, 6, 18], "input_arg": [7, 9, 10], "inspect": 19, "inspir": [6, 11], "instal": [2, 4, 9, 10, 11, 20], "instanc": [4, 7, 15], "instansi": 6, "instanti": 12, "instruct": [2, 20], "int": [6, 7, 9, 13, 14, 15, 16, 17], "interfac": [12, 15], "intermedi": [5, 12, 14], "intermediate_count": [5, 14], "intern": 17, "interpret": 6, "intra": 6, "invari": 6, "invert": 13, "invert_stereo": 13, "invertstereo": [12, 13], "investig": 14, "invok": 3, "is_complet": [5, 6], "is_fuzzi": [5, 6], "is_sanitiz": 13, "is_sanitizable2": 13, "is_smart": 6, "is_solv": [5, 14], "is_valid_mol": [5, 6], "isaromat": 6, "isotop": 13, "isotope_column": [12, 13], "isotope_info": 13, "isotopeinfo": [12, 13], "item": [15, 19], "iter": [6, 17], "jaccard": 17, "jian": 16, "join": [6, 9, 12], "join_clean": [9, 10, 11], "join_list": [5, 12], "join_map": [5, 9], "join_smil": [5, 12], "join_smiles_from_react": [5, 6], "json": 16, "junren": 16, "just": [9, 10, 11, 14], "kabeshov": 15, "keep": [6, 13], "keep_column": 13, "keep_someth": [6, 12, 13], "keepcolumn": [12, 13], "kei": [6, 13, 14, 16], "kept": 14, "key_column": [12, 13], "keyword": 14, "kwarg": [9, 10, 12, 14], "label": 17, "landrum": 6, "last": [2, 3, 4, 20], "lastli": [0, 3], "le": 15, "leaf": 14, "leaf_count": [5, 14], "learn": 15, "least": 6, "leav": [5, 14], "left": 0, "lei": 16, "len": 18, "length": [6, 13, 14, 15, 16, 17], "let": [3, 19], "level": 14, "li": 16, "librari": [3, 6], "like": [0, 3, 4, 14, 18], "limit": 17, "line": [4, 7, 8, 9, 10, 11, 12, 14], "linear": 14, "list": [3, 6, 9, 12, 13, 14, 15, 16, 17, 18, 19], "list_act": [5, 12], "ll": 14, "long": 6, "longer": 17, "longest": 14, "look": 3, "lookup": 15, "lou": 16, "lower": 6, "m": [2, 3, 15, 16, 20], "maco": 0, "made": [7, 13], "main": [3, 5, 6, 7, 8, 9, 10, 11, 12], "make": [0, 4, 9, 11, 14, 16], "manipul": 0, "map": [1, 2, 4, 5, 6, 13, 14, 19, 20], "mapped_root_smil": [5, 14], "mapped_rxn": [2, 20], "mapper": [2, 20], "mapping_pipelin": [1, 2, 5, 20], "margin": 14, "mark": [13, 14], "mass": [6, 13], "master": [6, 9], "match": [3, 6, 14], "match_regex": [12, 13], "materi": 14, "matrix": [9, 14, 17], "max": [2, 14, 20], "max_depth": 14, "max_length": 18, "maximum": [2, 13, 14, 20], "maxr": 13, "maxringnumb": [12, 13], "mean": [6, 14], "memori": 15, "menu": 0, "meso": 13, "meso_product": 13, "mesoproduct": 13, "metadata": [14, 16], "metadata_column": [4, 14], "metadata_kei": [14, 16], "metaflow": [2, 9, 10, 20], "method": [3, 6, 14, 15, 17], "metric": 14, "might": [3, 6], "min": 14, "min_length": 18, "miniconda": 4, "minimum": 17, "mismatch": 6, "mixin": 12, "mode": 0, "model": [2, 7, 14, 15, 18, 20], "model_cli": 15, "model_config": [14, 18], "model_path": [7, 15], "modifi": [0, 3, 6, 13], "modul": [1, 3], "mol": [6, 7, 14, 15, 18], "mol1": 6, "mol2": 6, "mol_cost": 14, "mol_draw_kwarg": 14, "mol_siz": 14, "molecul": [2, 6, 7, 13, 14, 15, 17, 18, 19, 20], "molecular": 6, "molecule_to_imag": [5, 14], "moleculenod": [14, 18], "molecules_to_imag": [5, 14], "molfromsmil": [3, 7], "molstogridimag": 14, "more": [2, 6, 14, 20], "morgan": [6, 17, 19], "most": [0, 14, 17], "move": [2, 19, 20], "multipli": [13, 14], "must": 13, "my_mol": 6, "n": [2, 4, 14, 16, 20], "n1": 4, "name": [2, 9, 10, 12, 13, 14, 17], "namedtupl": 8, "namerxn": [4, 12, 13, 14], "namrxn": 13, "nbatch": [2, 5, 9, 20], "nbit": [6, 17, 19], "nc": 4, "nc1cccc": 4, "nc2ccoc2": 4, "ndarrai": [6, 14, 15, 17], "ndynamicbond": 13, "necessari": 6, "need": [2, 3, 9, 10, 11, 12, 14, 20], "neighbour": 6, "neutral": [6, 13], "neutralize_molecul": [5, 6, 13], "neutralizemolecul": [12, 13], "new": [2, 3, 4, 12, 13, 14, 20], "newli": 13, "next": [6, 17], "nextmov": [4, 14], "nextmoverxnsmil": 13, "ngram": [14, 16], "ngram_collect": [5, 14], "ngram_overlap_scor": [14, 16], "ngramcollect": [14, 16], "nice": [3, 12], "nitem": [14, 16], "nline": [5, 9], "nm_rxn_column": [12, 13], "nmapped_products_column": [12, 13], "nmapped_reactants_column": [12, 13], "nmapped_reagents_column": [12, 13], "nmappedproduct": 13, "nmappedreact": 13, "nmappedreag": 13, "nmc": 13, "nmc_column": [12, 13], "no_chang": [5, 6], "no_reag": [12, 13], "node": [14, 17, 18], "node1": 17, "node2": 17, "non": [13, 14], "non_preferred_factor": 14, "none": [6, 7, 9, 10, 11, 12, 14, 16, 17, 18], "normal": 14, "notat": 6, "note": 2, "noth": 14, "noutcomes_column": [12, 13], "now": [0, 11, 19], "np": 17, "nproduct": 13, "nproducts_column": [12, 13], "nr": 16, "nreactant": 13, "nreactants_column": [12, 13], "nreagent": 13, "nreagents_column": [12, 13], "nringchang": 13, "nstep": [5, 14], "num": [2, 20], "number": [2, 3, 4, 6, 7, 9, 13, 14, 15, 17, 19, 20], "numbit": 15, "numpi": 9, "o": [4, 15, 19], "obj": 12, "object": [4, 6, 7, 11, 12, 13, 14, 15, 16, 17, 19], "obtain": 17, "occbr": 19, "och": 16, "ochem_predict_nn": 6, "oh": 19, "old": 0, "one": [3, 6, 9, 14, 19], "onli": [3, 6, 11, 13, 14, 19], "only_rxnmapp": [4, 14], "onnx": [7, 15], "open": [0, 10], "oper": 6, "option": [6, 12, 13, 14, 17, 19], "orang": 14, "ord": [2, 5, 9], "ord_data": [2, 9, 10], "ord_data_clean": 2, "ord_data_map": 2, "ord_data_repo_path": 2, "orddatapreparationflow": [9, 10], "order": 17, "org": 16, "organ": 15, "origin": [2, 6, 11, 15, 20], "other": [3, 4, 6, 14, 17, 19], "other_reactants_column": [12, 13], "otherwis": 6, "out": [3, 6], "out_column": [3, 9, 11, 12, 13], "out_column_reconstruct": [12, 13], "out_column_tag": [12, 13], "outcom": [2, 6], "output": [3, 4, 12, 14, 16], "output_filenam": 9, "outsid": 13, "over": [6, 17], "overlap": [14, 16], "overwrit": 14, "p": 13, "packag": [0, 1, 2, 19, 20], "pad": 14, "pair": 17, "pairwis": [14, 17], "panda": [3, 6, 12, 13, 14], "paper": 16, "paragraph": 20, "paragraphnum": 11, "param": [6, 9, 14, 15], "paramet": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "parameter": 15, "parenthesi": 6, "part": [6, 9, 17], "partial": 14, "particular": 14, "partner": 6, "patent": 20, "patentnumb": 11, "path": [2, 4, 8, 9, 12, 14, 15, 16], "path_to_model": 7, "pattern": 18, "pd": 3, "penal": 16, "perform": [2, 3, 9, 10, 11, 20], "pilcolor": 14, "pilimag": 14, "pip": [0, 2, 20], "pipelin": [0, 1, 2, 5, 9, 10, 11, 20], "piplin": 0, "plausibl": 16, "plenti": 17, "poetri": 0, "posit": 13, "possibl": [6, 14, 17], "possiblti": 14, "postfix": 3, "potenti": [6, 11, 13], "potential_stereo_cent": 13, "potentialstereocentr": 13, "pre": 0, "precomput": 15, "precursor": 6, "predict": 7, "prefactor": 15, "prefer": 14, "preferred_class": 14, "prefix": [2, 9, 20], "prepar": [2, 9, 20], "preparation_pipelin": [2, 5, 9, 20], "present": [6, 8], "preserv": 11, "pretti": 14, "pretty_nam": [3, 12, 13], "prevent": 0, "print": [3, 9, 10, 11], "prior": 15, "probabl": 14, "problem": 6, "procedur": 6, "process": [3, 6, 9, 14], "produc": [6, 13, 14, 19], "product": [2, 3, 6, 12, 13, 14, 17, 20], "product_atom_count": 3, "product_atommapping_stat": 13, "productatommappingstat": [12, 13], "products": [2, 3, 12, 13, 20], "products_atom_map_tag": 13, "products_list": [5, 6, 12], "products_mol": 3, "products_reconstruct": 13, "products_tag": 13, "program": 8, "proper": 14, "properti": [3, 6, 13, 14, 17, 19], "proton": 13, "provid": [2, 3, 6, 14, 19, 20], "pseudo": 6, "pseudo_reaction_hash": 13, "pseudo_rinchi": [5, 6], "pseudo_rinchi_kei": [5, 6], "pseudo_smiles_hash": 13, "pseudohash": 13, "pseudohash_inverted_stereo": 13, "pseudoreactionhash": [12, 13], "pseudosmileshash": [12, 13], "public": 15, "py": [6, 13], "pydant": 18, "pypi": 0, "python": [0, 2, 3, 13, 16, 20], "qualnam": 17, "quantifi": 16, "queri": [3, 12, 13], "query_datafram": [3, 13], "query_dataframe1": 3, "query_dataframe2": 3, "query_dataframe3": 3, "querydatafram": [12, 13], "ractant": 6, "radic": 13, "radiu": [6, 7, 15, 17, 19], "rais": [6, 8, 14, 17], "random": 17, "rank": [6, 14, 15], "raw": [11, 14], "rd_mol": 6, "rdchem": 14, "rdchiral": [6, 19], "rdkit": [0, 2, 6, 7, 13, 15, 20], "rdkit_rxnroleassign": [0, 13], "rdkit_valid": [5, 6], "rdkitrxnrol": [12, 13], "re": [7, 14, 19], "reactant": [2, 6, 12, 13, 14, 19, 20], "reactant_list": 19, "reactantproductatombal": [12, 13], "reactants": [2, 3, 12, 13, 20], "reactants2reag": 13, "reactants_list": [5, 6, 12, 19], "reactantstoreag": [12, 13], "reactent": 6, "reaction": [0, 1, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20], "reaction_centr": [5, 6], "reaction_class_rank": [14, 15], "reaction_class_rank_scor": [5, 14], "reaction_contain": 6, "reaction_cost": 14, "reaction_data": [5, 14, 15], "reaction_difference_fingerprint": [14, 15], "reaction_mod": [3, 5, 12], "reaction_ngram": [5, 14], "reaction_prop": [5, 12], "reaction_smil": [4, 5, 8, 14], "reaction_tre": 14, "reaction_util": 13, "reactionactionmixin": [5, 12, 13], "reactionexcept": [5, 6], "reactionnod": [14, 18], "reactions2rout": [5, 14], "reactionsmil": [2, 3, 11, 20], "reactionsmilesclean": [2, 3, 20], "reactiontempl": [5, 6, 19], "reactiontre": [5, 14], "reactiontreewrapp": [14, 17], "read": [9, 14, 16], "read_aizynthcli_datafram": [4, 5, 14], "read_aizynthfinder_dict": [5, 14], "read_csv_batch": [5, 9], "read_func": 9, "read_rdf_fil": [5, 14], "read_reaction_list": [4, 5, 14], "read_reactions_datafram": [4, 5, 14], "reader": [1, 4, 5], "readi": [2, 20], "readm": [2, 20], "reagent": [2, 6, 12, 13, 14, 20], "reagents2react": [3, 13], "reagents_list": 12, "reagentstoreact": [12, 13], "reason": [2, 20], "reassign": 6, "reassign_rsmi_atom_map": [5, 6], "record": 6, "recreat": 6, "recreate_rsmi": [5, 6], "rectangl": 14, "ref": [14, 16], "refer": [6, 14, 16], "regist": [3, 12], "rel": 14, "remap": [4, 5, 14], "remov": [2, 3, 6, 9, 13, 14, 20], "remove_atom_map": [3, 5, 6, 13], "remove_atom_mapping_templ": [5, 6], "remove_extra_atom_map": 13, "remove_stereo_info": 13, "remove_stereochemistri": [5, 6], "remove_unchanged_product": 13, "remove_unsanitiz": [3, 13], "removeatommap": [12, 13], "removeextraatommap": [12, 13], "removestereoinfo": [12, 13], "removeunchangedproduct": [12, 13], "removeunsanitiz": [12, 13], "renam": [13, 14, 17], "rename_column": 13, "renamecolumn": [12, 13], "replac": 14, "replace_mol_func": 14, "repo": [2, 20], "repositori": [0, 2], "repres": [6, 14, 18], "represent": [6, 14], "reproduc": [2, 20], "reproduct": 13, "requir": [0, 2, 8, 20], "resid": 11, "resiz": 14, "respect": [6, 19], "rest": 13, "result": 12, "retro": [6, 15, 16, 19], "retro_bleu": [5, 14], "retro_bleu_scor": [14, 16], "retro_templ": [5, 6, 19], "retro_template_generate_outcom": [5, 6], "retro_template_reproduct": 13, "retro_template_select": [5, 6], "retrosynthesi": [14, 16], "retrosynthet": 6, "retrotemplatereproduct": [12, 13], "return": [3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], "revers": 6, "rinchi": [0, 5, 6], "rinchi_api": [5, 6], "rinchi_key_long": [5, 6], "rinchi_key_short": [5, 6], "rinchierror": [6, 8], "rinchistructur": [6, 8], "ring": [6, 13], "ringbondmad": [12, 13], "ringmades": [12, 13], "ringnumberchang": [12, 13], "role": 13, "root": [0, 14], "roughli": [2, 20], "round": 14, "rout": [0, 1, 5], "route_distances_calcul": [5, 14], "route_id": 4, "route_rank": [5, 14], "route_sort": [5, 14], "routeimagefactori": [5, 14], "routin": [0, 4, 6, 12, 14, 15, 16, 19], "row": [3, 11, 12, 13, 14, 20], "rsmi": [6, 20], "rsmi_column": [12, 13], "rsmi_inverted_stereo": 13, "rsmi_process": 13, "rule": [6, 17], "run": [0, 2, 3, 9, 10, 11, 12, 13, 16, 20], "run_pipelin": [5, 12], "runner": [1, 3, 5, 13], "rxn": [0, 2, 6, 19, 20], "rxn4chemistri": [2, 20], "rxnatombal": 13, "rxndesalt": 13, "rxnfp": 7, "rxnfp_runner": [5, 6], "rxnmapper": [2, 4, 9, 12, 13, 14, 20], "rxnmapper_command": [12, 13], "rxnmapper_env_path": [4, 13], "rxnmapperrxnsmil": 13, "rxnmappingflow": [5, 9], "rxnneutral": 13, "rxnnounchangedprod": 13, "rxnroleassign": 13, "rxnsanitiz": 13, "rxnsmile": 13, "rxnsmilesallreact": 13, "rxnsmilesclean": 13, "rxnsmilesinvertedstereo": 13, "rxnsmilesnoatommap": 13, "rxnsmilesnostereo": 13, "rxnsmilesreassignedatommap": 13, "rxnsmileswithoutisotop": 13, "rxnsmileswithtruereag": 13, "rxnutil": [2, 3, 4, 19, 20], "salt": 6, "same": [3, 6, 12], "same_molecul": [5, 6], "sanit": [5, 6, 7], "sanitiz": [2, 13, 20], "sanitization_check": [5, 6], "sanitize_adjusth": 6, "sanitize_al": 6, "sanitize_cleanup": 6, "sanitize_cleanupchir": 6, "sanitize_findrad": 6, "sanitize_kekul": 6, "sanitize_non": 6, "sanitize_properti": 6, "sanitize_setaromat": 6, "sanitize_setconjug": 6, "sanitize_sethybrid": 6, "sanitize_symmr": 6, "save": [3, 4, 12, 16], "save_intermedi": 12, "save_to_fil": [14, 16], "sc": 7, "sc_score": [5, 6], "schema": 2, "sci": [14, 19], "score": [1, 4, 5, 7], "scorer": 14, "script": [7, 9, 10, 11], "scscore": [6, 7, 15], "scscorer": [7, 15], "second": [0, 3, 4, 6, 14], "see": [0, 6, 16, 19], "select": [6, 20], "self": [3, 17], "sen": 11, "sens": 15, "sent": 14, "separ": [2, 3, 4, 12, 14, 20], "sequenc": [7, 9, 10, 11, 12, 14, 16, 17], "sequenti": [3, 12], "seri": [3, 12, 14], "set": [2, 4, 6, 7, 14, 16, 19, 20], "setup": [0, 2, 9, 10, 11, 20], "setup_clean": [9, 10, 11], "share": 4, "short": [6, 12], "should": [2, 3, 6, 14, 18, 20], "show": 14, "show_al": 14, "show_atom_map": 14, "shuffl": 17, "similar": [6, 14], "simpl": [0, 3, 14, 17, 19], "simple_bond_forming_similar": [5, 14], "simple_route_similar": [5, 14], "simplest": 4, "sinc": [11, 17], "singl": [6, 14], "single_reactant_augment": [5, 6], "site": [6, 13], "size": [2, 3, 13, 14, 20], "skip": 6, "smaller": 13, "smart": [6, 19], "smile": [2, 3, 4, 6, 8, 12, 13, 14, 18, 19, 20], "smiles2inchikei": [5, 14], "smiles_col": 3, "smiles_column": [12, 13, 14], "smiles_column_index": [12, 13], "smiles_length": 13, "smiles_list": [6, 14], "smiles_sanitiz": 13, "smileslength": [12, 13], "smilessanitiz": [12, 13], "so": [2, 8, 14, 20], "softwar": 4, "solv": 14, "some": [0, 6, 10, 11, 13, 19], "someth": 4, "sort": [6, 14, 17], "sort_children": 17, "sourc": [0, 11, 17], "space": 14, "spars": 9, "spec": 13, "special": 6, "specif": [6, 9, 12, 19], "specifi": [3, 6, 9, 13, 14, 19], "split": [2, 3, 6, 9, 12, 13, 20], "split_list": [5, 12], "split_react": 13, "split_rsmi": [5, 6], "split_smil": [5, 12], "split_smiles_from_react": [5, 6], "splitreact": [12, 13], "squar": [14, 17], "stack": 13, "stack_column": [12, 13], "stack_multi_column": 13, "stackcolumn": [12, 13], "stackedcolumn": 13, "stackmulticolumn": [12, 13], "standard": [3, 6, 12], "standardfingerprintfactori": [14, 17], "start": [5, 6, 9, 10, 11, 14, 17, 19], "statist": [6, 13], "step": [9, 10, 11, 14], "stereo": [6, 13], "stereo_centre_chang": 13, "stereo_centre_cr": 13, "stereo_centre_outsid": 13, "stereo_centre_remov": 13, "stereo_changes_column": [12, 13], "stereo_chiral_reag": 13, "stereo_invent": 13, "stereocenterinreactantpotenti": [12, 13], "stereocenteriscr": [12, 13], "stereocenterisremov": [12, 13], "stereocenteroutsidereact": [12, 13], "stereocentrechang": [12, 13], "stereocentrecr": 13, "stereocentreremov": 13, "stereochang": 13, "stereochemistri": 13, "stereogen": 13, "stereohaschiralreag": [12, 13], "stereoinvent": [12, 13], "stereomesoproduct": [12, 13], "stereooutsid": 13, "stero": 13, "stock": 14, "store": [4, 6, 14], "str": [3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "strdict": 17, "strict": 18, "string": [2, 6, 14, 19, 20], "stringconstraint": 18, "strip_whitespac": 18, "structur": [6, 14, 18], "sub": [0, 14], "sub_regex": [12, 13], "submodul": [1, 5], "subpackag": 1, "subset": 14, "substitut": 17, "substructur": 6, "succe": 14, "successfulli": 6, "sum": [2, 20], "support": [0, 4], "sure": [0, 4], "symbol": 13, "symmetr": 6, "symmetri": 6, "synthesi": [0, 4, 14, 15, 16, 17], "synthesisrout": [5, 14, 15, 16, 17], "synthet": 7, "system": 8, "t": [3, 13], "tab": [2, 3, 12, 20], "tabl": 12, "tag": 13, "take": [2, 3, 6, 14, 17, 20], "taken": [2, 6], "target": 15, "target_column": [12, 13], "target_fingerprint": 15, "target_smil": 4, "task": [0, 2, 3, 20], "tautom": 6, "tautomer": 6, "technic": 19, "ted": [5, 14], "ted_distances_calcul": [14, 17], "templat": [0, 1, 3, 5, 12, 16], "template_column": [12, 13], "template_extractor": 6, "template_hash": 16, "template_smart": 6, "templategivesnoutcom": 13, "templategivesotherreact": 13, "templategivestruereact": 13, "templatemolecul": [5, 6], "test": 6, "text": 4, "text_yield_column": [9, 11], "textminedyield": 11, "thakkar": 19, "than": [2, 20], "thd": 15, "thei": [3, 12, 14, 19], "them": [11, 13, 14, 16, 17], "therefor": [2, 3, 20], "thi": [0, 2, 3, 4, 6, 9, 10, 11, 13, 14, 15, 17, 19, 20], "thoroughli": 14, "three": [0, 3, 9, 14, 17], "through": 16, "throughout": 14, "time": 17, "timeout": 17, "to_low": 18, "to_upp": 18, "togeth": [2, 6, 20], "token": [2, 20], "tool": [7, 9, 10, 11, 13, 14], "top": [13, 17], "total": 6, "total_cent": [5, 6], "tp7rh": 15, "train": [2, 20], "transform": [10, 11, 14], "transpar": [2, 20], "tree": [14, 17], "treecont": [14, 17], "trigger": 6, "trim": 13, "trim_rxn_smil": [3, 13], "trimrxnsmil": [12, 13], "true": [4, 6, 9, 10, 11, 12, 13, 14, 17], "trust": 8, "tsv": 3, "tupl": [6, 9, 12, 14, 15, 16, 19], "turn": 13, "tutori": 6, "two": [2, 3, 6, 13, 14, 17, 19, 20], "txt": 4, "type": [3, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18], "typic": 14, "un": [6, 14], "unchang": 13, "under": 13, "unimport": 6, "union": 17, "uniqu": [2, 6, 14, 20], "unmap": 13, "unmapped_column": [12, 13], "unmappedprodatom": 13, "unord": 17, "unsanitiz": 13, "unsanitizablereact": 13, "up": [6, 9, 10, 11, 14], "updat": 6, "upon": 14, "upsto": 11, "us": [0, 2, 3, 4, 6, 7, 11, 13, 14, 15, 16, 17, 19, 20], "usag": 0, "use_chir": 6, "use_cli": [9, 10, 11], "user": 0, "usernam": 4, "uspo_data_map": 20, "uspto": [0, 3, 5, 9], "uspto_clean": 3, "uspto_data": [3, 20], "uspto_data_clean": 20, "uspto_data_map": 20, "uspto_yield": [5, 9], "usptodatapreparationflow": [9, 11], "usptoyieldcur": [9, 11], "util": [0, 1, 5, 14, 19], "v": 6, "valid": [5, 6, 12, 13, 14], "validate_dict": [14, 18], "validation_runn": 3, "valu": [3, 17], "valueerror": 6, "variabl": [3, 6], "variat": 6, "variou": [0, 6, 14], "vector": 6, "versa": 6, "version": 6, "vice": 6, "wa": [2, 13, 19, 20], "wai": [3, 13], "we": [3, 6, 19], "weight": [6, 7], "well": [0, 4, 14], "were": 6, "what": [3, 4, 17], "wheel": 0, "when": [2, 3, 6, 8, 17, 20], "whenev": 14, "where": [4, 6, 13, 14], "wherea": 19, "whether": [6, 14], "which": [2, 3, 6, 14], "white": 14, "whole": 6, "widow_column": [12, 13], "widowatom": 13, "without": [2, 6, 13, 20], "work": [0, 3, 13, 19], "worker": [2, 20], "wrap": 17, "wrapper": [6, 17], "write": [7, 16], "write_func": 9, "written": [4, 12], "x": 14, "y": [2, 14, 20], "yaml": [3, 13], "year": [11, 20], "yield": [2, 6, 11, 14, 17], "yield_curation_uspto": 11, "yml": [0, 3], "you": [0, 2, 3, 4, 19, 20], "your": 4, "yujia": 15, "z": [13, 14], "za": 13}, "titles": ["rxnutils documentation", "rxnutils", "Open reaction database", "Pipeline", "Routes", "rxnutils package", "rxnutils.chem package", "rxnutils.chem.features package", "rxnutils.chem.rinchi package", "rxnutils.data package", "rxnutils.data.ord package", "rxnutils.data.uspto package", "rxnutils.pipeline package", "rxnutils.pipeline.actions package", "rxnutils.routes package", "rxnutils.routes.deepset package", "rxnutils.routes.retro_bleu package", "rxnutils.routes.ted package", "rxnutils.routes.utils package", "Templates", "USPTO"], "titleterms": {"action": [3, 13], "artifact": [2, 20], "augment": 6, "base": [12, 14], "base_pipelin": 9, "batch_util": 9, "cgr": 6, "chem": [6, 7, 8], "combin": 11, "comparison": 14, "content": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "data": [9, 10, 11], "databas": 2, "dataframe_mod": 13, "deepset": 15, "develop": 3, "distances_calcul": 17, "document": 0, "download": 11, "download_rinchi": 8, "extract": 19, "featur": [7, 15], "imag": 14, "import_ord_dataset": 10, "instal": 0, "introduct": 0, "limit": 0, "manipul": 19, "map": 9, "mapping_pipelin": 9, "modul": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "ngram_collect": 16, "open": 2, "ord": 10, "packag": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "pipelin": [3, 12, 13], "pre": [2, 20], "preparation_pipelin": [10, 11], "reaction": [2, 6], "reaction_mod": 13, "reaction_prop": 13, "reactiontre": 17, "read": 4, "reader": 14, "requisit": [2, 20], "retro_bleu": 16, "rinchi": 8, "rinchi_api": 8, "rout": [4, 14, 15, 16, 17, 18], "runner": 12, "rxnfp_runner": 7, "rxnutil": [0, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "sc_score": 7, "score": [14, 15, 16], "submodul": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "subpackag": [5, 6, 9, 12, 14], "ted": 17, "templat": [6, 13, 19], "usag": [2, 3, 20], "uspto": [11, 20], "uspto_yield": 11, "util": [6, 17, 18], "valid": 18}}) \ No newline at end of file diff --git a/templates.html b/templates.html new file mode 100644 index 0000000..c09235a --- /dev/null +++ b/templates.html @@ -0,0 +1,190 @@ + + + + + + + + Templates — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

Templates

+

reaction utils contains routines for extracting reaction templates using the RDchiral package. +This code is based on the work of Thakkar et al. (Chem. Sci., 2019) but with some re-factoring and +other additions.

+
+

Template extraction

+

Let’s start with this atom-mapped reaction

+_images/sample_reaction.PNG +
CCN(CC)CC.CCOCC.Cl[S:3]([CH2:2][CH3:1])(=[O:4])=[O:5].[OH:6][CH2:7][CH2:8][Br:9]>>[CH3:1][CH2:2][S:3](=[O:4])(=[O:5])[O:6][CH2:7][CH2:8][Br:9]
+
+
+

First we create a ChemicalReaction object that is encapsulating the reaction and provides some +simple curation routines.

+
from rxnutils.chem.reaction import ChemicalReaction
+
+reaction = "CCN(CC)CC.CCOCC.Cl[S:3]([CH2:2][CH3:1])(=[O:4])=[O:5].[OH:6][CH2:7][CH2:8][Br:9]>>[CH3:1][CH2:2][S:3](=[O:4])(=[O:5])[O:6][CH2:7][CH2:8][Br:9]"
+rxn = ChemicalReaction(reaction)
+
+
+

if you inspect the reactants_list property, you will see that two of the reactants from the reaction +SMILES have been moved to the list of agents because they are not mapped.

+
rxn.reactants_list
+>> ['Cl[S:3]([CH2:2][CH3:1])(=[O:4])=[O:5]', '[OH:6][CH2:7][CH2:8][Br:9]']
+
+rxn.agents_list
+>> ['CCN(CC)CC', 'CCOCC']
+
+
+

Now we can extract a reaction template

+
rxn.generate_reaction_template(radius=1)
+
+rxn.retro_template
+>> <rxnutils.chem.template.ReactionTemplate at 0x7fe4e9488d90>
+
+rxn.retro_template.smarts
+>> '[C:2]-[S;H0;D4;+0:1](=[O;D1;H0:3])(=[O;D1;H0:4])-[O;H0;D2;+0:6]-[C:5]>>Cl-[S;H0;D4;+0:1](-[C:2])(=[O;D1;H0:3])=[O;D1;H0:4].[C:5]-[OH;D1;+0:6]'
+
+
+

The radius is an optional argument, specifying the radius of the template.

+
+
+

Template manipulation

+

The reaction template, either the canonical (forward) or retro template is encapulsated in a +ReactionTemplate object that can be used to apply the template to a molecule or to generate +fingerprints or hash strings.

+

Let’s see if the template generated above is capable of re-generating the expected reactants.

+
smiles="CCS(=O)(=O)OCCBr"
+reactant_list = rxn.retro_template.apply(smiles)
+reactant_list
+>> (('CCS(=O)(=O)Cl', 'OCCBr'),)
+
+
+

we see that returned list (technically a tuple) contains one item, implying that the template +was specific and only produced one set of reactants. These reactants as you see are identical +to the reactants in the reaction SMILES above.

+

To create a hash string for the template, there are a number of routines

+
rxn.retro_template.hash_from_bits()
+>> 'a1727cc9ed68a6411bfd02873c1615c22baa1af4957f14ae942e2c85caf9adb5'
+
+rxn.retro_template.hash_from_smarts()
+>> '4cb9be0738a3a84e7ed4fb661d2efb73c099fc7d6c532a4b294c8d0d'
+
+rxn.retro_template.hash_from_smiles()
+>> '5b2ff2a69fb7bd6a032938e468684773bcc668928b037bbec0ac8335'
+
+
+

The first one is creating the hash string from the fingerprint bits that are one, whereas the +other two creates it by hashing the SMARTS and the SMILES string, respectively.

+

A Morgan fingerprint can be computed for a reaction template:

+
rxn.retro_template.fingerprint_vector(radius=2, nbits=1024)
+>> array([0., 0., 0., ..., 0., 0., 0.])
+
+
+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/uspto.html b/uspto.html new file mode 100644 index 0000000..70f8b43 --- /dev/null +++ b/uspto.html @@ -0,0 +1,195 @@ + + + + + + + + USPTO — ReactionUtils 1.8.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+

USPTO

+

rxnutils contain two pipelines that together downloads and prepares the USPTO reaction data so that it can be used on modelling.

+

It is a complete end-to-end pipeline that is designed to be transparent and reproducible.

+
+

Pre-requisites

+

The reason the pipeline is divided into two blocks is because the dependencies of the atom-mapper package (rxnmapper) is incompatible with +the dependencies rxnutils package. Therefore, to be able to use to full pipeline, you need to setup two python environment.

+
    +
  1. Install rxnutils according to the instructions in the README-file

  2. +
  3. Install rxnmapper according to the instructions in the repo: https://github.com/rxn4chemistry/rxnmapper

  4. +
+
conda create -n rxnmapper python=3.6 -y
+conda activate rxnmapper
+conda install -c rdkit rdkit=2020.03.3.0
+python -m pip install rxnmapper
+
+
+
    +
  1. Install Metaflow and rxnutils in the new environment

  2. +
+
python -m pip install metaflow
+python -m pip install --no-deps --ignore-requires-python .
+
+
+
+
+

Usage

+

Create a folder for the USPTO data and in that folder execute this command in the rxnutils environment

+
conda activate rxn-env
+python -m rxnutils.data.uspto.preparation_pipeline run --nbatches 200  --max-workers 8 --max-num-splits 200
+
+
+

and then in the environment with the rxnmapper run

+
conda activate rxnmapper
+python -m rxnutils.data.mapping_pipeline run --data-prefix uspto --nbatches 200  --max-workers 8 --max-num-splits 200
+
+
+

The -max-workers flag should be set to the number of CPUs available.

+

On 8 CPUs and 1 GPU the pipeline takes a couple of hours.

+
+
+

Artifacts

+

The pipelines creates a number of tab-separated CSV files:

+
+
    +
  • 1976_Sep2016_USPTOgrants_smiles.rsmi and 2001_Sep2016_USPTOapplications_smiles.rsmi is the original USPTO data downloaded from Figshare

  • +
  • uspto_data.csv is the combined USPTO data, with selected columns and a unique ID for each reaction

  • +
  • uspto_data_cleaned.csv is the cleaned and filter data

  • +
  • uspto_data_mapped.csv is the atom-mapped, modelling-ready data

  • +
+
+
+
The cleaning is done to be able to atom-map the reactions and are performing the following tasks:
    +
  • Ignore extended SMILES information in the SMILES strings

  • +
  • Remove molecules not sanitizable by RDKit

  • +
  • Remove reactions without any reactants or products

  • +
  • Move all reagents to reactants

  • +
  • Remove the existing atom-mapping

  • +
  • Remove reactions with more than 200 atoms when summing reactants and products

  • +
+
+
+

(the last is a requisite for rxnmapper that was trained on a maximum token size roughly corresponding to 200 atoms)

+

The uspo_data_mapped.csv files will have the following columns:

+
+
    +
  • ID - unique ID created by concatenated patent number, paragraph and row index in the original data file

  • +
  • Year - the year of the patent filing

  • +
  • ReactionSmiles - the original reaction SMILES

  • +
  • ReactionSmilesClean - the reaction SMILES after cleaning

  • +
  • BadMolecules - molecules not sanitizable by RDKit

  • +
  • ReactantSize - number of atoms in reactants

  • +
  • ProductSize - number of atoms in products

  • +
  • mapped_rxn - the mapped reaction SMILES

  • +
  • confidence - the confidence of the mapping as provided by rxnmapper

  • +
+
+
+
+ + +
+ +
+
+
+
+ + + + + + + \ No newline at end of file