Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1042406
Just created a stub of the notebook.
ceriottm Apr 10, 2025
df3ac23
README edits
ceriottm Apr 10, 2025
4134a4f
"At least there's a proper title"
ceriottm Apr 11, 2025
2f140b4
Adding TEMPORARILY the model files (to be removed before squash-mergi…
ceriottm Apr 12, 2025
412d220
Minimal (and somewhat underwhelming) NC example
ceriottm Apr 13, 2025
d9cecc8
Linter
ceriottm Apr 13, 2025
4e5d3c1
Splitting base tutorial and NC example
ceriottm May 2, 2025
e56f599
Also update links
ceriottm May 2, 2025
3adaa0c
Lint
ceriottm May 2, 2025
7283348
Linter
ceriottm May 2, 2025
7cff323
Try to fix CI issue
ceriottm May 2, 2025
9108e77
More testing
ceriottm May 2, 2025
c330947
Fix hashing bug (before fixing a missing file bug)
ceriottm May 2, 2025
d1f3029
Forgot environment.yml
ceriottm May 2, 2025
aef5d03
Removed debug code
ceriottm May 2, 2025
01a8bc2
Speed up PET-MAD example
ceriottm May 2, 2025
48c006c
linter
ceriottm May 2, 2025
23e9014
More cutting on the simulation time
ceriottm May 2, 2025
99c127d
Changed example to BMIM
ceriottm May 2, 2025
9d3ad82
Fixed bug
ceriottm May 2, 2025
ab86976
typo, again
ceriottm May 2, 2025
1fc7bb4
Updated durations to speed up example
ceriottm May 2, 2025
a606edc
fix stride
ceriottm May 2, 2025
907ff7b
fine tweaking the MTS machinery
ceriottm May 2, 2025
d161d8f
Finished drafting a full discussion of the NC example
ceriottm May 6, 2025
1340c03
Merge branch 'main' into pet-nc
ceriottm May 6, 2025
8ad04ce
Update ipi target
ceriottm May 6, 2025
c172d1e
Small tweaks
ceriottm May 6, 2025
f193c1e
Update chemiscope for the doc builder and fix some build errors
ceriottm May 6, 2025
2c787f7
Some formatting errors
ceriottm May 6, 2025
af6e871
Address FB comments
ceriottm May 6, 2025
f4c3d63
Lint
ceriottm May 6, 2025
9a9c387
removed leftover files
ceriottm May 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions INSTALLING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Whenever you want to run the recipe you just need to activate the environment
and run the recipe file.

.. code-block:: bash

# When you want to use the environment
conda env activate --name <recipe-env-path>

Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
The Atomistic Cookbook repository
=================================
Source code for the Atomistic Cookbook
======================================

.. image:: ./docs/src/_static/cookbook-icon.svg
:alt: A cookbook with a cover showing a water molecule and mathematical symbols
:align: center
:width: 50%
:width: 30%


This repository contains the source code for a collection of software recipes,
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ sphinx-gallery
sphinx-toggleprompt
docutils
furo
chemiscope>=0.7
chemiscope>=0.8.5
1 change: 1 addition & 0 deletions docs/src/software/chemiscope.sec
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ repository <https://github.com/lab-cosmo/chemiscope>`_.
- examples/water-model/water-model
- examples/polarizability/polarizability
- examples/pet-mad/pet-mad
- examples/pet-mad/pet-mad-nc
1 change: 1 addition & 0 deletions docs/src/software/i-pi.sec
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ it on the `ipi-code website <http://ipi-code.org>`_, the `documentation pages
- examples/pi-mts-rpc/mts-rpc
- examples/water-model/water-model
- examples/pet-mad/pet-mad
- examples/pet-mad-nc/pet-mad-nc
1 change: 1 addition & 0 deletions docs/src/software/metatensor.sec
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ training and evaluating ML models.
- examples/water-model/water-model
- examples/polarizability/polarizability
- examples/pet-mad/pet-mad
- examples/pet-mad-nc/pet-mad-nc
1 change: 1 addition & 0 deletions docs/src/topics/ml-models.sec
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ data.
- examples/periodic-hamiltonian/periodic-hamiltonian
- examples/polarizability/polarizability
- examples/pet-mad/pet-mad
- examples/pet-mad/pet-mad-nc
5 changes: 5 additions & 0 deletions examples/pet-mad-nc/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Non-conservative MTS MD
=======================

An example of running hybrid conservative/non-conservative MD
using PET-MAD and i-PI.
418 changes: 418 additions & 0 deletions examples/pet-mad-nc/data/bmimcl.xyz

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions examples/pet-mad-nc/data/input-nc-nve-mts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<simulation verbosity="high">
<output prefix="nve-nc-mts">
<properties stride="1" filename="out">
[step, time{picosecond}, conserved{electronvolt}, temperature{kelvin},
kinetic_md{electronvolt}, potential{electronvolt},
pot_component(0){electronvolt}, pot_component(1){electronvolt}
]
</properties>
<trajectory filename="pos" stride="2" format="ase"> positions </trajectory>
<trajectory filename="forces_c" stride="2" format="ase"> forces_component(0) </trajectory>
<trajectory filename="forces_nc" stride="2" format="ase"> forces_component(1) </trajectory>
<checkpoint stride="1000"/>
</output>
<total_steps>50</total_steps>
<prng><seed>12345</seed></prng>

<ffdirect name='cons' pbc="false">
<pes>metatensor</pes>
<parameters>{template:data/bmimcl.xyz,model:pet-mad-latest.pt,device:cpu,non_conservative:False} </parameters>
</ffdirect>
<ffdirect name='nocons' pbc="false">
<pes>metatensor</pes>
<parameters>{template:data/bmimcl.xyz,model:pet-mad-latest.pt,device:cpu,non_conservative:True} </parameters>
</ffdirect>
<system>
<initialize nbeads="1">
<file mode="ase"> data/bmimcl.xyz </file>
<velocities mode="thermal" units="kelvin"> 400.0 </velocities>
</initialize>
<forces>
<force forcefield="cons">
<mts_weights>[1,0]</mts_weights>
</force>
<force forcefield="nocons">
<mts_weights>[-1,1]</mts_weights>
</force>
</forces>
<motion mode="dynamics">
<dynamics mode="nve">
<timestep units="femtosecond"> 4 </timestep>
<nmts>[1,8]</nmts>
</dynamics>
</motion>
</system>
</simulation>
36 changes: 36 additions & 0 deletions examples/pet-mad-nc/data/input-nc-nve.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<simulation verbosity="high">
<output prefix="nve-nc">
<properties stride="8" filename="out">
[step, time{picosecond}, conserved{electronvolt}, temperature{kelvin},
kinetic_md{electronvolt}, potential{electronvolt},
pot_component(0){electronvolt}
]
</properties>
<trajectory filename="pos" stride="16" format="ase"> positions </trajectory>
<trajectory filename="forces_nc" stride="16" format="ase"> forces_component(0) </trajectory>
<checkpoint stride="1000"/>
</output>
<total_steps>160</total_steps>
<prng><seed>12345</seed></prng>
<ffdirect name='nocons' pbc="false">
<pes>metatensor</pes>
<parameters>{template:data/bmimcl.xyz,model:pet-mad-latest.pt,device:cpu,non_conservative:True} </parameters>
</ffdirect>
<system>
<initialize nbeads="1">
<file mode="ase"> data/bmimcl.xyz </file>
<velocities mode="thermal" units="kelvin"> 400.0 </velocities>
</initialize>
<forces>
<force forcefield="nocons">
</force>
</forces>

<motion mode="dynamics">
<dynamics mode="nve">
<timestep units="femtosecond"> 0.5 </timestep>
</dynamics>
</motion>

</system>
</simulation>
36 changes: 36 additions & 0 deletions examples/pet-mad-nc/data/input-nve.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<simulation verbosity="high">
<output prefix="nve-c">
<properties stride="8" filename="out">
[step, time{picosecond}, conserved{electronvolt}, temperature{kelvin},
kinetic_md{electronvolt}, potential{electronvolt},
pot_component(0){electronvolt}
]
</properties>
<trajectory filename="pos" stride="16" format="ase"> positions </trajectory>
<trajectory filename="forces_c" stride="16" format="ase"> forces_component(0) </trajectory>
<checkpoint stride="1000"/>
</output>
<total_steps>32</total_steps>
<prng><seed>12345</seed></prng>
<ffdirect name='cons' pbc="false">
<pes>metatensor</pes>
<parameters>{template:data/bmimcl.xyz,model:pet-mad-latest.pt,device:cpu,non_conservative:False} </parameters>
</ffdirect>
<system>
<initialize nbeads="1">
<file mode="ase"> data/bmimcl.xyz </file>
<velocities mode="thermal" units="kelvin"> 400.0 </velocities>
</initialize>
<forces>
<force forcefield="cons">
</force>
</forces>

<motion mode="dynamics">
<dynamics mode="nve">
<timestep units="femtosecond"> 0.5 </timestep>
</dynamics>
</motion>

</system>
</simulation>
13 changes: 13 additions & 0 deletions examples/pet-mad-nc/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
channels:
- metatensor
- conda-forge
dependencies:
- python=3.12
- pip
- pip:
- ase>=3.23
- pet-mad>=1.1.0rc4,<2.0
- ipi>=3.1.4,<4.0
- chemiscope>=0.8.5,<0.9
- matplotlib>=3.10,<4.0
- vesin[torch]>=0.3.2,<0.4
Loading