mlatom 3.18.2__tar.gz → 3.18.3__tar.gz
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.
- {mlatom-3.18.2/src/mlatom.egg-info → mlatom-3.18.3}/PKG-INFO +3 -12
- {mlatom-3.18.2 → mlatom-3.18.3}/README.md +2 -2
- {mlatom-3.18.2 → mlatom-3.18.3}/setup.py +1 -1
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/EEEDDDD.py +15 -4
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLTPA.py +50 -2
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatom.py +2 -2
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/__init__.py +1 -1
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/aiqm1.py +19 -14
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/aiqm2.py +30 -12
- mlatom-3.18.3/src/mlatom/aiqm3.py +166 -0
- mlatom-3.18.3/src/mlatom/fortran/np2/KREG.so +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/gen_ts_methods.py +9 -2
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/header.py +2 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/aimnet2_interface.py +24 -27
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/mace_interface.py +2 -1
- mlatom-3.18.3/src/mlatom/interfaces/mace_methods_interface.py +86 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/torchani_interface.py +19 -4
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/kreg_api.py +5 -1
- mlatom-3.18.3/src/mlatom/mlatom_models/aiqm2_model/__init__.py +0 -0
- mlatom-3.18.3/src/mlatom/mltpa/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/model_cls.py +100 -111
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/models.py +3 -1
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/ref.json +2 -1
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/simulations.py +17 -30
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/spectra.py +45 -0
- {mlatom-3.18.2 → mlatom-3.18.3/src/mlatom.egg-info}/PKG-INFO +3 -12
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom.egg-info/SOURCES.txt +6 -1
- {mlatom-3.18.2 → mlatom-3.18.3}/LICENSE.txt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/setup.cfg +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/EEEDDDD_descriptor.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/EEEDDDD_nn.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/GICnet.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/ML_NEA.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/A_KRR.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/A_KRR_kernel.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/D_CoulombMatrix.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/D_ID.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/D_rel2eq.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/MLatomF.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/MLatomFInfo.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/MLmodel.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/Makefile +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/Makefile.intel +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/analyze.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/constants.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/cs.cpp +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/dataset.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/mathUtils.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/molDescr.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/optionsModule.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/precision.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/recover.sh +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/sampling.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/statistics.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/stopper.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/strings.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/timing.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLatomF_src/types.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/MLtasks.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/addons/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/addons/omnip2x/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/addons/omnip2x/omnip2x.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/addons/omnip2x/vecmsani.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/addons/uaiqm/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/addons/uaiqm/uaiqm.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/al.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/al_utils.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/args_class.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/ccsdtstarcbs.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/composite_methods.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/constants.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/conversions.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/cs.so +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/data.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/decorators.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/dens.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/doc.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/fortran/KREG.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/fortran/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/fortran/compile.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/fortran/mathUtils.f90 +0 -0
- {mlatom-3.18.2/src/mlatom/fortran → mlatom-3.18.3/src/mlatom/fortran/np1}/KREG.so +0 -0
- {mlatom-3.18.2/src/mlatom/interfaces → mlatom-3.18.3/src/mlatom/fortran/np1}/__init__.py +0 -0
- {mlatom-3.18.2/src/mlatom/julia → mlatom-3.18.3/src/mlatom/fortran/np2}/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/fortran/stopper.f90 +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/functionsGICnet.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/gap_md.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/initial_conditions.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interface_MLatomF.py +0 -0
- {mlatom-3.18.2/src/mlatom/mlatom_models → mlatom-3.18.3/src/mlatom/interfaces}/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/ase_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/columbus_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/dftbplus_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/dftd3_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/dftd4_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/dpmd_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/gap_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/gaussian_external.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/gaussian_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/mndo_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/orca_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/physnet_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/pyscf_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/sgdml_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/sparrow_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/torchani_heavy_parts.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/turbomole_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/xtb +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/interfaces/xtb_interface.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/julia/KREG.jl +0 -0
- {mlatom-3.18.2/src/mlatom/mlatom_models/aiqm1_model → mlatom-3.18.3/src/mlatom/julia}/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/julia/kernel_function.jl +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/julia/kreg_julia.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/julia/krr.jl +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/julia/mathUtils.jl +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/julia/stopper.jl +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/krr_julia.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/log.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/md.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/md2vibr.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/md2vibr_cmd.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/md_cmd.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/md_parallel.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_gui.py +0 -0
- {mlatom-3.18.2/src/mlatom/mlatom_models/aiqm2_model → mlatom-3.18.3/src/mlatom/mlatom_models}/__init__.py +0 -0
- {mlatom-3.18.2/src/mlatom/mltpa → mlatom-3.18.3/src/mlatom/mlatom_models/aiqm1_model}/__init__.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv0.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv1.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv2.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv3.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv4.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv5.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv6.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm1_model/cv7.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv0.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv1.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv2.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv3.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv4.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv5.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv6.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mlatom_models/aiqm2_model/cv7.pt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mltpa/mff.txt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mltpa/mltpa2022_2.pkl +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/mltpa/mltpa2022_2_new_.pkl +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/namd.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/plot.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/shell_cmd.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/sliceData.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/stats.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/stopper.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/thermostat.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/utils.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom/xyz.py +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom.egg-info/dependency_links.txt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom.egg-info/entry_points.txt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom.egg-info/requires.txt +0 -0
- {mlatom-3.18.2 → mlatom-3.18.3}/src/mlatom.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mlatom
|
|
3
|
-
Version: 3.18.
|
|
3
|
+
Version: 3.18.3
|
|
4
4
|
Summary: A Package for AI-enhanced computational chemistry
|
|
5
5
|
Home-page: http://mlatom.com
|
|
6
6
|
Author: Pavlo O. Dral
|
|
@@ -14,20 +14,11 @@ Classifier: Environment :: Console
|
|
|
14
14
|
Requires-Python: >=3.8
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
|
-
Requires-Dist: numpy
|
|
18
|
-
Requires-Dist: scipy
|
|
19
|
-
Requires-Dist: h5py
|
|
20
|
-
Requires-Dist: pyh5md
|
|
21
|
-
Requires-Dist: torch
|
|
22
|
-
Requires-Dist: torchani
|
|
23
|
-
Requires-Dist: matplotlib
|
|
24
|
-
Requires-Dist: statsmodels
|
|
25
|
-
Requires-Dist: tqdm
|
|
26
17
|
|
|
27
18
|
# About Program
|
|
28
19
|
MLatom: a Package for Atomistic Simulations with Machine Learning
|
|
29
20
|
|
|
30
|
-
Version 3.18.
|
|
21
|
+
Version 3.18.3
|
|
31
22
|
|
|
32
23
|
**Official website**: http://mlatom.com/
|
|
33
24
|
**Documentation**: http://mlatom.com/docs/
|
|
@@ -56,7 +47,7 @@ When this Software or its derivatives are used in scientific publications, it sh
|
|
|
56
47
|
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Mario Barbatti, Olexandr Isayev, Cheng Wang, Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Lina Zhang, Shuang Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou. [MLatom 3: A Platform for Machine Learning-enhanced Computational Chemistry Simulations and Workflows](https://doi.org/10.1021/acs.jctc.3c01203). *J. Chem. Theory Comput.* **2024**, *20*, 1193--1213.
|
|
57
48
|
* Pavlo O. Dral, Fuchun Ge, Bao-Xin Xue, Yi-Fan Hou, Max Pinheiro Jr, Jianxing Huang, Mario Barbatti. [MLatom 2: An Integrative Platform for Atomistic Machine Learning](http://doi.org/10.1007/s41061-021-00339-5). *Top. Curr. Chem.* **2021**, *379*, 27.
|
|
58
49
|
* Pavlo O. Dral. [MLatom: A Program Package for Quantum Chemical Research Assisted by Machine Learning](http://dx.doi.org/10.1002/jcc.26004). *J. Comput. Chem.* **2019**, *40*, 2339--2347.
|
|
59
|
-
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Yuxinxin Chen, Peikun Zheng, Bao-Xin Xue, Mikolaj Martyka, Lina Zhang, Jakub Martinka, Quanhao Zhang, Xin-Yu Tong, Arif Ullah, Sebastian V. Pios, Vignesh B. Kumar, Yanchi Ou, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Matheus O. Bispo, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.18.
|
|
50
|
+
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Yuxinxin Chen, Peikun Zheng, Bao-Xin Xue, Mikolaj Martyka, Lina Zhang, Jakub Martinka, Quanhao Zhang, Xin-Yu Tong, Arif Ullah, Sebastian V. Pios, Vignesh B. Kumar, Yanchi Ou, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Matheus O. Bispo, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.18.3, Xiamen University, Xiamen, China, 2013-2025. [MLatom.com](http://mlatom.com).
|
|
60
51
|
|
|
61
52
|
The citations for MLatom's interfaces and features shall be eventually
|
|
62
53
|
included too. See program output, header.py, ref.json, and [MLatom.com](http://mlatom.com).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# About Program
|
|
2
2
|
MLatom: a Package for Atomistic Simulations with Machine Learning
|
|
3
3
|
|
|
4
|
-
Version 3.18.
|
|
4
|
+
Version 3.18.3
|
|
5
5
|
|
|
6
6
|
**Official website**: http://mlatom.com/
|
|
7
7
|
**Documentation**: http://mlatom.com/docs/
|
|
@@ -30,7 +30,7 @@ When this Software or its derivatives are used in scientific publications, it sh
|
|
|
30
30
|
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Mario Barbatti, Olexandr Isayev, Cheng Wang, Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Lina Zhang, Shuang Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou. [MLatom 3: A Platform for Machine Learning-enhanced Computational Chemistry Simulations and Workflows](https://doi.org/10.1021/acs.jctc.3c01203). *J. Chem. Theory Comput.* **2024**, *20*, 1193--1213.
|
|
31
31
|
* Pavlo O. Dral, Fuchun Ge, Bao-Xin Xue, Yi-Fan Hou, Max Pinheiro Jr, Jianxing Huang, Mario Barbatti. [MLatom 2: An Integrative Platform for Atomistic Machine Learning](http://doi.org/10.1007/s41061-021-00339-5). *Top. Curr. Chem.* **2021**, *379*, 27.
|
|
32
32
|
* Pavlo O. Dral. [MLatom: A Program Package for Quantum Chemical Research Assisted by Machine Learning](http://dx.doi.org/10.1002/jcc.26004). *J. Comput. Chem.* **2019**, *40*, 2339--2347.
|
|
33
|
-
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Yuxinxin Chen, Peikun Zheng, Bao-Xin Xue, Mikolaj Martyka, Lina Zhang, Jakub Martinka, Quanhao Zhang, Xin-Yu Tong, Arif Ullah, Sebastian V. Pios, Vignesh B. Kumar, Yanchi Ou, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Matheus O. Bispo, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.18.
|
|
33
|
+
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Yuxinxin Chen, Peikun Zheng, Bao-Xin Xue, Mikolaj Martyka, Lina Zhang, Jakub Martinka, Quanhao Zhang, Xin-Yu Tong, Arif Ullah, Sebastian V. Pios, Vignesh B. Kumar, Yanchi Ou, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Matheus O. Bispo, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.18.3, Xiamen University, Xiamen, China, 2013-2025. [MLatom.com](http://mlatom.com).
|
|
34
34
|
|
|
35
35
|
The citations for MLatom's interfaces and features shall be eventually
|
|
36
36
|
included too. See program output, header.py, ref.json, and [MLatom.com](http://mlatom.com).
|
|
@@ -18,6 +18,8 @@ from .EEEDDDD_nn import batch_jacobian, MLP, ModelEnsemble, StackModelEnsemble,
|
|
|
18
18
|
from .EEEDDDD_descriptor import self_edge_vector_matrix, self_distance_matrix
|
|
19
19
|
from typing import Any, List, Dict, Union, Iterable, Optional
|
|
20
20
|
|
|
21
|
+
torch.set_default_dtype(torch.float32)
|
|
22
|
+
|
|
21
23
|
# torch.autograd.set_detect_anomaly(True)
|
|
22
24
|
|
|
23
25
|
@compile_mode("script")
|
|
@@ -278,6 +280,7 @@ class EEEDDDD(model_cls.ml_model, model_cls.torch_model,model_cls.downloadable_m
|
|
|
278
280
|
self.species = model_dict['args'].pop('species')
|
|
279
281
|
model = self._new_model(model_dict['args'])
|
|
280
282
|
model.load_state_dict(model_dict['state'])
|
|
283
|
+
model = model.to(torch.float32)
|
|
281
284
|
model.eval()
|
|
282
285
|
if self.verbose:
|
|
283
286
|
print(f"model loaded from {model_file}")
|
|
@@ -294,10 +297,18 @@ class EEEDDDD(model_cls.ml_model, model_cls.torch_model,model_cls.downloadable_m
|
|
|
294
297
|
kwargs['reset_base'] = reset_base
|
|
295
298
|
self.model = ensemble(models=models, **kwargs)
|
|
296
299
|
|
|
297
|
-
def load_special(self,model_file):
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
300
|
+
def load_special(self, model_file):
|
|
301
|
+
|
|
302
|
+
download_links = [
|
|
303
|
+
'https://zenodo.org/records/15877717/files/mdtrajnet1_model.zip?download=1',
|
|
304
|
+
'https://aitomistic.xyz/model/mdtrajnet1_model.zip']
|
|
305
|
+
model_dir = 'mdtrajnet1_model'
|
|
306
|
+
model_files = [f'MDtrajNet-1.{ii}.pt' for ii in range(4)]
|
|
307
|
+
|
|
308
|
+
mlatom_model_dir, to_download = self.check_model_path(model_dir, model_files)
|
|
309
|
+
if to_download: self.download(download_links, mlatom_model_dir)
|
|
310
|
+
|
|
311
|
+
model_paths = [os.path.join(mlatom_model_dir,f'MDtrajNet-1.{ii}.pt') for ii in range(4)]
|
|
301
312
|
self.load(model_paths)
|
|
302
313
|
|
|
303
314
|
def specie_to_index(self, species: np.ndarray) -> torch.Tensor:
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# coding: utf-8
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
'''
|
|
6
5
|
!---------------------------------------------------------------------------!
|
|
7
6
|
! mltpa: Machine learning prediction of the Two-photon absorption !
|
|
8
|
-
! Implementations by: Yuming Su, Yiheng Dai, Yangtao Chen, Fuchun Ge !
|
|
7
|
+
! Implementations by: Yuming Su, Yiheng Dai, Yangtao Chen, Fuchun Ge !
|
|
8
|
+
! !
|
|
9
|
+
! Modified on 2025.07.30 by Yuming Su, to make it work, !
|
|
10
|
+
! if one does NOT have conjugation structure !
|
|
9
11
|
!---------------------------------------------------------------------------!
|
|
10
12
|
'''
|
|
11
13
|
|
|
@@ -345,6 +347,52 @@ class MLTPA(object):
|
|
|
345
347
|
mol = Chem.MolFromSmiles(smiles)
|
|
346
348
|
d_m = Chem.rdmolops.GetDistanceMatrix(mol)
|
|
347
349
|
ring_list, f_a = self.find_conj(smiles)
|
|
350
|
+
|
|
351
|
+
# 处理没有共轭结构的情况
|
|
352
|
+
if len(ring_list) == 0:
|
|
353
|
+
# 没有共轭结构时,最大共轭距离为0
|
|
354
|
+
feature_vector[0] = 0
|
|
355
|
+
|
|
356
|
+
# 计算所有原子的PEOE电荷、logP和MR
|
|
357
|
+
AllChem.ComputeGasteigerCharges(mol, nIter=25)
|
|
358
|
+
peoe_charge = [mol.GetAtomWithIdx(i).GetDoubleProp('_GasteigerCharge') for i in range(mol.GetNumAtoms())]
|
|
359
|
+
contribs = rdMolDescriptors._CalcCrippenContribs(mol)
|
|
360
|
+
logp = [contribs[i][0] for i in range(len(contribs))]
|
|
361
|
+
mr = [contribs[i][1] for i in range(len(contribs))]
|
|
362
|
+
|
|
363
|
+
# 使用整个分子的原子进行片段匹配
|
|
364
|
+
all_atoms = list(range(mol.GetNumAtoms()))
|
|
365
|
+
atom_props = [peoe_charge, logp, mr]
|
|
366
|
+
|
|
367
|
+
for prop_idx in range(len(atom_props)):
|
|
368
|
+
atom_props_list = atom_props[prop_idx]
|
|
369
|
+
frag_x = []
|
|
370
|
+
|
|
371
|
+
# 在整个分子中寻找匹配的片段
|
|
372
|
+
for i in range(len(mff_title)):
|
|
373
|
+
patt = mff_title[i]
|
|
374
|
+
f = Chem.MolFromSmarts(patt)
|
|
375
|
+
atomids = mol.GetSubstructMatches(f)
|
|
376
|
+
if len(atomids) > 0:
|
|
377
|
+
for atomid_group in atomids:
|
|
378
|
+
x_temp = 0
|
|
379
|
+
for k in atomid_group:
|
|
380
|
+
x_temp += atom_props_list[k]
|
|
381
|
+
frag_x.append(x_temp)
|
|
382
|
+
|
|
383
|
+
if len(frag_x) == 0:
|
|
384
|
+
frag_x = [0]
|
|
385
|
+
|
|
386
|
+
if prop_idx == 0 or prop_idx == 2: # PEOE电荷和MR取最大值
|
|
387
|
+
feature_vector[prop_idx + 1] = max(frag_x)
|
|
388
|
+
else: # logP取最小值
|
|
389
|
+
feature_vector[prop_idx + 1] = min(frag_x)
|
|
390
|
+
|
|
391
|
+
feature_vector[4] = et30
|
|
392
|
+
feature_vector[5] = wavelength
|
|
393
|
+
return feature_vector
|
|
394
|
+
|
|
395
|
+
# 原有的有共轭结构的处理逻辑
|
|
348
396
|
lstmax = sorted(ring_list, key=len)[-1]
|
|
349
397
|
|
|
350
398
|
# calculate max conju-distance
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
!---------------------------------------------------------------------------!
|
|
5
5
|
! !
|
|
6
6
|
! MLatom: a Package for Atomistic Simulations with Machine Learning !
|
|
7
|
-
! MLatom 3.18.
|
|
7
|
+
! MLatom 3.18.3 !
|
|
8
8
|
! @ !
|
|
9
9
|
! Xiamen Atomistic Computing Suite (XACS) !
|
|
10
10
|
! !
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
! Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, !
|
|
39
39
|
! Matheus O. Bispo !
|
|
40
40
|
! MLatom: A Package for Atomistic Simulations with Machine Learning, !
|
|
41
|
-
! version 3.18.
|
|
41
|
+
! version 3.18.3, Xiamen University, Xiamen, China, 2013-2025. !
|
|
42
42
|
! !
|
|
43
43
|
! The citations for MLatom's interfaces and features shall be eventually !
|
|
44
44
|
! included too. See header.py, ref.json and http://mlatom.com. !
|
|
@@ -200,25 +200,30 @@ class ani_nns_in_aiqm1(torchani_model, downloadable_model):
|
|
|
200
200
|
|
|
201
201
|
def load_model(self):
|
|
202
202
|
import torch
|
|
203
|
-
mlatomdir=os.path.dirname(__file__)
|
|
204
|
-
dirname = os.path.join(mlatomdir, 'aiqm1_model')
|
|
203
|
+
# mlatomdir = os.path.dirname(__file__)
|
|
204
|
+
# dirname = os.path.join(mlatomdir, 'aiqm1_model')
|
|
205
205
|
method = 'aiqm1_' + self.level
|
|
206
206
|
self.define_nn()
|
|
207
207
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
208
|
+
if method == 'aiqm1_cc':
|
|
209
|
+
download_links = [
|
|
210
|
+
'https://zenodo.org/records/15383390/files/aiqm1_cc_model.zip?download=1',
|
|
211
|
+
'https://aitomistic.xyz/model/uaiqm_odm2star_cc_20211202.zip']
|
|
212
|
+
model_dir = 'aiqm1_model'
|
|
213
|
+
model_files = [f'cv{ii}.pt' for ii in range(8)]
|
|
214
|
+
|
|
215
|
+
elif method == 'aiqm1_dft':
|
|
216
|
+
download_links = [
|
|
217
|
+
'https://zenodo.org/records/15383390/files/aiqm1_dft_model.zip?download=1',
|
|
218
|
+
'https://aitomistic.xyz/model/uaiqm_odm2star_dft_20211202.zip']
|
|
219
|
+
model_dir = 'aiqm1_dft_model'
|
|
220
|
+
model_files = [f'cv{ii}.pt' for ii in range(8)]
|
|
221
|
+
|
|
222
|
+
mlatom_model_dir, to_download = self.check_model_path(model_dir, model_files)
|
|
223
|
+
if to_download: self.download(download_links, mlatom_model_dir)
|
|
219
224
|
|
|
220
225
|
# checkpoint = torch.load(os.path.join(dirname, f'{method}_cv{self.model_index}.pt'), map_location=self.device)
|
|
221
|
-
checkpoint = torch.load(os.path.join(
|
|
226
|
+
checkpoint = torch.load(os.path.join(mlatom_model_dir, f'cv{self.model_index}.pt'), map_location=self.device, weights_only=False)
|
|
222
227
|
self.nn.load_state_dict(checkpoint['nn'])
|
|
223
228
|
import torchani
|
|
224
229
|
self.model = torchani.nn.Sequential(self.aev_computer, self.nn).to(self.device).double()
|
|
@@ -30,21 +30,23 @@ class aiqm2(method_model, downloadable_model):
|
|
|
30
30
|
"""
|
|
31
31
|
|
|
32
32
|
supported_methods = ['AIQM2', 'AIQM2@DFT', 'AIQM2@DFT*']
|
|
33
|
-
# mlatomdir=os.path.dirname(__file__)
|
|
34
|
-
# dirname = os.path.join(mlatomdir, 'aiqm2_model')
|
|
35
33
|
|
|
36
34
|
def __init__(
|
|
37
35
|
self,
|
|
38
36
|
method: str = 'AIQM2',
|
|
39
37
|
working_directory: str = '.',
|
|
40
|
-
|
|
38
|
+
baseline_kwargs: dict = None,
|
|
39
|
+
dispersion_kwargs: dict = None,
|
|
41
40
|
nthreads: int = 1
|
|
42
41
|
):
|
|
43
42
|
|
|
44
43
|
self.method = method.lower()
|
|
45
44
|
self.model_name = self.method.replace('@','at')
|
|
46
45
|
self.working_directory = working_directory
|
|
47
|
-
self.
|
|
46
|
+
if baseline_kwargs is None: self.baseline_kwargs = {}
|
|
47
|
+
else: self.baseline_kwargs = baseline_kwargs
|
|
48
|
+
if dispersion_kwargs is None: self.dispersion_kwargs = {}
|
|
49
|
+
else: self.dispersion_kwargs = dispersion_kwargs
|
|
48
50
|
self.load()
|
|
49
51
|
self.nthreads = nthreads
|
|
50
52
|
|
|
@@ -65,13 +67,13 @@ class aiqm2(method_model, downloadable_model):
|
|
|
65
67
|
calculate_energy_gradients=False,
|
|
66
68
|
calculate_hessian=False,
|
|
67
69
|
calculate_dipole_derivatives=False,
|
|
70
|
+
calculate_polarizability_derivatives=False,
|
|
68
71
|
):
|
|
69
|
-
|
|
70
72
|
molDB = super().predict(molecular_database=molecular_database, molecule=molecule)
|
|
71
73
|
for mol in molDB.molecules:
|
|
72
74
|
self.predict_for_molecule(molecule=mol,
|
|
73
75
|
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian,
|
|
74
|
-
calculate_dipole_derivatives=calculate_dipole_derivatives)
|
|
76
|
+
calculate_dipole_derivatives=calculate_dipole_derivatives,calculate_polarizability_derivatives=calculate_polarizability_derivatives,)
|
|
75
77
|
|
|
76
78
|
def predict_for_molecule( # no specific treatment to atomic energies currently
|
|
77
79
|
self,
|
|
@@ -80,6 +82,7 @@ class aiqm2(method_model, downloadable_model):
|
|
|
80
82
|
calculate_energy_gradients=False,
|
|
81
83
|
calculate_hessian=False,
|
|
82
84
|
calculate_dipole_derivatives=False,
|
|
85
|
+
calculate_polarizability_derivatives=False,
|
|
83
86
|
):
|
|
84
87
|
|
|
85
88
|
for atom in molecule.atoms:
|
|
@@ -90,7 +93,7 @@ class aiqm2(method_model, downloadable_model):
|
|
|
90
93
|
self.aiqm2_model.predict(
|
|
91
94
|
molecule=molecule,
|
|
92
95
|
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian,
|
|
93
|
-
calculate_dipole_derivatives=calculate_dipole_derivatives,
|
|
96
|
+
calculate_dipole_derivatives=calculate_dipole_derivatives,calculate_polarizability_derivatives=calculate_polarizability_derivatives,
|
|
94
97
|
)
|
|
95
98
|
|
|
96
99
|
molecule.__dict__[f'{self.model_name}_nn'].standard_deviation(properties=['energy'])
|
|
@@ -98,19 +101,32 @@ class aiqm2(method_model, downloadable_model):
|
|
|
98
101
|
def load(self):
|
|
99
102
|
from .models import methods
|
|
100
103
|
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
if self.model_name.lower() == 'aiqm2':
|
|
105
|
+
download_links = [
|
|
106
|
+
'https://zenodo.org/records/15383333/files/aiqm2_cc_model.zip?download=1',
|
|
107
|
+
'https://aitomistic.xyz/model/uaiqm_gfn2xtbstar_cc_20240106.zip']
|
|
108
|
+
model_dir = 'aiqm2_model'
|
|
109
|
+
model_files = [f'cv{ii}.pt' for ii in range(8)]
|
|
110
|
+
elif self.model_name.lower() in ['aiqm2atdft', 'aiqm2atdft*']:
|
|
111
|
+
download_links = [
|
|
112
|
+
'https://zenodo.org/records/15383333/files/aiqm2_dft_model.zip?download=1',
|
|
113
|
+
'https://aitomistic.xyz/model/uaiqm_gfn2xtbstar_dft_20240106.zip']
|
|
114
|
+
model_dir = 'aiqm2_dft_model'
|
|
115
|
+
model_files = [f'cv{ii}.pt' for ii in range(8)]
|
|
116
|
+
|
|
117
|
+
mlatom_model_dir, to_download = self.check_model_path(model_dir, model_files)
|
|
118
|
+
if to_download: self.download(download_links, mlatom_model_dir)
|
|
103
119
|
|
|
104
|
-
model_paths = [os.path.join(
|
|
120
|
+
model_paths = [os.path.join(mlatom_model_dir, model_files[ii]) for ii in range(8)]
|
|
105
121
|
|
|
106
122
|
baseline = model_tree_node(
|
|
107
123
|
name='gfn2xtbstar',
|
|
108
|
-
model=methods(method='GFN2-xTB*',
|
|
124
|
+
model=methods(method='GFN2-xTB*', working_directory=self.working_directory,**self.baseline_kwargs),
|
|
109
125
|
operator='predict'
|
|
110
126
|
)
|
|
111
127
|
d4 = model_tree_node(
|
|
112
128
|
name='d4wb97x',
|
|
113
|
-
model=methods(method='D4', functional='wb97x', working_directory=self.working_directory),
|
|
129
|
+
model=methods(method='D4', functional='wb97x', working_directory=self.working_directory, **self.dispersion_kwargs),
|
|
114
130
|
operator='predict'
|
|
115
131
|
)
|
|
116
132
|
from .interfaces.torchani_interface import ani
|
|
@@ -121,6 +137,8 @@ class aiqm2(method_model, downloadable_model):
|
|
|
121
137
|
def predict(self,**kwargs):
|
|
122
138
|
if 'calculate_dipole_derivatives' in kwargs.keys():
|
|
123
139
|
del kwargs['calculate_dipole_derivatives']
|
|
140
|
+
if 'calculate_polarizability_derivatives' in kwargs.keys():
|
|
141
|
+
del kwargs['calculate_polarizability_derivatives']
|
|
124
142
|
super().predict(**kwargs)
|
|
125
143
|
nn = model_tree_node(
|
|
126
144
|
name=f'{self.model_name}_nn',
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from . import data, models, constants
|
|
3
|
+
from .model_cls import method_model, model_tree_node, downloadable_model
|
|
4
|
+
|
|
5
|
+
class aiqm3(method_model, downloadable_model):
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
GFN2-xTB based artificial intelligence quantum-mechanical method 3 (AIQM3)
|
|
9
|
+
|
|
10
|
+
Arguments:
|
|
11
|
+
|
|
12
|
+
method (str, optional): Currently supports AIQM3, AIQM3@DFT, AIQM3@DFT*
|
|
13
|
+
working_directory (str, optional): The path to save temporary calculation file. By default, current directory will be choosed.
|
|
14
|
+
baseline_kwargs (dict, optional): Keywords passed to GFN2-xTB
|
|
15
|
+
dispersion_kwargs (dict, optional):
|
|
16
|
+
|
|
17
|
+
.. code-block::
|
|
18
|
+
|
|
19
|
+
# Initialize molecule
|
|
20
|
+
mol = ml.data.molecule()
|
|
21
|
+
mol.read_from_xyz_file(filename='ethanol.xyz')
|
|
22
|
+
# Run AIQM2 calculation
|
|
23
|
+
aiqm3 = ml.methods(method='aiqm3')
|
|
24
|
+
aiqm3.predict(molecule=mol, calculate_energy=True, calculate_energy_gradients=True, calculate_hessian=True)
|
|
25
|
+
# Get energy, gradient, and uncertainty of AIQM2
|
|
26
|
+
energy = mol.energy
|
|
27
|
+
gradient = mol.get_energy_gradients()
|
|
28
|
+
hess = mol.hessian
|
|
29
|
+
std = mol.aiqm3_model_nn.energy_standard_deviation
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
supported_methods = ['AIQM3', 'AIQM3@DFT', 'AIQM3@DFT*']
|
|
34
|
+
|
|
35
|
+
def __init__(
|
|
36
|
+
self,
|
|
37
|
+
method: str = 'AIQM3',
|
|
38
|
+
working_directory: str = None,
|
|
39
|
+
baseline_kwargs: dict = None,
|
|
40
|
+
dispersion_kwargs: dict = None,
|
|
41
|
+
nthreads: int = 1
|
|
42
|
+
):
|
|
43
|
+
|
|
44
|
+
self.method = method.lower()
|
|
45
|
+
self.model_name = self.method.replace('@','at')
|
|
46
|
+
self.working_directory = working_directory
|
|
47
|
+
if baseline_kwargs is None: self.baseline_kwargs = {}
|
|
48
|
+
else: self.baseline_kwargs = baseline_kwargs
|
|
49
|
+
if dispersion_kwargs is None: self.dispersion_kwargs = {}
|
|
50
|
+
else: self.dispersion_kwargs = dispersion_kwargs
|
|
51
|
+
|
|
52
|
+
self.load()
|
|
53
|
+
self.nthreads = nthreads
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def nthreads(self):
|
|
57
|
+
return self._nthreads
|
|
58
|
+
|
|
59
|
+
@nthreads.setter
|
|
60
|
+
def nthreads(self, value):
|
|
61
|
+
self._nthreads = value
|
|
62
|
+
self.aiqm3_model.nthreads = self._nthreads
|
|
63
|
+
|
|
64
|
+
def predict(
|
|
65
|
+
self,
|
|
66
|
+
molecular_database=None,
|
|
67
|
+
molecule=None,
|
|
68
|
+
calculate_energy=True,
|
|
69
|
+
calculate_energy_gradients=False,
|
|
70
|
+
calculate_hessian=False,
|
|
71
|
+
calculate_dipole_derivatives=False,
|
|
72
|
+
):
|
|
73
|
+
|
|
74
|
+
molDB = super().predict(molecular_database=molecular_database, molecule=molecule)
|
|
75
|
+
for mol in molDB.molecules:
|
|
76
|
+
self.predict_for_molecule(molecule=mol,
|
|
77
|
+
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian,
|
|
78
|
+
calculate_dipole_derivatives=calculate_dipole_derivatives)
|
|
79
|
+
|
|
80
|
+
def predict_for_molecule( # no specific treatment to atomic energies currently
|
|
81
|
+
self,
|
|
82
|
+
molecule=None,
|
|
83
|
+
calculate_energy=True,
|
|
84
|
+
calculate_energy_gradients=False,
|
|
85
|
+
calculate_hessian=False,
|
|
86
|
+
calculate_dipole_derivatives=False,
|
|
87
|
+
):
|
|
88
|
+
|
|
89
|
+
for atom in molecule.atoms:
|
|
90
|
+
if not atom.atomic_number in [1, 6, 7, 8, 9, 16, 17 ]:
|
|
91
|
+
errmsg = ' * Warning * Molecule contains elements other than H, C, N, O, F, S, Cl, no calculations performed'
|
|
92
|
+
raise ValueError(errmsg)
|
|
93
|
+
|
|
94
|
+
self.aiqm3_model.predict(
|
|
95
|
+
molecule=molecule,
|
|
96
|
+
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian,
|
|
97
|
+
calculate_dipole_derivatives=calculate_dipole_derivatives,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
molecule.__dict__[f'{self.model_name}_nn'].standard_deviation(properties=['energy'])
|
|
101
|
+
|
|
102
|
+
def load(self):
|
|
103
|
+
from .models import methods
|
|
104
|
+
|
|
105
|
+
if self.model_name.lower() == 'aiqm3':
|
|
106
|
+
download_links = [
|
|
107
|
+
'https://zenodo.org/records/15876694/files/aiqm3_cc_model.zip?download=1',
|
|
108
|
+
'https://aitomistic.xyz/model/uaiqm_gfn2xtbstar_cc_20250115.zip']
|
|
109
|
+
model_dir = 'aiqm3_model'
|
|
110
|
+
model_files = [f'cv{ii}.pt' for ii in range(8)]
|
|
111
|
+
|
|
112
|
+
elif self.model_name.lower() in ['aiqm3atdft', 'aiqm3atdft*']:
|
|
113
|
+
download_links = [
|
|
114
|
+
'https://zenodo.org/records/15876694/files/aiqm3_dft_model.zip?download=1',
|
|
115
|
+
'https://aitomistic.xyz/model/uaiqm_gfn2xtbstar_dft_20240619.zip']
|
|
116
|
+
model_dir = 'aiqm3_dft_model'
|
|
117
|
+
model_files = [f'cv{ii}.pt' for ii in range(8)]
|
|
118
|
+
|
|
119
|
+
mlatom_model_dir, to_download = self.check_model_path(model_dir, model_files)
|
|
120
|
+
if to_download: self.download(download_links, mlatom_model_dir)
|
|
121
|
+
|
|
122
|
+
model_paths = [os.path.join(mlatom_model_dir, model_files[ii]) for ii in range(8)]
|
|
123
|
+
|
|
124
|
+
baseline = model_tree_node(
|
|
125
|
+
name='gfn2xtbstar',
|
|
126
|
+
model=methods(method='GFN2-xTB*', working_directory=self.working_directory, **self.baseline_kwargs),
|
|
127
|
+
operator='predict'
|
|
128
|
+
)
|
|
129
|
+
d3 = model_tree_node(
|
|
130
|
+
name='d3b973c',
|
|
131
|
+
model=methods(method='d3bj', functional='b973c', working_directory=self.working_directory, **self.dispersion_kwargs),
|
|
132
|
+
operator='predict'
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
from .interfaces.torchani_interface import ani
|
|
136
|
+
class ani_wrapper(ani):
|
|
137
|
+
def __init__(self,**kwargs):
|
|
138
|
+
super().__init__(**kwargs)
|
|
139
|
+
|
|
140
|
+
def predict(self,**kwargs):
|
|
141
|
+
if 'calculate_dipole_derivatives' in kwargs.keys():
|
|
142
|
+
del kwargs['calculate_dipole_derivatives']
|
|
143
|
+
super().predict(**kwargs)
|
|
144
|
+
|
|
145
|
+
nn = model_tree_node(
|
|
146
|
+
name=f'{self.model_name}_nn',
|
|
147
|
+
children=[
|
|
148
|
+
model_tree_node(
|
|
149
|
+
name=f'{self.model_name}_nn_{ii}',
|
|
150
|
+
model=ani_wrapper(
|
|
151
|
+
model_file=model_paths[ii],
|
|
152
|
+
verbose=0),
|
|
153
|
+
operator='predict'
|
|
154
|
+
) for ii in range(8)
|
|
155
|
+
],
|
|
156
|
+
operator='average'
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
self.aiqm3_model = model_tree_node(
|
|
160
|
+
name=self.model_name,
|
|
161
|
+
children=[baseline, nn, d3],
|
|
162
|
+
operator='sum'
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
Binary file
|
|
@@ -22,6 +22,7 @@ def gen_ts_ects(
|
|
|
22
22
|
|
|
23
23
|
# check device and set local rank
|
|
24
24
|
import torch
|
|
25
|
+
torch.set_default_dtype(torch.float32)
|
|
25
26
|
if 'device' in program_kwargs: device = program_kwargs['device']
|
|
26
27
|
else: device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
27
28
|
if device.lower() not in ['cuda', 'cpu']:
|
|
@@ -43,7 +44,7 @@ def gen_ts_ects(
|
|
|
43
44
|
|
|
44
45
|
# load module
|
|
45
46
|
from EcTs.comparm import GP,Loaddict2obj
|
|
46
|
-
from EcTs.utils import xyz2mol
|
|
47
|
+
from EcTs.utils import xyz2mol, xyz2AC
|
|
47
48
|
from EcTs.graphs import RP_pair
|
|
48
49
|
from EcTs.model import EcTs_Model
|
|
49
50
|
|
|
@@ -56,7 +57,13 @@ def gen_ts_ects(
|
|
|
56
57
|
|
|
57
58
|
rmol = xyz2mol(ratoms,rxyz,charge=rcharge)[0]
|
|
58
59
|
pmol = xyz2mol(patoms,pxyz,charge=pcharge)[0]
|
|
59
|
-
|
|
60
|
+
radjs,rmol=xyz2AC(ratoms,rxyz,charge=rcharge)
|
|
61
|
+
padjs,pmol=xyz2AC(patoms,pxyz,charge=pcharge)
|
|
62
|
+
rp_pair = RP_pair(
|
|
63
|
+
rmol=rmol,pmol=pmol,
|
|
64
|
+
radjs=radjs, padjs=padjs,
|
|
65
|
+
rcoords=rxyz, pcoords=pxyz,
|
|
66
|
+
idx='ects')
|
|
60
67
|
|
|
61
68
|
ects_model = EcTs_Model(modelname="EcTs_Model",local_rank=local_rank)
|
|
62
69
|
|
|
@@ -143,6 +143,8 @@ def printHeader(args):
|
|
|
143
143
|
if args.method:
|
|
144
144
|
if 'DM21' in args.method.upper():
|
|
145
145
|
refItems['DM21'] = refs['DM21']
|
|
146
|
+
if 'mace-off' in args.method.lower():
|
|
147
|
+
refItems['MACE-OFF'] = refs['MACE-OFF']
|
|
146
148
|
|
|
147
149
|
if args.ani1xnr:
|
|
148
150
|
refItems['ANI-1xnr'] = refs['ANI-1xnr']
|