mlatom 3.1.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.
Files changed (129) hide show
  1. mlatom-3.3.0/PKG-INFO +116 -0
  2. mlatom-3.3.0/README.md +90 -0
  3. {mlatom-3.1.0 → mlatom-3.3.0}/setup.py +1 -1
  4. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatom.py +46 -57
  5. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLtasks.py +26 -11
  6. mlatom-3.3.0/src/mlatom/__init__.py +5 -0
  7. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1.py +92 -69
  8. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/args_class.py +6 -11
  9. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/conversions.py +5 -5
  10. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/data.py +151 -27
  11. mlatom-3.3.0/src/mlatom/decorators.py +61 -0
  12. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/doc.py +9 -15
  13. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/fortran/KREG.f90 +1 -1
  14. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/header.py +58 -2
  15. mlatom-3.3.0/src/mlatom/initial_conditions.py +551 -0
  16. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/__init__.py +12 -0
  17. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/ase_interface.py +82 -36
  18. mlatom-3.3.0/src/mlatom/interfaces/columbus_interface.py +157 -0
  19. mlatom-3.3.0/src/mlatom/interfaces/dftd4_interface.py +127 -0
  20. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/dpmd_interface.py +4 -1
  21. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/gap_interface.py +6 -3
  22. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/gaussian_interface.py +189 -42
  23. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/mace_interface.py +30 -6
  24. mlatom-3.3.0/src/mlatom/interfaces/mndo_interface.py +435 -0
  25. mlatom-3.3.0/src/mlatom/interfaces/orca_interface.py +276 -0
  26. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/physnet_interface.py +45 -44
  27. mlatom-3.3.0/src/mlatom/interfaces/pyscf_interface.py +368 -0
  28. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/sgdml_interface.py +23 -13
  29. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/sparrow_interface.py +22 -7
  30. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/torchani_interface.py +62 -46
  31. mlatom-3.3.0/src/mlatom/interfaces/turbomole_interface.py +213 -0
  32. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interfaces/xtb_interface.py +10 -2
  33. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/kreg_api.py +3 -10
  34. mlatom-3.3.0/src/mlatom/log.py +85 -0
  35. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/md.py +10 -21
  36. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/md2vibr.py +18 -12
  37. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/md2vibr_cmd.py +1 -1
  38. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/md_cmd.py +0 -2
  39. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/models.py +262 -163
  40. mlatom-3.3.0/src/mlatom/namd.py +498 -0
  41. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/plot.py +6 -7
  42. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/ref.json +2 -1
  43. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/simulations.py +258 -69
  44. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/thermostat.py +33 -11
  45. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/utils.py +145 -29
  46. mlatom-3.3.0/src/mlatom/xyz.py +65 -0
  47. mlatom-3.3.0/src/mlatom.egg-info/PKG-INFO +116 -0
  48. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom.egg-info/SOURCES.txt +5 -1
  49. mlatom-3.1.0/PKG-INFO +0 -214
  50. mlatom-3.1.0/README.md +0 -197
  51. mlatom-3.1.0/src/mlatom/__init__.py +0 -3
  52. mlatom-3.1.0/src/mlatom/environment_variables.py +0 -30
  53. mlatom-3.1.0/src/mlatom/initial_conditions.py +0 -213
  54. mlatom-3.1.0/src/mlatom/interfaces/dftd4_interface.py +0 -109
  55. mlatom-3.1.0/src/mlatom/interfaces/mndo_interface.py +0 -178
  56. mlatom-3.1.0/src/mlatom/interfaces/orca_interface.py +0 -167
  57. mlatom-3.1.0/src/mlatom/interfaces/pyscf_interface.py +0 -262
  58. mlatom-3.1.0/src/mlatom/xyz.py +0 -36
  59. mlatom-3.1.0/src/mlatom.egg-info/PKG-INFO +0 -214
  60. {mlatom-3.1.0 → mlatom-3.3.0}/LICENSE.txt +0 -0
  61. {mlatom-3.1.0 → mlatom-3.3.0}/setup.cfg +0 -0
  62. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLTPA.py +0 -0
  63. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/ML_NEA.py +0 -0
  64. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF +0 -0
  65. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/A_KRR.f90 +0 -0
  66. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/A_KRR_kernel.f90 +0 -0
  67. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/D_CoulombMatrix.f90 +0 -0
  68. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/D_ID.f90 +0 -0
  69. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/D_rel2eq.f90 +0 -0
  70. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/MLatomF.f90 +0 -0
  71. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/MLatomFInfo.f90 +0 -0
  72. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/MLmodel.f90 +0 -0
  73. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/Makefile +0 -0
  74. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/Makefile.intel +0 -0
  75. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/__init__.py +0 -0
  76. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/analyze.f90 +0 -0
  77. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/constants.f90 +0 -0
  78. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/cs.cpp +0 -0
  79. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/dataset.f90 +0 -0
  80. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/mathUtils.f90 +0 -0
  81. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/molDescr.f90 +0 -0
  82. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/optionsModule.f90 +0 -0
  83. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/precision.f90 +0 -0
  84. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/recover.sh +0 -0
  85. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/sampling.f90 +0 -0
  86. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/statistics.f90 +0 -0
  87. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/stopper.f90 +0 -0
  88. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/strings.f90 +0 -0
  89. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/timing.f90 +0 -0
  90. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/MLatomF_src/types.f90 +0 -0
  91. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/__init__.py +0 -0
  92. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv0.pt +0 -0
  93. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv1.pt +0 -0
  94. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv2.pt +0 -0
  95. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv3.pt +0 -0
  96. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv4.pt +0 -0
  97. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv5.pt +0 -0
  98. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv6.pt +0 -0
  99. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_cc_cv7.pt +0 -0
  100. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv0.pt +0 -0
  101. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv1.pt +0 -0
  102. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv2.pt +0 -0
  103. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv3.pt +0 -0
  104. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv4.pt +0 -0
  105. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv5.pt +0 -0
  106. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv6.pt +0 -0
  107. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/aiqm1_model/aiqm1_dft_cv7.pt +0 -0
  108. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/ccsdtstarcbs.py +0 -0
  109. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/composite_methods.py +0 -0
  110. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/constants.py +0 -0
  111. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/cs.so +0 -0
  112. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/fortran/__init__.py +0 -0
  113. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/fortran/compile.py +0 -0
  114. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/fortran/mathUtils.f90 +0 -0
  115. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/fortran/stopper.f90 +0 -0
  116. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/interface_MLatomF.py +0 -0
  117. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/mlatom_gui.py +0 -0
  118. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/mltpa/__init__.py +0 -0
  119. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/mltpa/mff.txt +0 -0
  120. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/mltpa/mltpa2022_2.pkl +0 -0
  121. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/mltpa/mltpa2022_2_new_.pkl +0 -0
  122. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/shell_cmd.py +0 -0
  123. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/sliceData.py +0 -0
  124. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/stats.py +0 -0
  125. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom/stopper.py +0 -0
  126. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom.egg-info/dependency_links.txt +0 -0
  127. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom.egg-info/entry_points.txt +0 -0
  128. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom.egg-info/requires.txt +0 -0
  129. {mlatom-3.1.0 → mlatom-3.3.0}/src/mlatom.egg-info/top_level.txt +0 -0
mlatom-3.3.0/PKG-INFO ADDED
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.1
2
+ Name: mlatom
3
+ Version: 3.3.0
4
+ Summary: A Package for Atomistic Simulations with Machine Learning
5
+ Home-page: http://mlatom.com
6
+ Author: Pavlo O. Dral
7
+ Author-email: admin@mlatom.com
8
+ License: MIT (modified)
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Fortran
12
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
13
+ Classifier: Environment :: Console
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
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
+
27
+ # About Program
28
+ MLatom: a Package for Atomistic Simulations with Machine Learning
29
+
30
+ Version 3.3.0
31
+
32
+ **Official website**: http://mlatom.com/
33
+ **Manual**: http://mlatom.com/manual/
34
+ **Tutorial**: http://mlatom.com/tutorial/
35
+
36
+ Copyright (c) 2013- Pavlo O. Dral
37
+ http://dr-dral.com/
38
+
39
+ MLatom is a software platform that enables AI-enhanced computational chemistry in a user-friendly manner as
40
+ it was written by computational chemists for computational chemists. MLatom allows to perform a wide range
41
+ of simulation tasks with a variety of machine learning and quantum mechanical models and their combinations,
42
+ through simple and intuitive input files, command line options, and Python API. The platform can be used
43
+ both as a ready-to-use tool for common computational chemistry simulations and as a Python library for
44
+ developing custom workflows. More information about MLatom and its developers is on [MLatom.com](http://mlatom.com).
45
+ MLatom can be also used on the [XACS cloud computing](https://XACScloud.com) platform.
46
+
47
+ # License and citations
48
+
49
+ ## License
50
+
51
+ MLatom is an open-source software under the [MIT license](https://opensource.org/license/mit/) (modified to request proper citations).
52
+
53
+ Copyright (c) 2013- Pavlo O. Dral (http://dr-dral.com/)
54
+
55
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
56
+
57
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
58
+ When this Software or its derivatives are used in scientific publications, it shall be cited as:
59
+
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
+ * 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
+ * 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, 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
+ [MLatom.com](http://mlatom.com).
65
+
66
+ The citations for MLatom's interfaces and features shall be eventually
67
+ included too. See program output, header.py, ref.json, and [MLatom.com](http://mlatom.com).
68
+
69
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
70
+
71
+ ## Citations
72
+ Citations mentioned above should be included. For convenience, below we provide the citations in the Bibtex format.
73
+
74
+
75
+ @article{MLatom 3,
76
+ author = {Dral, Pavlo O. and Ge, Fuchun and Hou, Yi-Fan and Zheng, Peikun and Chen, Yuxinxin and Barbatti, Mario and Isayev, Olexandr and Wang, Cheng 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},
77
+ title = {MLatom 3: A Platform for Machine Learning-Enhanced Computational Chemistry Simulations and Workflows},
78
+ journal = {J. Chem. Theory Comput.},
79
+ volume = {20},
80
+ number = {3},
81
+ pages = {1193--1213},
82
+ DOI = {10.1021/acs.jctc.3c01203},
83
+ year = {2024},
84
+ type = {Journal Article}
85
+ }
86
+
87
+ @article{MLatom2,
88
+ author = {Dral, Pavlo O. and Ge, Fuchun and Xue, Bao-Xin and Hou, Yi-Fan and Pinheiro Jr, Max and Huang, Jianxing and Barbatti, Mario},
89
+ title = {MLatom 2: An Integrative Platform for Atomistic Machine Learning},
90
+ journal = {Top. Curr. Chem.},
91
+ volume = {379},
92
+ number = {4},
93
+ pages = {27},
94
+ DOI = {10.1007/s41061-021-00339-5},
95
+ year = {2021},
96
+ type = {Journal Article}
97
+ }
98
+
99
+ @article{MLatom1,
100
+ author = {Dral, Pavlo O.},
101
+ title = {MLatom: A Program Package for Quantum Chemical Research Assisted by Machine Learning},
102
+ journal = {J. Comput. Chem.},
103
+ volume = {40},
104
+ number = {26},
105
+ pages = {2339--2347},
106
+ DOI = {10.1002/jcc.26004},
107
+ year = {2019},
108
+ type = {Journal Article}
109
+ }
110
+
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 Pios, Sebastian V. and Ou, Yanchi},
113
+ title = {MLatom: A Package for Atomistic Simulations with Machine Learning},
114
+ year = {2013--2024},
115
+ type = {Computer Program}
116
+ }
mlatom-3.3.0/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # About Program
2
+ MLatom: a Package for Atomistic Simulations with Machine Learning
3
+
4
+ Version 3.3.0
5
+
6
+ **Official website**: http://mlatom.com/
7
+ **Manual**: http://mlatom.com/manual/
8
+ **Tutorial**: http://mlatom.com/tutorial/
9
+
10
+ Copyright (c) 2013- Pavlo O. Dral
11
+ http://dr-dral.com/
12
+
13
+ MLatom is a software platform that enables AI-enhanced computational chemistry in a user-friendly manner as
14
+ it was written by computational chemists for computational chemists. MLatom allows to perform a wide range
15
+ of simulation tasks with a variety of machine learning and quantum mechanical models and their combinations,
16
+ through simple and intuitive input files, command line options, and Python API. The platform can be used
17
+ both as a ready-to-use tool for common computational chemistry simulations and as a Python library for
18
+ developing custom workflows. More information about MLatom and its developers is on [MLatom.com](http://mlatom.com).
19
+ MLatom can be also used on the [XACS cloud computing](https://XACScloud.com) platform.
20
+
21
+ # License and citations
22
+
23
+ ## License
24
+
25
+ MLatom is an open-source software under the [MIT license](https://opensource.org/license/mit/) (modified to request proper citations).
26
+
27
+ Copyright (c) 2013- Pavlo O. Dral (http://dr-dral.com/)
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
32
+ When this Software or its derivatives are used in scientific publications, it shall be cited as:
33
+
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
+ * 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
+ * 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, 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
+ [MLatom.com](http://mlatom.com).
39
+
40
+ The citations for MLatom's interfaces and features shall be eventually
41
+ included too. See program output, header.py, ref.json, and [MLatom.com](http://mlatom.com).
42
+
43
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44
+
45
+ ## Citations
46
+ Citations mentioned above should be included. For convenience, below we provide the citations in the Bibtex format.
47
+
48
+
49
+ @article{MLatom 3,
50
+ author = {Dral, Pavlo O. and Ge, Fuchun and Hou, Yi-Fan and Zheng, Peikun and Chen, Yuxinxin and Barbatti, Mario and Isayev, Olexandr and Wang, Cheng 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},
51
+ title = {MLatom 3: A Platform for Machine Learning-Enhanced Computational Chemistry Simulations and Workflows},
52
+ journal = {J. Chem. Theory Comput.},
53
+ volume = {20},
54
+ number = {3},
55
+ pages = {1193--1213},
56
+ DOI = {10.1021/acs.jctc.3c01203},
57
+ year = {2024},
58
+ type = {Journal Article}
59
+ }
60
+
61
+ @article{MLatom2,
62
+ author = {Dral, Pavlo O. and Ge, Fuchun and Xue, Bao-Xin and Hou, Yi-Fan and Pinheiro Jr, Max and Huang, Jianxing and Barbatti, Mario},
63
+ title = {MLatom 2: An Integrative Platform for Atomistic Machine Learning},
64
+ journal = {Top. Curr. Chem.},
65
+ volume = {379},
66
+ number = {4},
67
+ pages = {27},
68
+ DOI = {10.1007/s41061-021-00339-5},
69
+ year = {2021},
70
+ type = {Journal Article}
71
+ }
72
+
73
+ @article{MLatom1,
74
+ author = {Dral, Pavlo O.},
75
+ title = {MLatom: A Program Package for Quantum Chemical Research Assisted by Machine Learning},
76
+ journal = {J. Comput. Chem.},
77
+ volume = {40},
78
+ number = {26},
79
+ pages = {2339--2347},
80
+ DOI = {10.1002/jcc.26004},
81
+ year = {2019},
82
+ type = {Journal Article}
83
+ }
84
+
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 Pios, Sebastian V. and Ou, Yanchi},
87
+ title = {MLatom: A Package for Atomistic Simulations with Machine Learning},
88
+ year = {2013--2024},
89
+ type = {Computer Program}
90
+ }
@@ -43,7 +43,7 @@ with open(os.path.join(here, 'README.md')) as f:
43
43
 
44
44
  setup(
45
45
  name = pkg_name,
46
- version = "3.1.0",
46
+ version = "3.3.0",
47
47
  author = "Pavlo O. Dral",
48
48
  author_email = "admin@mlatom.com",
49
49
  license = 'MIT (modified)',
@@ -4,7 +4,7 @@
4
4
  !---------------------------------------------------------------------------!
5
5
  ! !
6
6
  ! MLatom: a Package for Atomistic Simulations with Machine Learning !
7
- ! MLatom 3.1.0 !
7
+ ! MLatom 3.3.0 !
8
8
  ! @ !
9
9
  ! Xiamen Atomistic Computing Suite (XACS) !
10
10
  ! !
@@ -30,20 +30,13 @@
30
30
  ! Mario Barbatti, Olexandr Isayev, Cheng Wang, Bao-Xin Xue, !
31
31
  ! Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, Lina Zhang, !
32
32
  ! Shuang Zhang, Arif Ullah, Quanhao Zhang, Yanchi Ou. !
33
- ! MLatom 3: Platform for machine learning-enhanced computational chemistry !
34
- ! simulations and workflows, submitted. !
35
- ! Pre-print on arXiv: `arXiv:2310.20155v1 [physics.chem-ph]. !
36
- ! Check MLatom.com for citation updates. !
33
+ ! J. Chem. Theory Comput. 2024, 20, 1193-1213. !
37
34
  ! !
38
- ! Pavlo O. Dral, Fuchun Ge, Bao-Xin Xue, Yi-Fan Hou, Max Pinheiro Jr, !
39
- ! Jianxing Huang, Mario Barbatti, Top. Curr. Chem. 2021, 379, 27 !
40
- ! Pavlo O. Dral, J. Comput. Chem. 2019, 40, 2339-2347. !
41
- ! !
42
- ! Pavlo O. Dral, Fuchun Ge, Yi-Fan Hou, Peikun Zheng, Yuxinxin Chen, !
43
- ! Bao-Xin Xue, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, !
44
- ! Shuang Zhang, Lina Zhang, Arif Ullah, 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, !
45
38
  ! MLatom: A Package for Atomistic Simulations with Machine Learning, !
46
- ! version 3.1.0, Xiamen University, Xiamen, China, 2013-2023. !
39
+ ! version 3.3.0, Xiamen University, Xiamen, China, 2013-2024. !
47
40
  ! !
48
41
  ! The citations for MLatom's interfaces and features shall be eventually !
49
42
  ! included too. See header.py, ref.json and http://mlatom.com. !
@@ -62,52 +55,48 @@
62
55
 
63
56
  import os, sys, time
64
57
  from mlatom import header
65
- from mlatom import MLtasks
58
+ from mlatom.MLtasks import CLItasks
66
59
  from mlatom.args_class import mlatom_args
67
- from mlatom.environment_variables import env
68
-
69
- class run(object):
70
- def __init__(self, argv = []):
71
- starttime = time.time()
72
-
73
- print(__doc__)
74
-
75
- print(' %s ' % ('='*78))
76
- print(time.strftime(" MLatom started on %d.%m.%Y at %H:%M:%S", time.localtime()))
77
- print(' with the following options:')
78
- argsstr = ' '
79
- for arg in sys.argv:
80
- argsstr += arg + ' '
81
- print(argsstr.rstrip())
82
- if len(sys.argv[1:]) == 1:
83
- if os.path.exists(sys.argv[1]):
84
- print('\n Input file content:')
85
- print(' %s ' % ('_'*78))
86
- with open(sys.argv[1], 'r') as finp:
87
- for line in finp:
88
- print(line.rstrip())
89
- print(' %s ' % ('_'*78))
90
- args = mlatom_args()
91
- if argv == []:
92
- args.parse(sys.argv[1:])
93
- else:
94
- args.parse(argv)
95
- print(' %s ' % ('='*78))
96
- header.printHeader(args)
97
- sys.stdout.flush()
98
60
 
99
- if args.nthreads:
100
- env.set_nthreads(args.nthreads)
101
-
102
- MLtasks.CLItasks(args).run()
103
-
104
- endtime = time.time()
105
- wallclock = endtime - starttime
106
- print(' %s ' % ('='*78))
107
- print(' Wall-clock time: %.2f s (%.2f min, %.2f hours)\n' % (wallclock, wallclock / 60.0, wallclock / 3600.0))
108
- print(time.strftime(" MLatom terminated on %d.%m.%Y at %H:%M:%S", time.localtime()))
109
- print(' %s ' % ('='*78))
110
- sys.stdout.flush()
61
+ def run(argv = []):
62
+ starttime = time.time()
63
+
64
+ print(__doc__)
65
+
66
+ print(' %s ' % ('='*78))
67
+ print(time.strftime(" MLatom started on %d.%m.%Y at %H:%M:%S", time.localtime()))
68
+ print(' with the following options:')
69
+ argsstr = ' '
70
+ for arg in sys.argv:
71
+ argsstr += arg + ' '
72
+ print(argsstr.rstrip())
73
+ if len(sys.argv[1:]) == 1:
74
+ if os.path.exists(sys.argv[1]):
75
+ print('\n Input file content:')
76
+ print(' %s ' % ('_'*78))
77
+ with open(sys.argv[1], 'r') as finp:
78
+ for line in finp:
79
+ print(line.rstrip())
80
+ print(' %s ' % ('_'*78))
81
+ args = mlatom_args()
82
+ if argv == []:
83
+ args.parse(sys.argv[1:])
84
+ else:
85
+ args.parse(argv)
86
+ print(' %s ' % ('='*78))
87
+ header.printHeader(args)
88
+ sys.stdout.flush()
89
+
90
+ result = CLItasks(args).run()
91
+
92
+ endtime = time.time()
93
+ wallclock = endtime - starttime
94
+ print(' %s ' % ('='*78))
95
+ print(' Wall-clock time: %.2f s (%.2f min, %.2f hours)\n' % (wallclock, wallclock / 60.0, wallclock / 3600.0))
96
+ print(time.strftime(" MLatom terminated on %d.%m.%Y at %H:%M:%S", time.localtime()))
97
+ print(' %s ' % ('='*78), flush=True)
98
+
99
+ return result
111
100
 
112
101
  if __name__ == '__main__':
113
102
  run()
@@ -29,6 +29,9 @@ class CLItasks(object):
29
29
  return globals()[self.args.task](self.args)
30
30
 
31
31
  def run_with_mlatomF(args):
32
+ if args.nthreads:
33
+ os.environ["OMP_NUM_THREADS"] = str(args.nthreads)
34
+ os.environ["MKL_NUM_THREADS"] = str(args.nthreads)
32
35
  if args.deltaLearn:
33
36
  pre_delta_learning(args)
34
37
  results = interface_MLatomF.ifMLatomCls.run(args.args2pass)
@@ -328,6 +331,7 @@ def learningCurve(args):
328
331
  os.chdir('../..')
329
332
  os.chdir('..')
330
333
  os.chdir('..')
334
+ return results
331
335
 
332
336
  def XYZ2X(args):
333
337
  interface_MLatomF.ifMLatomCls.run(args.argsraw)
@@ -341,7 +345,7 @@ def SMI2XYZ(args):
341
345
  molDB.write_file_with_xyz_coordinates(args.XYZout)
342
346
 
343
347
  def analyze(args):
344
- interface_MLatomF.ifMLatomCls.run(args.args2pass)
348
+ return interface_MLatomF.ifMLatomCls.run(args.args2pass)
345
349
 
346
350
  def sample(args):
347
351
  interface_MLatomF.ifMLatomCls.run(args.args2pass)
@@ -403,7 +407,8 @@ def freq(args):
403
407
  molDB = loading_data(args.XYZfile, charges=args.charges, multiplicities=args.multiplicities)
404
408
  model = loading_model(args)
405
409
  kwargs = {}
406
- if args.optProg: kwargs['program'] = args.optprog
410
+ if args.freqProg: kwargs['program'] = args.freqProg
411
+ elif args.optProg: kwargs['program'] = args.optProg
407
412
  for imol, mol in enumerate(molDB):
408
413
  mol.number = imol+1
409
414
  if args.ase.linear:
@@ -413,6 +418,11 @@ def freq(args):
413
418
  linearlist = args.ase.linear.split(',')
414
419
  if linearlist[imol] == '1': mol.shape = 'linear'
415
420
  else: mol.shape='nonlinear'
421
+ else:
422
+ if mol.is_it_linear():
423
+ mol.shape = 'linear'
424
+ else:
425
+ mol.shape = 'nonlinear'
416
426
  if args.ase.symmetrynumber:
417
427
  if len(molDB) == 1:
418
428
  symmetrynumbers = [args.ase.symmetrynumber]
@@ -444,17 +454,17 @@ def freq(args):
444
454
  elif args.ani1ccx or args.ani1x or args.ani2x or args.ani1xd4 or args.ani2xd4:
445
455
  printing_animethod_results(methodname=model.method, molecule=mol)
446
456
  print('')
447
- print(fmt % ('ZPE-exclusive internal energy at 0 K', mol.energy))
448
- print(fmt % ('Zero-point vibrational energy', mol.ZPE))
449
- print(fmt % ('Internal energy at 0 K', mol.U0))
450
- print(fmt % ('Enthalpy at 298 K', mol.H))
451
- print(fmt % ('Gibbs free energy at 298 K', mol.G))
457
+ if hasattr(mol, 'energy'): print(fmt % ('ZPE-exclusive internal energy at 0 K', mol.energy))
458
+ if hasattr(mol, 'ZPE'): print(fmt % ('Zero-point vibrational energy', mol.ZPE))
459
+ if hasattr(mol, 'U0'): print(fmt % ('Internal energy at 0 K', mol.U0))
460
+ if hasattr(mol, 'H'): print(fmt % ('Enthalpy at 298 K', mol.H))
461
+ if hasattr(mol, 'G'): print(fmt % ('Gibbs free energy at 298 K', mol.G))
452
462
  # To-do: add entropy
453
463
  if 'DeltaHf298' in mol.__dict__:
454
464
  print('')
455
465
  fmt = ' %-41s: %15.5f Hartree %15.5f kcal/mol'
456
- print(fmt % ('Atomization enthalpy at 0 K', mol.atomization_energy_0K, mol.atomization_energy_0K * constants.Hartree2kcalpermol))
457
- print(fmt % ('ZPE-exclusive atomization energy at 0 K', mol.ZPE_exclusive_atomization_energy_0K, mol.ZPE_exclusive_atomization_energy_0K * constants.Hartree2kcalpermol))
466
+ if 'atomization_energy_0K' in mol.__dict__: print(fmt % ('Atomization enthalpy at 0 K', mol.atomization_energy_0K, mol.atomization_energy_0K * constants.Hartree2kcalpermol))
467
+ if 'ZPE_exclusive_atomization_energy_0K' in mol.__dict__: print(fmt % ('ZPE-exclusive atomization energy at 0 K', mol.ZPE_exclusive_atomization_energy_0K, mol.ZPE_exclusive_atomization_energy_0K * constants.Hartree2kcalpermol))
458
468
  print(fmt % ('Heat of formation at 298 K', mol.DeltaHf298, mol.DeltaHf298 * constants.Hartree2kcalpermol))
459
469
  # To-do: make it work for ANI-1ccx
460
470
  if args.AIQM1:
@@ -541,6 +551,7 @@ def loading_method(args):
541
551
  else:
542
552
  kwargs['program'] = args.qmprog
543
553
  method = models.methods(**kwargs)
554
+ method.set_num_threads(args.nthreads)
544
555
  return method
545
556
 
546
557
  def loading_model(args):
@@ -566,6 +577,7 @@ def loading_model(args):
566
577
  else:
567
578
  stopper.stopMLatom("unknown MLmodelType/MLprog")
568
579
  model.parse_args(args)
580
+ model.set_num_threads(args.nthreads)
569
581
  return model
570
582
 
571
583
  def sampling(args=None, XYZfile=None, XfileIn=None, sampling=None, Nuse=None,
@@ -573,7 +585,7 @@ def sampling(args=None, XYZfile=None, XfileIn=None, sampling=None, Nuse=None,
573
585
  iTrainIn=None, iSubtrainIn=None, iValidateIn=None, iTestIn=None,
574
586
  iTrainOut=None, iSubtrainOut=None, iValidateOut=None, iTestOut=None,
575
587
  CVtest=False, NcvTestFolds=None, iCVtestPrefIn=None, iCVtestPrefOut=None,
576
- CVopt=False, NcvOptFolds=None, iCVoptPrefIn=None, iCVoptPrefOut=None,):
588
+ CVopt=False, NcvOptFolds=None, iCVoptPrefIn=None, iCVoptPrefOut=None, sample_test=False):
577
589
  i_train = None
578
590
  i_subtrain = None
579
591
  i_validate = None
@@ -582,6 +594,8 @@ def sampling(args=None, XYZfile=None, XfileIn=None, sampling=None, Nuse=None,
582
594
  i_cvopt = None
583
595
 
584
596
  if args:
597
+ if args.estAccMLmodel or args.learningCurve:
598
+ sample_test = True
585
599
  args = args.copy('sample', ["XYZfile", "XfileIn", "sampling", "CVtest", "CVopt", "Nuse", "Ntrain", "Nsubtrain", "Nvalidate", "Ntest", "NcvTestFolds", "NcvOptFolds", "iTrainIn", "iSubtrainIn", "iValidateIn", "iTestIn", "iCVtestPrefIn", "iCVoptPrefIn", "iTrainOut", "iSubtrainOut", "iValidateOut", "iTestOut", "iCVtestPrefOut", "iCVoptPrefOut"])
586
600
  else:
587
601
  args = mlatom_args()
@@ -624,7 +638,8 @@ def sampling(args=None, XYZfile=None, XfileIn=None, sampling=None, Nuse=None,
624
638
  args.iTrainOut = tmpdirname + '/itrain.dat'
625
639
  args.iSubtrainOut = tmpdirname + '/isubtrain.dat'
626
640
  args.iValidateOut = tmpdirname + '/ivalidate.dat'
627
- args.iTestOut = tmpdirname + '/itest.dat'
641
+ if sample_test:
642
+ args.iTestOut = tmpdirname + '/itest.dat'
628
643
  args.iCVtestPrefOut = tmpdirname + '/icvtest'
629
644
  args.iCVoptPrefOut = tmpdirname + '/icvopt' if not args.CVtest else 'icvopt'
630
645
  sample(args)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env python3
2
+ from . import data, models, plot, simulations, stats, xyz, namd, constants
3
+ from .simulations import optimize_geometry, irc, freq, thermochemistry, md, generate_initial_conditions, vibrational_spectrum
4
+ from .data import atom, molecule, molecular_database
5
+ from .models import methods