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,125 @@
|
|
|
1
|
+
# import matplotlib.pyplot as plt
|
|
2
|
+
import numpy as np
|
|
3
|
+
from sklearn.metrics.pairwise import pairwise_distances
|
|
4
|
+
from packaging import version
|
|
5
|
+
import tensorflow as tf
|
|
6
|
+
from tensorflow.keras import backend as K
|
|
7
|
+
from tensorflow.keras import Model
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_acc(pred_std, pred_err, stds):
|
|
11
|
+
pred_err_arr = []
|
|
12
|
+
for target_std in stds:
|
|
13
|
+
_pred_err = []
|
|
14
|
+
for idx, _std in enumerate(pred_std):
|
|
15
|
+
if _std < target_std:
|
|
16
|
+
_pred_err.append(pred_err[idx])
|
|
17
|
+
pred_err_arr.append(_pred_err)
|
|
18
|
+
acc, ratio = [], []
|
|
19
|
+
for idx, _ in enumerate(pred_err_arr):
|
|
20
|
+
pred_err_now = pred_err_arr[idx]
|
|
21
|
+
acc_arr = [1 if pred_err_now[ii] < 0.5 else 0 for ii in range(len(pred_err_now))]
|
|
22
|
+
acc.append(np.mean(acc_arr))
|
|
23
|
+
ratio.append(1.0 * len(pred_err_now) / len(pred_std))
|
|
24
|
+
print(('stds', stds))
|
|
25
|
+
print(('accuracy', acc))
|
|
26
|
+
print(('ratio', ratio))
|
|
27
|
+
return stds, np.array(acc), np.array(ratio)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def dist_neighbor(fmat1, fmat2, labels, l=5, dist_ref=1): # noqa: E741
|
|
31
|
+
dist_mat = pairwise_distances(fmat1, fmat2, 'manhattan')
|
|
32
|
+
dist_mat = dist_mat * 1.0 / dist_ref
|
|
33
|
+
dist_avrg, dist_list, labels_list = [], [], []
|
|
34
|
+
# print('shape of dist_mat:', dist_mat.shape)
|
|
35
|
+
for ele in dist_mat:
|
|
36
|
+
dist_arr = np.round(np.array(ele), 4)
|
|
37
|
+
if not dist_ref == 1:
|
|
38
|
+
_count = (dist_arr < 10).sum()
|
|
39
|
+
_count = l if _count < l else _count
|
|
40
|
+
_count = _count if _count < 300 else 300
|
|
41
|
+
else:
|
|
42
|
+
_count = l
|
|
43
|
+
ind = dist_arr.argsort()[:_count]
|
|
44
|
+
_dist = dist_arr[ind]
|
|
45
|
+
dist_list.append(_dist)
|
|
46
|
+
_labels = np.array([labels[x][0] for x in ind])
|
|
47
|
+
labels_list.append(_labels)
|
|
48
|
+
if _dist.all() > 1e-4:
|
|
49
|
+
dist_avrg.append(np.mean(_dist[:l]))
|
|
50
|
+
else:
|
|
51
|
+
dist_avrg.append(np.mean(_dist[:l]) * float(l) / (l - 1))
|
|
52
|
+
# print('-----mean: %f, std: %f---' % (np.mean(dist_avrg), np.std(dist_avrg)))
|
|
53
|
+
dist_avrg = np.array(dist_avrg)
|
|
54
|
+
dist_list = np.array(dist_list)
|
|
55
|
+
labels_list = np.array(labels_list)
|
|
56
|
+
return dist_avrg, dist_list, labels_list
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def array_stack(array, _idx):
|
|
60
|
+
for ii in range(len(array)):
|
|
61
|
+
if not ii == _idx:
|
|
62
|
+
if 'out_arr' not in dir():
|
|
63
|
+
out_arr = array[ii]
|
|
64
|
+
else:
|
|
65
|
+
out_arr = np.concatenate((out_arr, array[ii]))
|
|
66
|
+
return out_arr
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def dist_penalty(d):
|
|
70
|
+
return np.exp(-1 * d ** 2)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def get_entropy(dists, neighbor_targets) -> np.ndarray:
|
|
74
|
+
entropies = []
|
|
75
|
+
for ii, _neighbor_targets in enumerate(neighbor_targets):
|
|
76
|
+
p0, p1 = dist_penalty(2), dist_penalty(2)
|
|
77
|
+
for idx, tar in enumerate(_neighbor_targets):
|
|
78
|
+
tar = int(tar)
|
|
79
|
+
d = dists[ii][idx]
|
|
80
|
+
if d <= 10:
|
|
81
|
+
if d != 0:
|
|
82
|
+
if tar == 0:
|
|
83
|
+
p0 += dist_penalty(d)
|
|
84
|
+
elif tar == 1:
|
|
85
|
+
p1 += dist_penalty(d)
|
|
86
|
+
else:
|
|
87
|
+
if tar == 0:
|
|
88
|
+
p0 += 100
|
|
89
|
+
elif tar == 1:
|
|
90
|
+
p1 += 100
|
|
91
|
+
_sum = p0 + p1
|
|
92
|
+
p0 = p0 / _sum
|
|
93
|
+
p1 = p1 / _sum
|
|
94
|
+
if p1 == 0 or p0 == 0:
|
|
95
|
+
entropies.append(0)
|
|
96
|
+
else:
|
|
97
|
+
entropies.append(-(p0 * np.log(p0) + p1 * np.log(p1)))
|
|
98
|
+
return np.array(entropies)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def get_layer_outputs(model, layer_index, input,
|
|
102
|
+
training_flag=False) -> np.ndarray:
|
|
103
|
+
if not version.parse(tf.__version__) >= version.parse('2.0.0'):
|
|
104
|
+
get_outputs = K.function([model.layers[0].input, K.learning_phase()],
|
|
105
|
+
[model.layers[layer_index].output])
|
|
106
|
+
nn_outputs = get_outputs([input, training_flag])[0]
|
|
107
|
+
else:
|
|
108
|
+
partial_model = Model(model.inputs, model.layers[layer_index].output)
|
|
109
|
+
nn_outputs = partial_model([input], training=training_flag).numpy() # runs the model in training mode
|
|
110
|
+
return nn_outputs
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def lse_trust(lse):
|
|
114
|
+
level = False
|
|
115
|
+
if lse < 0.2:
|
|
116
|
+
level = 'very high'
|
|
117
|
+
elif lse < 0.3:
|
|
118
|
+
level = 'high'
|
|
119
|
+
elif lse < 0.4:
|
|
120
|
+
level = 'medium'
|
|
121
|
+
elif lse < 0.5:
|
|
122
|
+
level = 'low'
|
|
123
|
+
else:
|
|
124
|
+
level = 'very low'
|
|
125
|
+
return level
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
def write_dictionary(dictionary, path):
|
|
3
|
+
emsg = False
|
|
4
|
+
try:
|
|
5
|
+
with open(path, 'w') as f:
|
|
6
|
+
for keys in list(dictionary.keys()):
|
|
7
|
+
f.write(str(keys).strip("\n") + ',' + str(dictionary[keys]) + '\n')
|
|
8
|
+
except FileNotFoundError:
|
|
9
|
+
emsg = "Error, could not write dictionary space: " + path
|
|
10
|
+
return emsg
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def read_dictionary(path):
|
|
14
|
+
emsg = False
|
|
15
|
+
dictionary = dict()
|
|
16
|
+
try:
|
|
17
|
+
with open(path, 'r') as f:
|
|
18
|
+
for lines in f:
|
|
19
|
+
ll = lines.split(",")
|
|
20
|
+
key = ll[0]
|
|
21
|
+
value = ll[1].rstrip("\n")
|
|
22
|
+
dictionary[key] = value
|
|
23
|
+
except (FileNotFoundError, IndexError):
|
|
24
|
+
emsg = "Error, could not read dictionary space: " + path
|
|
25
|
+
return emsg, dictionary
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == "__main__":
|
|
29
|
+
sfd = {
|
|
30
|
+
"split_energy": [-54.19, 142.71],
|
|
31
|
+
"slope": [-174.20, 161.58],
|
|
32
|
+
"ls_min": [1.8146, 0.6910],
|
|
33
|
+
"hs_min": [1.8882, 0.6956],
|
|
34
|
+
"ox": [2, 1],
|
|
35
|
+
"alpha": [0, 0.3],
|
|
36
|
+
"ax_charge": [-2, 2],
|
|
37
|
+
"eq_charge": [-2, 2],
|
|
38
|
+
"ax_dent": [1, 1],
|
|
39
|
+
"eq_dent": [1, 3],
|
|
40
|
+
"sum_delen": [-5.34, 12.54],
|
|
41
|
+
"max_delen": [-0.89, 2.09],
|
|
42
|
+
"ax_bo": [0, 3],
|
|
43
|
+
"eq_bo": [0.00, 3],
|
|
44
|
+
"ax_ki": [0.00, 4.29],
|
|
45
|
+
"eq_ki": [0.00, 6.96]
|
|
46
|
+
}
|
|
47
|
+
write_dictionary(sfd, 'scaling.csv')
|
|
48
|
+
|
|
49
|
+
rect = read_dictionary('scaling.csv')
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import glob
|
|
2
|
+
import math
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
import scipy as sp
|
|
6
|
+
import os
|
|
7
|
+
from tensorflow.keras.callbacks import EarlyStopping
|
|
8
|
+
from tensorflow.keras.models import model_from_json
|
|
9
|
+
from tensorflow.keras import backend as K
|
|
10
|
+
|
|
11
|
+
from importlib_resources import files as resource_files
|
|
12
|
+
from sklearn.utils import shuffle
|
|
13
|
+
from molSimplify.python_nn.clf_analysis_tool import (dist_neighbor,
|
|
14
|
+
get_entropy)
|
|
15
|
+
from molSimplify.python_nn.tf_ANN import (data_normalize,
|
|
16
|
+
data_rescale,
|
|
17
|
+
get_key,
|
|
18
|
+
load_keras_ann,
|
|
19
|
+
load_normalization_data,
|
|
20
|
+
load_test_data,
|
|
21
|
+
load_test_labels,
|
|
22
|
+
load_train_info,
|
|
23
|
+
load_training_data,
|
|
24
|
+
load_training_labels,
|
|
25
|
+
save_model,
|
|
26
|
+
tf_ANN_excitation_prepare)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def reset_weights(model):
|
|
30
|
+
session = K.get_session()
|
|
31
|
+
for layer in model.layers:
|
|
32
|
+
if hasattr(layer, 'kernel_initializer'):
|
|
33
|
+
layer.kernel.initializer.run(session=session)
|
|
34
|
+
return model
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def array_stack(array, _idx):
|
|
38
|
+
for ii in range(len(array)):
|
|
39
|
+
if not ii == _idx:
|
|
40
|
+
if 'out_arr' not in dir():
|
|
41
|
+
out_arr = array[ii]
|
|
42
|
+
else:
|
|
43
|
+
out_arr = np.concatenate((out_arr, array[ii]))
|
|
44
|
+
return out_arr
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def mc_dropout_logp(tau, err):
|
|
48
|
+
T = err.shape[0]
|
|
49
|
+
logp = sp.misc.logsumexp(-0.5 * tau * err)
|
|
50
|
+
logp -= np.log(T)
|
|
51
|
+
logp -= 0.5 * np.log(np.power(tau, -1))
|
|
52
|
+
logp -= 0.5 * np.log(2 * math.pi)
|
|
53
|
+
return (logp)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def ensemble_maker_inner(train_mat, labels, model_gen_function, info_dict,
|
|
57
|
+
num=10):
|
|
58
|
+
## contains core functions to make ensemble models
|
|
59
|
+
## from training data and labels
|
|
60
|
+
## model_gen_function is a functiont that takes NO arguments and returns a keras model
|
|
61
|
+
## info_dict is a dictionary of training info
|
|
62
|
+
train_mat, labels = shuffle(train_mat, labels)
|
|
63
|
+
train_mat = np.array_split(train_mat, num, axis=0)
|
|
64
|
+
labels = np.array_split(labels, num, axis=0)
|
|
65
|
+
earlystop = EarlyStopping(monitor=info_dict['monitor'],
|
|
66
|
+
min_delta=info_dict['min_delta'],
|
|
67
|
+
patience=info_dict['patience'],
|
|
68
|
+
verbose=0,
|
|
69
|
+
mode='auto')
|
|
70
|
+
callbacks_list = [earlystop]
|
|
71
|
+
model_list = []
|
|
72
|
+
for ii in range(num):
|
|
73
|
+
train_feature = array_stack(train_mat, ii)
|
|
74
|
+
train_labels = array_stack(labels, ii)
|
|
75
|
+
loaded_model = model_gen_function() # note the call to gen new model
|
|
76
|
+
current_model = reset_weights(loaded_model)
|
|
77
|
+
current_model.fit(train_feature, train_labels,
|
|
78
|
+
epochs=info_dict['epochs'], verbose=0,
|
|
79
|
+
batch_size=info_dict['batch_size'],
|
|
80
|
+
callbacks=callbacks_list)
|
|
81
|
+
model_list.append(current_model)
|
|
82
|
+
return(model_list)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def ensemble_maker(predictor, num=10):
|
|
86
|
+
train_mean_x, train_mean_y, train_var_x, train_var_y = load_normalization_data(predictor)
|
|
87
|
+
mat = load_training_data(predictor)
|
|
88
|
+
mat = np.array(mat, dtype='float64')
|
|
89
|
+
train_mat = data_normalize(mat, train_mean_x, train_var_x)
|
|
90
|
+
labels = load_training_labels(predictor)
|
|
91
|
+
if "clf" not in predictor:
|
|
92
|
+
labels = np.array(labels, dtype='float64')
|
|
93
|
+
labels = data_normalize(labels, train_mean_y, train_var_y)
|
|
94
|
+
info_dict = load_train_info(predictor)
|
|
95
|
+
model_list = ensemble_maker_inner(train_mat=train_mat,
|
|
96
|
+
labels=labels,
|
|
97
|
+
model_gen_function=lambda: load_keras_ann(predictor),
|
|
98
|
+
info_dict=info_dict, num=num)
|
|
99
|
+
for ii, current_model in enumerate(model_list):
|
|
100
|
+
save_model(current_model, predictor, ii)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def ensemble_uq(predictor, descriptors=False, descriptor_names=False, suffix=False):
|
|
104
|
+
key = get_key(predictor, suffix)
|
|
105
|
+
base_path = str(resource_files("molSimplify.tf_nn").joinpath(f'{key}.csv'))
|
|
106
|
+
base_path = base_path + 'ensemble_models'
|
|
107
|
+
if not os.path.exists(base_path):
|
|
108
|
+
print('Ensemble models do not exist now, training...')
|
|
109
|
+
ensemble_maker(predictor)
|
|
110
|
+
print(('ANN activated for ' + str(predictor)))
|
|
111
|
+
model_list = glob.glob(base_path + '/*.h5')
|
|
112
|
+
|
|
113
|
+
labels = load_test_labels(predictor)
|
|
114
|
+
if 'clf' not in predictor:
|
|
115
|
+
labels = np.array(labels, dtype='float64')
|
|
116
|
+
else:
|
|
117
|
+
labels = np.array(labels, dtype='int')
|
|
118
|
+
train_mean_x, train_mean_y, train_var_x, train_var_y = load_normalization_data(predictor)
|
|
119
|
+
if (descriptors and descriptor_names):
|
|
120
|
+
excitation = tf_ANN_excitation_prepare(predictor, descriptors, descriptor_names)
|
|
121
|
+
excitation = data_normalize(excitation, train_mean_x, train_var_x)
|
|
122
|
+
else:
|
|
123
|
+
mat = load_test_data(predictor)
|
|
124
|
+
mat = np.array(mat, dtype='float64')
|
|
125
|
+
train_mat = data_normalize(mat, train_mean_x, train_var_x)
|
|
126
|
+
excitation = np.array(train_mat)
|
|
127
|
+
print(('excitation is ' + str(excitation.shape)))
|
|
128
|
+
print(('actual label:', labels[:3]))
|
|
129
|
+
results_list = []
|
|
130
|
+
# print('models', model_list)
|
|
131
|
+
for idx, model in enumerate(model_list):
|
|
132
|
+
_base = model.split('.')[0]
|
|
133
|
+
with open(_base + '.json', 'r') as json_file:
|
|
134
|
+
loaded_model_json = json_file.read()
|
|
135
|
+
loaded_model = model_from_json(loaded_model_json)
|
|
136
|
+
# load weights into model
|
|
137
|
+
loaded_model.load_weights(model)
|
|
138
|
+
# complile model
|
|
139
|
+
loaded_model.compile(loss="mse", optimizer='adam',
|
|
140
|
+
metrics=['mse', 'mae', 'mape'])
|
|
141
|
+
if 'clf' not in predictor:
|
|
142
|
+
result = data_rescale(loaded_model.predict(excitation), train_mean_y, train_var_y)
|
|
143
|
+
else:
|
|
144
|
+
result = loaded_model.predict(excitation)
|
|
145
|
+
result = np.squeeze(result, axis=1)
|
|
146
|
+
results_list.append(result)
|
|
147
|
+
results_list = np.transpose(np.array(results_list))
|
|
148
|
+
# print(results_list.shape)
|
|
149
|
+
result_mean, result_std = np.mean(results_list, axis=1), np.std(results_list, axis=1)
|
|
150
|
+
labels = np.squeeze(labels, axis=1)
|
|
151
|
+
print((labels.shape, result_mean.shape))
|
|
152
|
+
error_for_mean = np.abs(labels - result_mean)
|
|
153
|
+
return result_mean, result_std, error_for_mean
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def mc_dropout_uq(predictor, descriptors=False, descriptor_names=False, num=500):
|
|
157
|
+
labels = load_test_labels(predictor)
|
|
158
|
+
if 'clf' not in predictor:
|
|
159
|
+
labels = np.array(labels, dtype='float64')
|
|
160
|
+
else:
|
|
161
|
+
labels = np.array(labels, dtype='int')
|
|
162
|
+
train_mean_x, train_mean_y, train_var_x, train_var_y = load_normalization_data(predictor)
|
|
163
|
+
if (descriptors and descriptor_names):
|
|
164
|
+
excitation = tf_ANN_excitation_prepare(predictor, descriptors, descriptor_names)
|
|
165
|
+
excitation = data_normalize(excitation, train_mean_x, train_var_x)
|
|
166
|
+
else:
|
|
167
|
+
mat = load_test_data(predictor)
|
|
168
|
+
mat = np.array(mat, dtype='float64')
|
|
169
|
+
train_mat = data_normalize(mat, train_mean_x, train_var_x)
|
|
170
|
+
excitation = np.array(train_mat)
|
|
171
|
+
print(('excitation is ' + str(excitation.shape)))
|
|
172
|
+
loaded_model = load_keras_ann(predictor)
|
|
173
|
+
get_outputs = K.function([loaded_model.layers[0].input, K.learning_phase()],
|
|
174
|
+
[loaded_model.layers[-1].output])
|
|
175
|
+
print(('LOADED MODEL HAS ' + str(
|
|
176
|
+
len(loaded_model.layers)) + ' layers, so latent space measure will be from first ' + str(
|
|
177
|
+
len(loaded_model.layers) - 1) + ' layers'))
|
|
178
|
+
results_list = []
|
|
179
|
+
err_list = []
|
|
180
|
+
for ii in range(num):
|
|
181
|
+
if not np.mod(ii, int(num / 10)):
|
|
182
|
+
print(('%d / %d' % (ii, num)))
|
|
183
|
+
if 'clf' not in predictor:
|
|
184
|
+
results = data_rescale(np.array(get_outputs([excitation, 1])), train_mean_y,
|
|
185
|
+
train_var_y)[0]
|
|
186
|
+
else:
|
|
187
|
+
results = np.array(get_outputs([excitation, 1]))[0]
|
|
188
|
+
results = results.squeeze(axis=1)
|
|
189
|
+
err = np.linalg.norm(labels - results) ** 2
|
|
190
|
+
results_list.append(results)
|
|
191
|
+
err_list.append(err)
|
|
192
|
+
results_list = np.transpose(np.array(results_list))
|
|
193
|
+
|
|
194
|
+
def f(tau):
|
|
195
|
+
return mc_dropout_logp(tau, np.array(err_list))
|
|
196
|
+
tau = sp.optimize.minimize(f, 10).x
|
|
197
|
+
result_mean, result_std = np.mean(results_list, axis=1), np.std(results_list, axis=1)
|
|
198
|
+
result_std = np.sqrt(1 / tau + result_std ** 2)
|
|
199
|
+
# print(tau, result_std[:3])
|
|
200
|
+
labels = np.squeeze(labels, axis=1)
|
|
201
|
+
error_for_mean = np.abs(labels - result_mean)
|
|
202
|
+
return result_mean, result_std, error_for_mean
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def latent_space_uq(predictor, layer_index=-2, descriptors=False, descriptor_names=False, entropy=False):
|
|
206
|
+
key = get_key(predictor, suffix=False)
|
|
207
|
+
base_path = str(resource_files("molSimplify.tf_nn").joinpath(f'{key}.csv'))
|
|
208
|
+
base_path = base_path + 'ensemble_models'
|
|
209
|
+
if not os.path.exists(base_path):
|
|
210
|
+
print('Ensemble models do not exist now, training...')
|
|
211
|
+
ensemble_maker(predictor)
|
|
212
|
+
print(('ANN activated for ' + str(predictor)))
|
|
213
|
+
model_list = glob.glob(base_path + '/*.h5')
|
|
214
|
+
train_mean_x, train_mean_y, train_var_x, train_var_y = load_normalization_data(predictor)
|
|
215
|
+
if (descriptors and descriptor_names):
|
|
216
|
+
excitation = tf_ANN_excitation_prepare(predictor, descriptors, descriptor_names)
|
|
217
|
+
excitation = data_normalize(excitation, train_mean_x, train_var_x)
|
|
218
|
+
else:
|
|
219
|
+
mat = load_training_data(predictor)
|
|
220
|
+
mat = np.array(mat, dtype='float64')
|
|
221
|
+
train_mat = data_normalize(mat, train_mean_x, train_var_x)
|
|
222
|
+
excitation = np.array(train_mat)
|
|
223
|
+
### load test data
|
|
224
|
+
if (descriptors and descriptor_names):
|
|
225
|
+
excitation = tf_ANN_excitation_prepare(predictor, descriptors, descriptor_names)
|
|
226
|
+
excitation_test = data_normalize(excitation, train_mean_x, train_var_x)
|
|
227
|
+
else:
|
|
228
|
+
mat = load_test_data(predictor)
|
|
229
|
+
mat = np.array(mat, dtype='float64')
|
|
230
|
+
test_mat = data_normalize(mat, train_mean_x, train_var_x)
|
|
231
|
+
excitation_test = np.array(test_mat)
|
|
232
|
+
labels = load_test_labels(predictor)
|
|
233
|
+
labels_train = load_training_labels(predictor)
|
|
234
|
+
if 'clf' not in predictor:
|
|
235
|
+
labels = np.array(labels, dtype='float64')
|
|
236
|
+
labels_train = np.array(labels_train, dtype='float64')
|
|
237
|
+
else:
|
|
238
|
+
labels = np.array(labels, dtype='int')
|
|
239
|
+
labels_train = np.array(labels_train, dtype='int')
|
|
240
|
+
results_list = []
|
|
241
|
+
err_list = []
|
|
242
|
+
dist_list = []
|
|
243
|
+
for model in model_list:
|
|
244
|
+
_base = model.split('.')[0]
|
|
245
|
+
with open(_base + '.json', 'r') as json_file:
|
|
246
|
+
loaded_model_json = json_file.read()
|
|
247
|
+
loaded_model = model_from_json(loaded_model_json)
|
|
248
|
+
loaded_model.load_weights(model)
|
|
249
|
+
loaded_model.compile(loss="mse", optimizer='adam',
|
|
250
|
+
metrics=['mse', 'mae', 'mape'])
|
|
251
|
+
get_outputs = K.function([loaded_model.layers[0].input, K.learning_phase()],
|
|
252
|
+
[loaded_model.layers[-1].output])
|
|
253
|
+
get_latent = K.function([loaded_model.layers[0].input, K.learning_phase()],
|
|
254
|
+
[loaded_model.layers[layer_index].output])
|
|
255
|
+
print(('NOTE: you are choosing:', loaded_model.layers[layer_index], loaded_model.layers[layer_index].name,
|
|
256
|
+
'for the latence space!'))
|
|
257
|
+
if 'clf' not in predictor:
|
|
258
|
+
results = data_rescale(np.array(get_outputs([excitation_test, 0])), train_mean_y,
|
|
259
|
+
train_var_y)[0]
|
|
260
|
+
else:
|
|
261
|
+
results = np.array(get_outputs([excitation_test, 0]))[0]
|
|
262
|
+
## get latent dist
|
|
263
|
+
training_latent_distance = np.array(get_latent([excitation, 0]))[0]
|
|
264
|
+
nn_latent_dist_train, _, __ = dist_neighbor(training_latent_distance, training_latent_distance, labels_train,
|
|
265
|
+
l=5, dist_ref=1)
|
|
266
|
+
nn_dist_avrg_train = np.mean(nn_latent_dist_train)
|
|
267
|
+
# print(nn_dist_avrg_train)
|
|
268
|
+
test_latent_distance = np.array(get_latent([excitation_test, 0]))[0]
|
|
269
|
+
nn_latent_dist_test, nn_dists, nn_labels = dist_neighbor(test_latent_distance, training_latent_distance,
|
|
270
|
+
labels_train,
|
|
271
|
+
l=5, dist_ref=nn_dist_avrg_train)
|
|
272
|
+
if not entropy:
|
|
273
|
+
# print(nn_latent_dist_test.shape)
|
|
274
|
+
# print(min(nn_latent_dist_test), max(nn_latent_dist_test))
|
|
275
|
+
dist_list.append(nn_latent_dist_test)
|
|
276
|
+
else:
|
|
277
|
+
entropy = []
|
|
278
|
+
for idx, _dists in enumerate(nn_dists):
|
|
279
|
+
entropy.append(get_entropy(_dists, nn_labels[idx]))
|
|
280
|
+
dist_list.append(np.array(entropy))
|
|
281
|
+
results = results.squeeze(axis=1)
|
|
282
|
+
err = np.linalg.norm(labels - results) ** 2
|
|
283
|
+
results_list.append(results)
|
|
284
|
+
err_list.append(err)
|
|
285
|
+
dist_list = np.transpose(np.array(dist_list))
|
|
286
|
+
results_list = np.transpose(np.array(results_list))
|
|
287
|
+
result_mean = np.mean(results_list, axis=1)
|
|
288
|
+
latent_dist = np.mean(dist_list, axis=1)
|
|
289
|
+
labels = np.squeeze(labels, axis=1)
|
|
290
|
+
error_for_mean = np.abs(labels - result_mean)
|
|
291
|
+
return result_mean, latent_dist, error_for_mean
|
|
292
|
+
|
|
293
|
+
###########
|
|
294
|
+
# predictor = 'geo_static_clf'
|
|
295
|
+
# ensemble_maker(predictor, num=10)
|
|
296
|
+
# _result_mean, _result_std, _error_for_mean = ensemble_uq(predictor)
|
|
297
|
+
# result_mean, result_std, error_for_mean = mc_dropout_uq(predictor)
|
|
298
|
+
# result_mean, latent_dist, error_for_mean = latent_space_uq(predictor, layer_index=-4, entropy=True)
|
|
299
|
+
|
|
300
|
+
# stds = [0.01, 0.02, 0.03, 0.05, 0.075, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.3, 0.35] # for variance
|
|
301
|
+
# stds = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.8] # for latent distances
|
|
302
|
+
# stds = [0.01, 0.02, 0.04, 0.06, 0.08, 0.1, 0.125, 0.15, 0.175, 0.2, 0.25, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7] # for entropy
|
|
303
|
+
# plot_scatter(latent_dist, error_for_mean, xlabel='entropy', ylabel='prediction error',
|
|
304
|
+
# figname='entropy_err.pdf')
|
|
305
|
+
# plot_dist_err(pred_std=latent_dist, pred_err=error_for_mean, stds=stds,
|
|
306
|
+
# label_x='entropy', label_y='accuracy',
|
|
307
|
+
# lable_y2='ratio of data', figname='entropy_acc_ratio.pdf')
|
|
308
|
+
# plot_metrics_correlation(metric1=latent_dist, metric2=_result_std, pred_err=error_for_mean,
|
|
309
|
+
# xlabel='entropy', ylabel='ensemble std', figname='dist_relations_entropy_ensemblestd.pdf')
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
2.136969522
|
|
2
|
+
0.199834847
|
|
3
|
+
0.239471511
|
|
4
|
+
0.268373245
|
|
5
|
+
0.208918249
|
|
6
|
+
0.083402147
|
|
7
|
+
2.445086705
|
|
8
|
+
0.150082576
|
|
9
|
+
-0.415359207
|
|
10
|
+
-0.478943022
|
|
11
|
+
1.242774566
|
|
12
|
+
1.495458299
|
|
13
|
+
0.053674649
|
|
14
|
+
0.328654005
|
|
15
|
+
0.233691164
|
|
16
|
+
0.034682081
|
|
17
|
+
0.024772915
|
|
18
|
+
0.41370768
|
|
19
|
+
0.312964492
|
|
20
|
+
0.014863749
|
|
21
|
+
2.248505367
|
|
22
|
+
0.570049546
|
|
23
|
+
1.938893476
|
|
24
|
+
1.767960363
|
|
25
|
+
1.325765483
|
|
26
|
+
1.947052436
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
0.112806743
|
|
2
|
+
0.400041286
|
|
3
|
+
0.426937259
|
|
4
|
+
0.443295972
|
|
5
|
+
0.406703826
|
|
6
|
+
0.27660334
|
|
7
|
+
0.497180701
|
|
8
|
+
0.09941977
|
|
9
|
+
0.629885414
|
|
10
|
+
0.733052627
|
|
11
|
+
0.428937066
|
|
12
|
+
0.586856749
|
|
13
|
+
0.225467646
|
|
14
|
+
0.469917969
|
|
15
|
+
0.423352812
|
|
16
|
+
0.183048909
|
|
17
|
+
0.155496572
|
|
18
|
+
0.492700815
|
|
19
|
+
0.463891603
|
|
20
|
+
0.121057505
|
|
21
|
+
3.37445425
|
|
22
|
+
0.599294625
|
|
23
|
+
0.868873174
|
|
24
|
+
0.880362839
|
|
25
|
+
1.401356536
|
|
26
|
+
1.565485427
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
1.998290653
|
|
2
|
+
0.193228737
|
|
3
|
+
0.247729149
|
|
4
|
+
0.274153592
|
|
5
|
+
0.199009083
|
|
6
|
+
0.085879438
|
|
7
|
+
2.45912469
|
|
8
|
+
0.148843931
|
|
9
|
+
-0.423616846
|
|
10
|
+
-0.493806771
|
|
11
|
+
1.251032205
|
|
12
|
+
1.50206441
|
|
13
|
+
0.055326177
|
|
14
|
+
0.327002477
|
|
15
|
+
0.244426094
|
|
16
|
+
0.035507845
|
|
17
|
+
0.027250206
|
|
18
|
+
0.397192403
|
|
19
|
+
0.326176713
|
|
20
|
+
0.01734104
|
|
21
|
+
2.273526012
|
|
22
|
+
0.572130471
|
|
23
|
+
1.909991742
|
|
24
|
+
1.739058629
|
|
25
|
+
1.356769612
|
|
26
|
+
1.973370768
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
0.09847215
|
|
2
|
+
0.394993959
|
|
3
|
+
0.431872011
|
|
4
|
+
0.446271058
|
|
5
|
+
0.399419838
|
|
6
|
+
0.280301695
|
|
7
|
+
0.498532286
|
|
8
|
+
0.099724337
|
|
9
|
+
0.634858322
|
|
10
|
+
0.741175942
|
|
11
|
+
0.433786147
|
|
12
|
+
0.591080282
|
|
13
|
+
0.228710265
|
|
14
|
+
0.46931198
|
|
15
|
+
0.429923957
|
|
16
|
+
0.185136007
|
|
17
|
+
0.162878912
|
|
18
|
+
0.489518615
|
|
19
|
+
0.469006509
|
|
20
|
+
0.130592541
|
|
21
|
+
3.361758744
|
|
22
|
+
0.598396275
|
|
23
|
+
0.880077523
|
|
24
|
+
0.893291123
|
|
25
|
+
1.405013531
|
|
26
|
+
1.565100226
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
2.93155552948668
|
|
2
|
+
0.145515594829442
|
|
3
|
+
-2.43360048262547
|
|
4
|
+
-0.395157480282928
|
|
5
|
+
-0.637796603638759
|
|
6
|
+
0.930146106836688
|
|
7
|
+
-0.579524142895491
|
|
8
|
+
0.820626949144907
|
|
9
|
+
-0.777253783464289
|
|
10
|
+
0.29215692472564
|
|
11
|
+
0.626961509771671
|
|
12
|
+
2.44330097887685
|
|
13
|
+
-0.114308691579229
|
|
14
|
+
0.208927253397649
|
|
15
|
+
-1.1547541817769
|
|
16
|
+
2.37792109238942
|
|
17
|
+
1.73020053910489
|
|
18
|
+
0.0354183411959639
|
|
19
|
+
1.01037447839548
|
|
20
|
+
-1.147846585035
|
|
21
|
+
0.93779592438205
|
|
22
|
+
2.63165432155493
|
|
23
|
+
0.599279379070505
|
|
24
|
+
3.27174010720937
|
|
25
|
+
0.490135127953323
|
|
26
|
+
-2.16587669549562
|
|
27
|
+
-0.722977897819559
|
|
28
|
+
0.947350315047321
|
|
29
|
+
-0.264109742306947
|
|
30
|
+
2.54463856916042
|
|
31
|
+
0.029884855079517
|
|
32
|
+
-2.69607015251569
|
|
33
|
+
-0.521392807565805
|
|
34
|
+
1.94846941214027
|
|
35
|
+
1.42039316055551
|
|
36
|
+
-1.45812048290532
|
|
37
|
+
-1.37562155241263
|
|
38
|
+
1.24489712820888
|
|
39
|
+
-1.67964384941915
|
|
40
|
+
0.301571663456907
|
|
41
|
+
-0.224679255157492
|
|
42
|
+
-0.300143586984905
|
|
43
|
+
0.71755740409976
|
|
44
|
+
1.1278507970158
|
|
45
|
+
1.42092339643375
|
|
46
|
+
0.397904412800722
|
|
47
|
+
0.682084109695825
|
|
48
|
+
-0.991586223845188
|
|
49
|
+
2.05738727567306
|
|
50
|
+
-0.32091166977298
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
0.0610984936356544
|
|
2
|
+
0.0166297517716885
|
|
3
|
+
-0.0736834183335304
|
|
4
|
+
0.0157422479242086
|
|
5
|
+
0.0615338534116745
|
|
6
|
+
-0.556233763694763
|
|
7
|
+
-0.0763034969568253
|
|
8
|
+
-0.578255236148834
|
|
9
|
+
-0.00821118988096714
|
|
10
|
+
0.329997718334198
|
|
11
|
+
-0.0450253896415234
|
|
12
|
+
-0.0596241429448128
|
|
13
|
+
0.40295821428299
|
|
14
|
+
-0.394725888967514
|
|
15
|
+
0.0263551324605942
|
|
16
|
+
-0.0676112771034241
|
|
17
|
+
0.342610031366348
|
|
18
|
+
0.157034784555435
|
|
19
|
+
0.0200989171862602
|
|
20
|
+
0.213467597961426
|
|
21
|
+
0.00311096734367311
|
|
22
|
+
0.0461217276751995
|
|
23
|
+
-0.334931492805481
|
|
24
|
+
0.0107353795319796
|
|
25
|
+
0.227196827530861
|
|
26
|
+
0.0135542759671807
|
|
27
|
+
0.160586997866631
|
|
28
|
+
0.054229624569416
|
|
29
|
+
0.0179113112390041
|
|
30
|
+
0.0118232732638717
|
|
31
|
+
0.464570730924606
|
|
32
|
+
0.530038118362427
|
|
33
|
+
-0.0641885846853256
|
|
34
|
+
0.0990450754761696
|
|
35
|
+
-0.0292500946670771
|
|
36
|
+
-0.118187084794044
|
|
37
|
+
-0.0402664169669151
|
|
38
|
+
-0.0201399587094784
|
|
39
|
+
-0.0397170968353748
|
|
40
|
+
-0.0894053429365158
|
|
41
|
+
0.298441380262375
|
|
42
|
+
0.223844051361084
|
|
43
|
+
-0.118292838335037
|
|
44
|
+
0.0230815000832081
|
|
45
|
+
-0.00469169579446316
|
|
46
|
+
0.0141284568235278
|
|
47
|
+
-0.400922119617462
|
|
48
|
+
0.22510838508606
|
|
49
|
+
0.286137253046036
|
|
50
|
+
0.00674713868647814
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.509552240371704
|