Skip to content
Merged
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ uv sync

```python
from ase.build import bulk
from pyslice import MDCalculator,MultisliceCalculator,TACAWData
from pyslice import ORBMDCalculator,MultisliceCalculator,TACAWData

# 1. Create structure
atoms = bulk("Si", "diamond", a=5.431, cubic=True) * (10, 10, 2)

# 2. Run molecular dynamics
md = MDCalculator(model_name="orb-v3-direct-inf-omat")
md = ORBMDCalculator(model_name="orb-v3-direct-inf-omat")
md.setup(atoms, temperature=300, timestep=2.0, production_steps=500, save_interval=5)
trajectory = md.run()

Expand Down Expand Up @@ -123,8 +123,8 @@ wf_data.plot(powerscaling=0.125) # Diffraction pattern
```
Input Sources Processing Analysis Output
─────────────────────────────────────────────────────────────────────────────
CIF / XYZ / LAMMPS ─┬─→ Loader ─┬─→ MDCalculator ─┐
ASE Atoms / .traj ─┘ │ (ORB, MACE)
CIF / XYZ / LAMMPS ─┬─→ Loader ─┬─→ ORBMDCalculator ─┐
ASE Atoms / .traj ─┘ │ (or FAIRChem)
│ ↓
└───────────→ Trajectory
Expand Down Expand Up @@ -159,13 +159,13 @@ traj = Loader("file.cif").load()
traj = Loader("dump.lammpstrj", timestep=0.01, atom_mapping={1: "B", 2: "N"}).load()
```

### `MDCalculator`
### `ORBMDCalculator` / `FAIRChemMDCalculator`
Run molecular dynamics with universal ML potentials.

```python
from pyslice.md import MDCalculator
from pyslice.md import ORBMDCalculator

md = MDCalculator(model_name="orb-v3-direct-inf-omat", device="cuda")
md = ORBMDCalculator(model_name="orb-v3-direct-inf-omat", device="cuda")
md.setup(
atoms,
temperature=300, # K
Expand Down
4 changes: 2 additions & 2 deletions examples/k_space_tmdc_showcase_pub.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import numpy as np
from ase.build import make_supercell, mx2

from pyslice import Loader, MDCalculator, MultisliceCalculator, TACAWData
from pyslice import Loader, ORBMDCalculator, MultisliceCalculator, TACAWData

# =============================================================================
# CONFIGURATION
Expand Down Expand Up @@ -68,7 +68,7 @@ def run_md(atoms, output_dir: Path):
if SKIP_MD and traj_file.exists():
return Loader(filename=str(traj_file), timestep=timestep_ps).load()

md = MDCalculator(
md = ORBMDCalculator(
model_name="orb-v3-conservative-inf-omat",
weights_path=CACHED_WEIGHTS_PATH,
)
Expand Down
6 changes: 3 additions & 3 deletions examples/molecular_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import os
from ase.build import bulk
from pyslice import MDCalculator, Trajectory, analyze_md_trajectory
from pyslice import ORBMDCalculator, Trajectory, analyze_md_trajectory

os.makedirs("outputs/md_demo", exist_ok=True)
os.makedirs("outputs/md_production", exist_ok=True)
Expand All @@ -35,7 +35,7 @@
# ---------------------------------------------------------------------------
# 2. Set up the MD calculator with an ORB potential
# ---------------------------------------------------------------------------
md = MDCalculator(model_name="orb-v3-conservative-inf-omat")
md = ORBMDCalculator(model_name="orb-v3-conservative-inf-omat")

md.setup(
atoms=atoms,
Expand Down Expand Up @@ -120,7 +120,7 @@
# production_relaxation_steps lets the system forget the
# thermostat kick before recording begins.
#
md_prod = MDCalculator(model_name="orb-v3-conservative-inf-omat")
md_prod = ORBMDCalculator(model_name="orb-v3-conservative-inf-omat")

md_prod.setup(
atoms=atoms_prod,
Expand Down
4 changes: 2 additions & 2 deletions examples/real_space_phonon_showcase_pub.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from ase import Atoms
from ase.build import bulk, surface

from pyslice import Loader, MDCalculator, MultisliceCalculator, TACAWData
from pyslice import Loader, ORBMDCalculator, MultisliceCalculator, TACAWData

# =============================================================================
# CONFIGURATION
Expand Down Expand Up @@ -123,7 +123,7 @@ def run_md(atoms, output_dir: Path, save_interval: int):
atoms.calc = ORBCalculator(orb)
FIRE(atoms, logfile=str(output_dir / "relax.log")).run(fmax=0.05, steps=500)

md = MDCalculator(
md = ORBMDCalculator(
model_name="orb-v3-conservative-inf-omat",
weights_path=CACHED_WEIGHTS_PATH,
)
Expand Down
4 changes: 2 additions & 2 deletions examples/tacaw_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy as np
import matplotlib.pyplot as plt
from ase.build import bulk
from pyslice import MDCalculator, MultisliceCalculator, TACAWData
from pyslice import ORBMDCalculator, MultisliceCalculator, TACAWData

os.makedirs("outputs", exist_ok=True)

Expand All @@ -29,7 +29,7 @@
# ---------------------------------------------------------------------------
# 2. Run molecular dynamics with an ORB machine-learning potential
# ---------------------------------------------------------------------------
md = MDCalculator(model_name="orb-v3-conservative-inf-omat")
md = ORBMDCalculator(model_name="orb-v3-conservative-inf-omat")

md.setup(
atoms=atoms,
Expand Down
6 changes: 3 additions & 3 deletions src/pyslice/md/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
Molecular dynamics module for PySlice.

Provides MD simulation capabilities using machine learning force fields (ORB models).
Provides MD simulation capabilities using machine learning force fields.
"""

from .molecular_dynamics import MDCalculator, MDConvergenceChecker, analyze_md_trajectory
from .molecular_dynamics import MDCalculator, ORBMDCalculator, FAIRChemMDCalculator, MDConvergenceChecker, analyze_md_trajectory

__all__ = ['MDCalculator', 'MDConvergenceChecker', 'analyze_md_trajectory']
__all__ = ['MDCalculator', 'ORBMDCalculator', 'FAIRChemMDCalculator', 'MDConvergenceChecker', 'analyze_md_trajectory']
Loading