mlatom 3.0.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 (107) hide show
  1. mlatom-3.0.0/LICENSE.txt +251 -0
  2. mlatom-3.0.0/PKG-INFO +151 -0
  3. mlatom-3.0.0/README.md +134 -0
  4. mlatom-3.0.0/setup.cfg +4 -0
  5. mlatom-3.0.0/setup.py +82 -0
  6. mlatom-3.0.0/src/mlatom/MLTPA.py +445 -0
  7. mlatom-3.0.0/src/mlatom/ML_NEA.py +2726 -0
  8. mlatom-3.0.0/src/mlatom/MLatom.py +110 -0
  9. mlatom-3.0.0/src/mlatom/MLatomF +0 -0
  10. mlatom-3.0.0/src/mlatom/MLatomF_src/A_KRR.f90 +1577 -0
  11. mlatom-3.0.0/src/mlatom/MLatomF_src/A_KRR_kernel.f90 +2076 -0
  12. mlatom-3.0.0/src/mlatom/MLatomF_src/D_CoulombMatrix.f90 +175 -0
  13. mlatom-3.0.0/src/mlatom/MLatomF_src/D_ID.f90 +41 -0
  14. mlatom-3.0.0/src/mlatom/MLatomF_src/D_rel2eq.f90 +358 -0
  15. mlatom-3.0.0/src/mlatom/MLatomF_src/MLatomF.f90 +150 -0
  16. mlatom-3.0.0/src/mlatom/MLatomF_src/MLatomFInfo.f90 +27 -0
  17. mlatom-3.0.0/src/mlatom/MLatomF_src/MLmodel.f90 +971 -0
  18. mlatom-3.0.0/src/mlatom/MLatomF_src/Makefile +60 -0
  19. mlatom-3.0.0/src/mlatom/MLatomF_src/Makefile.intel +11 -0
  20. mlatom-3.0.0/src/mlatom/MLatomF_src/__init__.py +0 -0
  21. mlatom-3.0.0/src/mlatom/MLatomF_src/analyze.f90 +67 -0
  22. mlatom-3.0.0/src/mlatom/MLatomF_src/constants.f90 +17 -0
  23. mlatom-3.0.0/src/mlatom/MLatomF_src/cs.cpp +71 -0
  24. mlatom-3.0.0/src/mlatom/MLatomF_src/dataset.f90 +2099 -0
  25. mlatom-3.0.0/src/mlatom/MLatomF_src/mathUtils.f90 +761 -0
  26. mlatom-3.0.0/src/mlatom/MLatomF_src/molDescr.f90 +467 -0
  27. mlatom-3.0.0/src/mlatom/MLatomF_src/optionsModule.f90 +1383 -0
  28. mlatom-3.0.0/src/mlatom/MLatomF_src/precision.f90 +11 -0
  29. mlatom-3.0.0/src/mlatom/MLatomF_src/recover.sh +33 -0
  30. mlatom-3.0.0/src/mlatom/MLatomF_src/sampling.f90 +126 -0
  31. mlatom-3.0.0/src/mlatom/MLatomF_src/statistics.f90 +608 -0
  32. mlatom-3.0.0/src/mlatom/MLatomF_src/stopper.f90 +24 -0
  33. mlatom-3.0.0/src/mlatom/MLatomF_src/strings.f90 +87 -0
  34. mlatom-3.0.0/src/mlatom/MLatomF_src/timing.f90 +49 -0
  35. mlatom-3.0.0/src/mlatom/MLatomF_src/types.f90 +19 -0
  36. mlatom-3.0.0/src/mlatom/MLtasks.py +942 -0
  37. mlatom-3.0.0/src/mlatom/__init__.py +3 -0
  38. mlatom-3.0.0/src/mlatom/aiqm1.py +258 -0
  39. mlatom-3.0.0/src/mlatom/aiqm1_model/__init__.py +0 -0
  40. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv0.pt +0 -0
  41. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv1.pt +0 -0
  42. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv2.pt +0 -0
  43. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv3.pt +0 -0
  44. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv4.pt +0 -0
  45. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv5.pt +0 -0
  46. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv6.pt +0 -0
  47. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_cc_cv7.pt +0 -0
  48. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv0.pt +0 -0
  49. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv1.pt +0 -0
  50. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv2.pt +0 -0
  51. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv3.pt +0 -0
  52. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv4.pt +0 -0
  53. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv5.pt +0 -0
  54. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv6.pt +0 -0
  55. mlatom-3.0.0/src/mlatom/aiqm1_model/aiqm1_dft_cv7.pt +0 -0
  56. mlatom-3.0.0/src/mlatom/args_class.py +740 -0
  57. mlatom-3.0.0/src/mlatom/ccsdtstarcbs.py +125 -0
  58. mlatom-3.0.0/src/mlatom/composite_methods.py +99 -0
  59. mlatom-3.0.0/src/mlatom/constants.py +44 -0
  60. mlatom-3.0.0/src/mlatom/conversions.py +53 -0
  61. mlatom-3.0.0/src/mlatom/cs.so +0 -0
  62. mlatom-3.0.0/src/mlatom/data.py +1723 -0
  63. mlatom-3.0.0/src/mlatom/doc.py +952 -0
  64. mlatom-3.0.0/src/mlatom/environment_variables.py +30 -0
  65. mlatom-3.0.0/src/mlatom/header.py +148 -0
  66. mlatom-3.0.0/src/mlatom/initial_conditions.py +213 -0
  67. mlatom-3.0.0/src/mlatom/interface_MLatomF.py +197 -0
  68. mlatom-3.0.0/src/mlatom/interfaces/__init__.py +39 -0
  69. mlatom-3.0.0/src/mlatom/interfaces/ase_interface.py +197 -0
  70. mlatom-3.0.0/src/mlatom/interfaces/dftd4_interface.py +103 -0
  71. mlatom-3.0.0/src/mlatom/interfaces/dpmd_interface.py +464 -0
  72. mlatom-3.0.0/src/mlatom/interfaces/gap_interface.py +277 -0
  73. mlatom-3.0.0/src/mlatom/interfaces/gaussian_interface.py +642 -0
  74. mlatom-3.0.0/src/mlatom/interfaces/mndo_interface.py +178 -0
  75. mlatom-3.0.0/src/mlatom/interfaces/orca_interface.py +167 -0
  76. mlatom-3.0.0/src/mlatom/interfaces/physnet_interface.py +823 -0
  77. mlatom-3.0.0/src/mlatom/interfaces/pyscf_interface.py +261 -0
  78. mlatom-3.0.0/src/mlatom/interfaces/sgdml_interface.py +1141 -0
  79. mlatom-3.0.0/src/mlatom/interfaces/sparrow_interface.py +114 -0
  80. mlatom-3.0.0/src/mlatom/interfaces/torchani_interface.py +717 -0
  81. mlatom-3.0.0/src/mlatom/interfaces/xtb_interface.py +178 -0
  82. mlatom-3.0.0/src/mlatom/kreg_api.py +173 -0
  83. mlatom-3.0.0/src/mlatom/md.py +258 -0
  84. mlatom-3.0.0/src/mlatom/md2vibr.py +176 -0
  85. mlatom-3.0.0/src/mlatom/md2vibr_cmd.py +563 -0
  86. mlatom-3.0.0/src/mlatom/md_cmd.py +181 -0
  87. mlatom-3.0.0/src/mlatom/mlatom_gui.py +1356 -0
  88. mlatom-3.0.0/src/mlatom/mltpa/__init__.py +0 -0
  89. mlatom-3.0.0/src/mlatom/mltpa/mff.txt +564 -0
  90. mlatom-3.0.0/src/mlatom/mltpa/mltpa2022_2.pkl +0 -0
  91. mlatom-3.0.0/src/mlatom/mltpa/mltpa2022_2_new_.pkl +0 -0
  92. mlatom-3.0.0/src/mlatom/models.py +1219 -0
  93. mlatom-3.0.0/src/mlatom/plot.py +158 -0
  94. mlatom-3.0.0/src/mlatom/ref.json +47 -0
  95. mlatom-3.0.0/src/mlatom/shell_cmd.py +16 -0
  96. mlatom-3.0.0/src/mlatom/simulations.py +507 -0
  97. mlatom-3.0.0/src/mlatom/sliceData.py +334 -0
  98. mlatom-3.0.0/src/mlatom/stats.py +160 -0
  99. mlatom-3.0.0/src/mlatom/stopper.py +17 -0
  100. mlatom-3.0.0/src/mlatom/thermostat.py +296 -0
  101. mlatom-3.0.0/src/mlatom/utils.py +174 -0
  102. mlatom-3.0.0/src/mlatom/xyz.py +36 -0
  103. mlatom-3.0.0/src/mlatom.egg-info/PKG-INFO +151 -0
  104. mlatom-3.0.0/src/mlatom.egg-info/SOURCES.txt +105 -0
  105. mlatom-3.0.0/src/mlatom.egg-info/dependency_links.txt +1 -0
  106. mlatom-3.0.0/src/mlatom.egg-info/entry_points.txt +5 -0
  107. mlatom-3.0.0/src/mlatom.egg-info/top_level.txt +1 -0
@@ -0,0 +1,251 @@
1
+ Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License
2
+
3
+ By exercising the Licensed Rights (defined below), You accept and agree to be
4
+ bound by the terms and conditions of this Creative Commons
5
+ Attribution-NonCommercial-NoDerivatives 4.0 International Public License
6
+ ("Public License"). To the extent this Public License may be interpreted as a
7
+ contract, You are granted the Licensed Rights in consideration of Your
8
+ acceptance of these terms and conditions, and the Licensor grants You such
9
+ rights in consideration of benefits the Licensor receives from making the
10
+ Licensed Material available under these terms and conditions.
11
+
12
+ Section 1 – Definitions.
13
+
14
+ a. Adapted Material means material subject to Copyright and Similar Rights
15
+ that is derived from or based upon the Licensed Material and in which
16
+ the Licensed Material is translated, altered, arranged, transformed, or
17
+ otherwise modified in a manner requiring permission under the Copyright
18
+ and Similar Rights held by the Licensor. For purposes of this Public
19
+ License, where the Licensed Material is a musical work, performance, or
20
+ sound recording, Adapted Material is always produced where the Licensed
21
+ Material is synched in timed relation with a moving image.
22
+ b. Copyright and Similar Rights means copyright and/or similar rights
23
+ closely related to copyright including, without limitation,
24
+ performance, broadcast, sound recording, and Sui Generis Database
25
+ Rights, without regard to how the rights are labeled or categorized.
26
+ For purposes of this Public License, the rights specified in Section
27
+ 2(b)(1)-(2) are not Copyright and Similar Rights.
28
+ c. Effective Technological Measures means those measures that, in the
29
+ absence of proper authority, may not be circumvented under laws
30
+ fulfilling obligations under Article 11 of the WIPO Copyright Treaty
31
+ adopted on December 20, 1996, and/or similar international agreements.
32
+ d. Exceptions and Limitations means fair use, fair dealing, and/or any
33
+ other exception or limitation to Copyright and Similar Rights that
34
+ applies to Your use of the Licensed Material.
35
+ e. Licensed Material means the artistic or literary work, database, or
36
+ other material to which the Licensor applied this Public License.
37
+ f. Licensed Rights means the rights granted to You subject to the terms
38
+ and conditions of this Public License, which are limited to all
39
+ Copyright and Similar Rights that apply to Your use of the Licensed
40
+ Material and that the Licensor has authority to license.
41
+ g. Licensor means the individual(s) or entity(ies) granting rights under
42
+ this Public License.
43
+ h. NonCommercial means not primarily intended for or directed towards
44
+ commercial advantage or monetary compensation. For purposes of this
45
+ Public License, the exchange of the Licensed Material for other
46
+ material subject to Copyright and Similar Rights by digital
47
+ file-sharing or similar means is NonCommercial provided there is no
48
+ payment of monetary compensation in connection with the exchange.
49
+ i. Share means to provide material to the public by any means or process
50
+ that requires permission under the Licensed Rights, such as
51
+ reproduction, public display, public performance, distribution,
52
+ dissemination, communication, or importation, and to make material
53
+ available to the public including in ways that members of the public
54
+ may access the material from a place and at a time individually chosen
55
+ by them.
56
+ j. Sui Generis Database Rights means rights other than copyright resulting
57
+ from Directive 96/9/EC of the European Parliament and of the Council of
58
+ 11 March 1996 on the legal protection of databases, as amended and/or
59
+ succeeded, as well as other essentially equivalent rights anywhere in
60
+ the world.
61
+ k. You means the individual or entity exercising the Licensed Rights under
62
+ this Public License. Your has a corresponding meaning.
63
+
64
+ Section 2 – Scope.
65
+
66
+ a. License grant.
67
+ 1. Subject to the terms and conditions of this Public License, the
68
+ Licensor hereby grants You a worldwide, royalty-free,
69
+ non-sublicensable, non-exclusive, irrevocable license to exercise
70
+ the Licensed Rights in the Licensed Material to:
71
+ A. reproduce and Share the Licensed Material, in whole or in part,
72
+ for NonCommercial purposes only; and
73
+ B. produce and reproduce, but not Share, Adapted Material for
74
+ NonCommercial purposes only.
75
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
76
+ Exceptions and Limitations apply to Your use, this Public License
77
+ does not apply, and You do not need to comply with its terms and
78
+ conditions.
79
+ 3. Term. The term of this Public License is specified in Section 6(a).
80
+ 4. Media and formats; technical modifications allowed. The Licensor
81
+ authorizes You to exercise the Licensed Rights in all media and
82
+ formats whether now known or hereafter created, and to make
83
+ technical modifications necessary to do so. The Licensor waives
84
+ and/or agrees not to assert any right or authority to forbid You
85
+ from making technical modifications necessary to exercise the
86
+ Licensed Rights, including technical modifications necessary to
87
+ circumvent Effective Technological Measures. For purposes of this
88
+ Public License, simply making modifications authorized by this
89
+ Section 2(a)(4) never produces Adapted Material.
90
+ 5. Downstream recipients.
91
+ A. Offer from the Licensor – Licensed Material. Every recipient of
92
+ the Licensed Material automatically receives an offer from the
93
+ Licensor to exercise the Licensed Rights under the terms and
94
+ conditions of this Public License.
95
+ B. No downstream restrictions. You may not offer or impose any
96
+ additional or different terms or conditions on, or apply any
97
+ Effective Technological Measures to, the Licensed Material if
98
+ doing so restricts exercise of the Licensed Rights by any
99
+ recipient of the Licensed Material.
100
+ 6. No endorsement. Nothing in this Public License constitutes or may
101
+ be construed as permission to assert or imply that You are, or that
102
+ Your use of the Licensed Material is, connected with, or sponsored,
103
+ endorsed, or granted official status by, the Licensor or others
104
+ designated to receive attribution as provided in Section
105
+ 3(a)(1)(A)(i).
106
+
107
+ b. Other rights.
108
+ 1. Moral rights, such as the right of integrity, are not licensed
109
+ under this Public License, nor are publicity, privacy, and/or other
110
+ similar personality rights; however, to the extent possible, the
111
+ Licensor waives and/or agrees not to assert any such rights held by
112
+ the Licensor to the limited extent necessary to allow You to
113
+ exercise the Licensed Rights, but not otherwise.
114
+ 2. Patent and trademark rights are not licensed under this Public
115
+ License.
116
+ 3. To the extent possible, the Licensor waives any right to collect
117
+ royalties from You for the exercise of the Licensed Rights, whether
118
+ directly or through a collecting society under any voluntary or
119
+ waivable statutory or compulsory licensing scheme. In all other
120
+ cases the Licensor expressly reserves any right to collect such
121
+ royalties, including when the Licensed Material is used other than
122
+ for NonCommercial purposes.
123
+
124
+ Section 3 – License Conditions.
125
+
126
+ Your exercise of the Licensed Rights is expressly made subject to the following conditions.
127
+
128
+ a. Attribution.
129
+
130
+ 1. If You Share the Licensed Material, You must:
131
+ A. retain the following if it is supplied by the Licensor with the
132
+ Licensed Material:
133
+ i. identification of the creator(s) of the Licensed Material
134
+ and any others designated to receive attribution, in any
135
+ reasonable manner requested by the Licensor (including by
136
+ pseudonym if designated);
137
+ ii. a copyright notice;
138
+ iii. a notice that refers to this Public License;
139
+ iv. a notice that refers to the disclaimer of warranties;
140
+ v. a URI or hyperlink to the Licensed Material to the extent
141
+ reasonably practicable;
142
+ B. indicate if You modified the Licensed Material and retain an
143
+ indication of any previous modifications; and
144
+ C. indicate the Licensed Material is licensed under this Public
145
+ License, and include the text of, or the URI or hyperlink to,
146
+ this Public License.
147
+
148
+ For the avoidance of doubt, You do not have permission under this
149
+ Public License to Share Adapted Material.
150
+
151
+ 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable
152
+ manner based on the medium, means, and context in which You Share
153
+ the Licensed Material. For example, it may be reasonable to satisfy
154
+ the conditions by providing a URI or hyperlink to a resource that
155
+ includes the required information.
156
+ 3. If requested by the Licensor, You must remove any of the
157
+ information required by Section 3(a)(1)(A) to the extent reasonably
158
+ practicable.
159
+
160
+ Section 4 – Sui Generis Database Rights.
161
+
162
+ Where the Licensed Rights include Sui Generis Database Rights that apply to
163
+ Your use of the Licensed Material:
164
+
165
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right to
166
+ extract, reuse, reproduce, and Share all or a substantial portion of
167
+ the contents of the database for NonCommercial purposes only and
168
+ provided You do not Share Adapted Material;
169
+ b. if You include all or a substantial portion of the database contents in
170
+ a database in which You have Sui Generis Database Rights, then the
171
+ database in which You have Sui Generis Database Rights (but not its
172
+ individual contents) is Adapted Material; and
173
+ c. You must comply with the conditions in Section 3(a) if You Share all or
174
+ a substantial portion of the contents of the database.
175
+
176
+ For the avoidance of doubt, this Section 4 supplements and does not replace
177
+ Your obligations under this Public License where the Licensed Rights include
178
+ other Copyright and Similar Rights.
179
+
180
+ Section 5 – Disclaimer of Warranties and Limitation of Liability.
181
+
182
+ a. Unless otherwise separately undertaken by the Licensor, to the extent
183
+ possible, the Licensor offers the Licensed Material as-is and
184
+ as-available, and makes no representations or warranties of any kind
185
+ concerning the Licensed Material, whether express, implied, statutory,
186
+ or other. This includes, without limitation, warranties of title,
187
+ merchantability, fitness for a particular purpose, non-infringement,
188
+ absence of latent or other defects, accuracy, or the presence or
189
+ absence of errors, whether or not known or discoverable. Where
190
+ disclaimers of warranties are not allowed in full or in part, this
191
+ disclaimer may not apply to You.
192
+ b. To the extent possible, in no event will the Licensor be liable to You
193
+ on any legal theory (including, without limitation, negligence) or
194
+ otherwise for any direct, special, indirect, incidental, consequential,
195
+ punitive, exemplary, or other losses, costs, expenses, or damages
196
+ arising out of this Public License or use of the Licensed Material,
197
+ even if the Licensor has been advised of the possibility of such
198
+ losses, costs, expenses, or damages. Where a limitation of liability is
199
+ not allowed in full or in part, this limitation may not apply to You.
200
+ c. The disclaimer of warranties and limitation of liability provided above
201
+ shall be interpreted in a manner that, to the extent possible, most
202
+ closely approximates an absolute disclaimer and waiver of all
203
+ liability.
204
+
205
+ Section 6 – Term and Termination.
206
+
207
+ a. This Public License applies for the term of the Copyright and Similar
208
+ Rights licensed here. However, if You fail to comply with this Public
209
+ License, then Your rights under this Public License terminate
210
+ automatically.
211
+ b. Where Your right to use the Licensed Material has terminated under
212
+ Section 6(a), it reinstates:
213
+ 1. automatically as of the date the violation is cured, provided it is
214
+ cured within 30 days of Your discovery of the violation; or
215
+ 2. upon express reinstatement by the Licensor.
216
+
217
+ For the avoidance of doubt, this Section 6(b) does not affect any right
218
+ the Licensor may have to seek remedies for Your violations of this
219
+ Public License.
220
+
221
+ c. For the avoidance of doubt, the Licensor may also offer the Licensed
222
+ Material under separate terms or conditions or stop distributing the
223
+ Licensed Material at any time; however, doing so will not terminate
224
+ this Public License.
225
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
226
+
227
+ Section 7 – Other Terms and Conditions.
228
+
229
+ a. The Licensor shall not be bound by any additional or different terms or
230
+ conditions communicated by You unless expressly agreed.
231
+ b. Any arrangements, understandings, or agreements regarding the Licensed
232
+ Material not stated herein are separate from and independent of the
233
+ terms and conditions of this Public License.
234
+
235
+ Section 8 – Interpretation.
236
+
237
+ a. For the avoidance of doubt, this Public License does not, and shall not
238
+ be interpreted to, reduce, limit, restrict, or impose conditions on any
239
+ use of the Licensed Material that could lawfully be made without
240
+ permission under this Public License.
241
+ b. To the extent possible, if any provision of this Public License is
242
+ deemed unenforceable, it shall be automatically reformed to the minimum
243
+ extent necessary to make it enforceable. If the provision cannot be
244
+ reformed, it shall be severed from this Public License without
245
+ affecting the enforceability of the remaining terms and conditions.
246
+ c. No term or condition of this Public License will be waived and no
247
+ failure to comply consented to unless expressly agreed to by the Licensor.
248
+ d. Nothing in this Public License constitutes or may be interpreted as a
249
+ limitation upon, or waiver of, any privileges and immunities that apply
250
+ to the Licensor or You, including from the legal processes of any
251
+ jurisdiction or authority.
mlatom-3.0.0/PKG-INFO ADDED
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.1
2
+ Name: mlatom
3
+ Version: 3.0.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
+
18
+ # Brief Introduction
19
+ A Package for Atomistic Simulations with Machine Learning
20
+
21
+ **manual**: http://mlatom.com/manual/
22
+ **tutorial**: http://mlatom.com/tutorial/
23
+
24
+
25
+ # Tasks Performed by MLatom
26
+ A brief overview of MLatom capabilities (see above links for more up-to-date version). See sections below for more details.
27
+
28
+ ## Tasks
29
+ - Estimating accuracy of ML models.
30
+ - Creating ML model and saving it to a file.
31
+ - Loading existing ML model from a file and performing ML calculations with this model.
32
+ - ML-accelerated calculation of absorption spectra within nuclear ensemble approach
33
+ - Learning curves
34
+ - ML-two photon absorption
35
+
36
+ ## Data Set Operations
37
+ - Converting XYZ coordinates into an input vector (molecular descriptor) for ML.
38
+ - Sampling subsets from a data set.
39
+
40
+
41
+ # Sampling
42
+ - none: simply splitting the data set into the training, test, and, if necessary, training set into the subtraining and validation sets (in this order) without changing the order of indices.
43
+ - random sampling.
44
+ - user-defined: requests MLatom to read indices for the training, test, and, if necessary, for the subtraining and validation sets from files.
45
+ - [ structure-based sampling ](http://mlatom.com/self-correcting-machine-learning-and-structure-based-sampling/)
46
+ - from unsliced and sliced data
47
+ - [ farthest-point traversal iterative procedure ](https://en.wikipedia.org/wiki/Farthest-first_traversal), which starts from two points farthest apart.
48
+
49
+
50
+ # ML Algorithm
51
+ [ Kernel ridge regression](https://web.stanford.edu/~hastie/ElemStatLearn/) with the following kernels:
52
+ - [ Gaussian ](https://doi.org/10.1103/PhysRevLett.108.058301).
53
+ - [ Laplacian ](https://doi.org/10.1103/PhysRevLett.108.058301).
54
+ - exponential.
55
+ - [ Matérn ](http://dx.doi.org/10.1198/jasa.2010.tm09420) ([ details of implementation ](http://dx.doi.org/10.1021/acs.jpclett.8b02469)).
56
+ Permutationally invariant kernel and self-correction are also supported.
57
+
58
+
59
+ # Hybrid QM/ML Approaches
60
+ [ Δ-machine learning ](http://dx.doi.org/10.1021/acs.jctc.5b00099).
61
+
62
+
63
+ # Molecular Descriptors
64
+ - [ Coulomb matrix ](https://doi.org/10.1103/PhysRevLett.108.058301)
65
+ - [ sorted by norms of its rows ](http://dx.doi.org/10.1021/ct400195d);
66
+ - unsorted;
67
+ - permuted.
68
+ - [ Normalized inverse internuclear distances (RE descriptor)](http://mlatom.com/self-correcting-machine-learning-and-structure-based-sampling/)
69
+ - sorted for user-defined atoms by the sum of their nuclear repulsions to all other atoms;
70
+ - unsorted;
71
+ - permuted.
72
+
73
+
74
+ # ML models
75
+ The [ KREG (Kernel-ridge-regression using RE descriptor and the Gaussian kernel function )](http://dx.doi.org/10.1021/acs.jpclett.8b02469) model is the default ML method.
76
+
77
+ ## General-purpose ML models
78
+ - AIQM1 (requires interfaces to other programs as described in http://MLatom.com/AIQM1)
79
+ - Models available via interface to [TorchANI](https://doi.org/10.1021/acs.jcim.0c00451)
80
+ - ANI-1x
81
+ - ANI-1ccx
82
+ - ANI-2x
83
+
84
+ # Model Validation
85
+ [ ML model can be validated (generalization error can be estimated) in several ways: ](https://web.stanford.edu/~hastie/ElemStatLearn/)
86
+
87
+ - on a hold-out test set not used for training. Both training and test sets can be sampled in one of the ways described above;
88
+ - by performing N-fold cross-validation. User can define the number of folds N. If N is equal to the number of data points, leave-one-out cross-validation is performed. Only random or no sampling can be used for cross-validation.
89
+ - by performing leave-one-out cross-validation (special case of N-fold cross-validation).
90
+ MLatom prints out mean absolute error (MAE), mean signed error (MSE), root-mean-squared error (RMSE), mean values of reference and estimated values, largest positive and negative outliers, correlation coefficient and its squared value R2 as well as coefficients of linear regression and corresponding standard deviations.
91
+
92
+
93
+ # Hyperparameter Tuning
94
+ Gaussian, Laplacian, and Matérn kernels have σ and λ tunable hyperparameters. MLatom can determine them by performing user-defined number of iterations of hyperparameter optimization on a logarithmic grid. User can adjust number of grid points, starting and finishing points on the grid. Hyperparameter are tuned to minimize either mean absolute error or root-mean-square error as defined by the user. [ Hyperparameters can be tuned to minimize ](https://web.stanford.edu/~hastie/ElemStatLearn/)
95
+
96
+ - the error of the ML model trained on the subtraining set in a hold-out validation set. Both subtraining and validation sets are parts of the training set, which can be used at the end with optimal parameters for training the final ML model. These sets ideally should not overlap and can be [ sampled ](http://mlatom.com/features/#Sampling) from the training set in one of the ways described above;
97
+ - N-fold cross-validation error. User can define the number of folds N. If N is equal to the number of data points, leave-one-out cross-validation is performed. Only random or no sampling can be used for cross-validation.
98
+
99
+ Note that hyperparameter tuning can be performed together with model validation. This means that for example one can perform outer loop of the cross-validation for model validation and tune hyperparameters via inner loop of the cross-validation.
100
+
101
+ Apart from natively implemented logarithmic grid search for hyperparameters, MLatom also provides the interface to the [ hyperopt package ](http://hyperopt.github.io/hyperopt/) implementing hyperparameter optimization using Bayesian methods with Tree-structured Parzen Estimator (TPE).
102
+
103
+
104
+ # First Derivatives
105
+ MLatom can be also used to estimate first derivatives from an ML model. Two scenarios are possible:
106
+
107
+ - partial derivatives are calculated for each dimension of given input vectors (analytical derivatives for Gaussian and Matern kernels);
108
+ - first derivatives are calculated in XYZ coordinates for input files containing molecular XYZ coordinates (analytical derivatives for the RE and Coulomb matrix descriptors).
109
+ - derivatives for interfaced models
110
+
111
+
112
+ # UV/vis spectra
113
+ MLatom can significantly accelerate the calculation of cross-section with the Nuclear Ensemble Approach (NEA).
114
+
115
+ In brief, this feature uses fewer QC calculation to achieve higher precision and reduce computational cost. You can find more detail on this paper (please cite it when using this feature):
116
+
117
+ > Bao-Xin Xue, Mario Barbatti, Pavlo O. Dral, [ Machine Learning for Absorption Cross Sections ](https://doi.org/10.1021/acs.jpca.0c05310), J. Phys. Chem. A 2020, 124, 7199–7210. DOI: 10.1021/acs.jpca.0c05310.
118
+
119
+ # Interfaces to 3<sup>rd</sup>-party software
120
+ MLatom also provides interfaces to some third-party software where extra ML model types are natively implemented. It allows users to access other popular ML model types within MLatom's workflow. Currently available third-party model types are:
121
+
122
+ - [ANI](https://doi.org/10.1039/c6sc05720a) (through [TorchANI](https://doi.org/10.1021/acs.jcim.0c00451))
123
+ - [DeepPot-SE](https://papers.nips.cc/paper/2018/hash/e2ad76f2326fbc6b56a45a56c59fafdb-Abstract.html) and [DPMD](https://doi.org/10.1103/PhysRevLett.120.143001) (through [DeePMD-kit](https://doi.org/10.1016/j.cpc.2018.03.016))
124
+ - [GAP](https://doi.org/10.1103/Physrevlett.104.136403)-[SOAP](https://doi.org/10.1103/physrevb.87.184115) (through [GAP](www.libatoms.org) suite and [QUIP](http://github.com/libAtoms/QUIP))
125
+ - [PhysNet](https://doi.org/10.1021/acs.jctc.9b00181) (through [PhysNet](github.com/MMunibas/PhysNet))
126
+ - [sGDML](https://doi.org/10.1038/s41467-018-06169-2) (through [sGDML](www.sgdml.org))
127
+
128
+ # About Program
129
+ MLatom: a Package for Atomistic Simulations with Machine Learning
130
+ Version 2.3.3
131
+ http://mlatom.com/
132
+
133
+ Copyright (c) 2013-2022 Pavlo O. Dral
134
+ http://dr-dral.com/
135
+
136
+ All rights reserved. This work is licensed under the [Attribution-NonCommercial-NoDerivatives 4.0 International](http://creativecommons.org/licenses/by-nc-nd/4.0/) license. See LICENSE.CC-BY-NC-ND-4.0.
137
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
138
+ 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.
139
+
140
+ Cite as:
141
+
142
+ 1. Pavlo O. Dral, J. Comput. Chem. 2019, 40, 2339-2347
143
+ 2. Pavlo O. Dral, Fuchun Ge, Bao-Xin Xue, Yi-Fan Hou, Max Pinheiro Jr, Jianxing Huang, Mario Barbatti, Top. Curr. Chem. 2021, 379, 27
144
+ 3. Pavlo O. Dral, Peikun Zheng, Bao-Xin Xue, Fuchun Ge, Yi-Fan Hou, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, MLatom: A Package for Atomistic Simulations with Machine Learning, version 2.3.3, Xiamen University, Xiamen, China, 2013-2022.
145
+
146
+
147
+ # License
148
+
149
+ This work is licensed under the [Attribution-NonCommercial-NoDerivatives 4.0 International](http://creativecommons.org/licenses/by-nc-nd/4.0/) license. See LICENSE.CC-BY-NC-ND-4.0.
150
+
151
+ <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
mlatom-3.0.0/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # Brief Introduction
2
+ A Package for Atomistic Simulations with Machine Learning
3
+
4
+ **manual**: http://mlatom.com/manual/
5
+ **tutorial**: http://mlatom.com/tutorial/
6
+
7
+
8
+ # Tasks Performed by MLatom
9
+ A brief overview of MLatom capabilities (see above links for more up-to-date version). See sections below for more details.
10
+
11
+ ## Tasks
12
+ - Estimating accuracy of ML models.
13
+ - Creating ML model and saving it to a file.
14
+ - Loading existing ML model from a file and performing ML calculations with this model.
15
+ - ML-accelerated calculation of absorption spectra within nuclear ensemble approach
16
+ - Learning curves
17
+ - ML-two photon absorption
18
+
19
+ ## Data Set Operations
20
+ - Converting XYZ coordinates into an input vector (molecular descriptor) for ML.
21
+ - Sampling subsets from a data set.
22
+
23
+
24
+ # Sampling
25
+ - none: simply splitting the data set into the training, test, and, if necessary, training set into the subtraining and validation sets (in this order) without changing the order of indices.
26
+ - random sampling.
27
+ - user-defined: requests MLatom to read indices for the training, test, and, if necessary, for the subtraining and validation sets from files.
28
+ - [ structure-based sampling ](http://mlatom.com/self-correcting-machine-learning-and-structure-based-sampling/)
29
+ - from unsliced and sliced data
30
+ - [ farthest-point traversal iterative procedure ](https://en.wikipedia.org/wiki/Farthest-first_traversal), which starts from two points farthest apart.
31
+
32
+
33
+ # ML Algorithm
34
+ [ Kernel ridge regression](https://web.stanford.edu/~hastie/ElemStatLearn/) with the following kernels:
35
+ - [ Gaussian ](https://doi.org/10.1103/PhysRevLett.108.058301).
36
+ - [ Laplacian ](https://doi.org/10.1103/PhysRevLett.108.058301).
37
+ - exponential.
38
+ - [ Matérn ](http://dx.doi.org/10.1198/jasa.2010.tm09420) ([ details of implementation ](http://dx.doi.org/10.1021/acs.jpclett.8b02469)).
39
+ Permutationally invariant kernel and self-correction are also supported.
40
+
41
+
42
+ # Hybrid QM/ML Approaches
43
+ [ Δ-machine learning ](http://dx.doi.org/10.1021/acs.jctc.5b00099).
44
+
45
+
46
+ # Molecular Descriptors
47
+ - [ Coulomb matrix ](https://doi.org/10.1103/PhysRevLett.108.058301)
48
+ - [ sorted by norms of its rows ](http://dx.doi.org/10.1021/ct400195d);
49
+ - unsorted;
50
+ - permuted.
51
+ - [ Normalized inverse internuclear distances (RE descriptor)](http://mlatom.com/self-correcting-machine-learning-and-structure-based-sampling/)
52
+ - sorted for user-defined atoms by the sum of their nuclear repulsions to all other atoms;
53
+ - unsorted;
54
+ - permuted.
55
+
56
+
57
+ # ML models
58
+ The [ KREG (Kernel-ridge-regression using RE descriptor and the Gaussian kernel function )](http://dx.doi.org/10.1021/acs.jpclett.8b02469) model is the default ML method.
59
+
60
+ ## General-purpose ML models
61
+ - AIQM1 (requires interfaces to other programs as described in http://MLatom.com/AIQM1)
62
+ - Models available via interface to [TorchANI](https://doi.org/10.1021/acs.jcim.0c00451)
63
+ - ANI-1x
64
+ - ANI-1ccx
65
+ - ANI-2x
66
+
67
+ # Model Validation
68
+ [ ML model can be validated (generalization error can be estimated) in several ways: ](https://web.stanford.edu/~hastie/ElemStatLearn/)
69
+
70
+ - on a hold-out test set not used for training. Both training and test sets can be sampled in one of the ways described above;
71
+ - by performing N-fold cross-validation. User can define the number of folds N. If N is equal to the number of data points, leave-one-out cross-validation is performed. Only random or no sampling can be used for cross-validation.
72
+ - by performing leave-one-out cross-validation (special case of N-fold cross-validation).
73
+ MLatom prints out mean absolute error (MAE), mean signed error (MSE), root-mean-squared error (RMSE), mean values of reference and estimated values, largest positive and negative outliers, correlation coefficient and its squared value R2 as well as coefficients of linear regression and corresponding standard deviations.
74
+
75
+
76
+ # Hyperparameter Tuning
77
+ Gaussian, Laplacian, and Matérn kernels have σ and λ tunable hyperparameters. MLatom can determine them by performing user-defined number of iterations of hyperparameter optimization on a logarithmic grid. User can adjust number of grid points, starting and finishing points on the grid. Hyperparameter are tuned to minimize either mean absolute error or root-mean-square error as defined by the user. [ Hyperparameters can be tuned to minimize ](https://web.stanford.edu/~hastie/ElemStatLearn/)
78
+
79
+ - the error of the ML model trained on the subtraining set in a hold-out validation set. Both subtraining and validation sets are parts of the training set, which can be used at the end with optimal parameters for training the final ML model. These sets ideally should not overlap and can be [ sampled ](http://mlatom.com/features/#Sampling) from the training set in one of the ways described above;
80
+ - N-fold cross-validation error. User can define the number of folds N. If N is equal to the number of data points, leave-one-out cross-validation is performed. Only random or no sampling can be used for cross-validation.
81
+
82
+ Note that hyperparameter tuning can be performed together with model validation. This means that for example one can perform outer loop of the cross-validation for model validation and tune hyperparameters via inner loop of the cross-validation.
83
+
84
+ Apart from natively implemented logarithmic grid search for hyperparameters, MLatom also provides the interface to the [ hyperopt package ](http://hyperopt.github.io/hyperopt/) implementing hyperparameter optimization using Bayesian methods with Tree-structured Parzen Estimator (TPE).
85
+
86
+
87
+ # First Derivatives
88
+ MLatom can be also used to estimate first derivatives from an ML model. Two scenarios are possible:
89
+
90
+ - partial derivatives are calculated for each dimension of given input vectors (analytical derivatives for Gaussian and Matern kernels);
91
+ - first derivatives are calculated in XYZ coordinates for input files containing molecular XYZ coordinates (analytical derivatives for the RE and Coulomb matrix descriptors).
92
+ - derivatives for interfaced models
93
+
94
+
95
+ # UV/vis spectra
96
+ MLatom can significantly accelerate the calculation of cross-section with the Nuclear Ensemble Approach (NEA).
97
+
98
+ In brief, this feature uses fewer QC calculation to achieve higher precision and reduce computational cost. You can find more detail on this paper (please cite it when using this feature):
99
+
100
+ > Bao-Xin Xue, Mario Barbatti, Pavlo O. Dral, [ Machine Learning for Absorption Cross Sections ](https://doi.org/10.1021/acs.jpca.0c05310), J. Phys. Chem. A 2020, 124, 7199–7210. DOI: 10.1021/acs.jpca.0c05310.
101
+
102
+ # Interfaces to 3<sup>rd</sup>-party software
103
+ MLatom also provides interfaces to some third-party software where extra ML model types are natively implemented. It allows users to access other popular ML model types within MLatom's workflow. Currently available third-party model types are:
104
+
105
+ - [ANI](https://doi.org/10.1039/c6sc05720a) (through [TorchANI](https://doi.org/10.1021/acs.jcim.0c00451))
106
+ - [DeepPot-SE](https://papers.nips.cc/paper/2018/hash/e2ad76f2326fbc6b56a45a56c59fafdb-Abstract.html) and [DPMD](https://doi.org/10.1103/PhysRevLett.120.143001) (through [DeePMD-kit](https://doi.org/10.1016/j.cpc.2018.03.016))
107
+ - [GAP](https://doi.org/10.1103/Physrevlett.104.136403)-[SOAP](https://doi.org/10.1103/physrevb.87.184115) (through [GAP](www.libatoms.org) suite and [QUIP](http://github.com/libAtoms/QUIP))
108
+ - [PhysNet](https://doi.org/10.1021/acs.jctc.9b00181) (through [PhysNet](github.com/MMunibas/PhysNet))
109
+ - [sGDML](https://doi.org/10.1038/s41467-018-06169-2) (through [sGDML](www.sgdml.org))
110
+
111
+ # About Program
112
+ MLatom: a Package for Atomistic Simulations with Machine Learning
113
+ Version 2.3.3
114
+ http://mlatom.com/
115
+
116
+ Copyright (c) 2013-2022 Pavlo O. Dral
117
+ http://dr-dral.com/
118
+
119
+ All rights reserved. This work is licensed under the [Attribution-NonCommercial-NoDerivatives 4.0 International](http://creativecommons.org/licenses/by-nc-nd/4.0/) license. See LICENSE.CC-BY-NC-ND-4.0.
120
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
121
+ 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.
122
+
123
+ Cite as:
124
+
125
+ 1. Pavlo O. Dral, J. Comput. Chem. 2019, 40, 2339-2347
126
+ 2. Pavlo O. Dral, Fuchun Ge, Bao-Xin Xue, Yi-Fan Hou, Max Pinheiro Jr, Jianxing Huang, Mario Barbatti, Top. Curr. Chem. 2021, 379, 27
127
+ 3. Pavlo O. Dral, Peikun Zheng, Bao-Xin Xue, Fuchun Ge, Yi-Fan Hou, Max Pinheiro Jr, Yuming Su, Yiheng Dai, Yangtao Chen, MLatom: A Package for Atomistic Simulations with Machine Learning, version 2.3.3, Xiamen University, Xiamen, China, 2013-2022.
128
+
129
+
130
+ # License
131
+
132
+ This work is licensed under the [Attribution-NonCommercial-NoDerivatives 4.0 International](http://creativecommons.org/licenses/by-nc-nd/4.0/) license. See LICENSE.CC-BY-NC-ND-4.0.
133
+
134
+ <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
mlatom-3.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
mlatom-3.0.0/setup.py ADDED
@@ -0,0 +1,82 @@
1
+ from setuptools import setup, find_packages
2
+ from setuptools.command.install_scripts import install_scripts
3
+ from contextlib import suppress
4
+ from pathlib import Path
5
+ import os
6
+ import sys
7
+
8
+ pkg_name = "mlatom"
9
+ mlatom_script = 'mlatom'
10
+ site_pkg = ''
11
+ def modify_mlatom_script(script_path: str):
12
+ global site_pkg
13
+ for path in sys.path:
14
+ with suppress(BaseException):
15
+ for path_dir in os.listdir(path):
16
+ if pkg_name in path_dir:
17
+ site_pkg = path
18
+ print(site_pkg)
19
+ MLatom_py_file = os.path.join(site_pkg, pkg_name, 'MLatom.py')
20
+ content = f"""#!/bin/bash
21
+ export mlatom='{MLatom_py_file}'
22
+ $mlatom "$@"
23
+ """
24
+ with open(script_path, 'w') as f:
25
+ f.write(content)
26
+
27
+ def chmod_py(path):
28
+ for py_file in Path(path).glob('*.py'):
29
+ py_file.chmod(0o755)
30
+
31
+ class InstallScripts(install_scripts):
32
+ def run(self):
33
+ install_scripts.run(self)
34
+
35
+ # Rename some script files
36
+ for script in self.get_outputs():
37
+ if script.endswith('mlatom'):
38
+ modify_mlatom_script(script)
39
+
40
+ here = os.path.abspath(os.path.dirname(__file__))
41
+ with open(os.path.join(here, 'README.md')) as f:
42
+ README = f.read()
43
+
44
+ setup(
45
+ name = pkg_name,
46
+ version = "3.0.0",
47
+ author = "Pavlo O. Dral",
48
+ author_email = "admin@mlatom.com",
49
+ license = 'MIT (modified)',
50
+ description = "A Package for Atomistic Simulations with Machine Learning",
51
+ long_description = README,
52
+ long_description_content_type = 'text/markdown',
53
+ url = "http://mlatom.com",
54
+ python_requires='>=3.8',
55
+ packages = find_packages('src'),
56
+ package_dir = {'' : 'src'},
57
+ # scripts = ['mlatom', 'MLatomF'],
58
+ package_data = {"": ['MLatomF', 'README', '*.json', 'cs.so', '*.cpp', '*.pt', '*.dat', '*.txt', '*.pkl', '*.inp', '*.f90', 'Makefile', 'Makefile.intel', '*.saved', '*.sh']},
59
+ classifiers = [
60
+ "Programming Language :: Python :: 3",
61
+ "Operating System :: POSIX :: Linux",
62
+ "Programming Language :: Fortran",
63
+ "Topic :: Scientific/Engineering :: Chemistry",
64
+ "Environment :: Console",
65
+ ],
66
+ install_requires = [],
67
+ # , 'pandas', '<scikit-learn> < <1.0.0>', 'xgboost', 'rdkit'
68
+ entry_points = {
69
+ 'console_scripts' : ['mlatom-gui = mlatom.mlatom_gui:main',
70
+ 'mlatom_gui = mlatom.mlatom_gui:main',
71
+ 'mlatom = mlatom.shell_cmd:mlatom',
72
+ # 'MLatom.py = MLatom.shell_cmd:mlatom',
73
+ 'MLatomF = mlatom.shell_cmd:MLatomF']
74
+ }
75
+ # cmdclass = {
76
+ # "install_scripts": InstallScripts
77
+ # }
78
+ )
79
+
80
+ # bin_path = os.path.dirname(sys.executable)
81
+ # modify_mlatom_script(os.path.join(bin_path, mlatom_script))
82
+ # chmod_py(os.path.join(site_pkg, pkg_name))