1git clone -b allscaip https://github.com/EricZQu/fairchem.git
2cd fairchem
1conda create -n allscaip python=3.12
2conda activate allscaip
3pip install -e packages/fairchem-core[dev]
1from ase import units
2from ase.io import Trajectory
3from ase.md.langevin import Langevin
4from ase.build import molecule
5from fairchem.core import pretrained_mlip, FAIRChemCalculator
6
7calc = FAIRChemCalculator.from_model_checkpoint("/path/to/your/checkpoint.pt", task_name="omol")
8
9atoms = molecule("H2O")
10atoms.calc = calc
11
12dyn = Langevin(
13 atoms,
14 timestep=0.1 * units.fs,
15 temperature_K=400,
16 friction=0.001 / units.fs,
17)
18trajectory = Trajectory("my_md.traj", "w", atoms)
19dyn.attach(trajectory.write, interval=1)
20dyn.run(steps=1000)