mlatom 3.2.0__tar.gz → 3.3.0__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.2.0/src/mlatom.egg-info → mlatom-3.3.0}/PKG-INFO +4 -4
- {mlatom-3.2.0 → mlatom-3.3.0}/README.md +3 -3
- {mlatom-3.2.0 → mlatom-3.3.0}/setup.py +1 -1
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatom.py +5 -9
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/__init__.py +1 -1
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1.py +92 -69
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/data.py +118 -0
- mlatom-3.3.0/src/mlatom/initial_conditions.py +551 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/__init__.py +8 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/ase_interface.py +6 -8
- mlatom-3.3.0/src/mlatom/interfaces/columbus_interface.py +157 -0
- mlatom-3.3.0/src/mlatom/interfaces/dftd4_interface.py +127 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/gaussian_interface.py +47 -31
- mlatom-3.3.0/src/mlatom/interfaces/mndo_interface.py +435 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/orca_interface.py +2 -2
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/torchani_interface.py +2 -1
- mlatom-3.3.0/src/mlatom/interfaces/turbomole_interface.py +213 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/kreg_api.py +3 -10
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/md.py +8 -19
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/md2vibr.py +9 -9
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/models.py +80 -31
- mlatom-3.3.0/src/mlatom/namd.py +498 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/simulations.py +100 -41
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/utils.py +148 -0
- {mlatom-3.2.0 → mlatom-3.3.0/src/mlatom.egg-info}/PKG-INFO +4 -4
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom.egg-info/SOURCES.txt +3 -0
- mlatom-3.2.0/src/mlatom/initial_conditions.py +0 -221
- mlatom-3.2.0/src/mlatom/interfaces/dftd4_interface.py +0 -120
- mlatom-3.2.0/src/mlatom/interfaces/mndo_interface.py +0 -187
- {mlatom-3.2.0 → mlatom-3.3.0}/LICENSE.txt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/setup.cfg +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLTPA.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/ML_NEA.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/A_KRR.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/A_KRR_kernel.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/D_CoulombMatrix.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/D_ID.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/D_rel2eq.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/MLatomF.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/MLatomFInfo.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/MLmodel.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/Makefile +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/Makefile.intel +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/__init__.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/analyze.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/constants.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/cs.cpp +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/dataset.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/mathUtils.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/molDescr.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/optionsModule.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/precision.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/recover.sh +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/sampling.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/statistics.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/stopper.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/strings.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/timing.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/types.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/MLtasks.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/__init__.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv0.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv1.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv2.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv3.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv4.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv5.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv6.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv7.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv0.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv1.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv2.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv3.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv4.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv5.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv6.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv7.pt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/args_class.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/ccsdtstarcbs.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/composite_methods.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/constants.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/conversions.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/cs.so +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/decorators.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/doc.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/fortran/KREG.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/fortran/__init__.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/fortran/compile.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/fortran/mathUtils.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/fortran/stopper.f90 +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/header.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interface_MLatomF.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/dpmd_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/gap_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/mace_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/physnet_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/pyscf_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/sgdml_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/sparrow_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/interfaces/xtb_interface.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/log.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/md2vibr_cmd.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/md_cmd.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/mlatom_gui.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/mltpa/__init__.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/mltpa/mff.txt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/mltpa/mltpa2022_2.pkl +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/mltpa/mltpa2022_2_new_.pkl +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/plot.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/ref.json +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/shell_cmd.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/sliceData.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/stats.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/stopper.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/thermostat.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom/xyz.py +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom.egg-info/dependency_links.txt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom.egg-info/entry_points.txt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/src/mlatom.egg-info/requires.txt +0 -0
- {mlatom-3.2.0 → mlatom-3.3.0}/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.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: A Package for Atomistic Simulations with Machine Learning
|
|
5
5
|
Home-page: http://mlatom.com
|
|
6
6
|
Author: Pavlo O. Dral
|
|
@@ -27,7 +27,7 @@ Requires-Dist: tqdm
|
|
|
27
27
|
# About Program
|
|
28
28
|
MLatom: a Package for Atomistic Simulations with Machine Learning
|
|
29
29
|
|
|
30
|
-
Version 3.
|
|
30
|
+
Version 3.3.0
|
|
31
31
|
|
|
32
32
|
**Official website**: http://mlatom.com/
|
|
33
33
|
**Manual**: http://mlatom.com/manual/
|
|
@@ -60,7 +60,7 @@ When this Software or its derivatives are used in scientific publications, it sh
|
|
|
60
60
|
* 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.
|
|
61
61
|
* 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.
|
|
62
62
|
* 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.
|
|
63
|
-
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Lina Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.
|
|
63
|
+
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Lina Zhang, Arif Ullah, Quanhao Zhang, Sebastian V. Pios, Yanchi Ou, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.3.0, Xiamen University, Xiamen, China, 2013-2024.
|
|
64
64
|
[MLatom.com](http://mlatom.com).
|
|
65
65
|
|
|
66
66
|
The citations for MLatom's interfaces and features shall be eventually
|
|
@@ -109,7 +109,7 @@ Citations mentioned above should be included. For convenience, below we provide
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
@misc{MLatomProg,
|
|
112
|
-
author = {Dral, Pavlo O. and Ge, Fuchun and Hou, Yi-Fan and Zheng, Peikun and Chen, Yuxinxin and Xue, Bao-Xin and Pinheiro Jr, Max and Su, Yuming and Dai, Yiheng and Chen, Yangtao and Zhang, Shuang and Zhang, Lina and Ullah, Arif and Zhang, Quanhao and Ou, Yanchi},
|
|
112
|
+
author = {Dral, Pavlo O. and Ge, Fuchun and Hou, Yi-Fan and Zheng, Peikun and Chen, Yuxinxin and Xue, Bao-Xin and Pinheiro Jr, Max and Su, Yuming and Dai, Yiheng and Chen, Yangtao and Zhang, Shuang and Zhang, Lina and Ullah, Arif and Zhang, Quanhao and Pios, Sebastian V. and Ou, Yanchi},
|
|
113
113
|
title = {MLatom: A Package for Atomistic Simulations with Machine Learning},
|
|
114
114
|
year = {2013--2024},
|
|
115
115
|
type = {Computer Program}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# About Program
|
|
2
2
|
MLatom: a Package for Atomistic Simulations with Machine Learning
|
|
3
3
|
|
|
4
|
-
Version 3.
|
|
4
|
+
Version 3.3.0
|
|
5
5
|
|
|
6
6
|
**Official website**: http://mlatom.com/
|
|
7
7
|
**Manual**: http://mlatom.com/manual/
|
|
@@ -34,7 +34,7 @@ When this Software or its derivatives are used in scientific publications, it sh
|
|
|
34
34
|
* 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.
|
|
35
35
|
* 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.
|
|
36
36
|
* 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.
|
|
37
|
-
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Lina Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.
|
|
37
|
+
* Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, Lina Zhang, Arif Ullah, Quanhao Zhang, Sebastian V. Pios, Yanchi Ou, MLatom: A Package for Atomistic Simulations with Machine Learning, version 3.3.0, Xiamen University, Xiamen, China, 2013-2024.
|
|
38
38
|
[MLatom.com](http://mlatom.com).
|
|
39
39
|
|
|
40
40
|
The citations for MLatom's interfaces and features shall be eventually
|
|
@@ -83,7 +83,7 @@ Citations mentioned above should be included. For convenience, below we provide
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
@misc{MLatomProg,
|
|
86
|
-
author = {Dral, Pavlo O. and Ge, Fuchun and Hou, Yi-Fan and Zheng, Peikun and Chen, Yuxinxin and Xue, Bao-Xin and Pinheiro Jr, Max and Su, Yuming and Dai, Yiheng and Chen, Yangtao and Zhang, Shuang and Zhang, Lina and Ullah, Arif and Zhang, Quanhao and Ou, Yanchi},
|
|
86
|
+
author = {Dral, Pavlo O. and Ge, Fuchun and Hou, Yi-Fan and Zheng, Peikun and Chen, Yuxinxin and Xue, Bao-Xin and Pinheiro Jr, Max and Su, Yuming and Dai, Yiheng and Chen, Yangtao and Zhang, Shuang and Zhang, Lina and Ullah, Arif and Zhang, Quanhao and Pios, Sebastian V. and Ou, Yanchi},
|
|
87
87
|
title = {MLatom: A Package for Atomistic Simulations with Machine Learning},
|
|
88
88
|
year = {2013--2024},
|
|
89
89
|
type = {Computer Program}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
!---------------------------------------------------------------------------!
|
|
5
5
|
! !
|
|
6
6
|
! MLatom: a Package for Atomistic Simulations with Machine Learning !
|
|
7
|
-
! MLatom 3.
|
|
7
|
+
! MLatom 3.3.0 !
|
|
8
8
|
! @ !
|
|
9
9
|
! Xiamen Atomistic Computing Suite (XACS) !
|
|
10
10
|
! !
|
|
@@ -32,15 +32,11 @@
|
|
|
32
32
|
! Shuang Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou. !
|
|
33
33
|
! J. Chem. Theory Comput. 2024, 20, 1193-1213. !
|
|
34
34
|
! !
|
|
35
|
-
! Pavlo O. Dral, Fuchun Ge,
|
|
36
|
-
!
|
|
37
|
-
!
|
|
38
|
-
! !
|
|
39
|
-
! Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, !
|
|
40
|
-
! Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, !
|
|
41
|
-
! Shuang Zhang, Lina Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou, !
|
|
35
|
+
! Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, Bao-Xin!
|
|
36
|
+
! Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Shuang Zhang, !
|
|
37
|
+
! Lina Zhang, Arif Ullah, Quanhao Zhang, Sebastian V. Pios, Yanchi Ou, !
|
|
42
38
|
! MLatom: A Package for Atomistic Simulations with Machine Learning, !
|
|
43
|
-
! version 3.
|
|
39
|
+
! version 3.3.0, Xiamen University, Xiamen, China, 2013-2024. !
|
|
44
40
|
! !
|
|
45
41
|
! The citations for MLatom's interfaces and features shall be eventually !
|
|
46
42
|
! included too. See header.py, ref.json and http://mlatom.com. !
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
from . import data, models, plot, simulations, stats, xyz
|
|
2
|
+
from . import data, models, plot, simulations, stats, xyz, namd, constants
|
|
3
3
|
from .simulations import optimize_geometry, irc, freq, thermochemistry, md, generate_initial_conditions, vibrational_spectrum
|
|
4
4
|
from .data import atom, molecule, molecular_database
|
|
5
5
|
from .models import methods
|
|
@@ -11,16 +11,13 @@ import numpy as np
|
|
|
11
11
|
import os
|
|
12
12
|
from . import data, models, stopper
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
from torchani.utils import ChemicalSymbolsToInts
|
|
18
|
-
except:
|
|
19
|
-
raise ValueError('Please install all Python modules required for TorchANI')
|
|
14
|
+
import torch
|
|
15
|
+
import torchani
|
|
16
|
+
from torchani.utils import ChemicalSymbolsToInts
|
|
20
17
|
|
|
21
18
|
class aiqm1(models.torchani_model):
|
|
22
19
|
"""
|
|
23
|
-
The Artificial intelligence
|
|
20
|
+
The Artificial intelligence-quantum mechanical method as in the `AIQM1 paper`_.
|
|
24
21
|
|
|
25
22
|
Arguments:
|
|
26
23
|
method (str, optional): AIQM method used. Currently supports AIQM1, AIQM1\@DFT*, and AIQM1\@DFT. Default value: AIQM1.
|
|
@@ -69,50 +66,66 @@ class aiqm1(models.torchani_model):
|
|
|
69
66
|
self.aiqm1_model = models.model_tree_node(name=modelname, children=aiqm1_children, operator='sum')
|
|
70
67
|
|
|
71
68
|
def predict(self, molecular_database=None, molecule=None,
|
|
72
|
-
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False):
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
elif molecule != None:
|
|
76
|
-
molDB = data.molecular_database()
|
|
77
|
-
molDB.molecules.append(molecule)
|
|
78
|
-
else:
|
|
79
|
-
errmsg = 'Either molecule or molecular_database should be provided in input'
|
|
80
|
-
raise ValueError(errmsg)
|
|
81
|
-
|
|
69
|
+
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False, nstates=1, current_state=0, **kwargs):
|
|
70
|
+
molDB = super().predict(molecular_database=molecular_database, molecule=molecule)
|
|
71
|
+
if 'nthreads' in self.__dict__: self.aiqm1_model.nthreads = self.nthreads
|
|
82
72
|
for mol in molDB.molecules:
|
|
83
73
|
self.predict_for_molecule(molecule=mol,
|
|
84
|
-
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian
|
|
74
|
+
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian, nstates=nstates,
|
|
75
|
+
current_state=current_state,
|
|
76
|
+
**kwargs)
|
|
85
77
|
|
|
86
78
|
def predict_for_molecule(self, molecule=None,
|
|
87
|
-
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False):
|
|
79
|
+
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False, nstates=1, current_state=0, **kwargs):
|
|
88
80
|
|
|
89
81
|
for atom in molecule.atoms:
|
|
90
82
|
if not atom.atomic_number in [1, 6, 7, 8]:
|
|
91
83
|
print(' * Warning * Molecule contains elements other than CHNO, no calculations performed')
|
|
92
84
|
return
|
|
93
85
|
|
|
86
|
+
if nstates >1:
|
|
87
|
+
mol_copy = molecule.copy()
|
|
88
|
+
mol_copy.electronic_states = []
|
|
89
|
+
for _ in range(nstates - len(molecule.electronic_states)):
|
|
90
|
+
molecule.electronic_states.append(mol_copy.copy())
|
|
91
|
+
|
|
92
|
+
# for molecule in molecules:
|
|
94
93
|
if len(molecule.atoms) == 1:
|
|
95
94
|
molecule.energy = self.atomic_energies[self.method][molecule.atoms[0].atomic_number]
|
|
96
95
|
standard_atom = data.atom(atomic_number=molecule.atoms[0].atomic_number)
|
|
97
96
|
if molecule.charge != 0 or molecule.multiplicity != standard_atom.multiplicity:
|
|
98
97
|
odm2model = models.methods(method='ODM2*', program=self.qm_program)
|
|
99
98
|
mol_odm2 = molecule.copy()
|
|
100
|
-
odm2model.predict(molecule=mol_odm2)
|
|
99
|
+
odm2model.predict(molecule=mol_odm2, nstates=nstates, **kwargs)
|
|
101
100
|
mol_standard_odm2 = molecule.copy() ; mol_standard_odm2.charge = 0; mol_standard_odm2.multiplicity=standard_atom.multiplicity
|
|
102
|
-
odm2model.predict(molecule=mol_standard_odm2)
|
|
101
|
+
odm2model.predict(molecule=mol_standard_odm2, nstates=nstates, **kwargs)
|
|
103
102
|
molecule.energy = molecule.energy + mol_odm2.energy - mol_standard_odm2.energy
|
|
104
103
|
else:
|
|
104
|
+
if nstates > 1 and isinstance(calculate_energy_gradients, list):
|
|
105
|
+
if any(calculate_energy_gradients):
|
|
106
|
+
calculate_energy_gradients = [True] * nstates
|
|
105
107
|
self.aiqm1_model.predict(molecule=molecule,
|
|
106
|
-
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian
|
|
108
|
+
calculate_energy=calculate_energy, calculate_energy_gradients=calculate_energy_gradients, calculate_hessian=calculate_hessian, nstates=nstates,
|
|
109
|
+
current_state=current_state,
|
|
110
|
+
**kwargs)
|
|
107
111
|
|
|
108
112
|
properties = [] ; atomic_properties = []
|
|
113
|
+
|
|
114
|
+
calculate_energy_gradients = bool(np.array(calculate_energy_gradients).any())
|
|
115
|
+
calculate_hessian = bool(np.array(calculate_hessian).any())
|
|
109
116
|
if calculate_energy: properties.append('energy')
|
|
110
117
|
if calculate_energy_gradients: atomic_properties.append('energy_gradients')
|
|
111
118
|
if calculate_hessian: properties.append('hessian')
|
|
112
119
|
modelname = self.method.lower().replace('*','star').replace('@','at')
|
|
113
|
-
molecule.__dict__[f'{modelname}_nn'].standard_deviation(properties=properties+atomic_properties)
|
|
114
120
|
|
|
115
|
-
|
|
121
|
+
if nstates >1:
|
|
122
|
+
for mol_el_st in molecule.electronic_states:
|
|
123
|
+
mol_el_st.__dict__[f'{modelname}_nn'].standard_deviation(properties=properties+atomic_properties)
|
|
124
|
+
else:
|
|
125
|
+
molecule.__dict__[f'{modelname}_nn'].standard_deviation(properties=properties+atomic_properties)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class atomic_energy_shift(models.model):
|
|
116
129
|
atomic_energy_shifts = {'AIQM1': {1: -4.29365862e-02, 6: -3.34329586e+01, 7: -4.69301173e+01, 8: -6.29634763e+01},
|
|
117
130
|
'AIQM1@DFT': {1: -4.27888067e-02, 6: -3.34869833e+01, 7: -4.69896148e+01, 8: -6.30294433e+01}}
|
|
118
131
|
atomic_energy_shifts['AIQM1@DFT*'] = atomic_energy_shifts['AIQM1@DFT']
|
|
@@ -121,30 +134,35 @@ class atomic_energy_shift():
|
|
|
121
134
|
self.method = method
|
|
122
135
|
|
|
123
136
|
def predict(self, molecular_database=None, molecule=None,
|
|
124
|
-
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False):
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
molDB = data.molecular_database()
|
|
129
|
-
molDB.molecules.append(molecule)
|
|
130
|
-
else:
|
|
131
|
-
errmsg = 'Either molecule or molecular_database should be provided in input'
|
|
132
|
-
raise ValueError(errmsg)
|
|
137
|
+
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False, nstates=1, **kwargs):
|
|
138
|
+
molDB = super().predict(molecular_database=molecular_database, molecule=molecule)
|
|
139
|
+
calculate_energy_gradients = bool(np.array(calculate_energy_gradients).any())
|
|
140
|
+
calculate_hessian = bool(np.array(calculate_hessian).any())
|
|
133
141
|
|
|
134
142
|
for mol in molDB.molecules:
|
|
135
|
-
|
|
136
|
-
sae = 0.0
|
|
137
|
-
for atom in mol.atoms:
|
|
138
|
-
sae += self.atomic_energy_shifts[self.method][atom.atomic_number]
|
|
139
|
-
mol.energy = sae
|
|
140
|
-
if calculate_energy_gradients:
|
|
141
|
-
for atom in mol.atoms:
|
|
142
|
-
atom.energy_gradients = np.zeros(3)
|
|
143
|
-
if calculate_hessian:
|
|
144
|
-
ndim = len(mol.atoms) * 3
|
|
145
|
-
mol.hessian = np.zeros(ndim*ndim).reshape(ndim,ndim)
|
|
143
|
+
molecules = [mol]
|
|
146
144
|
|
|
147
|
-
|
|
145
|
+
if nstates >1:
|
|
146
|
+
mol_copy = mol.copy()
|
|
147
|
+
mol_copy.electronic_states = []
|
|
148
|
+
for _ in range(nstates - len(mol.electronic_states)):
|
|
149
|
+
mol.electronic_states.append(mol_copy.copy())
|
|
150
|
+
molecules = mol.electronic_states
|
|
151
|
+
|
|
152
|
+
for mol in molecules:
|
|
153
|
+
if calculate_energy:
|
|
154
|
+
sae = 0.0
|
|
155
|
+
for atom in mol.atoms:
|
|
156
|
+
sae += self.atomic_energy_shifts[self.method][atom.atomic_number]
|
|
157
|
+
mol.energy = sae
|
|
158
|
+
if calculate_energy_gradients:
|
|
159
|
+
for atom in mol.atoms:
|
|
160
|
+
atom.energy_gradients = np.zeros(3)
|
|
161
|
+
if calculate_hessian:
|
|
162
|
+
ndim = len(mol.atoms) * 3
|
|
163
|
+
mol.hessian = np.zeros(ndim*ndim).reshape(ndim,ndim)
|
|
164
|
+
|
|
165
|
+
class ani_nns_in_aiqm1(models.torchani_model):
|
|
148
166
|
species_order = [1, 6, 7, 8]
|
|
149
167
|
|
|
150
168
|
def __init__(self, method='AIQM1', model_index = 0):
|
|
@@ -225,34 +243,39 @@ class ani_nns_in_aiqm1():
|
|
|
225
243
|
self.nn = nn
|
|
226
244
|
|
|
227
245
|
def predict(self, molecular_database=None, molecule=None,
|
|
228
|
-
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False):
|
|
229
|
-
|
|
230
|
-
molDB = molecular_database
|
|
231
|
-
elif molecule != None:
|
|
232
|
-
molDB = data.molecular_database()
|
|
233
|
-
molDB.molecules.append(molecule)
|
|
234
|
-
else:
|
|
235
|
-
errmsg = 'Either molecule or molecular_database should be provided in input'
|
|
236
|
-
raise ValueError(errmsg)
|
|
246
|
+
calculate_energy=True, calculate_energy_gradients=False, calculate_hessian=False, nstates=1, **kwargs):
|
|
247
|
+
molDB = super().predict(molecular_database=molecular_database, molecule=molecule)
|
|
237
248
|
|
|
249
|
+
calculate_energy_gradients = bool(np.array(calculate_energy_gradients).any())
|
|
250
|
+
calculate_hessian = bool(np.array(calculate_hessian).any())
|
|
238
251
|
species_to_tensor = ChemicalSymbolsToInts(self.species_order)
|
|
239
252
|
|
|
240
253
|
for mol in molDB.molecules:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
molecules = [mol]
|
|
255
|
+
|
|
256
|
+
if nstates >1:
|
|
257
|
+
mol_copy = mol.copy()
|
|
258
|
+
mol_copy.electronic_states = []
|
|
259
|
+
for _ in range(nstates - len(mol.electronic_states)):
|
|
260
|
+
mol.electronic_states.append(mol_copy.copy())
|
|
261
|
+
molecules = mol.electronic_states
|
|
262
|
+
|
|
263
|
+
for mol in molecules:
|
|
264
|
+
atomic_numbers = np.array([atom.atomic_number for atom in mol.atoms])
|
|
265
|
+
xyz_coordinates = torch.tensor(np.array(mol.xyz_coordinates).astype('float')).to(self.device).requires_grad_(calculate_energy_gradients or calculate_hessian)
|
|
266
|
+
xyz_coordinates = xyz_coordinates.unsqueeze(0)
|
|
267
|
+
species = species_to_tensor(atomic_numbers).to(self.device).unsqueeze(0)
|
|
268
|
+
ANI_NN_energy = self.model((species, xyz_coordinates)).energies
|
|
269
|
+
if calculate_energy: mol.energy = float(ANI_NN_energy)
|
|
270
|
+
if calculate_energy_gradients or calculate_hessian:
|
|
271
|
+
ANI_NN_energy_gradients = torch.autograd.grad(ANI_NN_energy.sum(), xyz_coordinates, create_graph=True, retain_graph=True)[0]
|
|
272
|
+
if calculate_energy_gradients:
|
|
273
|
+
grads = ANI_NN_energy_gradients[0].detach().cpu().numpy()
|
|
274
|
+
for iatom in range(len(mol.atoms)):
|
|
275
|
+
mol.atoms[iatom].energy_gradients = grads[iatom]
|
|
276
|
+
if calculate_hessian:
|
|
277
|
+
ANI_NN_hessian = torchani.utils.hessian(xyz_coordinates, energies=ANI_NN_energy)
|
|
278
|
+
mol.hessian = ANI_NN_hessian[0].detach().cpu().numpy()
|
|
256
279
|
|
|
257
280
|
if __name__ == '__main__':
|
|
258
281
|
pass
|
|
@@ -125,6 +125,8 @@ class molecule:
|
|
|
125
125
|
self.atoms = []
|
|
126
126
|
else:
|
|
127
127
|
self.atoms = atoms
|
|
128
|
+
|
|
129
|
+
self.electronic_states = []
|
|
128
130
|
|
|
129
131
|
def read_from_xyz_file(self, filename: str, format: Union[str, None] = None) -> molecule:
|
|
130
132
|
'''
|
|
@@ -137,6 +139,8 @@ class molecule:
|
|
|
137
139
|
- ``'COLUMBUS'``
|
|
138
140
|
|
|
139
141
|
- ``'NEWTON-X'`` or ``'NX'``
|
|
142
|
+
|
|
143
|
+
- ``'turbomol'``
|
|
140
144
|
|
|
141
145
|
Arguments:
|
|
142
146
|
filename (str): The name of the file to be read.
|
|
@@ -159,6 +163,8 @@ class molecule:
|
|
|
159
163
|
|
|
160
164
|
- ``'NEWTON-X'`` or ``'NX'``
|
|
161
165
|
|
|
166
|
+
- ``'turbomol'``
|
|
167
|
+
|
|
162
168
|
Arguments:
|
|
163
169
|
string (str): The string input.
|
|
164
170
|
format (str, optional): The format of the string.
|
|
@@ -187,6 +193,15 @@ class molecule:
|
|
|
187
193
|
nuclear_charge=float(yy[1]),
|
|
188
194
|
xyz_coordinates=coords,
|
|
189
195
|
nuclear_mass=float(yy[-1])))
|
|
196
|
+
elif format.casefold() == 'turbomole':
|
|
197
|
+
for line in fxyz:
|
|
198
|
+
yy = line.split()
|
|
199
|
+
if len(yy) != 4:
|
|
200
|
+
continue
|
|
201
|
+
else:
|
|
202
|
+
coords = array([float(xx)*constants.Bohr2Angstrom for xx in yy[0:3]]).astype(float)
|
|
203
|
+
self.atoms.append(atom(element_symbol=yy[3].capitalize(),
|
|
204
|
+
xyz_coordinates=coords))
|
|
190
205
|
return self
|
|
191
206
|
|
|
192
207
|
def read_from_numpy(self, coordinates: np.ndarray, species: np.ndarray) -> molecule:
|
|
@@ -308,6 +323,8 @@ class molecule:
|
|
|
308
323
|
|
|
309
324
|
- ``'NEWTON-X'`` or ``'NX'``
|
|
310
325
|
|
|
326
|
+
- ``'turbomol'``
|
|
327
|
+
|
|
311
328
|
Arguments:
|
|
312
329
|
filename (str): The name of the file to be written.
|
|
313
330
|
format (str, optional): The format of the file.
|
|
@@ -330,6 +347,12 @@ class molecule:
|
|
|
330
347
|
atom.xyz_coordinates[1] * constants.Angstrom2Bohr,
|
|
331
348
|
atom.xyz_coordinates[2] * constants.Angstrom2Bohr,
|
|
332
349
|
atom.nuclear_mass))
|
|
350
|
+
elif format.casefold() in ['TURBOMOLE'.casefold()]:
|
|
351
|
+
fw.writelines('$coord\n')
|
|
352
|
+
for atom in self.atoms:
|
|
353
|
+
fw.writelines('%25.13f %25.13f %25.13f %-3s \n' % (atom.xyz_coordinates[0] * constants.Angstrom2Bohr, atom.xyz_coordinates[1] * constants.Angstrom2Bohr, atom.xyz_coordinates[2] * constants.Angstrom2Bohr, atom.element_symbol))
|
|
354
|
+
fw.writelines('$user-defined bonds\n')
|
|
355
|
+
fw.writelines('$end\n')
|
|
333
356
|
|
|
334
357
|
|
|
335
358
|
def get_xyz_string(self) -> str:
|
|
@@ -391,6 +414,14 @@ class molecule:
|
|
|
391
414
|
|
|
392
415
|
def get_energy_gradients(self):
|
|
393
416
|
return self.get_xyz_vectorial_properties('energy_gradients')
|
|
417
|
+
|
|
418
|
+
@property
|
|
419
|
+
def energy_gradients(self):
|
|
420
|
+
return self.get_energy_gradients()
|
|
421
|
+
|
|
422
|
+
@energy_gradients.setter
|
|
423
|
+
def energy_gradients(self, value):
|
|
424
|
+
self.add_xyz_derivative_property(value, property_name='energy', xyz_derivative_property='energy_gradients')
|
|
394
425
|
|
|
395
426
|
def get_number_of_atoms(self):
|
|
396
427
|
return len(self)
|
|
@@ -573,7 +604,35 @@ class molecule:
|
|
|
573
604
|
|
|
574
605
|
def __getitem__(self, item):
|
|
575
606
|
return self.atoms[item]
|
|
607
|
+
|
|
608
|
+
@property
|
|
609
|
+
def state_energies(self) -> np.ndarray:
|
|
610
|
+
'''
|
|
611
|
+
The electronic state energies of the molecule.
|
|
612
|
+
'''
|
|
613
|
+
return np.array([state.energy for state in self.electronic_states])
|
|
576
614
|
|
|
615
|
+
@property
|
|
616
|
+
def state_gradients(self) -> np.ndarray:
|
|
617
|
+
'''
|
|
618
|
+
The electronic state energy gradients of the molecule.
|
|
619
|
+
'''
|
|
620
|
+
return np.array([state.energy_gradients for state in self.electronic_states])
|
|
621
|
+
|
|
622
|
+
@property
|
|
623
|
+
def energy_gaps(self) -> np.ndarray:
|
|
624
|
+
'''
|
|
625
|
+
The energy gaps of different states.
|
|
626
|
+
'''
|
|
627
|
+
return self.state_energies - self.state_energies[:, np.newaxis]
|
|
628
|
+
|
|
629
|
+
@property
|
|
630
|
+
def excitation_energies(self) -> np.ndarray:
|
|
631
|
+
'''
|
|
632
|
+
The excitation energies of the molecule from ground state.
|
|
633
|
+
'''
|
|
634
|
+
return self.state_energies[1:] - self.electronic_states[0].energy if len(self.electronic_states) > 1 else []
|
|
635
|
+
|
|
577
636
|
class properties_tree_node():
|
|
578
637
|
def __init__(self, name=None, parent=None, children=None, properties=None):
|
|
579
638
|
self.name = name
|
|
@@ -1269,6 +1328,8 @@ def dict_to_molecule_class_instance(dd):
|
|
|
1269
1328
|
if key == 'atoms':
|
|
1270
1329
|
for aa in dd[key]:
|
|
1271
1330
|
mol.atoms.append(dict_to_atom_class_instance(aa))
|
|
1331
|
+
elif key == 'electronic_states':
|
|
1332
|
+
mol.electronic_states = [dict_to_molecule_class_instance(state_dict) for state_dict in dd[key]]
|
|
1272
1333
|
elif type(dd[key]) == dict:
|
|
1273
1334
|
if 'parent' in dd[key].keys():
|
|
1274
1335
|
dict_to_properties_tree_node_class_instance(dd, key, mol)
|
|
@@ -1330,6 +1391,13 @@ class molecular_trajectory():
|
|
|
1330
1391
|
'mass':None,
|
|
1331
1392
|
'species':None,
|
|
1332
1393
|
}
|
|
1394
|
+
data['state_energies'] = []
|
|
1395
|
+
data['state_gradients'] = []
|
|
1396
|
+
if 'nonadiabatic_coupling_vectors' in self.steps[0].molecule.atoms[0].__dict__: data['nonadiabatic_coupling_vectors'] = []
|
|
1397
|
+
data['random_number'] = []
|
|
1398
|
+
data['hopping_probabilities'] = []
|
|
1399
|
+
if 'current_state' in self.steps[0].__dict__: data['current_state'] = []
|
|
1400
|
+
#'state_gradients'
|
|
1333
1401
|
dp_flag = True
|
|
1334
1402
|
for istep in self.steps:
|
|
1335
1403
|
if not 'dipole_moment' in istep.molecule.__dict__.keys():
|
|
@@ -1343,9 +1411,34 @@ class molecular_trajectory():
|
|
|
1343
1411
|
data['position'].append(istep.molecule.xyz_coordinates)
|
|
1344
1412
|
data['velocities'].append(istep.molecule.get_xyz_vectorial_properties('xyz_velocities'))
|
|
1345
1413
|
data['gradients'].append(istep.molecule.get_energy_gradients())
|
|
1414
|
+
if len(istep.molecule.electronic_states) > 1:
|
|
1415
|
+
data['state_energies'].append(istep.molecule.state_energies)
|
|
1416
|
+
state_gradients = []
|
|
1417
|
+
for i in range(0, len(istep.molecule.electronic_states)):
|
|
1418
|
+
if 'energy_gradients' in istep.molecule.electronic_states[i].atoms[0].__dict__:
|
|
1419
|
+
state_gradients.append(istep.molecule.electronic_states[i].get_energy_gradients())
|
|
1420
|
+
else:
|
|
1421
|
+
state_gradients.append(None)
|
|
1422
|
+
data['state_gradients'].append(np.array(state_gradients))
|
|
1423
|
+
if 'nonadiabatic_coupling_vectors' in data.keys(): data['nonadiabatic_coupling_vectors'].append(istep.molecule.get_xyz_vectorial_properties('nonadiabatic_coupling_vectors'))
|
|
1346
1424
|
data['kinetic_energy'].append(istep.molecule.kinetic_energy)
|
|
1347
1425
|
data['potential_energy'].append(istep.molecule.energy)
|
|
1348
1426
|
data['total_energy'].append(istep.molecule.kinetic_energy+istep.molecule.energy)
|
|
1427
|
+
if 'random_number' in data.keys():
|
|
1428
|
+
try:
|
|
1429
|
+
data['random_number'].append(istep.random_number)
|
|
1430
|
+
except AttributeError:
|
|
1431
|
+
data['random_number'].append(np.nan)
|
|
1432
|
+
if 'hopping_probabilities' in data.keys():
|
|
1433
|
+
try:
|
|
1434
|
+
data['hopping_probabilities'].append(max(istep.hopping_probabilities))
|
|
1435
|
+
except AttributeError:
|
|
1436
|
+
data['hopping_probabilities'].append(np.nan)
|
|
1437
|
+
if 'current_state' in data.keys():
|
|
1438
|
+
try:
|
|
1439
|
+
data['current_state'].append(istep.current_state)
|
|
1440
|
+
except AttributeError:
|
|
1441
|
+
data['current_state'].append(np.nan)
|
|
1349
1442
|
if dp_flag:
|
|
1350
1443
|
data['dipole_moment'].append(istep.molecule.dipole_moment)
|
|
1351
1444
|
with h5md(filename) as trajH5:
|
|
@@ -1394,6 +1487,22 @@ class molecular_trajectory():
|
|
|
1394
1487
|
# gradients
|
|
1395
1488
|
for iatom in range(Natoms):
|
|
1396
1489
|
molecule_istep.atoms[iatom].energy_gradients = data['gradients'][istep][iatom]
|
|
1490
|
+
|
|
1491
|
+
if 'state_energies' in data.keys():
|
|
1492
|
+
molecule_istep.electronic_states=[]
|
|
1493
|
+
molecule_istep.electronic_states.extend([molecule_istep.copy() for _ in range(len(data['state_energies'][istep]))])
|
|
1494
|
+
for i in range(0, len(data['state_energies'][istep])):
|
|
1495
|
+
molecule_istep.electronic_states[i].energy = data['state_energies'][istep][i]
|
|
1496
|
+
if 'state_gradients' in data.keys():
|
|
1497
|
+
if not molecule_istep.electronic_states:
|
|
1498
|
+
molecule_istep.electronic_states=[]
|
|
1499
|
+
molecule_istep.electronic_states.extend([molecule_istep.copy() for _ in range(len(data['state_gradients'][istep]))])
|
|
1500
|
+
for i in range(0, len(data['state_gradients'][istep])):
|
|
1501
|
+
if data['state_gradients'][istep][i] is not None:
|
|
1502
|
+
molecule_istep.electronic_states[i].add_xyz_derivative_property(np.array(data['state_gradients'][istep][i]).astype(float), 'energy', 'energy_gradients')
|
|
1503
|
+
if 'nonadiabatic_coupling_vectors' in data.keys():
|
|
1504
|
+
for iatom in range(Natoms):
|
|
1505
|
+
molecule_istep.atoms[iatom].nonadiabatic_coupling_vectors = data['nonadiabatic_coupling_vectors'][istep][iatom]
|
|
1397
1506
|
# kinetic_energy
|
|
1398
1507
|
# molecule_istep.kinetic_energy = data['kinetic_energy'][istep]
|
|
1399
1508
|
# potential_energy
|
|
@@ -1406,6 +1515,15 @@ class molecular_trajectory():
|
|
|
1406
1515
|
trajectory_step.molecule = molecule_istep
|
|
1407
1516
|
trajectory_step.step = istep
|
|
1408
1517
|
trajectory_step.time = data['time'][istep]
|
|
1518
|
+
# random_number
|
|
1519
|
+
if 'random_number' in data.keys():
|
|
1520
|
+
trajectory_step.random_number = data['random_number'][istep]
|
|
1521
|
+
# prob
|
|
1522
|
+
if 'hopping_probabilities' in data.keys():
|
|
1523
|
+
trajectory_step.hopping_probabilities = data['hopping_probabilities'][istep]
|
|
1524
|
+
# current_state
|
|
1525
|
+
if 'current_state' in data.keys():
|
|
1526
|
+
trajectory_step.current_state = data['current_state'][istep]
|
|
1409
1527
|
self.steps.append(trajectory_step)
|
|
1410
1528
|
|
|
1411
1529
|
elif format.casefold() == 'json'.casefold():
|