Skip to content

Commit

Permalink
Fix docs?
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Jan 26, 2024
1 parent 5fb18c1 commit 374b88b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ furo
sphinx >= 7
sphinx-toggleprompt
tomli

ase # for ASE tutorial
2 changes: 1 addition & 1 deletion docs/src/tutorials/ase.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Running molecular dynamics in ASE
=================================

Exported models from `metatensor-models` can be used in `ase`to run
Exported models from ``metatensor-models`` can be used in ``ase`` to run
molecular dynamics simulations. Here is an example:

.. literalinclude:: ../../../examples/ase/run_ase.py
Expand Down
4 changes: 3 additions & 1 deletion examples/ase/run_ase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tools to run the simulation
# Import tools to run the simulation
import ase.build
import ase.md
import ase.md.velocitydistribution
Expand All @@ -20,11 +20,13 @@
# Load the model and register it as the energy calculator for these ``atoms``:
atoms.calc = MetatensorCalculator("exported-model.pt")

# Define the integrator:
integrator = ase.md.Langevin(
atoms,
timestep=1.0 * ase.units.fs,
temperature_K=300,
friction=0.1 / ase.units.fs,
)

# Run the simulation:
integrator.run(10)

0 comments on commit 374b88b

Please sign in to comment.