molSimplify 1.7.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (651) hide show
  1. docs/source/conf.py +224 -0
  2. molSimplify/Classes/__init__.py +6 -0
  3. molSimplify/Classes/atom3D.py +235 -0
  4. molSimplify/Classes/dft_obs.py +130 -0
  5. molSimplify/Classes/globalvars.py +827 -0
  6. molSimplify/Classes/helpers.py +161 -0
  7. molSimplify/Classes/ligand.py +2330 -0
  8. molSimplify/Classes/mGUI.py +2493 -0
  9. molSimplify/Classes/mWidgets.py +438 -0
  10. molSimplify/Classes/miniGUI.py +41 -0
  11. molSimplify/Classes/mol2D.py +260 -0
  12. molSimplify/Classes/mol3D.py +5846 -0
  13. molSimplify/Classes/monomer3D.py +253 -0
  14. molSimplify/Classes/partialcharges.py +226 -0
  15. molSimplify/Classes/protein3D.py +1178 -0
  16. molSimplify/Classes/rundiag.py +151 -0
  17. molSimplify/Data/ML.dat +212 -0
  18. molSimplify/Data/MLS_FSR_for_inter.dat +23 -0
  19. molSimplify/Data/MLS_FSR_for_inter2.dat +23 -0
  20. molSimplify/Data/MLS_angle_for_click.dat +8 -0
  21. molSimplify/Data/MLS_angle_for_inter.dat +23 -0
  22. molSimplify/Data/MLS_angle_for_inter2.dat +48 -0
  23. molSimplify/Data/MLS_angle_for_intra.dat +10 -0
  24. molSimplify/Data/MLS_angle_for_intra2.dat +6 -0
  25. molSimplify/Data/MLS_angle_for_oa.dat +18 -0
  26. molSimplify/Data/ML_FSR_for_inter.dat +112 -0
  27. molSimplify/Data/ML_FSR_for_inter2.dat +110 -0
  28. molSimplify/Data/ML_bond_for_cat.dat +8 -0
  29. molSimplify/Data/ML_bond_for_click.dat +8 -0
  30. molSimplify/Data/ML_bond_for_inter.dat +48 -0
  31. molSimplify/Data/ML_bond_for_inter2.dat +48 -0
  32. molSimplify/Data/ML_bond_for_intra.dat +10 -0
  33. molSimplify/Data/ML_bond_for_intra2.dat +6 -0
  34. molSimplify/Data/ML_bond_for_oa.dat +18 -0
  35. molSimplify/Data/bp1.dat +21 -0
  36. molSimplify/Data/li.dat +3 -0
  37. molSimplify/Data/no.dat +2 -0
  38. molSimplify/Data/oct.dat +7 -0
  39. molSimplify/Data/pbp.dat +8 -0
  40. molSimplify/Data/spy.dat +6 -0
  41. molSimplify/Data/sqap.dat +9 -0
  42. molSimplify/Data/sqp.dat +5 -0
  43. molSimplify/Data/tbp.dat +6 -0
  44. molSimplify/Data/tdhd.dat +9 -0
  45. molSimplify/Data/thd.dat +5 -0
  46. molSimplify/Data/tpl.dat +4 -0
  47. molSimplify/Data/tpr.dat +7 -0
  48. molSimplify/Informatics/HFXsensitivity/__init__.py +0 -0
  49. molSimplify/Informatics/HFXsensitivity/measure_HFX_sensitivity_oxo_hat_reb_rel.py +443 -0
  50. molSimplify/Informatics/HFXsensitivity/measure_HFX_stable.py +346 -0
  51. molSimplify/Informatics/MOF/Linker_rotation.py +179 -0
  52. molSimplify/Informatics/MOF/MOF_descriptors.py +1299 -0
  53. molSimplify/Informatics/MOF/MOF_descriptors_alternate_functional.py +589 -0
  54. molSimplify/Informatics/MOF/MOF_functionalizer.py +1648 -0
  55. molSimplify/Informatics/MOF/PBC_functions.py +1347 -0
  56. molSimplify/Informatics/MOF/__init__.py +0 -0
  57. molSimplify/Informatics/MOF/atomic.py +267 -0
  58. molSimplify/Informatics/MOF/cluster_extraction.py +388 -0
  59. molSimplify/Informatics/MOF/fragment_MOFs_for_pormake.py +895 -0
  60. molSimplify/Informatics/MOF/monofunctionalized_BDC/index_information.py +10 -0
  61. molSimplify/Informatics/Mol2Parser.py +46 -0
  62. molSimplify/Informatics/RACassemble.py +408 -0
  63. molSimplify/Informatics/__init__.py +0 -0
  64. molSimplify/Informatics/active_learning/__init__.py +0 -0
  65. molSimplify/Informatics/active_learning/expected_improvement.py +269 -0
  66. molSimplify/Informatics/autocorrelation.py +1930 -0
  67. molSimplify/Informatics/clean_autocorrelation.py +778 -0
  68. molSimplify/Informatics/coulomb_analyze.py +67 -0
  69. molSimplify/Informatics/decoration_manager.py +193 -0
  70. molSimplify/Informatics/geo_analyze.py +88 -0
  71. molSimplify/Informatics/geometrics.py +56 -0
  72. molSimplify/Informatics/graph_analyze.py +163 -0
  73. molSimplify/Informatics/graph_racs.py +288 -0
  74. molSimplify/Informatics/jupyter_vis.py +172 -0
  75. molSimplify/Informatics/lacRACAssemble.py +2192 -0
  76. molSimplify/Informatics/lacRACAssemble_bisdithiolenes.py +236 -0
  77. molSimplify/Informatics/misc_descriptors.py +198 -0
  78. molSimplify/Informatics/organic_fingerprints.py +61 -0
  79. molSimplify/Informatics/partialcharges.py +345 -0
  80. molSimplify/Informatics/protein/activesite.py +53 -0
  81. molSimplify/Informatics/protein/pymol_add_hs.py +33 -0
  82. molSimplify/Informatics/rac155_geo.py +48 -0
  83. molSimplify/Ligands/(1_methylbenzimidazol_2_yl)pyridine.xyz +45 -0
  84. molSimplify/Ligands/1-4-dimethyl-1-2-3-triazole.xyz +15 -0
  85. molSimplify/Ligands/12crown4.mol +62 -0
  86. molSimplify/Ligands/Antipyrine.mol +58 -0
  87. molSimplify/Ligands/BPAbipy.mol +106 -0
  88. molSimplify/Ligands/Hpyrrole.mol +26 -0
  89. molSimplify/Ligands/N-quinolinylbutyramidate.xyz +31 -0
  90. molSimplify/Ligands/N-quinolinylmethylmethinylacetamidate.xyz +30 -0
  91. molSimplify/Ligands/NMe2_-1.xyz +11 -0
  92. molSimplify/Ligands/PCy3.mol +111 -0
  93. molSimplify/Ligands/PMe3.xyz +15 -0
  94. molSimplify/Ligands/PPh3.mol +76 -0
  95. molSimplify/Ligands/Propyphenazone.mol +77 -0
  96. molSimplify/Ligands/acac.mol +33 -0
  97. molSimplify/Ligands/acacen.mol +76 -0
  98. molSimplify/Ligands/acetate.smi +1 -0
  99. molSimplify/Ligands/acetate.xyz +9 -0
  100. molSimplify/Ligands/aceticacidbipyridine.mol +70 -0
  101. molSimplify/Ligands/acetonitrile.mol +17 -0
  102. molSimplify/Ligands/alanine.mol +30 -0
  103. molSimplify/Ligands/alphabetizer.py +21 -0
  104. molSimplify/Ligands/amine.mol +11 -0
  105. molSimplify/Ligands/ammonia.mol +12 -0
  106. molSimplify/Ligands/arginine.mol +58 -0
  107. molSimplify/Ligands/asparagine.mol +38 -0
  108. molSimplify/Ligands/aspartic_acid.mol +35 -0
  109. molSimplify/Ligands/azide.mol +11 -0
  110. molSimplify/Ligands/benzene.mol +28 -0
  111. molSimplify/Ligands/benzene_pi.mol +30 -0
  112. molSimplify/Ligands/benzenedithiol.mol +30 -0
  113. molSimplify/Ligands/benzenethiol.mol +30 -0
  114. molSimplify/Ligands/benzylisocy.mol +38 -0
  115. molSimplify/Ligands/bidiazine.mol +42 -0
  116. molSimplify/Ligands/bidiazole.mol +38 -0
  117. molSimplify/Ligands/bifuran.mol +38 -0
  118. molSimplify/Ligands/bihydrodiazine.mol +58 -0
  119. molSimplify/Ligands/bihydrodiazole.mol +46 -0
  120. molSimplify/Ligands/bihydrooxazine.mol +54 -0
  121. molSimplify/Ligands/bihydrooxazole.mol +42 -0
  122. molSimplify/Ligands/bihydrothiazine.mol +54 -0
  123. molSimplify/Ligands/bihydrothiazole.mol +42 -0
  124. molSimplify/Ligands/biimidazole.mol +38 -0
  125. molSimplify/Ligands/bioxazole.mol +34 -0
  126. molSimplify/Ligands/bipy.mol +46 -0
  127. molSimplify/Ligands/bipyrazine.xyz +20 -0
  128. molSimplify/Ligands/bipyrimidine.mol +42 -0
  129. molSimplify/Ligands/bipyrrole.mol +42 -0
  130. molSimplify/Ligands/bisnapthyridylpyridine.mol +111 -0
  131. molSimplify/Ligands/bithiazole.mol +34 -0
  132. molSimplify/Ligands/bromide.mol +7 -0
  133. molSimplify/Ligands/bromide.smi +1 -0
  134. molSimplify/Ligands/c2.mol +9 -0
  135. molSimplify/Ligands/caprolactone.mol +41 -0
  136. molSimplify/Ligands/carbonyl.mol +8 -0
  137. molSimplify/Ligands/carboxyl.mol +13 -0
  138. molSimplify/Ligands/cat.mol +30 -0
  139. molSimplify/Ligands/chloride.mol +7 -0
  140. molSimplify/Ligands/chloride.smi +1 -0
  141. molSimplify/Ligands/chloropyridine.mol +27 -0
  142. molSimplify/Ligands/co2.mol +10 -0
  143. molSimplify/Ligands/corrolazine.mol +72 -0
  144. molSimplify/Ligands/cs.mol +8 -0
  145. molSimplify/Ligands/cyanate.xyz +5 -0
  146. molSimplify/Ligands/cyanide.mol +9 -0
  147. molSimplify/Ligands/cyanoaceticporphyrin.mol +114 -0
  148. molSimplify/Ligands/cyanopyridine.mol +29 -0
  149. molSimplify/Ligands/cyclam.mol +81 -0
  150. molSimplify/Ligands/cyclen.mol +69 -0
  151. molSimplify/Ligands/cyclopentadienyl.mol +26 -0
  152. molSimplify/Ligands/cysteine.mol +32 -0
  153. molSimplify/Ligands/diaminomethyl.mol +19 -0
  154. molSimplify/Ligands/diazine.mol +25 -0
  155. molSimplify/Ligands/diazole.mol +23 -0
  156. molSimplify/Ligands/dicyanamide.mol +15 -0
  157. molSimplify/Ligands/dihydrofuran.mol +27 -0
  158. molSimplify/Ligands/dmap.xyz +35 -0
  159. molSimplify/Ligands/dmf.mol +28 -0
  160. molSimplify/Ligands/dmi.mol +41 -0
  161. molSimplify/Ligands/dmpe.mol +52 -0
  162. molSimplify/Ligands/dpmu.mol +47 -0
  163. molSimplify/Ligands/dppe.mol +112 -0
  164. molSimplify/Ligands/edta.mol +69 -0
  165. molSimplify/Ligands/en.mol +28 -0
  166. molSimplify/Ligands/ethanethiol.mol +21 -0
  167. molSimplify/Ligands/ethanolamine.mol +26 -0
  168. molSimplify/Ligands/ethbipy.mol +70 -0
  169. molSimplify/Ligands/ethyl.mol +19 -0
  170. molSimplify/Ligands/ethylamine.mol +24 -0
  171. molSimplify/Ligands/ethylene.mol +16 -0
  172. molSimplify/Ligands/ethylesteracac.mol +57 -0
  173. molSimplify/Ligands/fluoride.mol +7 -0
  174. molSimplify/Ligands/fluoride.smi +1 -0
  175. molSimplify/Ligands/formaldehyde.mol +12 -0
  176. molSimplify/Ligands/formamidate.xyz +8 -0
  177. molSimplify/Ligands/formate.xyz +6 -0
  178. molSimplify/Ligands/furan.mol +23 -0
  179. molSimplify/Ligands/glutamic_acid.mol +42 -0
  180. molSimplify/Ligands/glutamine.mol +44 -0
  181. molSimplify/Ligands/glycinate.mol +23 -0
  182. molSimplify/Ligands/glycine.mol +24 -0
  183. molSimplify/Ligands/h2s.mol +10 -0
  184. molSimplify/Ligands/helium.mol +6 -0
  185. molSimplify/Ligands/histidine.mol +45 -0
  186. molSimplify/Ligands/hmpa.mol +62 -0
  187. molSimplify/Ligands/hs-.mol +9 -0
  188. molSimplify/Ligands/hydride.mol +7 -0
  189. molSimplify/Ligands/hydrocarboxyacetylide.xyz +8 -0
  190. molSimplify/Ligands/hydrocyanide.mol +10 -0
  191. molSimplify/Ligands/hydrodiazine.mol +33 -0
  192. molSimplify/Ligands/hydrodiazole.mol +27 -0
  193. molSimplify/Ligands/hydrogensulfide.mol +10 -0
  194. molSimplify/Ligands/hydroisocyanide.mol +11 -0
  195. molSimplify/Ligands/hydrooxazine.mol +31 -0
  196. molSimplify/Ligands/hydrooxazole.mol +25 -0
  197. molSimplify/Ligands/hydrothiazine.mol +31 -0
  198. molSimplify/Ligands/hydrothiazole.mol +25 -0
  199. molSimplify/Ligands/hydroxyl.mol +9 -0
  200. molSimplify/Ligands/imidazole.mol +23 -0
  201. molSimplify/Ligands/imidazolidinone.mol +29 -0
  202. molSimplify/Ligands/imine.mol +13 -0
  203. molSimplify/Ligands/iminodiacetic.mol +33 -0
  204. molSimplify/Ligands/iodide.mol +7 -0
  205. molSimplify/Ligands/iodobenzene.xyz +14 -0
  206. molSimplify/Ligands/isoleucine.mol +48 -0
  207. molSimplify/Ligands/isothiocyanate.mol +11 -0
  208. molSimplify/Ligands/leucine.mol +48 -0
  209. molSimplify/Ligands/ligands.dict +257 -0
  210. molSimplify/Ligands/lysine.mol +54 -0
  211. molSimplify/Ligands/mebenzenedithiol.mol +36 -0
  212. molSimplify/Ligands/mebim_py.xyz +29 -0
  213. molSimplify/Ligands/mebim_pz.xyz +28 -0
  214. molSimplify/Ligands/mebipy.mol +58 -0
  215. molSimplify/Ligands/mecat.mol +36 -0
  216. molSimplify/Ligands/methanal.mol +11 -0
  217. molSimplify/Ligands/methanethiol.mol +15 -0
  218. molSimplify/Ligands/methanol.mol +16 -0
  219. molSimplify/Ligands/methionine.mol +44 -0
  220. molSimplify/Ligands/methyl.mol +13 -0
  221. molSimplify/Ligands/methylacetylide.xyz +8 -0
  222. molSimplify/Ligands/methylamine.mol +19 -0
  223. molSimplify/Ligands/methylazide.xyz +9 -0
  224. molSimplify/Ligands/methylisocy.mol +17 -0
  225. molSimplify/Ligands/methylpyridine.mol +33 -0
  226. molSimplify/Ligands/n2.mol +8 -0
  227. molSimplify/Ligands/n4py.xyz +51 -0
  228. molSimplify/Ligands/nch.mol +10 -0
  229. molSimplify/Ligands/nco-.mol +11 -0
  230. molSimplify/Ligands/nethanolamine.mol +26 -0
  231. molSimplify/Ligands/nitrate.mol +14 -0
  232. molSimplify/Ligands/nitrite.mol +11 -0
  233. molSimplify/Ligands/nitro.mol +11 -0
  234. molSimplify/Ligands/nitrobipy.mol +54 -0
  235. molSimplify/Ligands/nitroso.mol +8 -0
  236. molSimplify/Ligands/nme3.mol +30 -0
  237. molSimplify/Ligands/no-.mol +10 -0
  238. molSimplify/Ligands/no2-.mol +11 -0
  239. molSimplify/Ligands/noxygen.mol +8 -0
  240. molSimplify/Ligands/ns-.mol +10 -0
  241. molSimplify/Ligands/o-pyridylbenzene.xyz +23 -0
  242. molSimplify/Ligands/o-pyridylphenylanion.xyz +22 -0
  243. molSimplify/Ligands/o2-.mol +9 -0
  244. molSimplify/Ligands/o2.xyz +4 -0
  245. molSimplify/Ligands/och2.mol +12 -0
  246. molSimplify/Ligands/oethanolamine.mol +26 -0
  247. molSimplify/Ligands/ome2.mol +22 -0
  248. molSimplify/Ligands/ooh.xyz +5 -0
  249. molSimplify/Ligands/oxalate.mol +17 -0
  250. molSimplify/Ligands/oxalate.smi +1 -0
  251. molSimplify/Ligands/oxygen.mol +7 -0
  252. molSimplify/Ligands/pentacyanocyclopentadienide.mol +36 -0
  253. molSimplify/Ligands/ph2-.mol +11 -0
  254. molSimplify/Ligands/ph3.mol +12 -0
  255. molSimplify/Ligands/phen.mol +51 -0
  256. molSimplify/Ligands/phenacac.mol +63 -0
  257. molSimplify/Ligands/phenalalanine.mol +51 -0
  258. molSimplify/Ligands/phendione.mol +51 -0
  259. molSimplify/Ligands/phenphen.mol +75 -0
  260. molSimplify/Ligands/phenylbenzoxazole.mol +54 -0
  261. molSimplify/Ligands/phenylcyc.mol +99 -0
  262. molSimplify/Ligands/phenylenediamine.mol +37 -0
  263. molSimplify/Ligands/phenylisocy.mol +32 -0
  264. molSimplify/Ligands/phosacidbipy.mol +66 -0
  265. molSimplify/Ligands/phosphine.mol +13 -0
  266. molSimplify/Ligands/phosphorine.mol +27 -0
  267. molSimplify/Ligands/phosphorustrifluoride.mol +12 -0
  268. molSimplify/Ligands/phthalocyanine.mol +126 -0
  269. molSimplify/Ligands/pme3o.mol +32 -0
  270. molSimplify/Ligands/porphyrin.mol +82 -0
  271. molSimplify/Ligands/pph3o.mol +77 -0
  272. molSimplify/Ligands/proline.mol +39 -0
  273. molSimplify/Ligands/propdiol.mol +21 -0
  274. molSimplify/Ligands/propylene.mol +23 -0
  275. molSimplify/Ligands/pyridine.mol +27 -0
  276. molSimplify/Ligands/pyrimidone.mol +27 -0
  277. molSimplify/Ligands/pyrrole.mol +24 -0
  278. molSimplify/Ligands/quinoxalinedithiol.mol +39 -0
  279. molSimplify/Ligands/s2-.mol +9 -0
  280. molSimplify/Ligands/salen.mol +75 -0
  281. molSimplify/Ligands/salphen.mol +84 -0
  282. molSimplify/Ligands/serine.mol +32 -0
  283. molSimplify/Ligands/simple_ligands.dict +14 -0
  284. molSimplify/Ligands/sulfacidbipy.mol +63 -0
  285. molSimplify/Ligands/tbucat.mol +54 -0
  286. molSimplify/Ligands/tbuphisocy.mol +56 -0
  287. molSimplify/Ligands/tbutylcyclen.mol +166 -0
  288. molSimplify/Ligands/tbutylisocy.mol +35 -0
  289. molSimplify/Ligands/tbutylthiol.mol +33 -0
  290. molSimplify/Ligands/tcnoet.mol +43 -0
  291. molSimplify/Ligands/tcnoetOH.mol +45 -0
  292. molSimplify/Ligands/terpy.mol +65 -0
  293. molSimplify/Ligands/tetrahydrofuran.mol +31 -0
  294. molSimplify/Ligands/thiane.mol +37 -0
  295. molSimplify/Ligands/thiazole.mol +21 -0
  296. molSimplify/Ligands/thiocyanate.mol +11 -0
  297. molSimplify/Ligands/thiol.mol +9 -0
  298. molSimplify/Ligands/thiophene.mol +23 -0
  299. molSimplify/Ligands/thiopyridine.mol +29 -0
  300. molSimplify/Ligands/threonine.mol +38 -0
  301. molSimplify/Ligands/tpp.mol +165 -0
  302. molSimplify/Ligands/tricyanomethyl.mol +19 -0
  303. molSimplify/Ligands/trifluoromethyl.mol +13 -0
  304. molSimplify/Ligands/tryptophan.mol +60 -0
  305. molSimplify/Ligands/tyrosine.mol +53 -0
  306. molSimplify/Ligands/uthiol.mol +11 -0
  307. molSimplify/Ligands/uthiolme2.mol +23 -0
  308. molSimplify/Ligands/valine.mol +42 -0
  309. molSimplify/Ligands/water.mol +10 -0
  310. molSimplify/Ligands/x.mol +6 -0
  311. molSimplify/Scripts/__init__.py +0 -0
  312. molSimplify/Scripts/addtodb.py +308 -0
  313. molSimplify/Scripts/cellbuilder.py +1592 -0
  314. molSimplify/Scripts/cellbuilder_tools.py +701 -0
  315. molSimplify/Scripts/chains.py +342 -0
  316. molSimplify/Scripts/convert_2to3.py +23 -0
  317. molSimplify/Scripts/dbinteract.py +631 -0
  318. molSimplify/Scripts/distgeom.py +617 -0
  319. molSimplify/Scripts/findcorrelations.py +287 -0
  320. molSimplify/Scripts/generator.py +267 -0
  321. molSimplify/Scripts/geometry.py +1224 -0
  322. molSimplify/Scripts/grabguivars.py +845 -0
  323. molSimplify/Scripts/in_b3lyp_usetc.py +141 -0
  324. molSimplify/Scripts/inparse.py +1673 -0
  325. molSimplify/Scripts/io.py +1149 -0
  326. molSimplify/Scripts/isomers.py +415 -0
  327. molSimplify/Scripts/jobgen.py +247 -0
  328. molSimplify/Scripts/krr_prep.py +1262 -0
  329. molSimplify/Scripts/molSimplify_io.py +18 -0
  330. molSimplify/Scripts/molden2psi4wfn.py +166 -0
  331. molSimplify/Scripts/namegen.py +32 -0
  332. molSimplify/Scripts/nn_prep.py +561 -0
  333. molSimplify/Scripts/oct_check_mols.py +782 -0
  334. molSimplify/Scripts/periodic_QE.py +97 -0
  335. molSimplify/Scripts/postmold.py +304 -0
  336. molSimplify/Scripts/postmwfn.py +709 -0
  337. molSimplify/Scripts/postparse.py +488 -0
  338. molSimplify/Scripts/postproc.py +139 -0
  339. molSimplify/Scripts/qcgen.py +1450 -0
  340. molSimplify/Scripts/rmsd.py +489 -0
  341. molSimplify/Scripts/rungen.py +670 -0
  342. molSimplify/Scripts/structgen.py +3040 -0
  343. molSimplify/Scripts/tf_nn_prep.py +894 -0
  344. molSimplify/Scripts/tsgen.py +295 -0
  345. molSimplify/Scripts/uq_calibration.py +69 -0
  346. molSimplify/__init__.py +0 -0
  347. molSimplify/__main__.py +197 -0
  348. molSimplify/icons/chemdb.png +0 -0
  349. molSimplify/icons/hjklogo.png +0 -0
  350. molSimplify/icons/icon.png +0 -0
  351. molSimplify/icons/logo.png +0 -0
  352. molSimplify/icons/logo_old.png +0 -0
  353. molSimplify/icons/petachem.png +0 -0
  354. molSimplify/icons/petachem2.png +0 -0
  355. molSimplify/icons/petachem_full.png +0 -0
  356. molSimplify/icons/pythonlogo.png +0 -0
  357. molSimplify/icons/sge copy.png +0 -0
  358. molSimplify/icons/sge.png +0 -0
  359. molSimplify/icons/slurm.png +0 -0
  360. molSimplify/icons/wft1.png +0 -0
  361. molSimplify/icons/wft2.png +0 -0
  362. molSimplify/icons/wft3.png +0 -0
  363. molSimplify/ml/__init__.py +0 -0
  364. molSimplify/ml/kernels.py +36 -0
  365. molSimplify/ml/layers.py +29 -0
  366. molSimplify/molscontrol/__init__.py +14 -0
  367. molSimplify/molscontrol/_version.py +521 -0
  368. molSimplify/molscontrol/clf_tools.py +144 -0
  369. molSimplify/molscontrol/data/README.md +21 -0
  370. molSimplify/molscontrol/data/look_and_say.dat +15 -0
  371. molSimplify/molscontrol/dynamic_classifier.py +514 -0
  372. molSimplify/molscontrol/io_tools.py +363 -0
  373. molSimplify/molscontrol/molscontrol.py +49 -0
  374. molSimplify/molscontrol/terachem/jobscript_control.sh +31 -0
  375. molSimplify/molscontrol/terachem/terachem_input +22 -0
  376. molSimplify/python_krr/X_train_TS.csv +535 -0
  377. molSimplify/python_krr/__init__.py +0 -0
  378. molSimplify/python_krr/hat2_X_mean_std.csv +3 -0
  379. molSimplify/python_krr/hat2_feature_names.csv +1 -0
  380. molSimplify/python_krr/hat2_y_mean_std.csv +2 -0
  381. molSimplify/python_krr/hat_X_mean_std.csv +6 -0
  382. molSimplify/python_krr/hat_feature_names.csv +1 -0
  383. molSimplify/python_krr/hat_krr_X_train.csv +5205 -0
  384. molSimplify/python_krr/hat_krr_dual_coef.csv +1 -0
  385. molSimplify/python_krr/hat_y_mean_std.csv +2 -0
  386. molSimplify/python_krr/sklearn_models.py +34 -0
  387. molSimplify/python_krr/y_train_TS.csv +535 -0
  388. molSimplify/python_nn/ANN.py +198 -0
  389. molSimplify/python_nn/__init__.py +0 -0
  390. molSimplify/python_nn/clf_analysis_tool.py +125 -0
  391. molSimplify/python_nn/dictionary_toolbox.py +49 -0
  392. molSimplify/python_nn/ensemble_test.py +309 -0
  393. molSimplify/python_nn/hs_center.csv +26 -0
  394. molSimplify/python_nn/hs_scale.csv +26 -0
  395. molSimplify/python_nn/ls_center.csv +26 -0
  396. molSimplify/python_nn/ls_scale.csv +26 -0
  397. molSimplify/python_nn/ms_hs_b1.csv +50 -0
  398. molSimplify/python_nn/ms_hs_b2.csv +50 -0
  399. molSimplify/python_nn/ms_hs_b3.csv +1 -0
  400. molSimplify/python_nn/ms_hs_w1.csv +50 -0
  401. molSimplify/python_nn/ms_hs_w2.csv +50 -0
  402. molSimplify/python_nn/ms_hs_w3.csv +1 -0
  403. molSimplify/python_nn/ms_ls_b1.csv +50 -0
  404. molSimplify/python_nn/ms_ls_b2.csv +50 -0
  405. molSimplify/python_nn/ms_ls_b3.csv +1 -0
  406. molSimplify/python_nn/ms_ls_w1.csv +50 -0
  407. molSimplify/python_nn/ms_ls_w2.csv +50 -0
  408. molSimplify/python_nn/ms_ls_w3.csv +1 -0
  409. molSimplify/python_nn/ms_slope_b1.csv +50 -0
  410. molSimplify/python_nn/ms_slope_b2.csv +50 -0
  411. molSimplify/python_nn/ms_slope_b3.csv +1 -0
  412. molSimplify/python_nn/ms_slope_w1.csv +50 -0
  413. molSimplify/python_nn/ms_slope_w2.csv +50 -0
  414. molSimplify/python_nn/ms_slope_w3.csv +1 -0
  415. molSimplify/python_nn/ms_split_b1.csv +50 -0
  416. molSimplify/python_nn/ms_split_b2.csv +50 -0
  417. molSimplify/python_nn/ms_split_b3.csv +1 -0
  418. molSimplify/python_nn/ms_split_w1.csv +50 -0
  419. molSimplify/python_nn/ms_split_w2.csv +50 -0
  420. molSimplify/python_nn/ms_split_w3.csv +1 -0
  421. molSimplify/python_nn/slope_center.csv +25 -0
  422. molSimplify/python_nn/slope_scale.csv +25 -0
  423. molSimplify/python_nn/split_center.csv +26 -0
  424. molSimplify/python_nn/split_scale.csv +26 -0
  425. molSimplify/python_nn/tf_ANN.py +762 -0
  426. molSimplify/python_nn/train_data.csv +1211 -0
  427. molSimplify/tf_nn/__init__.py +0 -0
  428. molSimplify/tf_nn/geo_static_clf/geo_static_clf_model.h5 +0 -0
  429. molSimplify/tf_nn/geo_static_clf/geo_static_clf_train_name.csv +1591 -0
  430. molSimplify/tf_nn/geo_static_clf/geo_static_clf_train_x.csv +2790 -0
  431. molSimplify/tf_nn/geo_static_clf/geo_static_clf_train_y.csv +2790 -0
  432. molSimplify/tf_nn/geo_static_clf/geo_static_clf_vars.csv +154 -0
  433. molSimplify/tf_nn/geos/hs_ii_bl_x.csv +1577 -0
  434. molSimplify/tf_nn/geos/hs_ii_bl_y.csv +1577 -0
  435. molSimplify/tf_nn/geos/hs_ii_model.h5 +0 -0
  436. molSimplify/tf_nn/geos/hs_ii_model.json +1 -0
  437. molSimplify/tf_nn/geos/hs_ii_vars.csv +154 -0
  438. molSimplify/tf_nn/geos/hs_iii_bl_x.csv +1659 -0
  439. molSimplify/tf_nn/geos/hs_iii_bl_y.csv +1659 -0
  440. molSimplify/tf_nn/geos/hs_iii_model.h5 +0 -0
  441. molSimplify/tf_nn/geos/hs_iii_model.json +1 -0
  442. molSimplify/tf_nn/geos/hs_iii_vars.csv +154 -0
  443. molSimplify/tf_nn/geos/ls_ii_bl_x.csv +1374 -0
  444. molSimplify/tf_nn/geos/ls_ii_bl_y.csv +1374 -0
  445. molSimplify/tf_nn/geos/ls_ii_model.h5 +0 -0
  446. molSimplify/tf_nn/geos/ls_ii_model.json +1 -0
  447. molSimplify/tf_nn/geos/ls_ii_vars.csv +154 -0
  448. molSimplify/tf_nn/geos/ls_iii_bl_x.csv +1364 -0
  449. molSimplify/tf_nn/geos/ls_iii_bl_y.csv +1364 -0
  450. molSimplify/tf_nn/geos/ls_iii_model.h5 +0 -0
  451. molSimplify/tf_nn/geos/ls_iii_model.json +1 -0
  452. molSimplify/tf_nn/geos/ls_iii_vars.csv +154 -0
  453. molSimplify/tf_nn/homolumo/gap_model.h5 +0 -0
  454. molSimplify/tf_nn/homolumo/gap_model.json +1 -0
  455. molSimplify/tf_nn/homolumo/gap_test_names.csv +175 -0
  456. molSimplify/tf_nn/homolumo/gap_test_x.csv +176 -0
  457. molSimplify/tf_nn/homolumo/gap_test_y.csv +176 -0
  458. molSimplify/tf_nn/homolumo/gap_train_names.csv +699 -0
  459. molSimplify/tf_nn/homolumo/gap_train_x.csv +700 -0
  460. molSimplify/tf_nn/homolumo/gap_train_y.csv +700 -0
  461. molSimplify/tf_nn/homolumo/gap_vars.csv +153 -0
  462. molSimplify/tf_nn/homolumo/homo_model.h5 +0 -0
  463. molSimplify/tf_nn/homolumo/homo_model.json +126 -0
  464. molSimplify/tf_nn/homolumo/homo_test_names.csv +175 -0
  465. molSimplify/tf_nn/homolumo/homo_test_x.csv +176 -0
  466. molSimplify/tf_nn/homolumo/homo_test_y.csv +176 -0
  467. molSimplify/tf_nn/homolumo/homo_train_names.csv +699 -0
  468. molSimplify/tf_nn/homolumo/homo_train_x.csv +700 -0
  469. molSimplify/tf_nn/homolumo/homo_train_y.csv +700 -0
  470. molSimplify/tf_nn/homolumo/homo_vars.csv +153 -0
  471. molSimplify/tf_nn/oxoandhomo/homo_empty_info.json +7 -0
  472. molSimplify/tf_nn/oxoandhomo/homo_empty_model.h5 +0 -0
  473. molSimplify/tf_nn/oxoandhomo/homo_empty_model.json +1 -0
  474. molSimplify/tf_nn/oxoandhomo/homo_empty_test_names.csv +143 -0
  475. molSimplify/tf_nn/oxoandhomo/homo_empty_test_x.csv +144 -0
  476. molSimplify/tf_nn/oxoandhomo/homo_empty_test_y.csv +144 -0
  477. molSimplify/tf_nn/oxoandhomo/homo_empty_train_names.csv +513 -0
  478. molSimplify/tf_nn/oxoandhomo/homo_empty_train_x.csv +514 -0
  479. molSimplify/tf_nn/oxoandhomo/homo_empty_train_y.csv +514 -0
  480. molSimplify/tf_nn/oxoandhomo/homo_empty_val_names.csv +143 -0
  481. molSimplify/tf_nn/oxoandhomo/homo_empty_val_x.csv +58 -0
  482. molSimplify/tf_nn/oxoandhomo/homo_empty_val_y.csv +58 -0
  483. molSimplify/tf_nn/oxoandhomo/homo_empty_vars.csv +155 -0
  484. molSimplify/tf_nn/oxoandhomo/oxo20_info.json +7 -0
  485. molSimplify/tf_nn/oxoandhomo/oxo20_model.h5 +0 -0
  486. molSimplify/tf_nn/oxoandhomo/oxo20_model.json +1 -0
  487. molSimplify/tf_nn/oxoandhomo/oxo20_test_names.csv +143 -0
  488. molSimplify/tf_nn/oxoandhomo/oxo20_test_x.csv +144 -0
  489. molSimplify/tf_nn/oxoandhomo/oxo20_test_y.csv +144 -0
  490. molSimplify/tf_nn/oxoandhomo/oxo20_train_names.csv +513 -0
  491. molSimplify/tf_nn/oxoandhomo/oxo20_train_x.csv +514 -0
  492. molSimplify/tf_nn/oxoandhomo/oxo20_train_y.csv +514 -0
  493. molSimplify/tf_nn/oxoandhomo/oxo20_val_names.csv +143 -0
  494. molSimplify/tf_nn/oxoandhomo/oxo20_val_x.csv +58 -0
  495. molSimplify/tf_nn/oxoandhomo/oxo20_val_y.csv +58 -0
  496. molSimplify/tf_nn/oxoandhomo/oxo20_vars.csv +154 -0
  497. molSimplify/tf_nn/oxocatalysis/hat_model.h5 +0 -0
  498. molSimplify/tf_nn/oxocatalysis/hat_model.json +1 -0
  499. molSimplify/tf_nn/oxocatalysis/hat_test_names.csv +419 -0
  500. molSimplify/tf_nn/oxocatalysis/hat_test_x.csv +420 -0
  501. molSimplify/tf_nn/oxocatalysis/hat_test_y.csv +420 -0
  502. molSimplify/tf_nn/oxocatalysis/hat_train_names.csv +1507 -0
  503. molSimplify/tf_nn/oxocatalysis/hat_train_x.csv +1508 -0
  504. molSimplify/tf_nn/oxocatalysis/hat_train_y.csv +1508 -0
  505. molSimplify/tf_nn/oxocatalysis/hat_val_x.csv +169 -0
  506. molSimplify/tf_nn/oxocatalysis/hat_val_y.csv +169 -0
  507. molSimplify/tf_nn/oxocatalysis/hat_vars.csv +162 -0
  508. molSimplify/tf_nn/oxocatalysis/oxo_model.h5 +0 -0
  509. molSimplify/tf_nn/oxocatalysis/oxo_model.json +1 -0
  510. molSimplify/tf_nn/oxocatalysis/oxo_test_names.csv +527 -0
  511. molSimplify/tf_nn/oxocatalysis/oxo_test_x.csv +528 -0
  512. molSimplify/tf_nn/oxocatalysis/oxo_test_y.csv +528 -0
  513. molSimplify/tf_nn/oxocatalysis/oxo_train_names.csv +1897 -0
  514. molSimplify/tf_nn/oxocatalysis/oxo_train_x.csv +1898 -0
  515. molSimplify/tf_nn/oxocatalysis/oxo_train_y.csv +1898 -0
  516. molSimplify/tf_nn/oxocatalysis/oxo_val_x.csv +212 -0
  517. molSimplify/tf_nn/oxocatalysis/oxo_val_y.csv +212 -0
  518. molSimplify/tf_nn/oxocatalysis/oxo_vars.csv +162 -0
  519. molSimplify/tf_nn/rescaling_data/gap_mean_x.csv +153 -0
  520. molSimplify/tf_nn/rescaling_data/gap_mean_y.csv +1 -0
  521. molSimplify/tf_nn/rescaling_data/gap_var_x.csv +153 -0
  522. molSimplify/tf_nn/rescaling_data/gap_var_y.csv +1 -0
  523. molSimplify/tf_nn/rescaling_data/geo_static_clf_mean_x.csv +154 -0
  524. molSimplify/tf_nn/rescaling_data/geo_static_clf_mean_y.csv +1 -0
  525. molSimplify/tf_nn/rescaling_data/geo_static_clf_var_x.csv +154 -0
  526. molSimplify/tf_nn/rescaling_data/geo_static_clf_var_y.csv +1 -0
  527. molSimplify/tf_nn/rescaling_data/hat_mean_x.csv +162 -0
  528. molSimplify/tf_nn/rescaling_data/hat_mean_y.csv +1 -0
  529. molSimplify/tf_nn/rescaling_data/hat_var_x.csv +162 -0
  530. molSimplify/tf_nn/rescaling_data/hat_var_y.csv +1 -0
  531. molSimplify/tf_nn/rescaling_data/homo_empty_mean_x.csv +155 -0
  532. molSimplify/tf_nn/rescaling_data/homo_empty_mean_y.csv +1 -0
  533. molSimplify/tf_nn/rescaling_data/homo_empty_var_x.csv +155 -0
  534. molSimplify/tf_nn/rescaling_data/homo_empty_var_y.csv +1 -0
  535. molSimplify/tf_nn/rescaling_data/homo_mean_x.csv +153 -0
  536. molSimplify/tf_nn/rescaling_data/homo_mean_y.csv +1 -0
  537. molSimplify/tf_nn/rescaling_data/homo_var_x.csv +153 -0
  538. molSimplify/tf_nn/rescaling_data/homo_var_y.csv +1 -0
  539. molSimplify/tf_nn/rescaling_data/hs_ii_mean_x.csv +154 -0
  540. molSimplify/tf_nn/rescaling_data/hs_ii_mean_y.csv +3 -0
  541. molSimplify/tf_nn/rescaling_data/hs_ii_var_x.csv +154 -0
  542. molSimplify/tf_nn/rescaling_data/hs_ii_var_y.csv +3 -0
  543. molSimplify/tf_nn/rescaling_data/hs_iii_mean_x.csv +154 -0
  544. molSimplify/tf_nn/rescaling_data/hs_iii_mean_y.csv +3 -0
  545. molSimplify/tf_nn/rescaling_data/hs_iii_var_x.csv +154 -0
  546. molSimplify/tf_nn/rescaling_data/hs_iii_var_y.csv +3 -0
  547. molSimplify/tf_nn/rescaling_data/ls_ii_mean_x.csv +154 -0
  548. molSimplify/tf_nn/rescaling_data/ls_ii_mean_y.csv +3 -0
  549. molSimplify/tf_nn/rescaling_data/ls_ii_var_x.csv +154 -0
  550. molSimplify/tf_nn/rescaling_data/ls_ii_var_y.csv +3 -0
  551. molSimplify/tf_nn/rescaling_data/ls_iii_mean_x.csv +154 -0
  552. molSimplify/tf_nn/rescaling_data/ls_iii_mean_y.csv +3 -0
  553. molSimplify/tf_nn/rescaling_data/ls_iii_var_x.csv +154 -0
  554. molSimplify/tf_nn/rescaling_data/ls_iii_var_y.csv +3 -0
  555. molSimplify/tf_nn/rescaling_data/oxo20_mean_x.csv +154 -0
  556. molSimplify/tf_nn/rescaling_data/oxo20_mean_y.csv +1 -0
  557. molSimplify/tf_nn/rescaling_data/oxo20_var_x.csv +154 -0
  558. molSimplify/tf_nn/rescaling_data/oxo20_var_y.csv +1 -0
  559. molSimplify/tf_nn/rescaling_data/oxo_mean_x.csv +162 -0
  560. molSimplify/tf_nn/rescaling_data/oxo_mean_y.csv +1 -0
  561. molSimplify/tf_nn/rescaling_data/oxo_var_x.csv +162 -0
  562. molSimplify/tf_nn/rescaling_data/oxo_var_y.csv +1 -0
  563. molSimplify/tf_nn/rescaling_data/sc_static_clf_mean_x.csv +154 -0
  564. molSimplify/tf_nn/rescaling_data/sc_static_clf_mean_y.csv +1 -0
  565. molSimplify/tf_nn/rescaling_data/sc_static_clf_var_x.csv +154 -0
  566. molSimplify/tf_nn/rescaling_data/sc_static_clf_var_y.csv +1 -0
  567. molSimplify/tf_nn/rescaling_data/split_mean_x.csv +155 -0
  568. molSimplify/tf_nn/rescaling_data/split_mean_y.csv +1 -0
  569. molSimplify/tf_nn/rescaling_data/split_var_x.csv +155 -0
  570. molSimplify/tf_nn/rescaling_data/split_var_y.csv +1 -0
  571. molSimplify/tf_nn/sc_static_clf/sc_static_clf_model.h5 +0 -0
  572. molSimplify/tf_nn/sc_static_clf/sc_static_clf_train_name.csv +1591 -0
  573. molSimplify/tf_nn/sc_static_clf/sc_static_clf_train_x.csv +1592 -0
  574. molSimplify/tf_nn/sc_static_clf/sc_static_clf_train_y.csv +1592 -0
  575. molSimplify/tf_nn/sc_static_clf/sc_static_clf_vars.csv +154 -0
  576. molSimplify/tf_nn/split/split_model.h5 +0 -0
  577. molSimplify/tf_nn/split/split_model.json +1 -0
  578. molSimplify/tf_nn/split/split_vars.csv +155 -0
  579. molSimplify/tf_nn/split/split_x.csv +1902 -0
  580. molSimplify/tf_nn/split/split_y.csv +1902 -0
  581. molSimplify/tf_nn/split/train_names.csv +1901 -0
  582. molSimplify/utils/__init__.py +0 -0
  583. molSimplify/utils/decorators.py +16 -0
  584. molSimplify/utils/metaclasses.py +12 -0
  585. molSimplify/utils/tensorflow.py +23 -0
  586. molSimplify/utils/timer.py +16 -0
  587. molSimplify-1.7.4.dist-info/LICENSE +674 -0
  588. molSimplify-1.7.4.dist-info/METADATA +821 -0
  589. molSimplify-1.7.4.dist-info/RECORD +651 -0
  590. molSimplify-1.7.4.dist-info/WHEEL +5 -0
  591. molSimplify-1.7.4.dist-info/entry_points.txt +3 -0
  592. molSimplify-1.7.4.dist-info/top_level.txt +4 -0
  593. tests/generateTests.py +122 -0
  594. tests/helperFuncs.py +658 -0
  595. tests/informatics/test_MOF_descriptors.py +128 -0
  596. tests/informatics/test_active_learning.py +113 -0
  597. tests/informatics/test_coulomb_analyze.py +24 -0
  598. tests/informatics/test_graph_racs.py +193 -0
  599. tests/ml/test_kernels.py +20 -0
  600. tests/ml/test_layers.py +47 -0
  601. tests/runtest.py +10 -0
  602. tests/test_Mol2D.py +128 -0
  603. tests/test_basic_imports.py +62 -0
  604. tests/test_bidentate.py +25 -0
  605. tests/test_cli.py +20 -0
  606. tests/test_distgeom.py +106 -0
  607. tests/test_example_1.py +29 -0
  608. tests/test_example_3.py +31 -0
  609. tests/test_example_5.py +43 -0
  610. tests/test_example_7.py +28 -0
  611. tests/test_example_8.py +15 -0
  612. tests/test_example_tbp.py +15 -0
  613. tests/test_ff_xtb.py +111 -0
  614. tests/test_geocheck_oct.py +26 -0
  615. tests/test_geocheck_one_empty.py +15 -0
  616. tests/test_geometry.py +44 -0
  617. tests/test_inparse.py +76 -0
  618. tests/test_io.py +84 -0
  619. tests/test_jobgen.py +84 -0
  620. tests/test_joption_pythonic.py +27 -0
  621. tests/test_ligand_assign.py +58 -0
  622. tests/test_ligand_assign_consistent.py +60 -0
  623. tests/test_ligand_class.py +26 -0
  624. tests/test_ligand_from_mol_file.py +35 -0
  625. tests/test_ligands.py +86 -0
  626. tests/test_mol3D.py +337 -0
  627. tests/test_molcas_caspt2.py +15 -0
  628. tests/test_molcas_casscf.py +15 -0
  629. tests/test_old_ANNs.py +68 -0
  630. tests/test_orca_ccsdt.py +15 -0
  631. tests/test_orca_dft.py +15 -0
  632. tests/test_qcgen.py +50 -0
  633. tests/test_racs.py +124 -0
  634. tests/test_rmsd.py +68 -0
  635. tests/test_structgen_functions.py +198 -0
  636. tests/test_tetrahedral.py +29 -0
  637. tests/test_tutorial_10_part_one.py +16 -0
  638. tests/test_tutorial_10_part_two.py +15 -0
  639. tests/test_tutorial_2.py +11 -0
  640. tests/test_tutorial_3.py +15 -0
  641. tests/test_tutorial_4.py +57 -0
  642. tests/test_tutorial_6.py +10 -0
  643. tests/test_tutorial_8.py +29 -0
  644. tests/test_tutorial_9_part_one.py +15 -0
  645. tests/test_tutorial_9_part_two.py +15 -0
  646. tests/test_tutorial_qm9_part_one.py +6 -0
  647. tests/testresources/refs/racs/generate_references.py +85 -0
  648. workflows/NandyJACSAu2022/bridge_functionalizer.py +253 -0
  649. workflows/NandyJACSAu2022/frag_functionalizer.py +242 -0
  650. workflows/NandyJACSAu2022/fragment_classes.py +586 -0
  651. workflows/NandyJACSAu2022/macrocycle_synthesis.py +179 -0
@@ -0,0 +1,827 @@
1
+ # @file globalvars.py
2
+ # @file globalvars.py
3
+ # Contains useful constants used throughout the code.
4
+ #
5
+ # Written by Kulik Group
6
+ #
7
+ # Department of Chemical Engineering, MIT
8
+
9
+ import os
10
+ import inspect
11
+ import glob
12
+ import platform
13
+ import sys
14
+ import subprocess
15
+ from typing import Dict, Tuple
16
+ from molSimplify.utils.metaclasses import Singleton
17
+
18
+ # Dictionary containing atomic mass, atomic number, covalent radius, num valence electrons
19
+ # Data from http://www.webelements.com/ (last accessed May 13th 2015)
20
+ amassdict = {'X': (1.0, 0, 0.77, 0), 'H': (1.0079, 1, 0.37, 1),
21
+ 'D': (2.0141, 1, 0.37, 1), 'He': (4.002602, 2, 0.46, 2),
22
+ 'Li': (6.94, 3, 1.33, 1), 'Be': (9.0121831, 4, 1.02, 2), 'B': (10.83, 5, 0.85, 3),
23
+ 'C': (12.0107, 6, 0.77, 4), 'N': (14.0067, 7, 0.75, 5), 'O': (15.9994, 8, 0.73, 6),
24
+ 'F': (18.9984, 9, 0.71, 7), 'Ne': (20.1797, 10, 0.67, 8), 'Na': (22.99, 11, 1.55, 1),
25
+ 'Mg': (24.30, 12, 1.39, 2), 'Al': (26.98, 13, 1.26, 3), 'Si': (28.08, 14, 1.16, 4),
26
+ 'P': (30.9738, 15, 1.06, 5), 'S': (32.065, 16, 1.02, 6), 'Cl': (35.453, 17, 0.99, 7),
27
+ 'Ar': (39.948, 18, 0.96, 8), 'K': (39.10, 19, 1.96, 1), 'Ca': (40.08, 20, 1.71, 2),
28
+ 'Sc': (44.96, 21, 1.7, 3), 'Ti': (47.867, 22, 1.36, 4), 'V': (50.94, 23, 1.22, 5),
29
+ 'Cr': (51.9961, 24, 1.27, 6), 'Mn': (54.938, 25, 1.39, 7), 'Fe': (55.84526, 26, 1.25, 8),
30
+ 'Co': (58.9332, 27, 1.26, 9), 'Ni': (58.4934, 28, 1.21, 10), 'Cu': (63.546, 29, 1.38, 11),
31
+ 'Zn': (65.39, 30, 1.31, 12), 'Ga': (69.72, 31, 1.24, 3), 'Ge': (72.63, 32, 1.21, 4),
32
+ 'As': (74.92, 33, 1.21, 5), 'Se': (78.96, 34, 1.16, 6), 'Br': (79.904, 35, 1.14, 7),
33
+ 'Kr': (83.798, 36, 1.17, 8), 'Rb': (85.47, 37, 2.10, 1), 'Sr': (87.62, 38, 1.85, 2),
34
+ 'Y': (88.91, 39, 1.63, 3), 'Zr': (91.22, 40, 1.54, 4), 'Nb': (92.91, 41, 1.47, 5),
35
+ 'Mo': (95.96, 42, 1.38, 6), 'Tc': (98.9, 43, 1.56, 7), 'Ru': (101.1, 44, 1.25, 8),
36
+ 'Rh': (102.9, 45, 1.25, 9), 'Pd': (106.4, 46, 1.20, 10), 'Ag': (107.9, 47, 1.28, 11),
37
+ 'Cd': (112.4, 48, 1.48, 12), 'In': (111.818, 49, 1.42, 3), 'Sn': (118.710, 50, 1.40, 4),
38
+ 'Sb': (121.760, 51, 1.40, 5), 'Te': (127.60, 52, 1.99, 6), 'I': (126.90447, 53, 1.40, 7),
39
+ 'Xe': (131.293, 54, 1.31, 8), 'Cs': (132.9055, 55, 2.32, 1), 'Ba': (137.327, 56, 1.96, 2),
40
+ 'La': (138.9, 57, 1.69, 3), 'Ce': (140.116, 58, 1.63, 4), 'Pr': (140.90766, 59, 1.76, 5),
41
+ 'Nd': (144.242, 60, 1.74, 6), 'Pm': (145, 61, 1.73, 7), 'Sm': (150.36, 62, 1.72, 8),
42
+ 'Eu': (151.964, 63, 1.68, 9), 'Gd': (157.25, 64, 1.69, 10), 'Tb': (158.92535, 65, 1.68, 11),
43
+ 'Dy': (162.500, 66, 1.67, 12), 'Ho': (164.93033, 67, 1.66, 13), 'Er': (167.259, 68, 1.65, 14),
44
+ 'Tm': (168.93422, 69, 1.64, 15), 'Yb': (173.045, 70, 1.70, 16), 'Lu': (174.9668, 71, 1.62, 3),
45
+ 'Hf': (178.5, 72, 1.50, 8), 'Ta': (180.9, 73, 1.38, 5), 'W': (183.8, 74, 1.46, 6),
46
+ 'Re': (186.2, 75, 1.59, 7), 'Os': (190.2, 76, 1.28, 8), 'Ir': (192.2, 77, 1.37, 9),
47
+ 'Pt': (195.1, 78, 1.23, 10), 'Au': (197.0, 79, 1.24, 11), 'Hg': (200.6, 80, 1.49, 2),
48
+ 'Tl': (204.38, 81, 1.44, 3), 'Pb': (207.2, 82, 1.44, 4), 'Bi': (208.9804, 83, 1.51, 5),
49
+ 'Po': (208.98, 84, 1.90, 6), 'At': (209.99, 85, 2.00, 7), 'Rn': (222.6, 86, 142, 4),
50
+ 'Fr': (223.02, 87, 3.48, 8), 'Ra': (226.03, 88, 2.01, 2), 'Ac': (277, 89, 1.86, 3),
51
+ 'Th': (232.0377, 90, 1.75, 4), 'Pa': (231.04, 91, 2.00, 5), 'U': (238.02891, 92, 1.70, 6),
52
+ 'Np': (237.05, 93, 1.90, 7), 'Pu': (244.06, 94, 1.75, 8), 'Am': (243.06, 95, 1.80, 9),
53
+ 'Cm': (247.07, 96, 1.69, 10), 'Bk': (247.07, 97, 1.68, 11), 'Cf': (251.08, 98, 1.68, 12)}
54
+
55
+ # Pa and onward should be checked
56
+
57
+
58
+ # van der Waals radii for elements
59
+ # Data from DOI: 10.1039/C3DT50599E, Dalton Trans., 2013, 42, 8617-8636
60
+ vdwrad = {'H': 1.2, 'He': 1.43, 'Li': 2.12, 'Be': 1.98, 'B': 1.91,
61
+ 'C': 1.77, 'N': 1.66, 'O': 1.50, 'F': 1.46, 'Ne': 1.58, 'Na': 2.50,
62
+ 'Mg': 2.51, 'Al': 2.25, 'Si': 2.19, 'P': 1.90, 'S': 1.89,
63
+ 'Cl': 1.82, 'Ar': 1.83, 'K': 2.73, 'Ca': 2.62, 'Sc': 2.58,
64
+ 'Ti': 2.46, 'V': 2.42, 'Cr': 2.45, 'Mn': 2.45, 'Fe': 2.44,
65
+ 'Co': 2.40, 'Ni': 2.40, 'Cu': 2.38, 'Zn': 2.39, 'Ga': 2.32,
66
+ 'Ge': 2.29, 'As': 1.88, 'Se': 1.82, 'Br': 1.86, 'Kr': 2.25,
67
+ 'Rb': 3.21, 'Sr': 2.84, 'Y': 2.75, 'Zr': 2.52, 'Nb': 2.56,
68
+ 'Mo': 2.45, 'Tc': 2.44, 'Ru': 2.46, 'Rh': 2.44, 'Pd': 2.15,
69
+ 'Ag': 2.53, 'Cd': 2.49, 'In': 2.43, 'Sn': 2.42, 'Sb': 2.47,
70
+ 'Te': 1.99, 'I': 2.04, 'Xe': 2.06, 'Cs': 3.48, 'Ba': 3.03,
71
+ 'La': 2.98, 'Ce': 2.88, 'Pr': 2.92, 'Nd': 2.95, 'Sm': 2.90,
72
+ 'Eu': 2.87, 'Gd': 2.83, 'Tb': 2.79, 'Dy': 2.87, 'Ho': 2.81,
73
+ 'Er': 2.83, 'Tm': 2.79, 'Yb': 2.80, 'Lu': 2.74, 'Hf': 2.63,
74
+ 'Ta': 2.53, 'W': 2.57, 'Re': 2.49, 'Os': 2.48, 'Ir': 2.41,
75
+ 'Pt': 2.29, 'Au': 2.32, 'Hg': 2.45, 'Tl': 2.47, 'Pb': 2.60,
76
+ 'Bi': 2.54, 'Ac': 2.8, 'Th': 2.93, 'Pa': 2.88, 'U': 2.71,
77
+ 'Np': 2.82, 'Pu': 2.81, 'Am': 2.83, 'Cm': 3.05, 'Bk': 3.4,
78
+ 'Cf': 3.05, 'Es': 2.7}
79
+
80
+ # Bondi van der Waals radii for elements
81
+ # From: doi:10.1021/j100881a503
82
+ # Accessed: http://www.knowledgedoor.com/2/elements_handbook/bondi_van_der_waals_radius.html 4/8/2021
83
+ bondivdw = {'Ar': 1.88, 'As': 1.85, 'Br': 1.85, 'Cd': 1.62, 'C': 1.70,
84
+ 'Cl': 1.75, 'Cu': 1.4, 'F': 1.47, 'Ga': 1.87, 'Au': 1.66,
85
+ 'He': 1.40, 'H': 1.20, 'In': 1.93, 'I': 1.98, 'Kr': 2.02,
86
+ 'Pb': 2.02, 'Li': 1.82, 'Mg': 1.73, 'Hg': 1.70, 'Ne': 1.54,
87
+ 'Ni': 1.63, 'N': 1.55, 'O': 1.52, 'Pd': 1.63, 'P': 1.80, 'Pt': 1.7,
88
+ 'K': 2.75, 'Se': 1.90, 'Si': 2.10, 'Ag': 1.72, 'Na': 2.27, 'S': 1.80,
89
+ 'Te': 2.06, 'Tl': 1.96, 'Sn': 1.96, 'U': 1.86, 'Xe': 2.16, 'Zn': 1.39}
90
+
91
+ # Period definitions for all element symbols
92
+ # Data from https://en.wikipedia.org/wiki/Group_(periodic_table) (last accessed Sept. 12th 2019)
93
+
94
+ period_1 = ['H', 'He']
95
+
96
+ period_2 = ['Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne']
97
+
98
+ period_3 = ['Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar']
99
+
100
+ period_4 = ['K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe', 'Co', 'Ni', 'Cu',
101
+ 'Zn', 'Ga', 'Ge', 'As', 'Se', 'Br', 'Kr']
102
+
103
+ period_5 = ['Rb', 'Sr', 'Y', 'Zr', 'Nb', 'Mo', 'Tc', 'Ru', 'Rh',
104
+ 'Pd', 'Ag', 'Cd', 'In', 'Sn', 'Sb', ' Te', 'I', 'Xe']
105
+
106
+ period_6 = ['Cs', 'Ba', 'La', 'Ce', 'Pr', 'Nd', 'Pm', 'Sm', 'Eu', 'Gd',
107
+ 'Tb', 'Dy', 'Ho', 'Er', 'Tm', 'Yb', 'Lu', 'Hf', 'Ta', 'W', 'Re',
108
+ 'Os', 'Ir', 'Pt', 'Au', 'Hg', 'Tl', 'Pb', 'Bi', 'Po', 'At', 'Rn']
109
+
110
+ period_7 = ['Fr', 'Ra', 'Ac', 'Th', 'Pa', 'U', 'Np', 'Pu', 'Am', 'Cm', 'Bk',
111
+ 'Cf', 'Es', 'Fm', 'Md', 'No', 'Lr', 'Rf', 'Db', 'Sg', 'Bh', 'Hs',
112
+ 'Mt', 'Ds', 'Rg', 'Cn', 'Nh', 'Fl', 'Mc', 'Lv', 'Ts', 'Og']
113
+
114
+ periods_dict = {'period_1': period_1, 'period_2': period_2, 'period_3': period_3,
115
+ 'period_4': period_4, 'period_5': period_5, 'period_6': period_6,
116
+ 'period_7': period_7}
117
+
118
+ # Group definitions for all element symbols
119
+ # Data from https://en.wikipedia.org/wiki/Group_(periodic_table) (last accessed Sept. 12th 2019)
120
+
121
+ hydrogen = ['H'] # Note H not typically included in group 1
122
+
123
+ group_1 = ['Li', 'Na', 'K', 'Rb', 'Cs', 'Fr']
124
+
125
+ group_2 = ['Be', 'Mg', 'Ca', 'Sr', 'Ba', 'Ra']
126
+
127
+ group_3 = ['Sc', 'Y'] # Some IUPAC Initiatives to call either 'La' and 'Ac' grp 3 or 'Lu' and 'Lr
128
+
129
+ group_4 = ['Ti', 'Zr', 'Hf', 'Rf']
130
+
131
+ group_5 = ['V', 'Nb', 'Ta', 'Db']
132
+
133
+ group_6 = ['Cr', 'Mo', 'W', 'Sg']
134
+
135
+ group_7 = ['Mn', 'Tc', 'Re', 'Bh']
136
+
137
+ group_8 = ['Fe', 'Ru', 'Os', 'Hs']
138
+
139
+ group_9 = ['Co', 'Rh', 'Ir', 'Mt']
140
+
141
+ group_10 = ['Ni', 'Pd', 'Pt', 'Ds']
142
+
143
+ group_11 = ['Cu', 'Ag', 'Au', 'Rg']
144
+
145
+ group_12 = ['Zn', 'Cd', 'Hg', 'Cn']
146
+
147
+ group_13 = ['B', 'Al', 'Ga', 'In', 'Tl', 'Nh']
148
+
149
+ group_14 = ['C', 'Si', 'Ge', 'Sn', 'Pb', 'Fl']
150
+
151
+ group_15 = ['N', 'P', 'As', 'Sb', 'Bi', 'Mc']
152
+
153
+ group_16 = ['O', 'S', 'Se', 'Te', 'Po', 'Lv']
154
+
155
+ group_17 = ['F', 'Cl', 'Br', 'I', 'At', 'Ts']
156
+
157
+ group_18 = ['He', 'Ne', 'Ar', 'Kr', 'Xe', 'Rn', 'Og']
158
+
159
+ lanthanides = ['La', 'Ce', 'Pr', 'Nd', 'Pm', 'Sm', 'Eu', 'Gd', 'Tb', 'Dy',
160
+ 'Ho', 'Er', 'Tm', 'Yb', 'Lu']
161
+
162
+ actinides = ['Ac', 'Th', 'Pa', 'U', 'Np', 'Pu', 'Am', 'Cm', 'Bk', 'Cf',
163
+ 'Es', 'Fm', 'Md', 'No', 'Lr']
164
+
165
+ groups_dict = {
166
+ 'group_1': group_1, 'group_2': group_2, 'group_3': group_3,
167
+ 'group_4': group_4, 'group_5': group_5, 'group_6': group_6,
168
+ 'group_7': group_7, 'group_8': group_8, 'group_9': group_9,
169
+ 'group_10': group_10, 'group_11': group_11, 'group_12': group_12,
170
+ 'group_13': group_13, 'group_14': group_14, 'group_15': group_15,
171
+ 'group_16': group_16, 'group_17': group_17, 'group_18': group_18,
172
+ 'lanthanides': lanthanides, 'actinides': actinides, 'hydrogen': hydrogen}
173
+
174
+ # Metals (includes alkali, alkaline earth, and transition metals)
175
+ alkali_and_alkaline_earth = [
176
+ 'Li', 'li', 'LI', 'lithium', 'Be', 'be', 'BE', 'beryllium',
177
+ 'Na', 'na', 'NA', 'sodium', 'Mg', 'mg', 'MG', 'magnesium',
178
+ 'K', 'k', 'potassium', 'Ca', 'ca', 'CA', 'calcium',
179
+ 'Rb', 'rb', 'RB', 'rubidium', 'Sr', 'sr', 'SR', 'strontium',
180
+ 'Cs', 'cs', 'CS', 'cesium', 'Ba', 'ba', 'BA', 'barium',
181
+ 'Fr', 'fr', 'FR', 'francium', 'Ra', 'ra', 'RA', 'radium']
182
+
183
+ heavy_metals_and_metalloids = [
184
+ 'Al', 'al', 'AL', 'aluminum', 'aluminium',
185
+ 'Ga', 'ga', 'GA', 'gallium', 'Ge', 'ge', 'GE', 'germanium',
186
+ 'As', 'as', 'AS', 'arsenic', 'In', 'in', 'IN', 'indium',
187
+ 'Sn', 'sn', 'SN', 'tin', 'Sb', 'sb', 'SB', 'antimony',
188
+ 'Te', 'te', 'TE', 'tellurium', 'Tl', 'tl', 'TL', 'thallium',
189
+ 'Pb', 'pb', 'PB', 'lead', 'Bi', 'bi', 'BI', 'bismuth',
190
+ 'Po', 'po', 'PO', 'polonium', 'At', 'at', 'AT', 'astatine',
191
+ 'La', 'la', 'LA', 'lanthanum',
192
+ 'Ce', 'ce', 'CE', 'cerium', 'Pr', 'pr', 'PR', 'praseodymium',
193
+ 'Nd', 'nd', 'ND', 'neodymium', 'Pm', 'pm', 'PM', 'promethium',
194
+ 'Sm', 'sm', 'SM', 'samarium', 'Eu', 'eu', 'EU', 'europium',
195
+ 'Gd', 'gd', 'GD', 'gadolinium', 'Tb', 'tb', 'TB', 'terbium',
196
+ 'Dy', 'dy', 'DY', 'dysprosium', 'Ho', 'ho', 'HO', 'holmium',
197
+ 'Er', 'er', 'ER', 'erbium', 'Tm', 'tm', 'TM', 'thulium',
198
+ 'Yb', 'yb', 'YB', 'ytterbium', 'Lu', 'lu', 'LU', 'lutetium',
199
+ 'Ac', 'ac', 'AC', 'actinium', 'Th', 'th', 'TH', 'thorium',
200
+ 'Pa', 'pa', 'PA', 'protactinium', 'U', 'u', 'uranium',
201
+ 'Np', 'np', 'NP', 'neptunium', 'Pu', 'pu', 'PU', 'plutonium',
202
+ 'Am', 'am', 'AM', 'americium', 'Cm', 'cm', 'CM', 'curium',
203
+ 'Bk', 'bk', 'BK', 'berkelium', 'Cf', 'cf', 'CF', 'californium',
204
+ 'Es', 'es', 'ES', 'einsteinium', 'Fm', 'fm', 'FM', 'fermium',
205
+ 'Md', 'md', 'MD', 'mendelevium', 'No', 'no', 'NO', 'nobelium',
206
+ 'Lr', 'lr', 'LR', 'lawrencium']
207
+
208
+ # ## The metals list below contains only TMs. See metalslist function for logic.
209
+ metalslist = [
210
+ 'Sc', 'sc', 'SC', 'scandium', 'Ti', 'ti', 'TI', 'titanium',
211
+ 'V', 'v', 'vanadium', 'Cr', 'cr', 'CR', 'chromium',
212
+ 'Mn', 'mn', 'MN', 'manganese', 'Fe', 'fe', 'FE', 'iron',
213
+ 'Co', 'co', 'CO', 'cobalt', 'Ni', 'ni', 'NI', 'nickel',
214
+ 'Cu', 'cu', 'CU', 'copper', 'Zn', 'zn', 'ZN', 'zinc',
215
+ 'Y', 'y', 'yttrium', 'Zr', 'zr', 'ZR', 'zirconium',
216
+ 'Nb', 'nb', 'NB', 'niobium', 'Mo', 'mo', 'MO', 'molybdenum',
217
+ 'Tc', 'tc', 'TC', 'technetium', 'Ru', 'ru', 'RU', 'ruthenium',
218
+ 'Rh', 'rh', 'RH', 'rhodium', 'Pd', 'pd', 'PD', 'palladium',
219
+ 'Ag', 'ag', 'AG', 'silver', 'Cd', 'cd', 'CD', 'cadmium',
220
+ 'Hf', 'hf', 'HF', 'hafnium', 'Ta', 'ta', 'TA', 'tantalum',
221
+ 'W', 'w', 'tungsten', 'Re', 're', 'RE', 'rhenium',
222
+ 'Os', 'os', 'OS', 'osmium', 'Ir', 'ir', 'IR', 'iridium',
223
+ 'Pt', 'pt', 'PT', 'platinum', 'Au', 'au', 'AU', 'gold',
224
+ 'Hg', 'hg', 'HG', 'mercury', 'X',
225
+ ]
226
+
227
+ metals_conv = {
228
+ 'scandium': 'Sc', 'titanium': 'Ti', 'vanadium': 'V', 'chromium': 'Cr',
229
+ 'manganese': 'Mn', 'iron': 'Fe', 'cobalt': 'Co', 'nickel': 'Ni',
230
+ 'copper': 'Cu', 'zinc': 'Zn', 'yttrium': 'Y', 'zirconium': 'Zr',
231
+ 'niobium': 'Nb', 'molybdenum': 'Mo', 'technetium': 'Tc',
232
+ 'ruthenium': 'Ru', 'rhodium': 'Rh', 'palladium': 'Pd', 'silver': 'Ag',
233
+ 'cadmium': 'Cd', 'lanthanum': 'La', 'hafnium': 'Hf', 'tantalum': 'Ta',
234
+ 'tungsten': 'W', 'rhenium': 'Re', 'osmium': 'Os', 'iridium': 'Ir',
235
+ 'platinum': 'Pt', 'gold': 'Au', 'mercury': 'Hg'}
236
+
237
+ # d-electron counts of transition metals
238
+ mtlsdlist = {'sc': 1, 'ti': 2, 'v': 3, 'cr': 4, 'mn': 5, 'fe': 6, 'co': 7, 'ni': 8, 'cu': 9, 'zn': 10,
239
+ 'y': 1, 'zr': 2, 'nb': 3, 'mo': 4, 'tc': 5, 'ru': 6, 'rh': 7, 'pd': 8, 'ag': 9, 'cd': 10,
240
+ 'hf': 2, 'ta': 3, 'w': 4, 're': 5, 'os': 6, 'ir': 7, 'pt': 8, 'au': 9, 'hg': 10}
241
+
242
+ # Default spins for each d-electron count (make this metal/oxidation state specific)
243
+ defaultspins = {0: '1', 1: '2', 2: '3', 3: '4', 4: '5',
244
+ 5: '6', 6: '5', 7: '4', 8: '3', 9: '2', 10: '1'}
245
+
246
+ # Elements sorted by atomic number
247
+ elementsbynum = ['H', 'He',
248
+ 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne',
249
+ 'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar',
250
+ 'K', 'Ca',
251
+ 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe', 'Co', 'Ni', 'Cu', 'Zn', 'Ga', 'Ge', 'As', 'Se', 'Br', 'Kr',
252
+ 'Rb', 'Sr', 'Y', 'Zr', 'Nb', 'Mo', 'Tc', 'Ru', 'Rh', 'Pd', 'Ag', 'Cd', 'In', 'Sn', 'Sb', 'Te', 'I',
253
+ 'Xe',
254
+ 'Cs', 'Ba', 'La', 'Ce', 'Pr', 'Nd', 'Pm', 'Sm', 'Eu', 'Gd', 'Tb', 'Dy', 'Ho', 'Er', 'Tm', 'Yb', 'Lu',
255
+ 'Hf', 'Ta', 'W', 'Re', 'Os', 'Ir', 'Pt', 'Au', 'Hg', 'Tl', 'Pb', 'Bi', 'Po', 'At', 'Rn',
256
+ 'Fr', 'Ra', 'Ac', 'Th', 'Pa', 'U', 'Np', 'Pu', 'Am', 'Cm', 'Bk', 'Cf', 'Es', 'Fm', 'Md', 'No', 'Lr',
257
+ 'Rf', 'Db', 'Sg', 'Bh', 'Hs', 'Mt', 'Ds', 'Rg', 'Cn', 'Uut', 'Fl', 'Uup', 'Lv', 'Uus', 'Uuo']
258
+
259
+ # Electronegativity (Pauling) by atom symbol
260
+ endict = {"H": 2.20, "He": 4.16,
261
+ "Li": 0.98, "Be": 1.57, "B": 2.04, "C": 2.55, "N": 3.04, "O": 3.44, "F": 3.98,
262
+ "Na": 0.93, "Mg": 1.31, "Al": 1.61, "Si": 1.90, "P": 2.19, "S": 2.58, "Cl": 3.16,
263
+ "K": 0.82, "Ca": 1.00, "Sc": 1.36, "Ti": 1.54, "V": 1.63, "Cr": 1.66,
264
+ "Mn": 1.55, "Fe": 1.83, "Co": 1.88, "Ni": 1.91, "Cu": 1.90, "Zn": 1.65, "Ga": 1.81,
265
+ "Ge": 2.01, "As": 2.18, "Se": 2.55, "Br": 2.96, "Rb": 0.82, "Sr": 0.95, "Y": 1.22,
266
+ "Zr": 1.33, "Nb": 1.60, "Mo": 2.16, "Tc": 2.10, "Ru": 2.20, "Rh": 2.28,
267
+ "Pd": 2.20, "Ag": 1.93, "Cd": 1.69, "In": 1.78, "Sn": 1.96, "Sb": 2.05, "I": 2.66,
268
+ "Cs": 0.79, "Ba": 0.89, "Hf": 1.30, "Ta": 1.50, "W": 2.36, "Re": 1.90, "Os": 2.20, "Ir": 2.20,
269
+ "Pt": 2.28, "Au": 2.54, "Hg": 2.00, "Tl": 1.62, "Pb": 2.33, "Bi": 2.02,
270
+ "La": 1.10, "Ce": 1.12, "Pr": 1.13, "Nd": 1.14, "Sm": 1.17,
271
+ "Gd": 1.20, "Dy": 1.22, "Ho": 1.23, "Er": 1.24, "Tm": 1.25, "Lu": 1.27,
272
+ "Fr": 0.7, "Ra": 0.9, "Ac": 1.1, "Th": 1.3, "Pa": 1.5, "U": 1.38, "Np": 1.36, "Pu": 1.28,
273
+ "Am": 1.3, "Cm": 1.3, "Bk": 1.3, "Cf": 1.3, "Es": 1.3, "Fm": 1.3, "Md": 1.3, "No": 1.3,
274
+ "Yb": 1.1, "Eu": 1.2, "Tb": 1.1, "Te": 2.10}
275
+
276
+ # Polarizability (alpha) by atom symbol
277
+ # From https://www.tandfonline.com/doi/full/10.1080/00268976.2018.1535143
278
+ # Last accessed 4/28/20
279
+
280
+ poldict = {"H": 4.50711, "He": 1.38375,
281
+ "Li": 164.1125, "Be": 37.74, "B": 20.5, "C": 11.3, "N": 7.4,
282
+ "O": 5.3, "F": 3.74, "Ne": 2.66, "Na": 162.7, "Mg": 71.2, "Al": 57.8, "Si": 37.3, "P": 25,
283
+ "S": 19.4, "Cl": 14.6, "Ar": 11.083, "K": 289.7, "Ca": 160.8, "Sc": 97, "Ti": 100,
284
+ "V": 87, "Cr": 83, "Mn": 68, "Fe": 62, "Co": 55, "Ni": 49, "Cu": 46.5, "Zn": 38.67,
285
+ "Ga": 50, "Ge": 40, "As": 30, "Se": 28.9, "Br": 21, "Kr": 16.78, "Rb": 319.8, "Sr": 197.2,
286
+ "Y": 162, "Zr": 112, "Nb": 98, "Mo": 87, "Tc": 79, "Ru": 72, "Rh": 66, "Pd": 26.14,
287
+ "Ag": 55, "Cd": 46, "In": 65, "Sn": 53, "Sb": 43, "Te": 38, "I": 32.9, "Xe": 27.32,
288
+ "Cs": 400.9, "Ba": 272, "La": 215, "Ce": 205, "Pr": 216, "Nd": 208, "Pm": 200, "Sm": 192,
289
+ "Eu": 184, "Gd": 158, "Tb": 170, "Dy": 163, "Ho": 156, "Er": 150, "Tm": 144,
290
+ "Yb": 139, "Lu": 137, "Hf": 103, "Ta": 74, "W": 68, "Re": 62, "Os": 57, "Ir": 54,
291
+ "Pt": 48, "Au": 36, "Hg": 33.91, "Tl": 50, "Pb": 47, "Bi": 48, "Po": 44, "At": 42,
292
+ "Rn": 35, "Fr": 317.8, "Ra": 246, "Ac": 203, "Pa": 154, "U": 129, "Np": 151, "Pu": 132,
293
+ "Am": 131, "Cm": 144, "Bk": 125, "Cf": 122, "Es": 118, "Fm": 113, "Md": 109, "No": 110,
294
+ "Lr": 320, "Rf": 112, "Db": 42, "Sg": 40, "Bh": 38, "Hs": 36, "Mt": 34, "Ds": 32,
295
+ "Rg": 32, "Cn": 28, "Nh": 29, "Fl": 31, "Mc": 71, "Ts": 76, "Og": 58}
296
+
297
+
298
+ # Roman numerals
299
+ romans = {'I': '1', 'II': '2', 'III': '3', 'IV': '4',
300
+ 'V': '5', 'VI': '6', 'VII': '7', 'VIII': '8'}
301
+
302
+ # bondsdict
303
+ bondsdict = {"H": 1, "Li": 1, "Be": 2, "B": 3, "C": 4, "N": 3, "O": 2, "F": 1,
304
+ "Na": 1, "Mg": 2, "Al": 3, "Si": 4, "P": 3, "S": 2, "Cl": 1,
305
+ "As": 3, "Se": 2, "Br": 1, "I": 1, "He": 2}
306
+
307
+ # triple bonds dictionry: Defined as 0.5*(double bond dist + triple bond dist)
308
+ # bond lengths are from http://www.wiredchemist.com/chemistry/data/bond_energies_lengths.html
309
+ tribonddict = {("C", "C"): 1.27, ("C", "N"): 1.235, ("C", "O"): 1.165, ("N", "N"): 1.175,
310
+ ("N", "C"): 1.235, ("O", "C"): 1.165}
311
+
312
+ # Amino acids
313
+ amino_acids = {"ALA": "ALA", "A": "ALA",
314
+ "ARG": "ARG", "R": "ARG", "ARN": "ARG",
315
+ "ASN": "ASN", "N": "ASN",
316
+ "ASP": "ASP", "D": "ASP", "ASH": "ASP",
317
+ "CYS": "CYS", "C": "CYS", "CYS2": "CYS", "CYM": "CYS",
318
+ "CYX": "CYS", "GLU": "GLU", "E": "GLU", "GLH": "GLU",
319
+ "GLN": "GLN", "Q": "GLN", 'AGLN': 'GLN', 'BGLN': 'GLN',
320
+ "GLY": "GLY", "G": "GLY",
321
+ "HIS": "HIS", 'H': "HIS", "HID": "HIS", "HIE": "HIS",
322
+ "HIP": "HIS", "HSE": "HIS", "HSD": "HIS", "HSP": "HIS",
323
+ "ILE": "ILE", "I": "ILE", "LEU": "LEU", "L": "LEU",
324
+ "LYS": "LYS", "K": "LYS", "LYN": "LYS",
325
+ "MET": "MET", "M": "MET", "AMET": "MET", "BMET": "MET",
326
+ "PHE": "PHE", "F": "PHE", "PRO": "PRO", "P": "PRO",
327
+ "SER": "SER", "S": "SER", "ASER": "SER", "BSER": "SER",
328
+ "THR": "THR", 'T': "THR", "TRP": "TRP", "W": "TRP",
329
+ "TYR": "TYR", "Y": 'TYR',
330
+ "VAL": "VAL", 'V': "VAL", 'AVAL': 'VAL', 'BVAL': 'VAL'
331
+ }
332
+
333
+ # Common heteromolecules
334
+ het_mols = ['TAU', 'AKG', 'FE2', 'HOH', 'NAG', 'BMA', 'MAN', 'ACE', 'ACY', 'FE',
335
+ 'HEM', 'BLE', 'MG', 'BGC', 'WAT', 'CA', 'CL1']
336
+
337
+ # ---Geo_Check_Metrics------
338
+ dict_oct_check_loose = {"mono": {'num_coord_metal': 6,
339
+ 'rmsd_max': 0.4, 'atom_dist_max': 0.6,
340
+ 'oct_angle_devi_max': 16, 'max_del_sig_angle': 27,
341
+ 'dist_del_eq': 0.45, 'dist_del_all': 1.25,
342
+ 'devi_linear_avrg': 35, 'devi_linear_max': 40},
343
+ "multi": {'num_coord_metal': 6,
344
+ 'rmsd_max': 4, 'atom_dist_max': 0.6,
345
+ 'oct_angle_devi_max': 20, 'max_del_sig_angle': 35,
346
+ 'dist_del_eq': 0.45, 'dist_del_all': 1.25,
347
+ 'devi_linear_avrg': 35, 'devi_linear_max': 40}
348
+ }
349
+
350
+ dict_oct_check_st = {"mono": {'num_coord_metal': 6,
351
+ 'rmsd_max': 0.3, 'atom_dist_max': 0.45,
352
+ 'oct_angle_devi_max': 12, 'max_del_sig_angle': 22.5,
353
+ 'dist_del_eq': 0.35, 'dist_del_all': 1.0,
354
+ 'devi_linear_avrg': 20, 'devi_linear_max': 28},
355
+ "multi": {'num_coord_metal': 6,
356
+ 'rmsd_max': 3, 'atom_dist_max': 0.45,
357
+ 'oct_angle_devi_max': 20, 'max_del_sig_angle': 36,
358
+ 'dist_del_eq': 0.35, 'dist_del_all': 1.0,
359
+ 'devi_linear_avrg': 20, 'devi_linear_max': 28}
360
+ }
361
+
362
+ dict_oneempty_check_st = {"mono": {'num_coord_metal': 5,
363
+ 'rmsd_max': 0.4, 'atom_dist_max': 0.7,
364
+ 'oct_angle_devi_max': 15, 'max_del_sig_angle': 18,
365
+ 'dist_del_eq': 0.5, 'dist_del_all': 1,
366
+ 'devi_linear_avrg': 10, 'devi_linear_max': 20},
367
+ "multi": {'num_coord_metal': 5,
368
+ 'rmsd_max': 0.4, 'atom_dist_max': 0.7,
369
+ 'oct_angle_devi_max': 15, 'max_del_sig_angle': 18,
370
+ 'dist_del_eq': 0.5, 'dist_del_all': 1,
371
+ 'devi_linear_avrg': 10, 'devi_linear_max': 20}
372
+ }
373
+
374
+ dict_oneempty_check_loose = {"mono": {'num_coord_metal': 5,
375
+ 'rmsd_max': 0.6, 'atom_dist_max': 0.9,
376
+ 'oct_angle_devi_max': 20, 'max_del_sig_angle': 27,
377
+ 'dist_del_eq': 0.6, 'dist_del_all': 1.2,
378
+ 'devi_linear_avrg': 15, 'devi_linear_max': 28},
379
+ "multi": {'num_coord_metal': 5,
380
+ 'rmsd_max': 0.6, 'atom_dist_max': 0.9,
381
+ 'oct_angle_devi_max': 20, 'max_del_sig_angle': 27,
382
+ 'dist_del_eq': 0.6, 'dist_del_all': 1.2,
383
+ 'devi_linear_avrg': 15, 'devi_linear_max': 28}
384
+ }
385
+
386
+ dict_tetra_check_loose = {"mono": {'num_coord_metal': 4, 'rmsd_max': 0.4,
387
+ 'oct_angle_devi_max': 16, 'max_del_sig_angle': 27,
388
+ 'dist_del_all': 1.25,
389
+ 'devi_linear_avrg': 35, 'devi_linear_max': 40},
390
+ "multi": {'num_coord_metal': 4, 'rmsd_max': 0.4,
391
+ 'oct_angle_devi_max': 16, 'max_del_sig_angle': 27,
392
+ 'dist_del_all': 1.25,
393
+ 'devi_linear_avrg': 35, 'devi_linear_max': 40}
394
+ }
395
+
396
+ dict_tetra_check_st = {"mono": {'num_coord_metal': 4, 'rmsd_max': 0.3,
397
+ 'oct_angle_devi_max': 12, 'max_del_sig_angle': 22.5,
398
+ 'dist_del_all': 1,
399
+ 'devi_linear_avrg': 20, 'devi_linear_max': 28},
400
+ "multi": {'num_coord_metal': 4, 'rmsd_max': 0.3,
401
+ 'oct_angle_devi_max': 12, 'max_del_sig_angle': 22.5,
402
+ 'dist_del_all': 1,
403
+ 'devi_linear_avrg': 20, 'devi_linear_max': 28}
404
+ }
405
+
406
+ dict_eightcoord_check = {"mono": {'num_coord_metal': 8,
407
+ 'rmsd_max': 0.4, 'atom_dist_max': 0.6,
408
+ 'oct_angle_devi_max': 16, 'max_del_sig_angle': 27,
409
+ 'dist_del_eq': 0.45, 'dist_del_all': 1.25,
410
+ 'devi_linear_avrg': 35, 'devi_linear_max': 40},
411
+ "multi": {'num_coord_metal': 8,
412
+ 'rmsd_max': 0.4, 'atom_dist_max': 0.6,
413
+ 'oct_angle_devi_max': 20, 'max_del_sig_angle': 35,
414
+ 'dist_del_eq': 0.45, 'dist_del_all': 1.25,
415
+ 'devi_linear_avrg': 35, 'devi_linear_max': 40}
416
+ }
417
+
418
+ dict_staus = {'good': 1, 'bad': 0}
419
+
420
+ oct_angle_ref = [[90, 90, 90, 90, 180] for x in range(6)]
421
+ tetra_angle_ref = [[109.47, 109.47, 109.47] for x in range(4)]
422
+ oneempty_angle_ref = [[90, 90, 90, 90], [180, 90, 90, 90], [180, 90, 90, 90],
423
+ [180, 90, 90, 90], [180, 90, 90, 90]]
424
+ eightcoord_angle_ref = [[73.7, 73.7, 76.8, 76.8, 116.1, 142.1, 142.1] for x in range(8)]
425
+ geo_check_dictionary = {"dict_oct_check_loose": dict_oct_check_loose,
426
+ "dict_oct_check_st": dict_oct_check_st,
427
+ "dict_oneempty_check_st": dict_oneempty_check_st,
428
+ "dict_oneempty_check_loose": dict_oneempty_check_loose,
429
+ "dict_staus": dict_staus,
430
+ "oct_angle_ref": oct_angle_ref,
431
+ "oneempty_angle_ref": oneempty_angle_ref,
432
+ "eightcoord_angle_ref": eightcoord_angle_ref}
433
+ all_geometries = {
434
+ 2: ["linear", "bent"],
435
+ 3: ["trigonal planar", "T shape", "trigonal pyramidal"],
436
+ 4: ["tetrahedral", "square planar", "seesaw"],
437
+ 5: ["trigonal bipyramidal", "square pyramidal", "pentagonal planar"],
438
+ 6: ["octahedral", "pentagonal pyramidal", "trigonal prismatic"],
439
+ 7: ["pentagonal bipyramidal"],
440
+ 8: ["square antiprismatic"],
441
+ 9: ["tricapped trigonal prismatic"]
442
+ }
443
+ all_angle_refs = {
444
+ "linear": [[180] for x in range(2)],
445
+ "bent": [[120] for x in range(2)],
446
+ "trigonal planar": [[120, 120] for x in range(3)],
447
+ "T shape": [[90, 90], [90, 180], [90, 180]],
448
+ "tetrahedral": [[109.47, 109.47, 109.47] for x in range(4)],
449
+ "square planar": [[90, 90, 180] for x in range(4)],
450
+ "seesaw": [[90, 90, 180] for x in range(2)] + [[90, 90, 120] for x in range(2)],
451
+ "trigonal pyramidal": [[109.5, 109.5] for x in range(3)],
452
+ "trigonal bipyramidal": [[90, 90, 90, 180] for x in range(2)] + [[120, 120, 90, 90] for x in range(3)],
453
+ "square pyramidal": [[90, 90, 90, 90]] + [[180, 90, 90, 90] for x in range(4)],
454
+ "pentagonal planar": [[36, 36, 72, 72] for x in range(5)],
455
+ "octahedral": [[90, 90, 90, 90, 180] for x in range(6)],
456
+ "pentagonal pyramidal": [[90, 90, 90, 90, 90]] + [[36, 36, 72, 72, 90] for x in range(5)],
457
+ "trigonal prismatic": [[75.3, 86.5, 86.5, 133.3, 133.3] for x in range(6)],
458
+ "pentagonal bipyramidal": [[90, 90, 90, 90, 90, 180] for x in range(2)] +
459
+ [[72, 72, 144, 144, 90, 90] for x in range(5)],
460
+ "square antiprismatic": [[73.7, 73.7, 76.8, 76.8, 116.1, 142.1, 142.1] for x in range(8)],
461
+ "tricapped trigonal prismatic": [[70.5, 70.5, 120, 67.7, 67.7, 135.5, 135.5, 120] for x in range(4)] +
462
+ [[76.3, 79, 138.2, 70.5, 67.7, 76.3, 138.2, 135.5] for x in range(4)] +
463
+ [[70.5, 70.5, 67.7, 67.7, 120, 120, 135.5, 135.5]]
464
+ }
465
+
466
+ # Module for running bash commands
467
+ # @param cmd String containing command to be run
468
+ # @return bash output string
469
+ def mybash(cmd):
470
+ """Function to run a bash command.
471
+
472
+ Parameters
473
+ ----------
474
+ cmd : str
475
+ String containing command to be run
476
+
477
+ Returns
478
+ -------
479
+ output : str
480
+ bash output string
481
+
482
+ """
483
+ p = subprocess.Popen(
484
+ cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
485
+ stdout, stderr = p.communicate()
486
+ lines = stdout.decode('utf-8').splitlines()
487
+ lines = [line+"\n" for line in lines if line !=""]
488
+ return ''.join(lines)
489
+
490
+
491
+ # Defines global variables used throughout the code
492
+ class globalvars(metaclass=Singleton):
493
+ """Globalvars class. Defines global variables used throughout the code, including periodic table.
494
+ """
495
+ def __init__(self):
496
+ # Program name
497
+ self.PROGRAM = 'molSimplify'
498
+ s = '\nmolSimplify v1.3.3x\nFreely distributed under the GNU GPL license.\n'
499
+ s += 'Copyright 2017 Kulik Lab @ MIT\n'
500
+ s += 'Developed by: Efthymios Ioannidis (timis@mit.edu)\n'
501
+ s += 'Contributions by:\n\tHeather J. Kulik (hjkulik@mit.edu)\n'
502
+ s += '\t Terry Gani (terryg@mit.edu)\n'
503
+ s += '\t JP Janet (jpjanet@mit.edu)\n'
504
+ s += 'E. I. Ioannidis, T. Z. H. Gani, H. J. Kulik. J. Comput. Chem. 2016, 37, 2106-2117.\n'
505
+ s += 'J.P. Janet, Q. Zhao, E.I. Ioannidis, H.J. Kulik. Mol. Simul. 2017,43(5-6), 327-345.\n'
506
+ s += 'J.P. Janet, T. Z. H. Gani, A. H. Steeves, E. I. Ioannidis, H. J. Kulik. Ind. Eng. Chem. Res. 2017, 56(17), 4898-4910.\n'
507
+ # About message
508
+ self.about = s
509
+ # ##### GET INFORMATION ######
510
+ runfromcmd = False
511
+ try:
512
+ # ## check if running through commandline ###
513
+ if sys.stdin.isatty():
514
+ # running through command line
515
+ runfromcmd = True
516
+ else:
517
+ runfromcmd = False
518
+ except AttributeError: # if sys.stdin does not have an isatty method
519
+ runfromcmd = True
520
+ # ## get running os ###
521
+ self.linux, self.osx = False, False
522
+ if platform.system().lower() in 'linux':
523
+ self.linux = True
524
+ elif platform.system().lower() in 'darwin':
525
+ self.osx = True
526
+ # get cwd
527
+ # script filename (usually with path)
528
+ _ = inspect.getfile(inspect.currentframe())
529
+ cdir2 = os.path.dirname(os.path.abspath(
530
+ inspect.getfile(inspect.currentframe()))) # script directory
531
+ cdir = cdir2.rsplit('/', 1)[0]
532
+ # unused:
533
+ # cdir2 = cdir
534
+ homedir = os.path.expanduser("~")
535
+ # create default molSimplify for mac
536
+ if self.osx and not glob.glob(homedir + '/.' + self.PROGRAM) and not runfromcmd:
537
+ txt = 'INSTALLDIR=/Applications/' + self.PROGRAM + '.app/Contents/Resources\n'
538
+ with open(homedir + '/.' + self.PROGRAM, 'w') as fout:
539
+ fout.write(txt)
540
+ self.chemdbdir = ''
541
+ self.multiwfn = ''
542
+ self.custom_path = False
543
+ # ##### check for ~/.molSimplify ######
544
+ if glob.glob(homedir + '/.' + self.PROGRAM):
545
+ with open(homedir + '/.' + self.PROGRAM, 'r') as fin:
546
+ s = [_f for _f in fin.read().splitlines() if _f]
547
+ d = dict()
548
+ for ss in s:
549
+ sp = [_f for _f in ss.split('=') if _f]
550
+ try:
551
+ d[sp[0]] = sp[1]
552
+ except IndexError:
553
+ pass
554
+ if 'CHEMDBDIR' in list(d.keys()):
555
+ self.chemdbdir = d['CHEMDBDIR']
556
+ if 'MULTIWFN' in list(d.keys()):
557
+ self.multiwfn = "'" + d['MULTIWFN'] + "'"
558
+ if 'CUSTOM_DATA_PATH' in list(d.keys()):
559
+ self.custom_path = d['CUSTOM_DATA_PATH']
560
+ else:
561
+ self.installdir = cdir
562
+ with open(homedir + '/.' + self.PROGRAM, 'w') as fout:
563
+ fout.write('CHEMDBDIR=\n')
564
+
565
+ # Home directory
566
+ self.homedir = homedir
567
+ # Number of smiles ligands
568
+ self.nosmiles = 0
569
+ # Jobs directory
570
+ self.rundir = homedir + '/Runs/'
571
+ # Number of generated structures
572
+ self.generated = 0
573
+ # Additional debug output
574
+ self.debug = False
575
+ # SMARTS patterns for forced hydrogen removal
576
+ self.remHsmarts = ["O=CN", "O=CO", "n", "N=CN", "nN"]
577
+ # Default geometries for each coordination number if none specified
578
+ self.defaultgeometry = {8: ('sqap', 'square_antiprismatic'), 7: ('pbp', 'pentagonal_bipyramidal'),
579
+ 6: ('oct', 'octahedral'), 5: ('tbp', 'trigonal bipyramidal'), 4: ('thd', 'tetrahedral'),
580
+ 3: ('trigonal planar', 'tpl'), 2: ('linear', 'li'), 1: ('one', 'one')}
581
+ # Default oxidation states for elements
582
+ self.defaultoxstate = {
583
+ 'au': 'I', 'gold': 'I', 'scandium': 'III', 'sc': 'III', 'ti': 'IV', 'titanium': 'IV'}
584
+ # bent "linear" angle in degrees, e.g., in Fe(III)-superoxo or a bent nitrosyl
585
+ self.linearbentang = 45
586
+
587
+ # Returns atomic mass dictionary
588
+ # @param self The object pointer
589
+ # @return Atomic mass dictionary
590
+ def amass(self) -> Dict[str, Tuple[float, int, float, int]]:
591
+ """Get the atomic mass dictionary.
592
+
593
+ Returns
594
+ -------
595
+ amassdict : dict
596
+ Dictionary containing atomic masses.
597
+ """
598
+ return amassdict
599
+
600
+ def polarizability(self) -> Dict[str, float]:
601
+ """Get the polarizability dictionary.
602
+
603
+ Returns
604
+ -------
605
+ poldict : dict
606
+ Dictionary containing polarizabilities.
607
+ """
608
+ return poldict
609
+
610
+ def tribonddict(self):
611
+ """Get the triple bond dictionary.
612
+
613
+ Returns
614
+ -------
615
+ tribonddict : dict
616
+ Dictionary containing triple bond lengths.
617
+ """
618
+ return tribonddict
619
+
620
+ def bondsdict(self):
621
+ """Get the bond dictionary.
622
+
623
+ Returns
624
+ -------
625
+ bondsdict : dict
626
+ Dictionary containing bond lengths.
627
+ """
628
+ return bondsdict
629
+
630
+ def elementsbynum(self):
631
+ """Returns list of elements by number
632
+
633
+ Returns
634
+ -------
635
+ elementsbynum : list
636
+ List of elements by number
637
+ """
638
+ return elementsbynum
639
+
640
+ def endict(self):
641
+ """Returns electronegativity dictionary.
642
+
643
+ Returns
644
+ -------
645
+ endict : list
646
+ Electronegativity dictionary
647
+ """
648
+ return endict
649
+
650
+ def vdwrad(self):
651
+ """Returns VDW dictionary.
652
+
653
+ Returns
654
+ -------
655
+ vdwrad : list
656
+ Dictionary of VDW radii.
657
+ """
658
+ return vdwrad
659
+
660
+ def metalslist(self, transition_metals_only=True):
661
+ """Get the metals list.
662
+
663
+ Returns
664
+ -------
665
+ metalslist : list
666
+ List of available metals.
667
+ """
668
+ if not transition_metals_only:
669
+ return metalslist + alkali_and_alkaline_earth + heavy_metals_and_metalloids
670
+ else:
671
+ return metalslist
672
+
673
+ def groups(self):
674
+ """Returns dict of elements by groups.
675
+
676
+ Returns
677
+ -------
678
+ groups_dict : dict
679
+ Groups dictionary.
680
+ """
681
+ return groups_dict
682
+
683
+ def periods(self):
684
+ """Returns dict of elements by periods.
685
+
686
+ Returns
687
+ -------
688
+ periods_dict : dict
689
+ Periods dictionary.
690
+ """
691
+ return periods_dict
692
+
693
+ def geo_check_dictionary(self):
694
+ """Returns list of geo check objects dictionary.
695
+
696
+ Returns
697
+ -------
698
+ geo_check_dictionary : dict
699
+ Geo check measurement dictionary.
700
+ """
701
+ return geo_check_dictionary
702
+
703
+ def get_all_geometries(self):
704
+ """Get available geometries.
705
+
706
+ Returns
707
+ -------
708
+ all_geometries : list
709
+ All available geometries.
710
+ """
711
+ return all_geometries
712
+
713
+ def get_all_angle_refs(self):
714
+ """Get references angle dict.
715
+
716
+ Returns
717
+ -------
718
+ all_angle_refs : dict
719
+ Reference angles for various geometries.
720
+ """
721
+ return all_angle_refs
722
+
723
+ def add_custom_path(self, path):
724
+ """Record custom path in ~/.molSimplify file
725
+
726
+ Parameters
727
+ ----------
728
+ path : str
729
+ Path to custom data ~/.molSimplify file.
730
+ """
731
+ homedir = os.path.expanduser("~")
732
+ with open(homedir + '/.' + self.PROGRAM, 'a') as f:
733
+ f.write('CUSTOM_DATA_PATH=' + str(path) + "\n")
734
+
735
+ def bbcombs_mononuc(self):
736
+ """Get backbone combinations dictionary
737
+
738
+ Returns
739
+ -------
740
+ bbcombs_mononuc : dict
741
+ Backbone combination dictionary for different geometries.
742
+ """
743
+ bbcombs_mononuc = dict()
744
+ bbcombs_mononuc['one'] = [[1]]
745
+ bbcombs_mononuc['li'] = [[1], [2]]
746
+ bbcombs_mononuc['oct'] = [[1, 2, 3, 4, 5, 6], # 6-dentate
747
+ [1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [
748
+ 1, 2, 3, 5, 6], [1, 2, 4, 5, 6], # 5-dentate
749
+ [1, 3, 4, 5, 6], [2, 3, 4, 5, 6], # 5-dentate
750
+ [1, 2, 3, 4], [2, 5, 4, 6], [
751
+ 1, 5, 3, 6], # 4-dentate
752
+ [1, 2, 3], [1, 4, 2], [1, 4, 3], [1, 5, 3], [
753
+ 1, 6, 3], [2, 3, 4], # 3-dentate
754
+ [2, 5, 4], [2, 6, 4], [5, 4, 6], [5, 1, 6], [
755
+ 5, 2, 6], [5, 3, 6], # 3-dentate
756
+ [1, 2], [1, 4], [1, 5], [1, 6], [
757
+ 2, 3], [2, 5], # 2-dentate
758
+ [2, 6], [3, 5], [3, 6], [4, 5], [
759
+ 4, 6], [3, 4], # 2-dentate
760
+ [1], [2], [3], [4], [5], [6]] # 1-dentate
761
+ bbcombs_mononuc['pbp'] = [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 6], # 6/5-dentate
762
+ [1, 2, 3, 5], # 4-dentate
763
+ [1, 2, 3], [1, 2, 4], [2, 1, 5], [3, 1, 6], [
764
+ 5, 6, 3], [2, 6, 5], # 3-dentate
765
+ [1, 2], [2, 3], [3, 4], [4, 5], [1, 7], [
766
+ 2, 6], [5, 7], [3, 6], # 2-dentate
767
+ [1], [2], [3], [4], [5], [6], [7]] # 1-dentate
768
+ bbcombs_mononuc['spy'] = [[1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3], [2, 3, 4], [3, 4, 1], [4, 1, 2],
769
+ [1, 2], [1, 4], [2, 3], [3, 4], [4, 5], [
770
+ 2, 5], [3, 5], [1, 5], [1], [2], [3], [4],
771
+ [5]]
772
+ bbcombs_mononuc['sqp'] = [[1, 4, 2, 3], [1, 2, 3], [2, 3, 4], [3, 4, 1], [4, 1, 2], [1, 2], [1, 4], [2, 3],
773
+ [3, 4],
774
+ [1], [2], [3], [4]]
775
+ bbcombs_mononuc['tbp'] = [[1, 2, 3, 4, 5], [1, 3, 4, 5], [3, 2, 4], [4, 5, 3], [5, 1, 3], [4, 5], [5, 3],
776
+ [3, 4],
777
+ [1, 4], [1, 5], [1, 3], [2, 4], [2, 5], [2, 3], [1], [2], [3], [4], [5]]
778
+ bbcombs_mononuc['thd'] = [[1, 2, 3, 4], [3, 2, 4], [2, 4, 1], [4, 1, 3], [2, 4], [4, 3], [3, 2], [1, 3], [1, 4],
779
+ [2, 4], [1], [2], [3], [4]]
780
+ bbcombs_mononuc['tpl'] = [[1, 2, 3], [
781
+ 1, 2], [2, 3], [1, 3], [1], [2], [3]]
782
+ bbcombs_mononuc['tpr'] = [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5], [1, 2, 5, 4], [5, 2, 3, 6], [1, 4, 6, 3],
783
+ [1, 2, 3], [3, 6, 5],
784
+ [2, 3], [2, 5], [5, 6], [6, 4], [4, 1], [1], [2], [3], [4], [5], [6]]
785
+ return bbcombs_mononuc
786
+
787
+ def testTF(self):
788
+ """Tests to see whether keras and tensorflow are available.
789
+
790
+ Returns
791
+ -------
792
+ tf_flag : bool
793
+ True if tensorflow and keras are available.
794
+ """
795
+ try:
796
+ os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
797
+ from tensorflow.keras.models import Model # noqa: F401
798
+ from tensorflow.keras.models import Sequential # noqa: F401
799
+ return True
800
+ except ImportError:
801
+ return False
802
+
803
+ def testmatplotlib(self):
804
+ """Tests to see if matplotlib is available
805
+
806
+ Returns
807
+ -------
808
+ mpl_flag : bool
809
+ True if matplotlib is available
810
+ """
811
+ try:
812
+ # os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
813
+ import matplotlib.pyplot as plt # noqa: F401
814
+ import matplotlib.ticker as ticker # noqa: F401
815
+ return True
816
+ except ImportError:
817
+ return False
818
+
819
+ def getAllAAs(self):
820
+ """ Gets all amino acids
821
+
822
+ Returns
823
+ -------
824
+ amino_acids : dictionary
825
+ Dictionary of standard amino acids
826
+ """
827
+ return amino_acids