Commit
·
abd35cd
1
Parent(s):
a002c28
Fixed NaCl minimal example for pretrained model
Browse filesOriginal NaCl example code was not working properly, follow this on github https://github.com/ACEsuit/mace/issues/261. It can be easily fixed by changing ASE NPT to ASE Langevin and it is also fast and light anyways.
README.md
CHANGED
@@ -24,7 +24,8 @@ pip install git+https://github.com/ACEsuit/mace.git
|
|
24 |
```python
|
25 |
from mace.calculators import MACECalculator
|
26 |
from ase import Atoms
|
27 |
-
from ase.md.
|
|
|
28 |
|
29 |
atoms = Atoms("NaCl")
|
30 |
|
@@ -36,14 +37,18 @@ calculator = MACECalculator(
|
|
36 |
|
37 |
atoms.calc = calculator
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
npt.run(steps)
|
47 |
```
|
48 |
|
49 |
# Citing
|
|
|
24 |
```python
|
25 |
from mace.calculators import MACECalculator
|
26 |
from ase import Atoms
|
27 |
+
from ase.md.langevin import Langevin
|
28 |
+
from ase import units
|
29 |
|
30 |
atoms = Atoms("NaCl")
|
31 |
|
|
|
37 |
|
38 |
atoms.calc = calculator
|
39 |
|
40 |
+
## Suggested for test ##
|
41 |
+
timestep = 0.5 * units.fs
|
42 |
+
temperature = 300 #Kelvins
|
43 |
+
friction = 0.1
|
44 |
+
|
45 |
+
steps = 10
|
46 |
+
|
47 |
+
dyn = Langevin(atoms, timestep, temperature_K=temperature, friction=friction,
|
48 |
+
fixcm=False)
|
49 |
+
|
50 |
+
dyn.run(steps)
|
51 |
|
|
|
52 |
```
|
53 |
|
54 |
# Citing
|