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.
- docs/source/conf.py +224 -0
- molSimplify/Classes/__init__.py +6 -0
- molSimplify/Classes/atom3D.py +235 -0
- molSimplify/Classes/dft_obs.py +130 -0
- molSimplify/Classes/globalvars.py +827 -0
- molSimplify/Classes/helpers.py +161 -0
- molSimplify/Classes/ligand.py +2330 -0
- molSimplify/Classes/mGUI.py +2493 -0
- molSimplify/Classes/mWidgets.py +438 -0
- molSimplify/Classes/miniGUI.py +41 -0
- molSimplify/Classes/mol2D.py +260 -0
- molSimplify/Classes/mol3D.py +5846 -0
- molSimplify/Classes/monomer3D.py +253 -0
- molSimplify/Classes/partialcharges.py +226 -0
- molSimplify/Classes/protein3D.py +1178 -0
- molSimplify/Classes/rundiag.py +151 -0
- molSimplify/Data/ML.dat +212 -0
- molSimplify/Data/MLS_FSR_for_inter.dat +23 -0
- molSimplify/Data/MLS_FSR_for_inter2.dat +23 -0
- molSimplify/Data/MLS_angle_for_click.dat +8 -0
- molSimplify/Data/MLS_angle_for_inter.dat +23 -0
- molSimplify/Data/MLS_angle_for_inter2.dat +48 -0
- molSimplify/Data/MLS_angle_for_intra.dat +10 -0
- molSimplify/Data/MLS_angle_for_intra2.dat +6 -0
- molSimplify/Data/MLS_angle_for_oa.dat +18 -0
- molSimplify/Data/ML_FSR_for_inter.dat +112 -0
- molSimplify/Data/ML_FSR_for_inter2.dat +110 -0
- molSimplify/Data/ML_bond_for_cat.dat +8 -0
- molSimplify/Data/ML_bond_for_click.dat +8 -0
- molSimplify/Data/ML_bond_for_inter.dat +48 -0
- molSimplify/Data/ML_bond_for_inter2.dat +48 -0
- molSimplify/Data/ML_bond_for_intra.dat +10 -0
- molSimplify/Data/ML_bond_for_intra2.dat +6 -0
- molSimplify/Data/ML_bond_for_oa.dat +18 -0
- molSimplify/Data/bp1.dat +21 -0
- molSimplify/Data/li.dat +3 -0
- molSimplify/Data/no.dat +2 -0
- molSimplify/Data/oct.dat +7 -0
- molSimplify/Data/pbp.dat +8 -0
- molSimplify/Data/spy.dat +6 -0
- molSimplify/Data/sqap.dat +9 -0
- molSimplify/Data/sqp.dat +5 -0
- molSimplify/Data/tbp.dat +6 -0
- molSimplify/Data/tdhd.dat +9 -0
- molSimplify/Data/thd.dat +5 -0
- molSimplify/Data/tpl.dat +4 -0
- molSimplify/Data/tpr.dat +7 -0
- molSimplify/Informatics/HFXsensitivity/__init__.py +0 -0
- molSimplify/Informatics/HFXsensitivity/measure_HFX_sensitivity_oxo_hat_reb_rel.py +443 -0
- molSimplify/Informatics/HFXsensitivity/measure_HFX_stable.py +346 -0
- molSimplify/Informatics/MOF/Linker_rotation.py +179 -0
- molSimplify/Informatics/MOF/MOF_descriptors.py +1299 -0
- molSimplify/Informatics/MOF/MOF_descriptors_alternate_functional.py +589 -0
- molSimplify/Informatics/MOF/MOF_functionalizer.py +1648 -0
- molSimplify/Informatics/MOF/PBC_functions.py +1347 -0
- molSimplify/Informatics/MOF/__init__.py +0 -0
- molSimplify/Informatics/MOF/atomic.py +267 -0
- molSimplify/Informatics/MOF/cluster_extraction.py +388 -0
- molSimplify/Informatics/MOF/fragment_MOFs_for_pormake.py +895 -0
- molSimplify/Informatics/MOF/monofunctionalized_BDC/index_information.py +10 -0
- molSimplify/Informatics/Mol2Parser.py +46 -0
- molSimplify/Informatics/RACassemble.py +408 -0
- molSimplify/Informatics/__init__.py +0 -0
- molSimplify/Informatics/active_learning/__init__.py +0 -0
- molSimplify/Informatics/active_learning/expected_improvement.py +269 -0
- molSimplify/Informatics/autocorrelation.py +1930 -0
- molSimplify/Informatics/clean_autocorrelation.py +778 -0
- molSimplify/Informatics/coulomb_analyze.py +67 -0
- molSimplify/Informatics/decoration_manager.py +193 -0
- molSimplify/Informatics/geo_analyze.py +88 -0
- molSimplify/Informatics/geometrics.py +56 -0
- molSimplify/Informatics/graph_analyze.py +163 -0
- molSimplify/Informatics/graph_racs.py +288 -0
- molSimplify/Informatics/jupyter_vis.py +172 -0
- molSimplify/Informatics/lacRACAssemble.py +2192 -0
- molSimplify/Informatics/lacRACAssemble_bisdithiolenes.py +236 -0
- molSimplify/Informatics/misc_descriptors.py +198 -0
- molSimplify/Informatics/organic_fingerprints.py +61 -0
- molSimplify/Informatics/partialcharges.py +345 -0
- molSimplify/Informatics/protein/activesite.py +53 -0
- molSimplify/Informatics/protein/pymol_add_hs.py +33 -0
- molSimplify/Informatics/rac155_geo.py +48 -0
- molSimplify/Ligands/(1_methylbenzimidazol_2_yl)pyridine.xyz +45 -0
- molSimplify/Ligands/1-4-dimethyl-1-2-3-triazole.xyz +15 -0
- molSimplify/Ligands/12crown4.mol +62 -0
- molSimplify/Ligands/Antipyrine.mol +58 -0
- molSimplify/Ligands/BPAbipy.mol +106 -0
- molSimplify/Ligands/Hpyrrole.mol +26 -0
- molSimplify/Ligands/N-quinolinylbutyramidate.xyz +31 -0
- molSimplify/Ligands/N-quinolinylmethylmethinylacetamidate.xyz +30 -0
- molSimplify/Ligands/NMe2_-1.xyz +11 -0
- molSimplify/Ligands/PCy3.mol +111 -0
- molSimplify/Ligands/PMe3.xyz +15 -0
- molSimplify/Ligands/PPh3.mol +76 -0
- molSimplify/Ligands/Propyphenazone.mol +77 -0
- molSimplify/Ligands/acac.mol +33 -0
- molSimplify/Ligands/acacen.mol +76 -0
- molSimplify/Ligands/acetate.smi +1 -0
- molSimplify/Ligands/acetate.xyz +9 -0
- molSimplify/Ligands/aceticacidbipyridine.mol +70 -0
- molSimplify/Ligands/acetonitrile.mol +17 -0
- molSimplify/Ligands/alanine.mol +30 -0
- molSimplify/Ligands/alphabetizer.py +21 -0
- molSimplify/Ligands/amine.mol +11 -0
- molSimplify/Ligands/ammonia.mol +12 -0
- molSimplify/Ligands/arginine.mol +58 -0
- molSimplify/Ligands/asparagine.mol +38 -0
- molSimplify/Ligands/aspartic_acid.mol +35 -0
- molSimplify/Ligands/azide.mol +11 -0
- molSimplify/Ligands/benzene.mol +28 -0
- molSimplify/Ligands/benzene_pi.mol +30 -0
- molSimplify/Ligands/benzenedithiol.mol +30 -0
- molSimplify/Ligands/benzenethiol.mol +30 -0
- molSimplify/Ligands/benzylisocy.mol +38 -0
- molSimplify/Ligands/bidiazine.mol +42 -0
- molSimplify/Ligands/bidiazole.mol +38 -0
- molSimplify/Ligands/bifuran.mol +38 -0
- molSimplify/Ligands/bihydrodiazine.mol +58 -0
- molSimplify/Ligands/bihydrodiazole.mol +46 -0
- molSimplify/Ligands/bihydrooxazine.mol +54 -0
- molSimplify/Ligands/bihydrooxazole.mol +42 -0
- molSimplify/Ligands/bihydrothiazine.mol +54 -0
- molSimplify/Ligands/bihydrothiazole.mol +42 -0
- molSimplify/Ligands/biimidazole.mol +38 -0
- molSimplify/Ligands/bioxazole.mol +34 -0
- molSimplify/Ligands/bipy.mol +46 -0
- molSimplify/Ligands/bipyrazine.xyz +20 -0
- molSimplify/Ligands/bipyrimidine.mol +42 -0
- molSimplify/Ligands/bipyrrole.mol +42 -0
- molSimplify/Ligands/bisnapthyridylpyridine.mol +111 -0
- molSimplify/Ligands/bithiazole.mol +34 -0
- molSimplify/Ligands/bromide.mol +7 -0
- molSimplify/Ligands/bromide.smi +1 -0
- molSimplify/Ligands/c2.mol +9 -0
- molSimplify/Ligands/caprolactone.mol +41 -0
- molSimplify/Ligands/carbonyl.mol +8 -0
- molSimplify/Ligands/carboxyl.mol +13 -0
- molSimplify/Ligands/cat.mol +30 -0
- molSimplify/Ligands/chloride.mol +7 -0
- molSimplify/Ligands/chloride.smi +1 -0
- molSimplify/Ligands/chloropyridine.mol +27 -0
- molSimplify/Ligands/co2.mol +10 -0
- molSimplify/Ligands/corrolazine.mol +72 -0
- molSimplify/Ligands/cs.mol +8 -0
- molSimplify/Ligands/cyanate.xyz +5 -0
- molSimplify/Ligands/cyanide.mol +9 -0
- molSimplify/Ligands/cyanoaceticporphyrin.mol +114 -0
- molSimplify/Ligands/cyanopyridine.mol +29 -0
- molSimplify/Ligands/cyclam.mol +81 -0
- molSimplify/Ligands/cyclen.mol +69 -0
- molSimplify/Ligands/cyclopentadienyl.mol +26 -0
- molSimplify/Ligands/cysteine.mol +32 -0
- molSimplify/Ligands/diaminomethyl.mol +19 -0
- molSimplify/Ligands/diazine.mol +25 -0
- molSimplify/Ligands/diazole.mol +23 -0
- molSimplify/Ligands/dicyanamide.mol +15 -0
- molSimplify/Ligands/dihydrofuran.mol +27 -0
- molSimplify/Ligands/dmap.xyz +35 -0
- molSimplify/Ligands/dmf.mol +28 -0
- molSimplify/Ligands/dmi.mol +41 -0
- molSimplify/Ligands/dmpe.mol +52 -0
- molSimplify/Ligands/dpmu.mol +47 -0
- molSimplify/Ligands/dppe.mol +112 -0
- molSimplify/Ligands/edta.mol +69 -0
- molSimplify/Ligands/en.mol +28 -0
- molSimplify/Ligands/ethanethiol.mol +21 -0
- molSimplify/Ligands/ethanolamine.mol +26 -0
- molSimplify/Ligands/ethbipy.mol +70 -0
- molSimplify/Ligands/ethyl.mol +19 -0
- molSimplify/Ligands/ethylamine.mol +24 -0
- molSimplify/Ligands/ethylene.mol +16 -0
- molSimplify/Ligands/ethylesteracac.mol +57 -0
- molSimplify/Ligands/fluoride.mol +7 -0
- molSimplify/Ligands/fluoride.smi +1 -0
- molSimplify/Ligands/formaldehyde.mol +12 -0
- molSimplify/Ligands/formamidate.xyz +8 -0
- molSimplify/Ligands/formate.xyz +6 -0
- molSimplify/Ligands/furan.mol +23 -0
- molSimplify/Ligands/glutamic_acid.mol +42 -0
- molSimplify/Ligands/glutamine.mol +44 -0
- molSimplify/Ligands/glycinate.mol +23 -0
- molSimplify/Ligands/glycine.mol +24 -0
- molSimplify/Ligands/h2s.mol +10 -0
- molSimplify/Ligands/helium.mol +6 -0
- molSimplify/Ligands/histidine.mol +45 -0
- molSimplify/Ligands/hmpa.mol +62 -0
- molSimplify/Ligands/hs-.mol +9 -0
- molSimplify/Ligands/hydride.mol +7 -0
- molSimplify/Ligands/hydrocarboxyacetylide.xyz +8 -0
- molSimplify/Ligands/hydrocyanide.mol +10 -0
- molSimplify/Ligands/hydrodiazine.mol +33 -0
- molSimplify/Ligands/hydrodiazole.mol +27 -0
- molSimplify/Ligands/hydrogensulfide.mol +10 -0
- molSimplify/Ligands/hydroisocyanide.mol +11 -0
- molSimplify/Ligands/hydrooxazine.mol +31 -0
- molSimplify/Ligands/hydrooxazole.mol +25 -0
- molSimplify/Ligands/hydrothiazine.mol +31 -0
- molSimplify/Ligands/hydrothiazole.mol +25 -0
- molSimplify/Ligands/hydroxyl.mol +9 -0
- molSimplify/Ligands/imidazole.mol +23 -0
- molSimplify/Ligands/imidazolidinone.mol +29 -0
- molSimplify/Ligands/imine.mol +13 -0
- molSimplify/Ligands/iminodiacetic.mol +33 -0
- molSimplify/Ligands/iodide.mol +7 -0
- molSimplify/Ligands/iodobenzene.xyz +14 -0
- molSimplify/Ligands/isoleucine.mol +48 -0
- molSimplify/Ligands/isothiocyanate.mol +11 -0
- molSimplify/Ligands/leucine.mol +48 -0
- molSimplify/Ligands/ligands.dict +257 -0
- molSimplify/Ligands/lysine.mol +54 -0
- molSimplify/Ligands/mebenzenedithiol.mol +36 -0
- molSimplify/Ligands/mebim_py.xyz +29 -0
- molSimplify/Ligands/mebim_pz.xyz +28 -0
- molSimplify/Ligands/mebipy.mol +58 -0
- molSimplify/Ligands/mecat.mol +36 -0
- molSimplify/Ligands/methanal.mol +11 -0
- molSimplify/Ligands/methanethiol.mol +15 -0
- molSimplify/Ligands/methanol.mol +16 -0
- molSimplify/Ligands/methionine.mol +44 -0
- molSimplify/Ligands/methyl.mol +13 -0
- molSimplify/Ligands/methylacetylide.xyz +8 -0
- molSimplify/Ligands/methylamine.mol +19 -0
- molSimplify/Ligands/methylazide.xyz +9 -0
- molSimplify/Ligands/methylisocy.mol +17 -0
- molSimplify/Ligands/methylpyridine.mol +33 -0
- molSimplify/Ligands/n2.mol +8 -0
- molSimplify/Ligands/n4py.xyz +51 -0
- molSimplify/Ligands/nch.mol +10 -0
- molSimplify/Ligands/nco-.mol +11 -0
- molSimplify/Ligands/nethanolamine.mol +26 -0
- molSimplify/Ligands/nitrate.mol +14 -0
- molSimplify/Ligands/nitrite.mol +11 -0
- molSimplify/Ligands/nitro.mol +11 -0
- molSimplify/Ligands/nitrobipy.mol +54 -0
- molSimplify/Ligands/nitroso.mol +8 -0
- molSimplify/Ligands/nme3.mol +30 -0
- molSimplify/Ligands/no-.mol +10 -0
- molSimplify/Ligands/no2-.mol +11 -0
- molSimplify/Ligands/noxygen.mol +8 -0
- molSimplify/Ligands/ns-.mol +10 -0
- molSimplify/Ligands/o-pyridylbenzene.xyz +23 -0
- molSimplify/Ligands/o-pyridylphenylanion.xyz +22 -0
- molSimplify/Ligands/o2-.mol +9 -0
- molSimplify/Ligands/o2.xyz +4 -0
- molSimplify/Ligands/och2.mol +12 -0
- molSimplify/Ligands/oethanolamine.mol +26 -0
- molSimplify/Ligands/ome2.mol +22 -0
- molSimplify/Ligands/ooh.xyz +5 -0
- molSimplify/Ligands/oxalate.mol +17 -0
- molSimplify/Ligands/oxalate.smi +1 -0
- molSimplify/Ligands/oxygen.mol +7 -0
- molSimplify/Ligands/pentacyanocyclopentadienide.mol +36 -0
- molSimplify/Ligands/ph2-.mol +11 -0
- molSimplify/Ligands/ph3.mol +12 -0
- molSimplify/Ligands/phen.mol +51 -0
- molSimplify/Ligands/phenacac.mol +63 -0
- molSimplify/Ligands/phenalalanine.mol +51 -0
- molSimplify/Ligands/phendione.mol +51 -0
- molSimplify/Ligands/phenphen.mol +75 -0
- molSimplify/Ligands/phenylbenzoxazole.mol +54 -0
- molSimplify/Ligands/phenylcyc.mol +99 -0
- molSimplify/Ligands/phenylenediamine.mol +37 -0
- molSimplify/Ligands/phenylisocy.mol +32 -0
- molSimplify/Ligands/phosacidbipy.mol +66 -0
- molSimplify/Ligands/phosphine.mol +13 -0
- molSimplify/Ligands/phosphorine.mol +27 -0
- molSimplify/Ligands/phosphorustrifluoride.mol +12 -0
- molSimplify/Ligands/phthalocyanine.mol +126 -0
- molSimplify/Ligands/pme3o.mol +32 -0
- molSimplify/Ligands/porphyrin.mol +82 -0
- molSimplify/Ligands/pph3o.mol +77 -0
- molSimplify/Ligands/proline.mol +39 -0
- molSimplify/Ligands/propdiol.mol +21 -0
- molSimplify/Ligands/propylene.mol +23 -0
- molSimplify/Ligands/pyridine.mol +27 -0
- molSimplify/Ligands/pyrimidone.mol +27 -0
- molSimplify/Ligands/pyrrole.mol +24 -0
- molSimplify/Ligands/quinoxalinedithiol.mol +39 -0
- molSimplify/Ligands/s2-.mol +9 -0
- molSimplify/Ligands/salen.mol +75 -0
- molSimplify/Ligands/salphen.mol +84 -0
- molSimplify/Ligands/serine.mol +32 -0
- molSimplify/Ligands/simple_ligands.dict +14 -0
- molSimplify/Ligands/sulfacidbipy.mol +63 -0
- molSimplify/Ligands/tbucat.mol +54 -0
- molSimplify/Ligands/tbuphisocy.mol +56 -0
- molSimplify/Ligands/tbutylcyclen.mol +166 -0
- molSimplify/Ligands/tbutylisocy.mol +35 -0
- molSimplify/Ligands/tbutylthiol.mol +33 -0
- molSimplify/Ligands/tcnoet.mol +43 -0
- molSimplify/Ligands/tcnoetOH.mol +45 -0
- molSimplify/Ligands/terpy.mol +65 -0
- molSimplify/Ligands/tetrahydrofuran.mol +31 -0
- molSimplify/Ligands/thiane.mol +37 -0
- molSimplify/Ligands/thiazole.mol +21 -0
- molSimplify/Ligands/thiocyanate.mol +11 -0
- molSimplify/Ligands/thiol.mol +9 -0
- molSimplify/Ligands/thiophene.mol +23 -0
- molSimplify/Ligands/thiopyridine.mol +29 -0
- molSimplify/Ligands/threonine.mol +38 -0
- molSimplify/Ligands/tpp.mol +165 -0
- molSimplify/Ligands/tricyanomethyl.mol +19 -0
- molSimplify/Ligands/trifluoromethyl.mol +13 -0
- molSimplify/Ligands/tryptophan.mol +60 -0
- molSimplify/Ligands/tyrosine.mol +53 -0
- molSimplify/Ligands/uthiol.mol +11 -0
- molSimplify/Ligands/uthiolme2.mol +23 -0
- molSimplify/Ligands/valine.mol +42 -0
- molSimplify/Ligands/water.mol +10 -0
- molSimplify/Ligands/x.mol +6 -0
- molSimplify/Scripts/__init__.py +0 -0
- molSimplify/Scripts/addtodb.py +308 -0
- molSimplify/Scripts/cellbuilder.py +1592 -0
- molSimplify/Scripts/cellbuilder_tools.py +701 -0
- molSimplify/Scripts/chains.py +342 -0
- molSimplify/Scripts/convert_2to3.py +23 -0
- molSimplify/Scripts/dbinteract.py +631 -0
- molSimplify/Scripts/distgeom.py +617 -0
- molSimplify/Scripts/findcorrelations.py +287 -0
- molSimplify/Scripts/generator.py +267 -0
- molSimplify/Scripts/geometry.py +1224 -0
- molSimplify/Scripts/grabguivars.py +845 -0
- molSimplify/Scripts/in_b3lyp_usetc.py +141 -0
- molSimplify/Scripts/inparse.py +1673 -0
- molSimplify/Scripts/io.py +1149 -0
- molSimplify/Scripts/isomers.py +415 -0
- molSimplify/Scripts/jobgen.py +247 -0
- molSimplify/Scripts/krr_prep.py +1262 -0
- molSimplify/Scripts/molSimplify_io.py +18 -0
- molSimplify/Scripts/molden2psi4wfn.py +166 -0
- molSimplify/Scripts/namegen.py +32 -0
- molSimplify/Scripts/nn_prep.py +561 -0
- molSimplify/Scripts/oct_check_mols.py +782 -0
- molSimplify/Scripts/periodic_QE.py +97 -0
- molSimplify/Scripts/postmold.py +304 -0
- molSimplify/Scripts/postmwfn.py +709 -0
- molSimplify/Scripts/postparse.py +488 -0
- molSimplify/Scripts/postproc.py +139 -0
- molSimplify/Scripts/qcgen.py +1450 -0
- molSimplify/Scripts/rmsd.py +489 -0
- molSimplify/Scripts/rungen.py +670 -0
- molSimplify/Scripts/structgen.py +3040 -0
- molSimplify/Scripts/tf_nn_prep.py +894 -0
- molSimplify/Scripts/tsgen.py +295 -0
- molSimplify/Scripts/uq_calibration.py +69 -0
- molSimplify/__init__.py +0 -0
- molSimplify/__main__.py +197 -0
- molSimplify/icons/chemdb.png +0 -0
- molSimplify/icons/hjklogo.png +0 -0
- molSimplify/icons/icon.png +0 -0
- molSimplify/icons/logo.png +0 -0
- molSimplify/icons/logo_old.png +0 -0
- molSimplify/icons/petachem.png +0 -0
- molSimplify/icons/petachem2.png +0 -0
- molSimplify/icons/petachem_full.png +0 -0
- molSimplify/icons/pythonlogo.png +0 -0
- molSimplify/icons/sge copy.png +0 -0
- molSimplify/icons/sge.png +0 -0
- molSimplify/icons/slurm.png +0 -0
- molSimplify/icons/wft1.png +0 -0
- molSimplify/icons/wft2.png +0 -0
- molSimplify/icons/wft3.png +0 -0
- molSimplify/ml/__init__.py +0 -0
- molSimplify/ml/kernels.py +36 -0
- molSimplify/ml/layers.py +29 -0
- molSimplify/molscontrol/__init__.py +14 -0
- molSimplify/molscontrol/_version.py +521 -0
- molSimplify/molscontrol/clf_tools.py +144 -0
- molSimplify/molscontrol/data/README.md +21 -0
- molSimplify/molscontrol/data/look_and_say.dat +15 -0
- molSimplify/molscontrol/dynamic_classifier.py +514 -0
- molSimplify/molscontrol/io_tools.py +363 -0
- molSimplify/molscontrol/molscontrol.py +49 -0
- molSimplify/molscontrol/terachem/jobscript_control.sh +31 -0
- molSimplify/molscontrol/terachem/terachem_input +22 -0
- molSimplify/python_krr/X_train_TS.csv +535 -0
- molSimplify/python_krr/__init__.py +0 -0
- molSimplify/python_krr/hat2_X_mean_std.csv +3 -0
- molSimplify/python_krr/hat2_feature_names.csv +1 -0
- molSimplify/python_krr/hat2_y_mean_std.csv +2 -0
- molSimplify/python_krr/hat_X_mean_std.csv +6 -0
- molSimplify/python_krr/hat_feature_names.csv +1 -0
- molSimplify/python_krr/hat_krr_X_train.csv +5205 -0
- molSimplify/python_krr/hat_krr_dual_coef.csv +1 -0
- molSimplify/python_krr/hat_y_mean_std.csv +2 -0
- molSimplify/python_krr/sklearn_models.py +34 -0
- molSimplify/python_krr/y_train_TS.csv +535 -0
- molSimplify/python_nn/ANN.py +198 -0
- molSimplify/python_nn/__init__.py +0 -0
- molSimplify/python_nn/clf_analysis_tool.py +125 -0
- molSimplify/python_nn/dictionary_toolbox.py +49 -0
- molSimplify/python_nn/ensemble_test.py +309 -0
- molSimplify/python_nn/hs_center.csv +26 -0
- molSimplify/python_nn/hs_scale.csv +26 -0
- molSimplify/python_nn/ls_center.csv +26 -0
- molSimplify/python_nn/ls_scale.csv +26 -0
- molSimplify/python_nn/ms_hs_b1.csv +50 -0
- molSimplify/python_nn/ms_hs_b2.csv +50 -0
- molSimplify/python_nn/ms_hs_b3.csv +1 -0
- molSimplify/python_nn/ms_hs_w1.csv +50 -0
- molSimplify/python_nn/ms_hs_w2.csv +50 -0
- molSimplify/python_nn/ms_hs_w3.csv +1 -0
- molSimplify/python_nn/ms_ls_b1.csv +50 -0
- molSimplify/python_nn/ms_ls_b2.csv +50 -0
- molSimplify/python_nn/ms_ls_b3.csv +1 -0
- molSimplify/python_nn/ms_ls_w1.csv +50 -0
- molSimplify/python_nn/ms_ls_w2.csv +50 -0
- molSimplify/python_nn/ms_ls_w3.csv +1 -0
- molSimplify/python_nn/ms_slope_b1.csv +50 -0
- molSimplify/python_nn/ms_slope_b2.csv +50 -0
- molSimplify/python_nn/ms_slope_b3.csv +1 -0
- molSimplify/python_nn/ms_slope_w1.csv +50 -0
- molSimplify/python_nn/ms_slope_w2.csv +50 -0
- molSimplify/python_nn/ms_slope_w3.csv +1 -0
- molSimplify/python_nn/ms_split_b1.csv +50 -0
- molSimplify/python_nn/ms_split_b2.csv +50 -0
- molSimplify/python_nn/ms_split_b3.csv +1 -0
- molSimplify/python_nn/ms_split_w1.csv +50 -0
- molSimplify/python_nn/ms_split_w2.csv +50 -0
- molSimplify/python_nn/ms_split_w3.csv +1 -0
- molSimplify/python_nn/slope_center.csv +25 -0
- molSimplify/python_nn/slope_scale.csv +25 -0
- molSimplify/python_nn/split_center.csv +26 -0
- molSimplify/python_nn/split_scale.csv +26 -0
- molSimplify/python_nn/tf_ANN.py +762 -0
- molSimplify/python_nn/train_data.csv +1211 -0
- molSimplify/tf_nn/__init__.py +0 -0
- molSimplify/tf_nn/geo_static_clf/geo_static_clf_model.h5 +0 -0
- molSimplify/tf_nn/geo_static_clf/geo_static_clf_train_name.csv +1591 -0
- molSimplify/tf_nn/geo_static_clf/geo_static_clf_train_x.csv +2790 -0
- molSimplify/tf_nn/geo_static_clf/geo_static_clf_train_y.csv +2790 -0
- molSimplify/tf_nn/geo_static_clf/geo_static_clf_vars.csv +154 -0
- molSimplify/tf_nn/geos/hs_ii_bl_x.csv +1577 -0
- molSimplify/tf_nn/geos/hs_ii_bl_y.csv +1577 -0
- molSimplify/tf_nn/geos/hs_ii_model.h5 +0 -0
- molSimplify/tf_nn/geos/hs_ii_model.json +1 -0
- molSimplify/tf_nn/geos/hs_ii_vars.csv +154 -0
- molSimplify/tf_nn/geos/hs_iii_bl_x.csv +1659 -0
- molSimplify/tf_nn/geos/hs_iii_bl_y.csv +1659 -0
- molSimplify/tf_nn/geos/hs_iii_model.h5 +0 -0
- molSimplify/tf_nn/geos/hs_iii_model.json +1 -0
- molSimplify/tf_nn/geos/hs_iii_vars.csv +154 -0
- molSimplify/tf_nn/geos/ls_ii_bl_x.csv +1374 -0
- molSimplify/tf_nn/geos/ls_ii_bl_y.csv +1374 -0
- molSimplify/tf_nn/geos/ls_ii_model.h5 +0 -0
- molSimplify/tf_nn/geos/ls_ii_model.json +1 -0
- molSimplify/tf_nn/geos/ls_ii_vars.csv +154 -0
- molSimplify/tf_nn/geos/ls_iii_bl_x.csv +1364 -0
- molSimplify/tf_nn/geos/ls_iii_bl_y.csv +1364 -0
- molSimplify/tf_nn/geos/ls_iii_model.h5 +0 -0
- molSimplify/tf_nn/geos/ls_iii_model.json +1 -0
- molSimplify/tf_nn/geos/ls_iii_vars.csv +154 -0
- molSimplify/tf_nn/homolumo/gap_model.h5 +0 -0
- molSimplify/tf_nn/homolumo/gap_model.json +1 -0
- molSimplify/tf_nn/homolumo/gap_test_names.csv +175 -0
- molSimplify/tf_nn/homolumo/gap_test_x.csv +176 -0
- molSimplify/tf_nn/homolumo/gap_test_y.csv +176 -0
- molSimplify/tf_nn/homolumo/gap_train_names.csv +699 -0
- molSimplify/tf_nn/homolumo/gap_train_x.csv +700 -0
- molSimplify/tf_nn/homolumo/gap_train_y.csv +700 -0
- molSimplify/tf_nn/homolumo/gap_vars.csv +153 -0
- molSimplify/tf_nn/homolumo/homo_model.h5 +0 -0
- molSimplify/tf_nn/homolumo/homo_model.json +126 -0
- molSimplify/tf_nn/homolumo/homo_test_names.csv +175 -0
- molSimplify/tf_nn/homolumo/homo_test_x.csv +176 -0
- molSimplify/tf_nn/homolumo/homo_test_y.csv +176 -0
- molSimplify/tf_nn/homolumo/homo_train_names.csv +699 -0
- molSimplify/tf_nn/homolumo/homo_train_x.csv +700 -0
- molSimplify/tf_nn/homolumo/homo_train_y.csv +700 -0
- molSimplify/tf_nn/homolumo/homo_vars.csv +153 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_info.json +7 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_model.h5 +0 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_model.json +1 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_test_names.csv +143 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_test_x.csv +144 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_test_y.csv +144 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_train_names.csv +513 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_train_x.csv +514 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_train_y.csv +514 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_val_names.csv +143 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_val_x.csv +58 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_val_y.csv +58 -0
- molSimplify/tf_nn/oxoandhomo/homo_empty_vars.csv +155 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_info.json +7 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_model.h5 +0 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_model.json +1 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_test_names.csv +143 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_test_x.csv +144 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_test_y.csv +144 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_train_names.csv +513 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_train_x.csv +514 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_train_y.csv +514 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_val_names.csv +143 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_val_x.csv +58 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_val_y.csv +58 -0
- molSimplify/tf_nn/oxoandhomo/oxo20_vars.csv +154 -0
- molSimplify/tf_nn/oxocatalysis/hat_model.h5 +0 -0
- molSimplify/tf_nn/oxocatalysis/hat_model.json +1 -0
- molSimplify/tf_nn/oxocatalysis/hat_test_names.csv +419 -0
- molSimplify/tf_nn/oxocatalysis/hat_test_x.csv +420 -0
- molSimplify/tf_nn/oxocatalysis/hat_test_y.csv +420 -0
- molSimplify/tf_nn/oxocatalysis/hat_train_names.csv +1507 -0
- molSimplify/tf_nn/oxocatalysis/hat_train_x.csv +1508 -0
- molSimplify/tf_nn/oxocatalysis/hat_train_y.csv +1508 -0
- molSimplify/tf_nn/oxocatalysis/hat_val_x.csv +169 -0
- molSimplify/tf_nn/oxocatalysis/hat_val_y.csv +169 -0
- molSimplify/tf_nn/oxocatalysis/hat_vars.csv +162 -0
- molSimplify/tf_nn/oxocatalysis/oxo_model.h5 +0 -0
- molSimplify/tf_nn/oxocatalysis/oxo_model.json +1 -0
- molSimplify/tf_nn/oxocatalysis/oxo_test_names.csv +527 -0
- molSimplify/tf_nn/oxocatalysis/oxo_test_x.csv +528 -0
- molSimplify/tf_nn/oxocatalysis/oxo_test_y.csv +528 -0
- molSimplify/tf_nn/oxocatalysis/oxo_train_names.csv +1897 -0
- molSimplify/tf_nn/oxocatalysis/oxo_train_x.csv +1898 -0
- molSimplify/tf_nn/oxocatalysis/oxo_train_y.csv +1898 -0
- molSimplify/tf_nn/oxocatalysis/oxo_val_x.csv +212 -0
- molSimplify/tf_nn/oxocatalysis/oxo_val_y.csv +212 -0
- molSimplify/tf_nn/oxocatalysis/oxo_vars.csv +162 -0
- molSimplify/tf_nn/rescaling_data/gap_mean_x.csv +153 -0
- molSimplify/tf_nn/rescaling_data/gap_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/gap_var_x.csv +153 -0
- molSimplify/tf_nn/rescaling_data/gap_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/geo_static_clf_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/geo_static_clf_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/geo_static_clf_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/geo_static_clf_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/hat_mean_x.csv +162 -0
- molSimplify/tf_nn/rescaling_data/hat_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/hat_var_x.csv +162 -0
- molSimplify/tf_nn/rescaling_data/hat_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/homo_empty_mean_x.csv +155 -0
- molSimplify/tf_nn/rescaling_data/homo_empty_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/homo_empty_var_x.csv +155 -0
- molSimplify/tf_nn/rescaling_data/homo_empty_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/homo_mean_x.csv +153 -0
- molSimplify/tf_nn/rescaling_data/homo_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/homo_var_x.csv +153 -0
- molSimplify/tf_nn/rescaling_data/homo_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/hs_ii_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/hs_ii_mean_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/hs_ii_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/hs_ii_var_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/hs_iii_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/hs_iii_mean_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/hs_iii_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/hs_iii_var_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/ls_ii_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/ls_ii_mean_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/ls_ii_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/ls_ii_var_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/ls_iii_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/ls_iii_mean_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/ls_iii_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/ls_iii_var_y.csv +3 -0
- molSimplify/tf_nn/rescaling_data/oxo20_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/oxo20_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/oxo20_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/oxo20_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/oxo_mean_x.csv +162 -0
- molSimplify/tf_nn/rescaling_data/oxo_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/oxo_var_x.csv +162 -0
- molSimplify/tf_nn/rescaling_data/oxo_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/sc_static_clf_mean_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/sc_static_clf_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/sc_static_clf_var_x.csv +154 -0
- molSimplify/tf_nn/rescaling_data/sc_static_clf_var_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/split_mean_x.csv +155 -0
- molSimplify/tf_nn/rescaling_data/split_mean_y.csv +1 -0
- molSimplify/tf_nn/rescaling_data/split_var_x.csv +155 -0
- molSimplify/tf_nn/rescaling_data/split_var_y.csv +1 -0
- molSimplify/tf_nn/sc_static_clf/sc_static_clf_model.h5 +0 -0
- molSimplify/tf_nn/sc_static_clf/sc_static_clf_train_name.csv +1591 -0
- molSimplify/tf_nn/sc_static_clf/sc_static_clf_train_x.csv +1592 -0
- molSimplify/tf_nn/sc_static_clf/sc_static_clf_train_y.csv +1592 -0
- molSimplify/tf_nn/sc_static_clf/sc_static_clf_vars.csv +154 -0
- molSimplify/tf_nn/split/split_model.h5 +0 -0
- molSimplify/tf_nn/split/split_model.json +1 -0
- molSimplify/tf_nn/split/split_vars.csv +155 -0
- molSimplify/tf_nn/split/split_x.csv +1902 -0
- molSimplify/tf_nn/split/split_y.csv +1902 -0
- molSimplify/tf_nn/split/train_names.csv +1901 -0
- molSimplify/utils/__init__.py +0 -0
- molSimplify/utils/decorators.py +16 -0
- molSimplify/utils/metaclasses.py +12 -0
- molSimplify/utils/tensorflow.py +23 -0
- molSimplify/utils/timer.py +16 -0
- molSimplify-1.7.4.dist-info/LICENSE +674 -0
- molSimplify-1.7.4.dist-info/METADATA +821 -0
- molSimplify-1.7.4.dist-info/RECORD +651 -0
- molSimplify-1.7.4.dist-info/WHEEL +5 -0
- molSimplify-1.7.4.dist-info/entry_points.txt +3 -0
- molSimplify-1.7.4.dist-info/top_level.txt +4 -0
- tests/generateTests.py +122 -0
- tests/helperFuncs.py +658 -0
- tests/informatics/test_MOF_descriptors.py +128 -0
- tests/informatics/test_active_learning.py +113 -0
- tests/informatics/test_coulomb_analyze.py +24 -0
- tests/informatics/test_graph_racs.py +193 -0
- tests/ml/test_kernels.py +20 -0
- tests/ml/test_layers.py +47 -0
- tests/runtest.py +10 -0
- tests/test_Mol2D.py +128 -0
- tests/test_basic_imports.py +62 -0
- tests/test_bidentate.py +25 -0
- tests/test_cli.py +20 -0
- tests/test_distgeom.py +106 -0
- tests/test_example_1.py +29 -0
- tests/test_example_3.py +31 -0
- tests/test_example_5.py +43 -0
- tests/test_example_7.py +28 -0
- tests/test_example_8.py +15 -0
- tests/test_example_tbp.py +15 -0
- tests/test_ff_xtb.py +111 -0
- tests/test_geocheck_oct.py +26 -0
- tests/test_geocheck_one_empty.py +15 -0
- tests/test_geometry.py +44 -0
- tests/test_inparse.py +76 -0
- tests/test_io.py +84 -0
- tests/test_jobgen.py +84 -0
- tests/test_joption_pythonic.py +27 -0
- tests/test_ligand_assign.py +58 -0
- tests/test_ligand_assign_consistent.py +60 -0
- tests/test_ligand_class.py +26 -0
- tests/test_ligand_from_mol_file.py +35 -0
- tests/test_ligands.py +86 -0
- tests/test_mol3D.py +337 -0
- tests/test_molcas_caspt2.py +15 -0
- tests/test_molcas_casscf.py +15 -0
- tests/test_old_ANNs.py +68 -0
- tests/test_orca_ccsdt.py +15 -0
- tests/test_orca_dft.py +15 -0
- tests/test_qcgen.py +50 -0
- tests/test_racs.py +124 -0
- tests/test_rmsd.py +68 -0
- tests/test_structgen_functions.py +198 -0
- tests/test_tetrahedral.py +29 -0
- tests/test_tutorial_10_part_one.py +16 -0
- tests/test_tutorial_10_part_two.py +15 -0
- tests/test_tutorial_2.py +11 -0
- tests/test_tutorial_3.py +15 -0
- tests/test_tutorial_4.py +57 -0
- tests/test_tutorial_6.py +10 -0
- tests/test_tutorial_8.py +29 -0
- tests/test_tutorial_9_part_one.py +15 -0
- tests/test_tutorial_9_part_two.py +15 -0
- tests/test_tutorial_qm9_part_one.py +6 -0
- tests/testresources/refs/racs/generate_references.py +85 -0
- workflows/NandyJACSAu2022/bridge_functionalizer.py +253 -0
- workflows/NandyJACSAu2022/frag_functionalizer.py +242 -0
- workflows/NandyJACSAu2022/fragment_classes.py +586 -0
- workflows/NandyJACSAu2022/macrocycle_synthesis.py +179 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import networkx as nx
|
|
3
|
+
import operator
|
|
4
|
+
from typing import Callable, List, Optional, Tuple
|
|
5
|
+
from molSimplify.Classes.mol2D import Mol2D
|
|
6
|
+
from molSimplify.Classes.globalvars import amassdict, endict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def racs_property_vector(mol: Mol2D, node: int) -> np.ndarray:
|
|
10
|
+
"""Calculates the property vector for a given node (atom) in a molecular graph.
|
|
11
|
+
|
|
12
|
+
Parameters
|
|
13
|
+
----------
|
|
14
|
+
mol : Mol2D
|
|
15
|
+
molecular graph
|
|
16
|
+
node : int
|
|
17
|
+
index of the node
|
|
18
|
+
|
|
19
|
+
Returns
|
|
20
|
+
-------
|
|
21
|
+
np.ndarray
|
|
22
|
+
property vector of the node
|
|
23
|
+
"""
|
|
24
|
+
output = np.zeros(5)
|
|
25
|
+
symbol = mol.nodes[node]["symbol"]
|
|
26
|
+
Z = amassdict[symbol][1]
|
|
27
|
+
# property (i): nuclear charge Z
|
|
28
|
+
output[0] = Z
|
|
29
|
+
# property (ii): Pauling electronegativity chi
|
|
30
|
+
output[1] = endict[symbol]
|
|
31
|
+
# property (iii): topology T, coordination number
|
|
32
|
+
output[2] = len(list(mol.neighbors(node)))
|
|
33
|
+
# property (iv): identity
|
|
34
|
+
output[3] = 1.0
|
|
35
|
+
# property (v): covalent radius S
|
|
36
|
+
output[4] = amassdict[symbol][2]
|
|
37
|
+
return output
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def atom_centered_AC(
|
|
41
|
+
mol: Mol2D,
|
|
42
|
+
starting_node: int,
|
|
43
|
+
depth: int = 3,
|
|
44
|
+
operation: Callable[[np.ndarray, np.ndarray], np.ndarray] = operator.mul,
|
|
45
|
+
property_fun: Callable[[Mol2D, int], np.ndarray] = racs_property_vector,
|
|
46
|
+
) -> np.ndarray:
|
|
47
|
+
"""Calculates atom-centered autocorrelation vectors for a given node in a molecular graph.
|
|
48
|
+
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
mol : Mol2D
|
|
52
|
+
molecular graph
|
|
53
|
+
starting_node : int
|
|
54
|
+
index of the starting node
|
|
55
|
+
depth : int, optional
|
|
56
|
+
depth of the RACs, by default 3
|
|
57
|
+
operation : Callable[[np.ndarray, np.ndarray], np.ndarray], optional
|
|
58
|
+
correlation operation, e.g. operator.mul or operator.sub for product and difference RACs,
|
|
59
|
+
by default operator.mul
|
|
60
|
+
property_fun : Callable[[Mol2D, int], np.ndarray], optional
|
|
61
|
+
function that calculates the atomic property vector, by default racs_property_vector
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
np.ndarray
|
|
66
|
+
atom-centered autocorrelation vector
|
|
67
|
+
"""
|
|
68
|
+
# Generate all paths from the starting node to all possible nodes
|
|
69
|
+
lengths = nx.single_source_shortest_path_length(
|
|
70
|
+
mol, source=starting_node, cutoff=depth
|
|
71
|
+
)
|
|
72
|
+
p_i = property_fun(mol, starting_node)
|
|
73
|
+
output = np.zeros((depth + 1, len(p_i)))
|
|
74
|
+
for node, d_ij in lengths.items():
|
|
75
|
+
p_j = property_fun(mol, node)
|
|
76
|
+
output[d_ij] += operation(p_i, p_j)
|
|
77
|
+
return output
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def multi_centered_AC(
|
|
81
|
+
mol: Mol2D,
|
|
82
|
+
depth: int = 3,
|
|
83
|
+
operation: Callable[[np.ndarray, np.ndarray], np.ndarray] = operator.mul,
|
|
84
|
+
property_fun: Callable[[Mol2D, int], np.ndarray] = racs_property_vector
|
|
85
|
+
) -> np.ndarray:
|
|
86
|
+
"""Calculates the full-scope autocorrelation vector on molecular graph.
|
|
87
|
+
|
|
88
|
+
Parameters
|
|
89
|
+
----------
|
|
90
|
+
mol : Mol2D
|
|
91
|
+
molecular graph
|
|
92
|
+
depth : int, optional
|
|
93
|
+
depth of the RACs, by default 3
|
|
94
|
+
operation : Callable[[np.ndarray, np.ndarray], np.ndarray], optional
|
|
95
|
+
correlation operation, e.g. operator.mul or operator.sub for product and difference RACs,
|
|
96
|
+
by default operator.mul
|
|
97
|
+
property_fun : Callable[[Mol2D, int], np.ndarray], optional
|
|
98
|
+
function that calculates the atomic property vector, by default racs_property_vector
|
|
99
|
+
|
|
100
|
+
Returns
|
|
101
|
+
-------
|
|
102
|
+
np.ndarray
|
|
103
|
+
full-scope autocorrelation vector
|
|
104
|
+
"""
|
|
105
|
+
n_props = len(property_fun(mol, list(mol.nodes.keys())[0]))
|
|
106
|
+
output = np.zeros((depth + 1, n_props))
|
|
107
|
+
# Generate all pairwise path lengths
|
|
108
|
+
lengths = nx.all_pairs_shortest_path_length(mol, cutoff=depth)
|
|
109
|
+
for node_i, lengths_i in lengths:
|
|
110
|
+
p_i = property_fun(mol, node_i)
|
|
111
|
+
for node_j, d_ij in lengths_i.items():
|
|
112
|
+
p_j = property_fun(mol, node_j)
|
|
113
|
+
output[d_ij] += operation(p_i, p_j)
|
|
114
|
+
return output
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def octahedral_racs(
|
|
118
|
+
mol: Mol2D,
|
|
119
|
+
depth: int = 3,
|
|
120
|
+
equatorial_connecting_atoms: Optional[List[int]] = None,
|
|
121
|
+
property_fun: Callable[[Mol2D, int], np.ndarray] = racs_property_vector,
|
|
122
|
+
) -> np.ndarray:
|
|
123
|
+
# Following J. Phys. Chem. A 2017, 121, 8939 there are 6 start/scope
|
|
124
|
+
# combinations for product ACs and 3 for difference ACs.
|
|
125
|
+
n_props = len(property_fun(mol, list(mol.nodes.keys())[0]))
|
|
126
|
+
output = np.zeros((6 + 3, depth + 1, n_props))
|
|
127
|
+
|
|
128
|
+
# start = f, scope = all, product
|
|
129
|
+
output[0] = multi_centered_AC(mol, depth=depth, property_fun=property_fun)
|
|
130
|
+
# start = mc, scope = all, product
|
|
131
|
+
output[1] = atom_centered_AC(mol, 0, depth=depth, property_fun=property_fun)
|
|
132
|
+
|
|
133
|
+
# For the other scopes the graph has to be subdivided into individual
|
|
134
|
+
# ligand graphs. Make these changes on a copy of the graph:
|
|
135
|
+
subgraphs = mol.copy()
|
|
136
|
+
# First find all connecting atoms of the first metal:
|
|
137
|
+
metals = mol.find_metal()
|
|
138
|
+
if len(metals) != 1:
|
|
139
|
+
raise ValueError("Currently only supports mononuclear TMCs.")
|
|
140
|
+
metal = metals[0]
|
|
141
|
+
connecting_atoms = sorted(list(subgraphs.neighbors(metal)))
|
|
142
|
+
# Assert that we are removing 6 edges
|
|
143
|
+
if len(connecting_atoms) != 6:
|
|
144
|
+
raise ValueError(
|
|
145
|
+
"First metal in the graph does not have 6 neighbors "
|
|
146
|
+
"as expected for an octahedral complex."
|
|
147
|
+
)
|
|
148
|
+
# Then cut the graph by removing all connections to the metal atom
|
|
149
|
+
subgraphs.remove_edges_from([(metal, c) for c in connecting_atoms])
|
|
150
|
+
|
|
151
|
+
if equatorial_connecting_atoms is None:
|
|
152
|
+
# Assume the first 4 connecting atoms belong to the equatorial ligands
|
|
153
|
+
# and the other two are axial.
|
|
154
|
+
equatorial_connecting_atoms = connecting_atoms[:4]
|
|
155
|
+
axial_connecting_atoms = connecting_atoms[4:]
|
|
156
|
+
else:
|
|
157
|
+
axial_connecting_atoms = [
|
|
158
|
+
c for c in connecting_atoms if c not in equatorial_connecting_atoms
|
|
159
|
+
]
|
|
160
|
+
if len(equatorial_connecting_atoms) != 4 or len(axial_connecting_atoms) != 2:
|
|
161
|
+
raise ValueError(
|
|
162
|
+
"The provided equatorial connecting atoms "
|
|
163
|
+
f"{equatorial_connecting_atoms} are not "
|
|
164
|
+
"consistent with the neighbors of the first "
|
|
165
|
+
f"metal in the graph {connecting_atoms}"
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
# Build lists of connecting atom and ligand
|
|
169
|
+
# subgraph tuples by first finding set of nodes for the component that the
|
|
170
|
+
# connecting atom c comes from (using nx.node_conncted_component()) and
|
|
171
|
+
# then constructing a subgraph using this node set.
|
|
172
|
+
axial_ligands = [
|
|
173
|
+
(c, subgraphs.subgraph(nx.node_connected_component(subgraphs, c)))
|
|
174
|
+
for c in axial_connecting_atoms
|
|
175
|
+
]
|
|
176
|
+
equatorial_ligands = [
|
|
177
|
+
(c, subgraphs.subgraph(nx.node_connected_component(subgraphs, c)))
|
|
178
|
+
for c in equatorial_connecting_atoms
|
|
179
|
+
]
|
|
180
|
+
|
|
181
|
+
# Note that the ligand centered RACs are averaged over the involved
|
|
182
|
+
# ligands.
|
|
183
|
+
# start = lc, scope = ax, product
|
|
184
|
+
output[2] = np.mean(
|
|
185
|
+
[
|
|
186
|
+
atom_centered_AC(g, c, depth=depth, property_fun=property_fun)
|
|
187
|
+
for (c, g) in axial_ligands
|
|
188
|
+
],
|
|
189
|
+
axis=0,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# start = lc, scope = eq, product
|
|
193
|
+
output[3] = np.mean(
|
|
194
|
+
[
|
|
195
|
+
atom_centered_AC(g, c, depth=depth, property_fun=property_fun)
|
|
196
|
+
for (c, g) in equatorial_ligands
|
|
197
|
+
],
|
|
198
|
+
axis=0,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
output[4] = np.mean(
|
|
202
|
+
[
|
|
203
|
+
multi_centered_AC(g, depth=depth, property_fun=property_fun)
|
|
204
|
+
for (_, g) in axial_ligands
|
|
205
|
+
],
|
|
206
|
+
axis=0,
|
|
207
|
+
)
|
|
208
|
+
output[5] = np.mean(
|
|
209
|
+
[
|
|
210
|
+
multi_centered_AC(g, depth=depth, property_fun=property_fun)
|
|
211
|
+
for (_, g) in equatorial_ligands
|
|
212
|
+
],
|
|
213
|
+
axis=0,
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
# Finally calculate the difference ACs the same way:
|
|
217
|
+
# start = mc, scope = all, difference
|
|
218
|
+
output[6] = atom_centered_AC(
|
|
219
|
+
mol, 0, depth=depth, operation=operator.sub, property_fun=property_fun
|
|
220
|
+
)
|
|
221
|
+
# start = lc, scope = ax, difference
|
|
222
|
+
output[7] = np.mean(
|
|
223
|
+
[
|
|
224
|
+
atom_centered_AC(
|
|
225
|
+
g, c, depth=depth, operation=operator.sub, property_fun=property_fun
|
|
226
|
+
)
|
|
227
|
+
for (c, g) in axial_ligands
|
|
228
|
+
],
|
|
229
|
+
axis=0,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
# start = lc, scope = eq, difference
|
|
233
|
+
output[8] = np.mean(
|
|
234
|
+
[
|
|
235
|
+
atom_centered_AC(
|
|
236
|
+
g, c, depth=depth, operation=operator.sub, property_fun=property_fun
|
|
237
|
+
)
|
|
238
|
+
for (c, g) in equatorial_ligands
|
|
239
|
+
],
|
|
240
|
+
axis=0,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
return output
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def ligand_racs(
|
|
247
|
+
mol: Mol2D,
|
|
248
|
+
depth: int = 3,
|
|
249
|
+
full_scope: bool = True,
|
|
250
|
+
property_fun: Callable[[Mol2D, int], np.ndarray] = racs_property_vector,
|
|
251
|
+
) -> np.ndarray:
|
|
252
|
+
|
|
253
|
+
# First cut the molecular graph into subgraphs for the metal and the ligands
|
|
254
|
+
subgraphs = mol.copy()
|
|
255
|
+
# First find all connecting atoms of the first metal:
|
|
256
|
+
metals = mol.find_metal()
|
|
257
|
+
if len(metals) != 1:
|
|
258
|
+
raise ValueError("Currently only supports mononuclear TMCs.")
|
|
259
|
+
metal = metals[0]
|
|
260
|
+
connecting_atoms = sorted(list(subgraphs.neighbors(metal)))
|
|
261
|
+
|
|
262
|
+
n_ligands = len(connecting_atoms)
|
|
263
|
+
n_props = len(property_fun(mol, list(mol.nodes.keys())[0]))
|
|
264
|
+
n_scopes = 4 if full_scope else 2
|
|
265
|
+
output = np.zeros((n_ligands, n_scopes, depth + 1, n_props))
|
|
266
|
+
|
|
267
|
+
# Then cut the graph by removing all connections to the metal atom
|
|
268
|
+
subgraphs.remove_edges_from([(metal, c) for c in connecting_atoms])
|
|
269
|
+
# Build list of tuples for all connecting atoms and corresponding ligand subgraphs
|
|
270
|
+
# TODO: I am sure there is a better way of doing this than looping over all subgraphs
|
|
271
|
+
ligand_graphs: List[Tuple[int, Mol2D]] = []
|
|
272
|
+
for c in connecting_atoms:
|
|
273
|
+
for gi in nx.connected_components(subgraphs):
|
|
274
|
+
if c in gi:
|
|
275
|
+
ligand_graphs.append((c, subgraphs.subgraph(gi)))
|
|
276
|
+
break
|
|
277
|
+
|
|
278
|
+
# Actual calculation of the RACs
|
|
279
|
+
for i, (c, g) in enumerate(ligand_graphs):
|
|
280
|
+
# starting with connecting atom centered product RACs
|
|
281
|
+
output[i, 0] = atom_centered_AC(g, c, depth=depth, operation=operator.mul, property_fun=property_fun)
|
|
282
|
+
output[i, 1] = atom_centered_AC(g, c, depth=depth, operation=operator.sub, property_fun=property_fun)
|
|
283
|
+
# Add full scope RACs if requested
|
|
284
|
+
if full_scope:
|
|
285
|
+
output[i, 2] = multi_centered_AC(g, depth=depth, operation=operator.mul, property_fun=property_fun)
|
|
286
|
+
output[i, 3] = multi_centered_AC(g, depth=depth, operation=operator.sub, property_fun=property_fun)
|
|
287
|
+
|
|
288
|
+
return output
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Py3Dmol install: (works in both Python2/3 conda environments)
|
|
3
|
+
conda install -c rmg py3dmol
|
|
4
|
+
Some Documentation: https://pypi.org/project/py3Dmol/
|
|
5
|
+
3DMol.js backend: http://3dmol.csb.pitt.edu/index.html
|
|
6
|
+
"""
|
|
7
|
+
import math as m
|
|
8
|
+
import numpy as np
|
|
9
|
+
|
|
10
|
+
import py3Dmol
|
|
11
|
+
|
|
12
|
+
from molSimplify.Classes.mol3D import mol3D
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def type_convert(structures):
|
|
16
|
+
"""Handle multiple types of structures passed. List of xyz, mol2 files,
|
|
17
|
+
or list of xyz, mol2strings.
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
structures : list
|
|
22
|
+
Structures you want visualized: can either be a list or individual:
|
|
23
|
+
mol2 strings, mol2 files, xyz strings, xyz files, or mol3D objects
|
|
24
|
+
"""
|
|
25
|
+
outlist = []
|
|
26
|
+
if not isinstance(structures, str):
|
|
27
|
+
# Convert other array-like arguments to a list.
|
|
28
|
+
structures = list(structures)
|
|
29
|
+
if isinstance(structures, list):
|
|
30
|
+
for i, x in enumerate(structures):
|
|
31
|
+
if isinstance(x, mol3D):
|
|
32
|
+
outlist.append(x)
|
|
33
|
+
continue
|
|
34
|
+
mol = mol3D()
|
|
35
|
+
# mol2string
|
|
36
|
+
if 'TRIPOS' in x:
|
|
37
|
+
mol.readfrommol2(x, readstring=True)
|
|
38
|
+
# Xyz filename
|
|
39
|
+
elif x[-4:] == '.xyz':
|
|
40
|
+
mol.readfromxyz(x)
|
|
41
|
+
# mol2 filename
|
|
42
|
+
elif x[-5:] == '.mol2':
|
|
43
|
+
mol.readfrommol2(x)
|
|
44
|
+
# checking for number at start of string -> indicates xyz string
|
|
45
|
+
elif (len(x.split('\n')) > 3) & (x.split('\n')[0].replace(' ', '').isnumeric()):
|
|
46
|
+
mol.readfromstring(x)
|
|
47
|
+
# checking for similar file without header
|
|
48
|
+
elif (len(x.split('\n')[0].split()) == 4) and x.split('\n')[0].split()[0]:
|
|
49
|
+
mol.readfromstring(x)
|
|
50
|
+
else:
|
|
51
|
+
raise ValueError('Not Recognized Structure Type for index: ' + str(i))
|
|
52
|
+
outlist.append(mol)
|
|
53
|
+
elif isinstance(structures, str):
|
|
54
|
+
x = structures
|
|
55
|
+
mol = mol3D()
|
|
56
|
+
# mol2string
|
|
57
|
+
if 'TRIPOS' in x:
|
|
58
|
+
mol.readfrommol2(x, readstring=True)
|
|
59
|
+
# Xyz filename
|
|
60
|
+
elif x[-4:] == '.xyz':
|
|
61
|
+
mol.readfromxyz(x)
|
|
62
|
+
# mol2 filename
|
|
63
|
+
elif x[-5:] == '.mol2':
|
|
64
|
+
mol.readfrommol2(x)
|
|
65
|
+
# checking for number at start of string -> indicates xyz string
|
|
66
|
+
elif (len(x.split('\n')) > 3) & (x.split('\n')[0].replace(' ', '').isnumeric()):
|
|
67
|
+
mol.readfromstring(x)
|
|
68
|
+
# checking for similar file without header
|
|
69
|
+
elif (len(x.split('\n')[0].split()) == 4) and x.split('\n')[0].split()[0]:
|
|
70
|
+
mol.readfromstring(x)
|
|
71
|
+
else:
|
|
72
|
+
raise ValueError('Not Recognized Structure Type Passed')
|
|
73
|
+
outlist.append(mol)
|
|
74
|
+
elif isinstance(structures, mol3D):
|
|
75
|
+
outlist = structures
|
|
76
|
+
else:
|
|
77
|
+
raise ValueError('Not Recognized Structure Type Passed')
|
|
78
|
+
return outlist
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def view_structures(structures, w=400, h=400, columns=2,
|
|
82
|
+
representation='stick', labelsize=18,
|
|
83
|
+
labels=False, readstring=True):
|
|
84
|
+
"""
|
|
85
|
+
py3Dmol view atoms object(s)
|
|
86
|
+
xyz_names = xyz files that will be rendered in a tiled format in jupyter (list,str)
|
|
87
|
+
w = width of frame (or subframes) in pixels (int)
|
|
88
|
+
h = height of frame (or subframes) in pixels (int)
|
|
89
|
+
cols = number of columns in subframe (int)
|
|
90
|
+
representation = how the molecule will be viewed (str)
|
|
91
|
+
labelsize = size of the data label (in Points) (int)
|
|
92
|
+
labels = turn labels on/off (bool)
|
|
93
|
+
"""
|
|
94
|
+
mol3Ds = type_convert(structures)
|
|
95
|
+
if len(mol3Ds) == 1:
|
|
96
|
+
view_ats = py3Dmol.view(width=w, height=h)
|
|
97
|
+
mol = mol3Ds[0]
|
|
98
|
+
label = False
|
|
99
|
+
if isinstance(labels, str):
|
|
100
|
+
label = labels
|
|
101
|
+
elif isinstance(labels, list):
|
|
102
|
+
label = labels[0]
|
|
103
|
+
elif isinstance(labels, bool):
|
|
104
|
+
if labels:
|
|
105
|
+
label = mol.make_formula(latex=False)
|
|
106
|
+
|
|
107
|
+
metal_atom_index = mol.findMetal() # will be empty list if no metals
|
|
108
|
+
coords = mol.coords()
|
|
109
|
+
if metal_atom_index: # Take advantage of empty list
|
|
110
|
+
label_posits = mol.getAtomCoords(metal_atom_index[0])
|
|
111
|
+
else:
|
|
112
|
+
label_posits = mol.centersym() # Put it at the geometric center of the molecule.
|
|
113
|
+
view_ats.addModel(coords, 'xyz') # Add the molecule
|
|
114
|
+
view_ats.setStyle({representation: {'colorscheme': 'Jmol'}})
|
|
115
|
+
if label:
|
|
116
|
+
view_ats.addLabel(
|
|
117
|
+
"{}".format(label),
|
|
118
|
+
{'position': {'x': '{}'.format(label_posits[0]),
|
|
119
|
+
'y': '{}'.format(label_posits[1]), 'z': '{}'.format(label_posits[2])},
|
|
120
|
+
'backgroundColor': "'black'", 'backgroundOpacity': '0.3',
|
|
121
|
+
'fontOpacity': '1', 'fontSize': '{}'.format(labelsize),
|
|
122
|
+
'fontColor': "white", 'inFront': 'true'})
|
|
123
|
+
view_ats.zoomTo()
|
|
124
|
+
view_ats.show()
|
|
125
|
+
elif len(mol3Ds) < 50:
|
|
126
|
+
rows = int(m.ceil(float(len(mol3Ds))/columns))
|
|
127
|
+
w = w*columns
|
|
128
|
+
h = h*rows
|
|
129
|
+
# Initialize Layout
|
|
130
|
+
view_ats = py3Dmol.view(width=w, height=h, linked=False, viewergrid=(rows, columns))
|
|
131
|
+
# Check for labels and populate
|
|
132
|
+
if isinstance(labels, bool):
|
|
133
|
+
if labels:
|
|
134
|
+
label = [x.make_formula(latex=False) for x in mol3Ds]
|
|
135
|
+
else:
|
|
136
|
+
label = []
|
|
137
|
+
elif isinstance(labels, list) or isinstance(labels, np.ndarray):
|
|
138
|
+
if (len(labels) != len(mol3Ds)):
|
|
139
|
+
print('Wrong amount of labels passed, defaulting to chemical formulas.')
|
|
140
|
+
label = [x.make_formula(latex=False) for x in mol3Ds]
|
|
141
|
+
else: # Force them all to be strings.
|
|
142
|
+
label = [str(x) for x in labels]
|
|
143
|
+
else:
|
|
144
|
+
raise ValueError('What sort of labels are wanting? Not recognized.')
|
|
145
|
+
x, y = 0, 0 # Subframe position
|
|
146
|
+
for i, item in enumerate(mol3Ds):
|
|
147
|
+
mol = item
|
|
148
|
+
coords = mol.coords()
|
|
149
|
+
metal_atom_index = mol.findMetal()
|
|
150
|
+
if metal_atom_index:
|
|
151
|
+
label_posits = mol.getAtomCoords(metal_atom_index[0])
|
|
152
|
+
else:
|
|
153
|
+
label_posits = mol.centersym()
|
|
154
|
+
view_ats.addModel(coords, 'xyz', viewer=(x, y))
|
|
155
|
+
view_ats.setStyle({representation: {'colorscheme': 'Jmol'}}, viewer=(x, y))
|
|
156
|
+
if len(label) > 0:
|
|
157
|
+
view_ats.addLabel(
|
|
158
|
+
"{}".format(label[i]),
|
|
159
|
+
{'position': {'x': '{}'.format(label_posits[0]),
|
|
160
|
+
'y': '{}'.format(label_posits[1]), 'z': '{}'.format(label_posits[2])},
|
|
161
|
+
'backgroundColor': "'black'", 'backgroundOpacity': '0.5',
|
|
162
|
+
'fontOpacity': '1', 'fontSize': '{}'.format(labelsize),
|
|
163
|
+
'fontColor': "white", 'inFront': 'true'}, viewer=(x, y))
|
|
164
|
+
view_ats.zoomTo(viewer=(x, y))
|
|
165
|
+
if y+1 < columns: # Fill in columns
|
|
166
|
+
y += 1
|
|
167
|
+
else:
|
|
168
|
+
x += 1
|
|
169
|
+
y = 0
|
|
170
|
+
view_ats.show()
|
|
171
|
+
else:
|
|
172
|
+
raise ValueError('Warning. Passing this many structures WILL cause your kernel to crash.')
|