Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# EScAIP: Efficiently Scaled Attention Interatomic Potential
|
| 6 |
+
|
| 7 |
+
## Installation
|
| 8 |
+
|
| 9 |
+
First, clone the FAIR Chem repo with allscaip branch:
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
git clone -b allscaip https://github.com/EricZQu/fairchem.git
|
| 13 |
+
cd fairchem
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
Then, create a conda environment and install the dependencies:
|
| 17 |
+
|
| 18 |
+
```bash
|
| 19 |
+
conda create -n allscaip python=3.12
|
| 20 |
+
conda activate allscaip
|
| 21 |
+
pip install -e packages/fairchem-core[dev]
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
## Inference
|
| 25 |
+
|
| 26 |
+
You can use the `FAIRChemCalculator` to load a pretrained EScAIP model and perform inference. Here's an example:
|
| 27 |
+
|
| 28 |
+
```python
|
| 29 |
+
from ase import units
|
| 30 |
+
from ase.io import Trajectory
|
| 31 |
+
from ase.md.langevin import Langevin
|
| 32 |
+
from ase.build import molecule
|
| 33 |
+
from fairchem.core import pretrained_mlip, FAIRChemCalculator
|
| 34 |
+
|
| 35 |
+
calc = FAIRChemCalculator.from_model_checkpoint("/path/to/your/checkpoint.pt", task_name="omol")
|
| 36 |
+
|
| 37 |
+
atoms = molecule("H2O")
|
| 38 |
+
atoms.calc = calc
|
| 39 |
+
|
| 40 |
+
dyn = Langevin(
|
| 41 |
+
atoms,
|
| 42 |
+
timestep=0.1 * units.fs,
|
| 43 |
+
temperature_K=400,
|
| 44 |
+
friction=0.001 / units.fs,
|
| 45 |
+
)
|
| 46 |
+
trajectory = Trajectory("my_md.traj", "w", atoms)
|
| 47 |
+
dyn.attach(trajectory.write, interval=1)
|
| 48 |
+
dyn.run(steps=1000)
|
| 49 |
+
```
|