Fixed NaCl minimal example for pretrained model

#3
by pedrojuanbj - opened
Files changed (1) hide show
  1. README.md +13 -8
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.npt import NPT
 
28
 
29
  atoms = Atoms("NaCl")
30
 
@@ -36,14 +37,18 @@ calculator = MACECalculator(
36
 
37
  atoms.calc = calculator
38
 
39
- npt = NPT(
40
- atoms=atoms,
41
- timestep=timestep,
42
- temperature_K=temperature,
43
- externalstress=externalstress,
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