Skip to content

Commit 44cc610

Browse files
authored
Merge pull request #293 from ACEsuit/develop
edit readme example for foundation models
2 parents a2b6e8e + 7532bfb commit 44cc610

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ from mace.calculators import mace_mp
186186
from ase import build
187187

188188
atoms = build.molecule('H2O')
189-
calc = mace_mp(model="medium", device='cuda')
190-
atoms.set_calculator(calc)
189+
calc = mace_mp(model="medium", dispersion=False, default_dtype="float32", device='cuda')
190+
atoms.calc = calc
191191
print(atoms.get_potential_energy())
192192
```
193193

@@ -204,7 +204,7 @@ from ase import build
204204

205205
atoms = build.molecule('H2O')
206206
calc = mace_off(model="medium", device='cuda')
207-
atoms.set_calculator(calc)
207+
atoms.calc = calc
208208
print(atoms.get_potential_energy())
209209
```
210210

0 commit comments

Comments
 (0)