Skip to content

Commit c216114

Browse files
committed
Format the opening example
1 parent 63312cb commit c216114

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ After installation, you can run accelerated molecular dynamics as follows:
2222
```py
2323
import ase.build
2424
import ase.units
25-
from ase.md.velocitydistribution import MaxwellBoltzmannDistribution
2625
import torch
27-
from flashmd.ase import EnergyCalculator
26+
from ase.md.velocitydistribution import MaxwellBoltzmannDistribution
2827

2928
from flashmd import get_pretrained
29+
from flashmd.ase import EnergyCalculator
3030
from flashmd.ase.langevin import Langevin
3131

3232

@@ -41,8 +41,8 @@ atoms.set_velocities( # it is generally a good idea to remove any net velocity
4141
)
4242

4343
# Load models
44-
device="cuda" if torch.cuda.is_available() else "cpu"
45-
energy_model, flashmd_model = get_pretrained("pet-omatpes-v2", time_step)
44+
device = "cuda" if torch.cuda.is_available() else "cpu"
45+
energy_model, flashmd_model = get_pretrained("pet-omatpes-v2", time_step)
4646

4747
# Set the energy model (optional, see below for more precise usage)
4848
calculator = EnergyCalculator(energy_model, device=device)
@@ -55,9 +55,9 @@ dyn = Langevin(
5555
temperature_K=300,
5656
time_constant=100*ase.units.fs,
5757
model=flashmd_model,
58-
device=device
58+
device=device,
5959
)
60-
dyn.run(1000)
60+
dyn.run(1000) # this is 64 ps!
6161
```
6262

6363
[The first time you use this code and call the `get_pretrained` function, the

docs/lammps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ trained on. Here is how you can get them in the current directory from Python:
4949
```py
5050
from flashmd import get_pretrained
5151

52-
time_step = 16 # in fs, also available: 1, 2, 4, 8, 32, 64, 128
52+
time_step = 16 # 16 fs, also available: 1, 2, 4, 8, 32, 64, 128 fs
5353
energy_model, flashmd_model = get_pretrained("pet-omatpes-v2", time_step)
5454
energy_model.save("mlip.pt")
5555
flashmd_model.save(f"flashmd-{time_step}.pt")

0 commit comments

Comments
 (0)