venuspython 1.0.1__tar.gz → 1.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: venuspython
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: VENUSpy Initial Sampling and Molecular Dynamics
5
5
  Keywords: moleculardynamics,initialsampling
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -33,11 +33,11 @@ Inside the downloaded folder, you can install VENUSpy with the Atomic Simulation
33
33
 
34
34
  ```
35
35
  cd VENUSpy
36
- pip install venuspy
36
+ pip install venuspython
37
37
  pip install ase
38
38
  ```
39
39
 
40
- The file `cli.py` can be run with your favourite Python environment so long as the appropriate packages can be installed. Then, input files and command line arguments can be supplied to it.
40
+ The file `cli.py` can be run with your favourite Python environment so long as the appropriate packages can be installed; if installed with pip, then it can also be accessed with the alias `venuspy-cli`. Then, input files and command line arguments can be supplied to it.
41
41
 
42
42
  There are three key features in VENUSpy:
43
43
  - [Sampling Methods](#sampling-methods)
@@ -67,7 +67,7 @@ pip install tblite
67
67
  Water is a nonlinear molecule with three atoms, so it has three normal modes. The vibrational quanta of each mode will be sampled from a canonical ensemble with the `--INITQPa "thermal"` argument, which assumes energies in each mode are related by a temperature. The frequency of the modes dictates the distribution of quanta and their energies. With xTB, these frequencies are 3653 cm<sup>-1</sup> > 3645 cm<sup>-1</sup> > 1538 cm<sup>-1</sup> for the symmetric stretch, asymmetric stretch, and bending modes, respectively. VENUSpy can sample these with:
68
68
 
69
69
  ```
70
- python -u cli.py examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --TVIBa 298.0 --TROTa 0.001 --n_threads 1 > production.log
70
+ venuspy-cli examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --TVIBa 298.0 --TROTa 0.001 --n_threads 1 > production.log
71
71
  ```
72
72
 
73
73
  While tracking the normal mode breakdown of energies over the entire trajectory is slow (this requires a Hessian calculation at each step), this can be done for the first frame from the initial sampling. Search for the `Evibs` keyword in the output to see energies of each mode (in eV).
@@ -94,7 +94,7 @@ The resulting distribution of vibrational energies in each mode is shown in the
94
94
  Water is a nonlinear molecule with three atoms, so it has three normal modes. The vibrational energies of each mode will be sampled from a microcanonical ensemble with the `--INITQPa "microcanonical"` argument, which assumes uniform mixing of energies between all modes. The frequency of the modes dictates the absolute amount of energy ultimately given to a mode. With xTB, these frequencies are 3653 cm<sup>-1</sup> > 3645 cm<sup>-1</sup> > 1538 cm<sup>-1</sup> for the symmetric stretch, asymmetric stretch, and bending modes, respectively. VENUSpy can sample these with:
95
95
 
96
96
  ```
97
- python -u cli.py examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "microcanonical" --EVIBa 12.6372 --EROTa 0.00001 --n_threads 1 > production.log
97
+ venuspy-cli examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "microcanonical" --EVIBa 12.6372 --EROTa 0.00001 --n_threads 1 > production.log
98
98
  ```
99
99
 
100
100
  While tracking the normal mode breakdown of energies over the entire trajectory is slow (this requires a Hessian calculation at each step), this can be done for the first frame from the initial sampling. Search for the `Evibs` keyword in the output to see energies of each mode (in eV).
@@ -123,7 +123,7 @@ Finally, there is one more special case for diatomic molecules. Because polyatom
123
123
  Let's do an example for the OH radical with the same software, for the N=2,J=5 rovibrational state:
124
124
 
125
125
  ```
126
- python -u cli.py examples/OH.input.xyz examples/OH.input.xtb . --atomsInFirstGroup "1 2" --production 100 --interval 1 --time_step 0.15 --INITQPa "semiclassical" --NVIBa 2 --NROTa 5 --n_threads 1 > production.log
126
+ venuspy-cli examples/OH.input.xyz examples/OH.input.xtb . --atomsInFirstGroup "1 2" --production 100 --interval 1 --time_step 0.15 --INITQPa "semiclassical" --NVIBa 2 --NROTa 5 --n_threads 1 > production.log
127
127
  ```
128
128
 
129
129
  Note that, with the semiclassical method, the rovibrational states' energies are not known a priori, as they are not approximated from the normal mode frequencies. Thus, only specific rovibrational states (N,J) can be sampled rather than ensembles. However, the ensemble of phases for a state are still sampled.
@@ -177,7 +177,7 @@ H -2.684400 1.453100 0.000000
177
177
  Then, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
178
178
 
179
179
  ```
180
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.mopac . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
180
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.mopac . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
181
181
  ```
182
182
 
183
183
  Sometimes the SCF calculation in MOPAC does not converge which leads to the error: `ase.calculators.calculator.CalculationFailed: ... failed`. This happens about 1/5 times for this system; restarting it often resolves this.
@@ -230,7 +230,7 @@ referencemethod uhf
230
230
  Similar to the MOPAC implementation, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
231
231
 
232
232
  ```
233
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.psi4 . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
233
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.psi4 . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
234
234
  ```
235
235
 
236
236
  While PSI4 is parallelized, it is a full electronic structure calculation so it takes more than a minute to do the molecular dynamics, let alone the initial sampling. By default, if there are convergence issues at any step of the initial sampling or dynamics, the ab initio calculation is restarted with slightly different or looser parameters. We suggest skipping a full trajectory simulation if trying this as a test.
@@ -281,7 +281,7 @@ H -2.684400 1.453100 0.000000
281
281
  Similar to the MOPAC implementation, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
282
282
 
283
283
  ```
284
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
284
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
285
285
  ```
286
286
 
287
287
  Sometimes the xTB calculation does not converge. By default, VENUSpy restarts the calculation a few times with slightly different parameters to try to save the trajectory.
@@ -333,7 +333,7 @@ Q1-Sgm chempotpy O3 O3_6_5Ap_2023 0
333
333
  Then, any initial sampling and MD parameters can be given to this. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold O2, the following command works:
334
334
 
335
335
  ```
336
- python -u cli.py examples/O.O2.input.xyz examples/O.O2.input.chempotpy . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
336
+ venuspy-cli examples/O.O2.input.xyz examples/O.O2.input.chempotpy . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
337
337
  ```
338
338
 
339
339
  </details>
@@ -362,13 +362,13 @@ For Schnet, first install an appropriate version (depending on the version of th
362
362
  python3.11 -m venv .schnetmd
363
363
  source .schnetmd/bin/activate
364
364
  pip install torch==2.3 schnetpack==2.0.4 pytorch-lightning==2.2
365
- pip install ase venuspy
365
+ pip install ase venuspython
366
366
  ```
367
367
 
368
368
  And then do the initial sampling and MD:
369
369
 
370
370
  ```
371
- python -u cli.py examples/CH.C4H6.input.xyz examples/MLmodels/CHC4H6/best_inference_model . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
371
+ venuspy-cli examples/CH.C4H6.input.xyz examples/MLmodels/CHC4H6/best_inference_model . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
372
372
  ```
373
373
 
374
374
 
@@ -378,13 +378,13 @@ For sGDML, first install the latest version with `pip`:
378
378
  python -m venv .sgdmlmd
379
379
  source .sgdmlmd/bin/activate
380
380
  pip install sgdml
381
- pip install ase venuspy
381
+ pip install ase venuspython
382
382
  ```
383
383
 
384
384
  And then do the initial sampling and MD:
385
385
 
386
386
  ```
387
- python -u cli.py examples/HBr.HCl.input.xyz examples/MLmodels/HBrHCl/model-train8000-sym2-sig0050.npz . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
387
+ venuspy-cli examples/HBr.HCl.input.xyz examples/MLmodels/HBrHCl/model-train8000-sym2-sig0050.npz . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
388
388
  ```
389
389
 
390
390
  For Physnet, first download the latest version from github and install tensorflow:
@@ -408,7 +408,7 @@ sed -i 's/from importlib.metadata import entry_points/from importlib_metadata im
408
408
  And then do the initial sampling and MD:
409
409
 
410
410
  ```
411
- python -u cli.py examples/CH.SH2.input.xyz examples/MLmodels/CHSH2/model.physnet.config . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log 2> /dev/null
411
+ venuspy-cli examples/CH.SH2.input.xyz examples/MLmodels/CHSH2/model.physnet.config . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log 2> /dev/null
412
412
  ```
413
413
 
414
414
  </details>
@@ -425,13 +425,13 @@ python -m venv .hybridmd
425
425
  source .hybridmd/bin/activate
426
426
  pip install sgdml
427
427
  pip install tblite
428
- pip install ase venuspy
428
+ pip install ase venuspython
429
429
  ```
430
430
 
431
431
  Add the argument `--MDtype "smoothed"` and you're good to go:
432
432
 
433
433
  ```
434
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --MDtype "smoothed" --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 5000 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
434
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --MDtype "smoothed" --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 5000 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
435
435
  ```
436
436
 
437
437
  The xTB software, although not a completely ab initio theory, uses similar kinds of SCF methods and also runs into convergence problems. Over the course of the 5000 steps simulated, it often will have two or three energy drift/jump issues. When this happens, the sGDML surface quickly trains on the local surface and tries to save the trajectory. After some number of steps, the xTB method takes over again.
@@ -20,11 +20,11 @@ Inside the downloaded folder, you can install VENUSpy with the Atomic Simulation
20
20
 
21
21
  ```
22
22
  cd VENUSpy
23
- pip install venuspy
23
+ pip install venuspython
24
24
  pip install ase
25
25
  ```
26
26
 
27
- The file `cli.py` can be run with your favourite Python environment so long as the appropriate packages can be installed. Then, input files and command line arguments can be supplied to it.
27
+ The file `cli.py` can be run with your favourite Python environment so long as the appropriate packages can be installed; if installed with pip, then it can also be accessed with the alias `venuspy-cli`. Then, input files and command line arguments can be supplied to it.
28
28
 
29
29
  There are three key features in VENUSpy:
30
30
  - [Sampling Methods](#sampling-methods)
@@ -54,7 +54,7 @@ pip install tblite
54
54
  Water is a nonlinear molecule with three atoms, so it has three normal modes. The vibrational quanta of each mode will be sampled from a canonical ensemble with the `--INITQPa "thermal"` argument, which assumes energies in each mode are related by a temperature. The frequency of the modes dictates the distribution of quanta and their energies. With xTB, these frequencies are 3653 cm<sup>-1</sup> > 3645 cm<sup>-1</sup> > 1538 cm<sup>-1</sup> for the symmetric stretch, asymmetric stretch, and bending modes, respectively. VENUSpy can sample these with:
55
55
 
56
56
  ```
57
- python -u cli.py examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --TVIBa 298.0 --TROTa 0.001 --n_threads 1 > production.log
57
+ venuspy-cli examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --TVIBa 298.0 --TROTa 0.001 --n_threads 1 > production.log
58
58
  ```
59
59
 
60
60
  While tracking the normal mode breakdown of energies over the entire trajectory is slow (this requires a Hessian calculation at each step), this can be done for the first frame from the initial sampling. Search for the `Evibs` keyword in the output to see energies of each mode (in eV).
@@ -81,7 +81,7 @@ The resulting distribution of vibrational energies in each mode is shown in the
81
81
  Water is a nonlinear molecule with three atoms, so it has three normal modes. The vibrational energies of each mode will be sampled from a microcanonical ensemble with the `--INITQPa "microcanonical"` argument, which assumes uniform mixing of energies between all modes. The frequency of the modes dictates the absolute amount of energy ultimately given to a mode. With xTB, these frequencies are 3653 cm<sup>-1</sup> > 3645 cm<sup>-1</sup> > 1538 cm<sup>-1</sup> for the symmetric stretch, asymmetric stretch, and bending modes, respectively. VENUSpy can sample these with:
82
82
 
83
83
  ```
84
- python -u cli.py examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "microcanonical" --EVIBa 12.6372 --EROTa 0.00001 --n_threads 1 > production.log
84
+ venuspy-cli examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "microcanonical" --EVIBa 12.6372 --EROTa 0.00001 --n_threads 1 > production.log
85
85
  ```
86
86
 
87
87
  While tracking the normal mode breakdown of energies over the entire trajectory is slow (this requires a Hessian calculation at each step), this can be done for the first frame from the initial sampling. Search for the `Evibs` keyword in the output to see energies of each mode (in eV).
@@ -110,7 +110,7 @@ Finally, there is one more special case for diatomic molecules. Because polyatom
110
110
  Let's do an example for the OH radical with the same software, for the N=2,J=5 rovibrational state:
111
111
 
112
112
  ```
113
- python -u cli.py examples/OH.input.xyz examples/OH.input.xtb . --atomsInFirstGroup "1 2" --production 100 --interval 1 --time_step 0.15 --INITQPa "semiclassical" --NVIBa 2 --NROTa 5 --n_threads 1 > production.log
113
+ venuspy-cli examples/OH.input.xyz examples/OH.input.xtb . --atomsInFirstGroup "1 2" --production 100 --interval 1 --time_step 0.15 --INITQPa "semiclassical" --NVIBa 2 --NROTa 5 --n_threads 1 > production.log
114
114
  ```
115
115
 
116
116
  Note that, with the semiclassical method, the rovibrational states' energies are not known a priori, as they are not approximated from the normal mode frequencies. Thus, only specific rovibrational states (N,J) can be sampled rather than ensembles. However, the ensemble of phases for a state are still sampled.
@@ -164,7 +164,7 @@ H -2.684400 1.453100 0.000000
164
164
  Then, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
165
165
 
166
166
  ```
167
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.mopac . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
167
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.mopac . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
168
168
  ```
169
169
 
170
170
  Sometimes the SCF calculation in MOPAC does not converge which leads to the error: `ase.calculators.calculator.CalculationFailed: ... failed`. This happens about 1/5 times for this system; restarting it often resolves this.
@@ -217,7 +217,7 @@ referencemethod uhf
217
217
  Similar to the MOPAC implementation, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
218
218
 
219
219
  ```
220
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.psi4 . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
220
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.psi4 . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
221
221
  ```
222
222
 
223
223
  While PSI4 is parallelized, it is a full electronic structure calculation so it takes more than a minute to do the molecular dynamics, let alone the initial sampling. By default, if there are convergence issues at any step of the initial sampling or dynamics, the ab initio calculation is restarted with slightly different or looser parameters. We suggest skipping a full trajectory simulation if trying this as a test.
@@ -268,7 +268,7 @@ H -2.684400 1.453100 0.000000
268
268
  Similar to the MOPAC implementation, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
269
269
 
270
270
  ```
271
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
271
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
272
272
  ```
273
273
 
274
274
  Sometimes the xTB calculation does not converge. By default, VENUSpy restarts the calculation a few times with slightly different parameters to try to save the trajectory.
@@ -320,7 +320,7 @@ Q1-Sgm chempotpy O3 O3_6_5Ap_2023 0
320
320
  Then, any initial sampling and MD parameters can be given to this. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold O2, the following command works:
321
321
 
322
322
  ```
323
- python -u cli.py examples/O.O2.input.xyz examples/O.O2.input.chempotpy . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
323
+ venuspy-cli examples/O.O2.input.xyz examples/O.O2.input.chempotpy . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
324
324
  ```
325
325
 
326
326
  </details>
@@ -349,13 +349,13 @@ For Schnet, first install an appropriate version (depending on the version of th
349
349
  python3.11 -m venv .schnetmd
350
350
  source .schnetmd/bin/activate
351
351
  pip install torch==2.3 schnetpack==2.0.4 pytorch-lightning==2.2
352
- pip install ase venuspy
352
+ pip install ase venuspython
353
353
  ```
354
354
 
355
355
  And then do the initial sampling and MD:
356
356
 
357
357
  ```
358
- python -u cli.py examples/CH.C4H6.input.xyz examples/MLmodels/CHC4H6/best_inference_model . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
358
+ venuspy-cli examples/CH.C4H6.input.xyz examples/MLmodels/CHC4H6/best_inference_model . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
359
359
  ```
360
360
 
361
361
 
@@ -365,13 +365,13 @@ For sGDML, first install the latest version with `pip`:
365
365
  python -m venv .sgdmlmd
366
366
  source .sgdmlmd/bin/activate
367
367
  pip install sgdml
368
- pip install ase venuspy
368
+ pip install ase venuspython
369
369
  ```
370
370
 
371
371
  And then do the initial sampling and MD:
372
372
 
373
373
  ```
374
- python -u cli.py examples/HBr.HCl.input.xyz examples/MLmodels/HBrHCl/model-train8000-sym2-sig0050.npz . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
374
+ venuspy-cli examples/HBr.HCl.input.xyz examples/MLmodels/HBrHCl/model-train8000-sym2-sig0050.npz . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
375
375
  ```
376
376
 
377
377
  For Physnet, first download the latest version from github and install tensorflow:
@@ -395,7 +395,7 @@ sed -i 's/from importlib.metadata import entry_points/from importlib_metadata im
395
395
  And then do the initial sampling and MD:
396
396
 
397
397
  ```
398
- python -u cli.py examples/CH.SH2.input.xyz examples/MLmodels/CHSH2/model.physnet.config . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log 2> /dev/null
398
+ venuspy-cli examples/CH.SH2.input.xyz examples/MLmodels/CHSH2/model.physnet.config . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log 2> /dev/null
399
399
  ```
400
400
 
401
401
  </details>
@@ -412,13 +412,13 @@ python -m venv .hybridmd
412
412
  source .hybridmd/bin/activate
413
413
  pip install sgdml
414
414
  pip install tblite
415
- pip install ase venuspy
415
+ pip install ase venuspython
416
416
  ```
417
417
 
418
418
  Add the argument `--MDtype "smoothed"` and you're good to go:
419
419
 
420
420
  ```
421
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --MDtype "smoothed" --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 5000 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
421
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --MDtype "smoothed" --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 5000 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
422
422
  ```
423
423
 
424
424
  The xTB software, although not a completely ab initio theory, uses similar kinds of SCF methods and also runs into convergence problems. Over the course of the 5000 steps simulated, it often will have two or three energy drift/jump issues. When this happens, the sGDML surface quickly trains on the local surface and tries to save the trajectory. After some number of steps, the xTB method takes over again.
@@ -0,0 +1 @@
1
+ __version__ = "1.0.2"
@@ -0,0 +1,577 @@
1
+ from ase.io import read
2
+ from ase.md.verlet import VelocityVerlet
3
+ from ase import units
4
+
5
+ from ase.vibrations import Vibrations
6
+ import random
7
+
8
+ import argparse
9
+ import numpy as np
10
+ import os
11
+
12
+ # For initial sampling:
13
+ from .initialSampling import initialSampling
14
+
15
+ # For rewindrestarts:
16
+ from ase.io.extxyz import read_xyz
17
+
18
+ # For rewinds with sGDML:
19
+ from .md import regularMD, pingpongMD, smoothedMD, r2threshold
20
+
21
+
22
+
23
+ # Try importing BAGEL
24
+ try:
25
+ from .calc.bagelcalc import bagelcalculator
26
+ except ImportError:
27
+ print("WARNING: BAGEL has not been loaded ... it will not be available for initial sampling")
28
+
29
+ # Try importing psi4
30
+ try:
31
+ from .calc.psi4calc import psi4calculator
32
+ except ImportError:
33
+ print("WARNING: psi4 has not been loaded ... it will not be available for initial sampling")
34
+
35
+ # Try importing xtb (fast, semi-empirical DFT):
36
+ try:
37
+ # from tblite.ase import TBLite
38
+ from .calc.xtbcalc import TBLite
39
+ except ImportError:
40
+ print("WARNING: xtb has not been loaded ... it will not be available for initial sampling")
41
+
42
+ # Try import NWChem (not NWChemEx)
43
+ try:
44
+ from .calc.nwchemcalc import nwchemcalculator
45
+ except ImportError:
46
+ print("WARNING: NWChem has not been loaded ... it will not be available for initial sampling")
47
+
48
+ # Try importing NWChemEx
49
+ try:
50
+ from .calc.nwchemexcalc import nwchemexcalculator
51
+ except ImportError:
52
+ print("WARNING: NWChemEx has not been loaded ... it will not be available for initial sampling")
53
+
54
+ # Try importing QCEngine/GAMESS
55
+ try:
56
+ from .calc.qcengineGAMESScalc import qcengineGAMESScalculator
57
+ except ImportError:
58
+ print("WARNING: QCEngine/GAMESS has not been loaded ... it will not be available for initial sampling")
59
+
60
+ # Try importing sGDML
61
+ try:
62
+ import sgdml
63
+ from sgdml.train import GDMLTrain
64
+ from sgdml.predict import GDMLPredict
65
+ from sgdml.intf.ase_calc import SGDMLCalculator
66
+
67
+ from .calc.minisgdmlcalc import miniSGDMLCalculator
68
+
69
+ except ImportError:
70
+ print("WARNING: sGDML has not been loaded ... it will not be available for initial sampling")
71
+
72
+ # Try importing chempotpy
73
+ try:
74
+ from .calc.chempotpycalc import chempotpyCalculator
75
+ except ImportError:
76
+ print("WARNING: chempotpy has not been loaded ... it will not be available for initial sampling")
77
+
78
+ # Try importing Schnet
79
+ try:
80
+ import schnetpack as spk
81
+ import torch
82
+ except ImportError:
83
+ print("WARNING: Schnet has not been loaded ... it will not be available for initial sampling")
84
+
85
+ # Try importing Physnet
86
+ try:
87
+ from .calc.physnetcalc import PNCalculator
88
+ except ImportError:
89
+ print("WARNING: Physnet has not been loaded ... it will not be available for initial sampling")
90
+
91
+
92
+
93
+ ###################################################
94
+
95
+ # Define global constants up here in the correct
96
+ # units so that internally, everything uses:
97
+ # Energy: eV
98
+ # Distance: Angstrom
99
+ # Mass: Dalton
100
+
101
+ # global r2threshold
102
+
103
+ ###################################################
104
+
105
+ parser = argparse.ArgumentParser(description="Do a single MD trajectory using a initial geometry (and momenta) and a sGDML model",formatter_class=argparse.ArgumentDefaultsHelpFormatter)
106
+ parser.add_argument("initialGeometryFile", type=str, help="XYZ file with initial geometry; if initial conditions are sampled in the script, then this argument is required but is just an example XYZ")
107
+ parser.add_argument("PESinputFile", type=str, help="PES input file (may be a psi4 input file or a sGDML .npz model)")
108
+ parser.add_argument("outputDir", type=str, help="Directory to output stuff in")
109
+ parser.add_argument("--isotopeMassesFile", type=str, help="Change masses of specific atoms e.g. like isotopic substitution", default=None)
110
+ parser.add_argument("--rewindrestartFile", type=str, help="EXYZ file of a previous trajectory to rewind-restart from",default=None)
111
+ parser.add_argument("--rewindrestartEnergyThreshold", type=float, help="The energy threshold for allowable energy jumps to rewind-restart from",default=0.50)
112
+ parser.add_argument("--rewindrestartNskip", type=int, help="The number of frames at the end of the trajectory to skip possible restarts from",default=0)
113
+ parser.add_argument("--initialMomentaFile", type=str, help="XYZ file with initial momenta")
114
+ parser.add_argument("--atomsInFirstGroup", type=str, help="String with atoms which are in first group of atoms, separated by spaces")
115
+ parser.add_argument("--collisionEnergy", type=float, help="Collision energy in kcal/mol")
116
+ parser.add_argument("--impactParameter", type=float, help="Impact parameter in Angstrom")
117
+ parser.add_argument("--centerOfMassDistance", type=float, help="Distance between the two molecules' centers of mass in Angstrom")
118
+ parser.add_argument('--optimize', type=bool, default=True)
119
+ parser.add_argument("--production", type=int, help="Supply number of steps for a production run")
120
+ parser.add_argument("--interval", type=int, help="How often to print out the energy")
121
+ parser.add_argument("--time_step", type=float, help="The time step in fs for a production run")
122
+ parser.add_argument("--MDtype", type=str, help="The type of molecular dynamics to do: 'regular', 'pingpong', or 'smoothed' with sGDML", default="regular")
123
+ parser.add_argument("--Nrewindsteps", type=int, help="The number of steps to use MLMD for when smoothing",default=4)
124
+ parser.add_argument("--dEmax", type=float, help="The maximum change in total energy allowed between consecutive steps",default=1.0)
125
+ parser.add_argument("--Edriftmax", type=float, help="The maximum change in total energy allowed from start to end",default=1.5)
126
+ parser.add_argument("--E0", type=float, help="The initial total energy to track the drift in total energy (e.g. if the trajectory is being restarted)",default=None)
127
+ parser.add_argument("--n_threads", type=int, help="The number of threads to ask psi4 to use")
128
+
129
+ parser.add_argument("--INITQPa", type=str, help="Initial sampling method for atoms in first group ('semiclassical', 'microcanonical', 'thermal', or None)", default="")
130
+ parser.add_argument("--NVIBa", type=int, help="Vibrational quantum number of atoms in first group (supply if using the 'semiclassical' initial sampling)")
131
+ parser.add_argument("--NROTa", type=int, help="Rotational quantum number of atoms in first group (supply if using the 'semiclassical' initial sampling)")
132
+ parser.add_argument("--EVIBa", type=float, help="Vibrational energy of atoms in first group (supply if using the 'microcanonical' initial sampling)")
133
+ parser.add_argument("--EROTa", type=float, help="Rotational energy of atoms in first group (supply if using the 'microcanonical' initial sampling)")
134
+ parser.add_argument("--TVIBa", type=float, help="Vibrational temperature of atoms in first group (supply if using the 'thermal' initial sampling)")
135
+ parser.add_argument("--TROTa", type=float, help="Rotational temperature of atoms in first group (supply if using the 'thermal' initial sampling)")
136
+
137
+ parser.add_argument("--INITQPb", type=str, help="Initial sampling method for atoms in second group ('semiclassical', 'microcanonical', 'thermal', or None)", default="")
138
+ parser.add_argument("--NVIBb", type=int, help="Vibrational quantum number of atoms in second group (supply if using the 'semiclassical' initial sampling)")
139
+ parser.add_argument("--NROTb", type=int, help="Rotational quantum number of atoms in second group (supply if using the 'semiclassical' initial sampling)")
140
+ parser.add_argument("--EVIBb", type=float, help="Vibrational energy of atoms in second group (supply if using the 'microcanonical' initial sampling)")
141
+ parser.add_argument("--EROTb", type=float, help="Rotational energy of atoms in second group (supply if using the 'microcanonical' initial sampling)")
142
+ parser.add_argument("--TVIBb", type=float, help="Vibrational temperature of atoms in second group (supply if using the 'thermal' initial sampling)")
143
+ parser.add_argument("--TROTb", type=float, help="Rotational temperature of atoms in second group (supply if using the 'thermal' initial sampling)")
144
+ args = vars(parser.parse_args())
145
+
146
+ ########################################################################################
147
+
148
+ # A function to print the potential, kinetic and total energy
149
+ def printenergy(a,step,energyflag):
150
+ if ("ERROR" in energyflag):
151
+ epot = 0.0
152
+ ekin = a.get_kinetic_energy() / (units.kcal/units.mol)
153
+ print('@Epot = %.3f Ekin = %.3f (T=%3.0fK) '
154
+ 'Etot = %.3f kcal/mol Step = %8d %s' % (epot, ekin, ekin / (len(a) * 1.5 * 8.617281e-5), epot + ekin, step, energyflag))
155
+ else:
156
+ epot = a.get_potential_energy() / (units.kcal/units.mol)
157
+ ekin = a.get_kinetic_energy() / (units.kcal/units.mol)
158
+ print('@Epot = %.3f Ekin = %.3f (T=%3.0fK) '
159
+ 'Etot = %.3f kcal/mol Step = %8d %s' % (epot, ekin, ekin / (len(a) * 1.5 * 8.617281e-5), epot + ekin, step, energyflag))
160
+
161
+ ########################################################################################
162
+
163
+ # Get the various arguments
164
+ Qfile = args["initialGeometryFile"]
165
+ input_path = args["PESinputFile"]
166
+ output_path = args["outputDir"]
167
+
168
+ rrQPfile = args["rewindrestartFile"]
169
+ rrQPdEmax = args["rewindrestartEnergyThreshold"]
170
+ rrNskip = args["rewindrestartNskip"]
171
+
172
+ Pfile = args["initialMomentaFile"]
173
+ atomsInFirstGroup = args["atomsInFirstGroup"]
174
+ ce = args["collisionEnergy"]
175
+ b = args["impactParameter"]
176
+ dCM = args["centerOfMassDistance"]
177
+
178
+ isotopeMassesFile = args["isotopeMassesFile"]
179
+ Nsteps = args["production"]
180
+ Nprint = args["interval"]
181
+ dt = args["time_step"]
182
+
183
+ MDtype = args["MDtype"]
184
+ dEmax = args["dEmax"]
185
+ Edriftmax = args["Edriftmax"]
186
+ E0= args["E0"]
187
+ Nrewindsteps = args["Nrewindsteps"]
188
+
189
+ optimize_flag = args["optimize"]
190
+
191
+ if ((Nsteps is None) or (Nprint is None) or (dt is None)):
192
+ raise ValueError("For MD, need to specify these three: --production --interval --time_step")
193
+
194
+ n_threads = args["n_threads"]
195
+ if (n_threads is None): n_threads = 1
196
+
197
+ samplingMethod = [ args["INITQPa"], args["INITQPb"] ]
198
+ vibrationSampling = []
199
+ rotationSampling = []
200
+ if (samplingMethod[0] == "semiclassical"):
201
+ vibrationSampling.append(args["NVIBa"])
202
+ rotationSampling.append(args["NROTa"])
203
+ elif ("microcanonical" in samplingMethod[0]):
204
+ vibrationSampling.append(args["EVIBa"])
205
+ rotationSampling.append(args["EROTa"])
206
+ else:
207
+ vibrationSampling.append(args["TVIBa"])
208
+ rotationSampling.append(args["TROTa"])
209
+ if (samplingMethod[1] == "semiclassical"):
210
+ vibrationSampling.append(args["NVIBb"])
211
+ rotationSampling.append(args["NROTb"])
212
+ elif ("microcanonical" in samplingMethod[1]):
213
+ vibrationSampling.append(args["EVIBb"])
214
+ rotationSampling.append(args["EROTb"])
215
+ else:
216
+ vibrationSampling.append(args["TVIBb"])
217
+ rotationSampling.append(args["TROTb"])
218
+
219
+ # Note:
220
+ # Right now, all arguments are mandatory (even though this does
221
+ # not raise a warning) except for isotopeMassesFile
222
+
223
+ # Adjust the maximum interatomic distance allowed
224
+ # for the simulation
225
+ if ((b is not None) and (dCM is not None) and (1.2*(b**2 + dCM**2) > r2threshold)):
226
+ r2threshold = 1.2*(b**2 + dCM**2)
227
+
228
+ ########################################################################################
229
+
230
+ # Look at the input file name to guess its identity
231
+ try_bagel = False
232
+ try_psi4 = False
233
+ try_xtb = False
234
+ try_mopac = False
235
+ try_chempotpy = False
236
+ try_nwchem = False
237
+ try_nwchemex = False
238
+ try_physnet = False
239
+ try_schnet = False
240
+ try_sgdml = False
241
+ try_qcenginegamess = False
242
+ if (input_path.endswith(('.npz',))):
243
+
244
+ print("Input file '"+input_path+"' looks like a sGDML file so will attempt to read it in as such...")
245
+ try:
246
+ calc = SGDMLCalculator(input_path)
247
+ try_sgdml = True
248
+ except:
249
+ print(" Could not load file '"+input_path+"' as a sGDML model!")
250
+ try_psi4 = True
251
+
252
+ elif (input_path.endswith(('.physnet.config',))):
253
+ print("Input file '"+input_path+"' looks like a PhysNet config file so will attempt to read it in as such...")
254
+
255
+ if True:
256
+ tmp_mol = read(Qfile)
257
+ calc = PNCalculator(input_path,tmp_mol)
258
+ try_physnet = True
259
+
260
+ elif (input_path.endswith(('.bagel',))):
261
+ try_bagel = True
262
+
263
+ elif (input_path.endswith(('.psi4',))):
264
+ try_psi4 = True
265
+
266
+ elif (input_path.endswith(('.nwchem',))):
267
+ try_nwchem = True
268
+
269
+ elif (input_path.endswith(('.chempotpy',))):
270
+ try_chempotpy = True
271
+
272
+ elif (input_path.endswith(('.xtb',))):
273
+ try_xtb = True
274
+
275
+ elif (input_path.endswith(('.mopac',))):
276
+ try_mopac = True
277
+
278
+ elif (input_path.endswith(('.gamess.qcengine',))):
279
+ try_qcenginegamess = True
280
+
281
+ elif (input_path.endswith(('.nwchemex',))):
282
+ try_nwchemex = True
283
+
284
+ else:
285
+ try_schnet = True
286
+
287
+
288
+
289
+
290
+ if (try_schnet):
291
+
292
+ # Initialize the ML ase interface
293
+
294
+ # To accomodate for the older versions of numpy used in Schnet==1.0
295
+ np.int = np.int32
296
+ np.float = np.float64
297
+ np.bool = np.bool_
298
+
299
+ calc = spk.interfaces.SpkCalculator(
300
+ input_path,
301
+ device="cpu",
302
+ energy="energy", # Name of energies
303
+ forces="forces", # Name of forces
304
+ energy_units="kcal/mol",
305
+ forces_units="kcal/mol/A",
306
+ neighbor_list=spk.transform.ASENeighborList(5.0),
307
+ )
308
+
309
+
310
+ if (try_bagel):
311
+ print("Reading input file '"+input_path+"' as a BAGEL input file...")
312
+ calc = bagelcalculator(custominputfile=input_path,command='mpirun /mnt/lustre/koa/koastore/rsun_group/camels/BAGEL_1_AV/BAGEL/bin/BAGEL bagel0.json > bagel0.out')
313
+
314
+ # calc.restarts_max = 2 # Max number of allowable SCF restarts
315
+
316
+ # To conform to VENUS, we are going to keep the units
317
+ # in kcal/mol and Angstroms (which the model was
318
+ # originally trained on)
319
+ calc.E_to_eV = units.Ha
320
+ calc.Ang_to_R = units.Ang
321
+ calc.F_to_eV_Ang = (units.Ha / units.Bohr)
322
+
323
+ if (try_psi4):
324
+ print("Reading input file '"+input_path+"' as a psi4 input file...")
325
+ calc = psi4calculator(input_path,n_threads=n_threads)
326
+
327
+ calc.restarts_max = 2 # Max number of allowable SCF restarts
328
+
329
+ # To conform to VENUS, we are going to keep the units
330
+ # in kcal/mol and Angstroms (which the model was
331
+ # originally trained on)
332
+ calc.E_to_eV = units.Ha
333
+ calc.Ang_to_R = units.Ang
334
+ calc.F_to_eV_Ang = (units.Ha / units.Bohr)
335
+
336
+ if (try_xtb):
337
+ print("Reading input file '"+input_path+"' as a xtb input file...")
338
+ calc = TBLite(input_path)
339
+
340
+ if (try_qcenginegamess):
341
+ print("Reading input file '"+input_path+"' as a QCEngine/GAMESS input file...")
342
+ calc = qcengineGAMESScalculator(input_path,n_threads=n_threads)
343
+
344
+ # To conform to VENUS, we are going to keep the units
345
+ # in kcal/mol and Angstroms (which the model was
346
+ # originally trained on)
347
+ calc.E_to_eV = units.Ha
348
+ calc.Ang_to_R = (units.Ang / units.Bohr)
349
+ calc.F_to_eV_Ang = (units.Ha / units.Bohr)
350
+
351
+ if (try_nwchemex):
352
+ print("Reading input file '"+input_path+"' as a NWChemEx input file...")
353
+ calc = nwchemexcalculator(input_path,output_path=output_path,n_threads=n_threads)
354
+
355
+ # To conform to VENUS, we are going to keep the units
356
+ # in kcal/mol and Angstroms (which the model was
357
+ # originally trained on)
358
+ calc.E_to_eV = units.Ha
359
+ calc.Ang_to_R = (units.Ang / units.Bohr)
360
+ calc.F_to_eV_Ang = (units.Ha / units.Bohr)
361
+
362
+ if (try_nwchem):
363
+ print("Reading input file '"+input_path+"' as a NWChem (not NWChemEx) input file...")
364
+ calc = nwchemcalculator(input_path,output_path=output_path,n_threads=n_threads)
365
+
366
+ # To conform to VENUS, we are going to keep the units
367
+ # in kcal/mol and Angstroms (which the model was
368
+ # originally trained on)
369
+ calc.E_to_eV = 1.0 # units.Ha
370
+ calc.Ang_to_R = 1.0 # (units.Ang / units.Bohr)
371
+ calc.F_to_eV_Ang = 1.0 # (units.Ha / units.Bohr)
372
+
373
+ if (try_chempotpy):
374
+
375
+ print("Reading input file '"+input_path+"' as a chempotpy input file...")
376
+
377
+ # Read the input file
378
+ with open(input_path, 'r') as f:
379
+
380
+ totallines = []
381
+ totalentries = []
382
+ for line in f:
383
+ strippedline=" ".join(line.split())
384
+ entries = strippedline.split(" ")
385
+ totallines.append(line)
386
+ totalentries = totalentries + entries
387
+
388
+ calc = chempotpyCalculator(totallines[0])
389
+ strippedline=" ".join(line.split()[2:])
390
+ print("Single state: {:s} - Chempotpy input: {:s}".format(totalentries[0],strippedline))
391
+
392
+ # Note, different chempotpy PES have different maximum allowed distances
393
+ # For O3 surfaces, 100 A is okay (= 2 * 50 A)
394
+ initialSampling.dSEPARATED = 50.0
395
+
396
+ # For now, just use a different distance threshold too
397
+ r2threshold = (dCM + 5.0) * (dCM + 5.0)
398
+
399
+
400
+ if (try_mopac):
401
+ print("Reading input file '"+input_path+"' as a MOPAC input file...")
402
+ calc = mopaccalculator(input_path,output_path=output_path)
403
+
404
+ # To conform to VENUS, we are going to keep the units
405
+ # in kcal/mol and Angstroms (which the model was
406
+ # originally trained on)
407
+ calc.E_to_eV = 1.0 # units.Ha
408
+ calc.Ang_to_R = 1.0 # (units.Ang / units.Bohr)
409
+ calc.F_to_eV_Ang = 1.0 # (units.Ha / units.Bohr)
410
+
411
+
412
+ # Read in the geometry; set it in the "calculator"
413
+ mol = read(Qfile)
414
+ mol.set_calculator(calc)
415
+ mol.calc = calc
416
+ mol._calc = calc
417
+
418
+ # Get the output trajectory file ready
419
+ trajfile = os.path.join(output_path, "production.traj")
420
+
421
+ # If the masses are given, update the masses
422
+ # Note: this must be done BEFORE setting the momenta
423
+ if not (isotopeMassesFile is None):
424
+ massFile = open(isotopeMassesFile,"r")
425
+ newMasses = massFile.readlines()
426
+ massFile.close()
427
+ if (len(newMasses) != len(mol)): #.masses)):
428
+ raise ValueError("Number of masses provided in the isotope mass file does not match the input XYZ")
429
+ mol.set_masses([float(i) for i in newMasses])
430
+
431
+ # If a rewind-restart file is given, read in the coordinates (Q),
432
+ # momenta (P), and energies, for a possible restart
433
+ if not (rrQPfile is None):
434
+
435
+ print("REWIND-RESTARTING using this file: " + rrQPfile)
436
+
437
+ # Look at the last 1500 frames to restart from (but skip the last rrNskip)
438
+ rrQPfilehandle = open(rrQPfile)
439
+ if (rrNskip <= 0):
440
+ rrmols = list(read_xyz(rrQPfilehandle,slice(-1500,None)))
441
+ rrNskip = 0
442
+ else:
443
+ rrmols = list(read_xyz(rrQPfilehandle,slice(-(1500+rrNskip),-rrNskip)))
444
+
445
+ rrQPflag = True
446
+ Nconsecutivegoodframes = 0
447
+ rrmols.reverse() # Go from the most-recent to least-recent
448
+ for i,rrmol in enumerate(rrmols):
449
+ mol.set_positions(rrmol.get_positions())
450
+ mol.set_velocities(rrmol.get_velocities())
451
+ mol.set_momenta(rrmol.get_momenta())
452
+
453
+ # Compare the original and restarted potential energies
454
+ E_original = rrmol.calc.results['energy']
455
+ try:
456
+ Nconsecutivegoodframes += 1
457
+ E_restart = mol.get_potential_energy()
458
+ dE = abs(E_original - E_restart) / (units.kcal/units.mol)
459
+ print("REWIND-RESTARTING sees that the %d-th to last frame (1-th to last = last frame) has original energy %.3f and restart energy %.3f kcal/mol"
460
+ % (rrNskip+i+1, E_original / (units.kcal/units.mol), E_restart / (units.kcal/units.mol)))
461
+ except:
462
+ Nconsecutivegoodframes = 0
463
+ dE = rrQPdEmax * 2
464
+ print("REWIND-RESTARTING sees that the %d-th to last frame (1-th to last = last frame) has original energy %.3f and restart energy NaN kcal/mol"
465
+ % (rrNskip+i+1, E_original / (units.kcal/units.mol)))
466
+
467
+ # If they agree within the threshold, then go ahead with the restart
468
+ if (dE < rrQPdEmax):
469
+
470
+ # For a smoothed MD simulation, we need a few frames at the start to buffer over
471
+ if (Nconsecutivegoodframes < 10):
472
+ if (MDtype == "smoothed"): continue
473
+
474
+ rrQPflag = False
475
+ print("REWIND-RESTARTING accepts using the %d-th to last frame! (1-th to last = last frame)" % (rrNskip+i+1,))
476
+ break
477
+
478
+ if (rrQPflag):
479
+ raise ValueError("REWIND-RESTARTING failed ... no acceptable frames to restart from")
480
+
481
+ # If a momenta file is given, read in the momenta
482
+ # Read it in as a geometry, and then set it into the molecule
483
+ elif not (Pfile is None):
484
+ frame = read(Pfile)
485
+ p = [atom.position for atom in frame]
486
+ mol.set_momenta(p)
487
+
488
+ masses=mol.get_masses()
489
+ v = [p[i]/masses[i] for i in range(len(p))]
490
+ mol.set_velocities(v)
491
+
492
+ # If there is no momenta file, then do initial sampling
493
+ else:
494
+
495
+ Natoms = len(mol)
496
+
497
+ # If no atoms are specified to be in the first group,
498
+ # assume that this is a unimolecular sampling
499
+ if (atomsInFirstGroup is None):
500
+ atomsInFirstGroup = range(Natoms)
501
+
502
+ atomsInFirstGroup = [int(i)-1 for i in atomsInFirstGroup.split()]
503
+
504
+ atomsInSecondGroup = []
505
+ for i in range(Natoms):
506
+ if (i not in atomsInFirstGroup): atomsInSecondGroup.append(i)
507
+
508
+ if ((len(atomsInFirstGroup) > 0) and (len(atomsInSecondGroup) > 0)):
509
+ bimolecular_flag = True
510
+ if ((ce is None) or (b is None) or (dCM is None)):
511
+ raise ValueError("Lacking an argument for bimolecular sampling (collision energy, impact parameter, of center of mass distance)")
512
+ else:
513
+ bimolecular_flag = False
514
+
515
+ print("")
516
+ print("GEOMETRY INPUT")
517
+ print(" Input geometry file: ", Qfile)
518
+ print("Atoms in first group: ", atomsInFirstGroup)
519
+ print("Atoms in second group: ", atomsInSecondGroup)
520
+ print("SAMPLING INPUT")
521
+ print(" Input momenta file: ", Pfile)
522
+ if (Pfile is None):
523
+ print(" Optimize molecules? ", optimize_flag)
524
+ print(" Group A sampling method: ", samplingMethod[0])
525
+ print(" Group A vibration: ", vibrationSampling[0])
526
+ print(" Group A rotation: ", rotationSampling[0])
527
+ print(" Group B sampling method: ", samplingMethod[1])
528
+ print(" Group B vibration: ", vibrationSampling[1])
529
+ print(" Group B rotation: ", rotationSampling[1])
530
+ print(" Impact parameter (A): ", b)
531
+ print(" Initial separation (A): ", dCM)
532
+ print(" Collsion energy (kcal/mol): ", ce)
533
+ else:
534
+ print(" Input momenta file: ", Pfile)
535
+
536
+ print("##############################################################")
537
+ print("")
538
+
539
+ # Sample the internal positions and momenta of each of
540
+ # the two molecules
541
+ sampler = initialSampling(mol,atomsInFirstGroup,optimize=optimize_flag,
542
+ optimization_file=os.path.join(output_path, "optimization.traj"),
543
+ samplingMethodA=samplingMethod[0],vibrationalSampleA=vibrationSampling[0],rotationalSampleA=rotationSampling[0],
544
+ samplingMethodB=samplingMethod[1],vibrationalSampleB=vibrationSampling[1],rotationalSampleB=rotationSampling[1])
545
+
546
+ print("Sampling internal degrees of freedom...")
547
+ sampler.sampleRelativeQP()
548
+
549
+ if (bimolecular_flag):
550
+ print("Sampling relative degrees of freedom...")
551
+ sampler.sampleAbsoluteQP(ce,dCM=dCM,b=b)
552
+
553
+ else:
554
+ sampler.centerMolecule(range(Natoms))
555
+
556
+ ########################################################################################
557
+
558
+ if (MDtype == "regular"):
559
+
560
+ MDgen = regularMD(mol,trajfile,dt,Nprint=Nprint)
561
+
562
+ elif (MDtype == "pingpong"):
563
+
564
+ MDgen = pingpongMD(mol,trajfile,dt,Nprint=Nprint)
565
+
566
+ elif (MDtype == "smoothed"):
567
+
568
+ # MDgen = smoothedMD(mol,trajfile,dt,Nprint=Nprint,Nrewindsteps=Nrewindsteps,dEmax=dEmax,Edriftmax=Edriftmax)
569
+ MDgen = smoothedMD(mol,trajfile,dt,Nprint=Nprint,Nrewindsteps=Nrewindsteps,dEmax=dEmax,Edriftmax=Edriftmax,E0=E0,n_threads=n_threads)
570
+
571
+ else:
572
+ raise ValueError("MD type '"+MDtype+"' is not valid! Exiting...")
573
+
574
+ MDgen.production(Nsteps)
575
+
576
+
577
+
@@ -1292,7 +1292,9 @@ class initialSampling:
1292
1292
  Nnonzeromodes = len(nonzeroEs)
1293
1293
  ZPEs, amplitudes = self.getVibrationalEnergiesAndAmplitudes(nonzeroEs,[0 for nonzeroE in nonzeroEs])
1294
1294
 
1295
- reorder_flag = True
1295
+ # nonzeroEs = np.array([105,109,385,484,530,777,877,891,1066,1091,1216,1364,1410,1426,1435,1454,1731,2937,2963,2972,3019])
1296
+
1297
+ reorder_flag = False
1296
1298
  if reorder_flag:
1297
1299
  i1=1
1298
1300
  i2=2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: venuspython
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: VENUSpy Initial Sampling and Molecular Dynamics
5
5
  Keywords: moleculardynamics,initialsampling
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -33,11 +33,11 @@ Inside the downloaded folder, you can install VENUSpy with the Atomic Simulation
33
33
 
34
34
  ```
35
35
  cd VENUSpy
36
- pip install venuspy
36
+ pip install venuspython
37
37
  pip install ase
38
38
  ```
39
39
 
40
- The file `cli.py` can be run with your favourite Python environment so long as the appropriate packages can be installed. Then, input files and command line arguments can be supplied to it.
40
+ The file `cli.py` can be run with your favourite Python environment so long as the appropriate packages can be installed; if installed with pip, then it can also be accessed with the alias `venuspy-cli`. Then, input files and command line arguments can be supplied to it.
41
41
 
42
42
  There are three key features in VENUSpy:
43
43
  - [Sampling Methods](#sampling-methods)
@@ -67,7 +67,7 @@ pip install tblite
67
67
  Water is a nonlinear molecule with three atoms, so it has three normal modes. The vibrational quanta of each mode will be sampled from a canonical ensemble with the `--INITQPa "thermal"` argument, which assumes energies in each mode are related by a temperature. The frequency of the modes dictates the distribution of quanta and their energies. With xTB, these frequencies are 3653 cm<sup>-1</sup> > 3645 cm<sup>-1</sup> > 1538 cm<sup>-1</sup> for the symmetric stretch, asymmetric stretch, and bending modes, respectively. VENUSpy can sample these with:
68
68
 
69
69
  ```
70
- python -u cli.py examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --TVIBa 298.0 --TROTa 0.001 --n_threads 1 > production.log
70
+ venuspy-cli examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --TVIBa 298.0 --TROTa 0.001 --n_threads 1 > production.log
71
71
  ```
72
72
 
73
73
  While tracking the normal mode breakdown of energies over the entire trajectory is slow (this requires a Hessian calculation at each step), this can be done for the first frame from the initial sampling. Search for the `Evibs` keyword in the output to see energies of each mode (in eV).
@@ -94,7 +94,7 @@ The resulting distribution of vibrational energies in each mode is shown in the
94
94
  Water is a nonlinear molecule with three atoms, so it has three normal modes. The vibrational energies of each mode will be sampled from a microcanonical ensemble with the `--INITQPa "microcanonical"` argument, which assumes uniform mixing of energies between all modes. The frequency of the modes dictates the absolute amount of energy ultimately given to a mode. With xTB, these frequencies are 3653 cm<sup>-1</sup> > 3645 cm<sup>-1</sup> > 1538 cm<sup>-1</sup> for the symmetric stretch, asymmetric stretch, and bending modes, respectively. VENUSpy can sample these with:
95
95
 
96
96
  ```
97
- python -u cli.py examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "microcanonical" --EVIBa 12.6372 --EROTa 0.00001 --n_threads 1 > production.log
97
+ venuspy-cli examples/H2O.input.xyz examples/H2O.input.xtb . --atomsInFirstGroup "1 2 3" --production 100 --interval 1 --time_step 0.15 --INITQPa "microcanonical" --EVIBa 12.6372 --EROTa 0.00001 --n_threads 1 > production.log
98
98
  ```
99
99
 
100
100
  While tracking the normal mode breakdown of energies over the entire trajectory is slow (this requires a Hessian calculation at each step), this can be done for the first frame from the initial sampling. Search for the `Evibs` keyword in the output to see energies of each mode (in eV).
@@ -123,7 +123,7 @@ Finally, there is one more special case for diatomic molecules. Because polyatom
123
123
  Let's do an example for the OH radical with the same software, for the N=2,J=5 rovibrational state:
124
124
 
125
125
  ```
126
- python -u cli.py examples/OH.input.xyz examples/OH.input.xtb . --atomsInFirstGroup "1 2" --production 100 --interval 1 --time_step 0.15 --INITQPa "semiclassical" --NVIBa 2 --NROTa 5 --n_threads 1 > production.log
126
+ venuspy-cli examples/OH.input.xyz examples/OH.input.xtb . --atomsInFirstGroup "1 2" --production 100 --interval 1 --time_step 0.15 --INITQPa "semiclassical" --NVIBa 2 --NROTa 5 --n_threads 1 > production.log
127
127
  ```
128
128
 
129
129
  Note that, with the semiclassical method, the rovibrational states' energies are not known a priori, as they are not approximated from the normal mode frequencies. Thus, only specific rovibrational states (N,J) can be sampled rather than ensembles. However, the ensemble of phases for a state are still sampled.
@@ -177,7 +177,7 @@ H -2.684400 1.453100 0.000000
177
177
  Then, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
178
178
 
179
179
  ```
180
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.mopac . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
180
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.mopac . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
181
181
  ```
182
182
 
183
183
  Sometimes the SCF calculation in MOPAC does not converge which leads to the error: `ase.calculators.calculator.CalculationFailed: ... failed`. This happens about 1/5 times for this system; restarting it often resolves this.
@@ -230,7 +230,7 @@ referencemethod uhf
230
230
  Similar to the MOPAC implementation, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
231
231
 
232
232
  ```
233
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.psi4 . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
233
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.psi4 . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
234
234
  ```
235
235
 
236
236
  While PSI4 is parallelized, it is a full electronic structure calculation so it takes more than a minute to do the molecular dynamics, let alone the initial sampling. By default, if there are convergence issues at any step of the initial sampling or dynamics, the ab initio calculation is restarted with slightly different or looser parameters. We suggest skipping a full trajectory simulation if trying this as a test.
@@ -281,7 +281,7 @@ H -2.684400 1.453100 0.000000
281
281
  Similar to the MOPAC implementation, any initial sampling and MD parameters can be given to this so long as the B and C<sub>2</sub>H<sub>2</sub> are kept separate. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold C<sub>2</sub>H<sub>2</sub>, the following command works:
282
282
 
283
283
  ```
284
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
284
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
285
285
  ```
286
286
 
287
287
  Sometimes the xTB calculation does not converge. By default, VENUSpy restarts the calculation a few times with slightly different parameters to try to save the trajectory.
@@ -333,7 +333,7 @@ Q1-Sgm chempotpy O3 O3_6_5Ap_2023 0
333
333
  Then, any initial sampling and MD parameters can be given to this. For example, for a bimolecular collision initiated with 2.4 kcal/mol of collision energy and cold O2, the following command works:
334
334
 
335
335
  ```
336
- python -u cli.py examples/O.O2.input.xyz examples/O.O2.input.chempotpy . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
336
+ venuspy-cli examples/O.O2.input.xyz examples/O.O2.input.chempotpy . --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
337
337
  ```
338
338
 
339
339
  </details>
@@ -362,13 +362,13 @@ For Schnet, first install an appropriate version (depending on the version of th
362
362
  python3.11 -m venv .schnetmd
363
363
  source .schnetmd/bin/activate
364
364
  pip install torch==2.3 schnetpack==2.0.4 pytorch-lightning==2.2
365
- pip install ase venuspy
365
+ pip install ase venuspython
366
366
  ```
367
367
 
368
368
  And then do the initial sampling and MD:
369
369
 
370
370
  ```
371
- python -u cli.py examples/CH.C4H6.input.xyz examples/MLmodels/CHC4H6/best_inference_model . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
371
+ venuspy-cli examples/CH.C4H6.input.xyz examples/MLmodels/CHC4H6/best_inference_model . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
372
372
  ```
373
373
 
374
374
 
@@ -378,13 +378,13 @@ For sGDML, first install the latest version with `pip`:
378
378
  python -m venv .sgdmlmd
379
379
  source .sgdmlmd/bin/activate
380
380
  pip install sgdml
381
- pip install ase venuspy
381
+ pip install ase venuspython
382
382
  ```
383
383
 
384
384
  And then do the initial sampling and MD:
385
385
 
386
386
  ```
387
- python -u cli.py examples/HBr.HCl.input.xyz examples/MLmodels/HBrHCl/model-train8000-sym2-sig0050.npz . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
387
+ venuspy-cli examples/HBr.HCl.input.xyz examples/MLmodels/HBrHCl/model-train8000-sym2-sig0050.npz . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
388
388
  ```
389
389
 
390
390
  For Physnet, first download the latest version from github and install tensorflow:
@@ -408,7 +408,7 @@ sed -i 's/from importlib.metadata import entry_points/from importlib_metadata im
408
408
  And then do the initial sampling and MD:
409
409
 
410
410
  ```
411
- python -u cli.py examples/CH.SH2.input.xyz examples/MLmodels/CHSH2/model.physnet.config . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log 2> /dev/null
411
+ venuspy-cli examples/CH.SH2.input.xyz examples/MLmodels/CHSH2/model.physnet.config . --atomsInFirstGroup "1 2" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 100 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log 2> /dev/null
412
412
  ```
413
413
 
414
414
  </details>
@@ -425,13 +425,13 @@ python -m venv .hybridmd
425
425
  source .hybridmd/bin/activate
426
426
  pip install sgdml
427
427
  pip install tblite
428
- pip install ase venuspy
428
+ pip install ase venuspython
429
429
  ```
430
430
 
431
431
  Add the argument `--MDtype "smoothed"` and you're good to go:
432
432
 
433
433
  ```
434
- python -u cli.py examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --MDtype "smoothed" --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 5000 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
434
+ venuspy-cli examples/B.C2H2.input.xyz examples/B.C2H2.input.xtb . --MDtype "smoothed" --atomsInFirstGroup "1" --collisionEnergy 2.4 --impactParameter 1.0 --centerOfMassDistance 10.0 --production 5000 --interval 1 --time_step 0.15 --INITQPa "thermal" --INITQPb "thermal" --TVIBa 300.0 --TROTa 300.0 --TVIBb 10.0 --TROTb 10.0 --n_threads 1 > production.log
435
435
  ```
436
436
 
437
437
  The xTB software, although not a completely ab initio theory, uses similar kinds of SCF methods and also runs into convergence problems. Over the course of the 5000 steps simulated, it often will have two or three energy drift/jump issues. When this happens, the sGDML surface quickly trains on the local surface and tries to save the trajectory. After some number of steps, the xTB method takes over again.
@@ -2,6 +2,7 @@ README.md
2
2
  cli.py
3
3
  pyproject.toml
4
4
  venuspy/__init__.py
5
+ venuspy/cli.py
5
6
  venuspy/initialSampling.py
6
7
  venuspy/md.py
7
8
  venuspython.egg-info/PKG-INFO
@@ -1 +0,0 @@
1
- __version__ = "1.0.1"
File without changes
File without changes
File without changes
File without changes