Note
Go to the end to download the full example code.
Introduction to foundational models for molecular dynamics¶
- Authors:
Paolo Pegolo @ppegolo
Foundational (or universal) machine-learning interatomic potentials are trained once on broad, chemically diverse datasets, with the goal of describing essentially any system without specific re-parameterization. This recipe illustrates the concept: we take a single foundational model, PET-MAD-XS (which spans 102 elements of the periodic table), and use it, unchanged, to run molecular dynamics on four qualitatively different aqueous systems:
pure liquid water
a NaCl aqueous solution
an ethanol-water mixture
superionic water, an exotic phase found deep inside the ice-giant planets
For each system we provide the LAMMPS input that drives a short constant-temperature
simulation through the metatomic pair style. The first three (water, NaCl,
ethanol-water) are light enough to run live; the fourth (superionic water) is more
demanding, so for it we analyze a pre-computed trajectory.
# sphinx_gallery_thumbnail_number = 3
Setup¶
We download a small archive with the data we need: the starting structures and the
pre-computed trajectory for the superionic system (the first three runs are launched
live below). The LAMMPS dump format stores the full cell information together with
unwrapped Cartesian coordinates (xu yu zu), which makes part of the analysis
below straightforward.
from zipfile import ZipFile
import numpy as np
import matplotlib.pyplot as plt
import ase.io
from ase.geometry.rdf import get_rdf
import chemiscope
import upet
from atomistic_cookbook_utils import download_with_retry, run_command
download_with_retry(
"https://github.com/ppegolo/labcosmo_ictp_school/raw/refs/heads/tmp/water-md.zip",
"data.zip",
)
with ZipFile("data.zip", "r") as z:
z.extractall(".")
PET-MAD-XS through metatomic¶
PET-MAD is a foundational
potential trained on the MAD (Massive Atomic Diversity) dataset, version 1.5, a deliberately heterogeneous collection
of structures spanning 102 elements. PET-MAD-XS (“extra small”) is the lightest
and fastest version: it trades some accuracy for speed, but the same recipe works
unchanged with the larger versions (S, M, L).
The model ships as a single file and is coupled to a simulation engine through metatomic, the software that exposes the same potential to several simulation engines, including i-PI, LAMMPS, gromacs, and ASE through a common API. In every LAMMPS input below the potential is loaded with a single line:
pair_style metatomic pet-mad-xs-v1.5.0.pt device cpu
(use device cuda to run on a GPU instead).
We fetch the model once with upet and save it to the file the LAMMPS inputs load
(pet-mad-xs-v1.5.0.pt); every run below picks it up through the metatomic pair
style.
model_path = "pet-mad-xs-v1.5.0.pt"
upet.save_upet(model="pet-mad", size="xs", version="1.5.0", output=model_path)
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
WARNING:huggingface_hub.utils._http:Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
Liquid water at 400 K¶
We start with a simple case: 64 water molecules in a cubic, periodic box, propagated in the canonical (NVT) ensemble. This is the complete LAMMPS input:
# Liquid water NVT at 400 K with PET-MAD-xs
# Atom types: 1=H, 2=O
units metal
atom_style atomic
variable seed index 12345
variable t_target equal 400.0
variable tdamp equal 100*dt # thermostat time constant
variable nsteps equal 500 # 500 * 0.5 fs = 0.25 ps
variable dump_every equal 10
read_data data/water.data
pair_style metatomic pet-mad-xs-v1.5.0.pt device cpu
pair_coeff * * 1 8
timestep 0.0005
neighbor 2.0 bin
neigh_modify one 50000 page 500000
thermo_style custom step temp pe etotal press vol
thermo 10
velocity all create ${t_target} ${seed} mom yes rot yes dist gaussian
reset_timestep 0
fix nve_int all nve
fix thermostat all temp/csvr ${t_target} ${t_target} ${tdamp} ${seed}
print "step temp pe etotal press vol" file water_thermo.out
fix thermofile all print ${dump_every} "$(step) $(temp) $(pe) $(etotal) $(press) $(vol)" append water_thermo.out
dump traj all custom ${dump_every} water_traj.lammpstrj id type element xu yu zu
dump_modify traj element H O sort id
run ${nsteps}
Several of these settings recur in every simulation below and are worth a closer look:
Potential and element map.
pair_style metatomicinstructs LAMMPS to use the metatomic model to compute forces; the singlepair_coeff * * 1 8line is the only chemistry-specific input, mapping LAMMPS atom type 1 to hydrogen (Z=1) and type 2 to oxygen (Z=8).Ensemble.
fix nvepropagates the equations of motion with the velocity-Verlet integrator, whilefix temp/csvradds a stochastic velocity-rescaling thermostat (the Bussi-Donadio-Parrinello, or CSVR, thermostat) on top. Together they sample the canonical ensemble. CSVR reproduces the exact canonical velocity distribution while disturbing the dynamics minimally, which makes it a very common choice, especially when one wants to compute dynamical observables.Thermostat coupling time.
tdamp = 100*dt(here 50 fs) sets how strongly the thermostat couples to the system: 100 times the integration time step is usually loose enough not to damp the physical motion we want to measure, tight enough to keep the temperature steady over the run.Timestep.
timestep 0.0005is 0.5 fs. The fastest motion is the O-H stretch (period ≈ 10 fs), so half a femtosecond samples it about twenty times per oscillation, enough for stable, accurate integration.Temperature. We run at 400 K rather than 300 K because the electronic-structure reference of the MAD dataset (the r2SCAN functional) overstructures liquid water and raises its melting point by a few tens of kelvin. Working slightly above ambient keeps the system liquid and accelerates sampling.
These runs are intentionally short, so they reproduce quickly, but long enough to show some structure and stable dynamics. The only precomputed trajectories are for superionic water, which requires shorter time-steps and longer dynamics.
Each input reads its starting structure from data/ and is launched with a single
command, which we run here:
run_command("lmp -in in_water_nvt.lmp", print_output=True)
LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-734-ga1c7f5baba)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread.
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (0.73005488 0.73005488 0.73005488) to (13.254708 13.254708 13.254708)
1 by 1 by 1 MPI processor grid
reading atoms ...
192 atoms
reading velocities ...
192 velocities
read_data CPU = 0.001 seconds
This is an unamed model
=======================
Model authors
-------------
- Arslan Mazitov ([email protected])
- Filippo Bigi
- Matthias Kellner
- Paolo Pegolo
- Davide Tisi
- Guillaume Fraux
- Sergey Pozdnyakov
- Philip Loche
- Michele Ceriotti ([email protected])
Model references
----------------
Please cite the following references when using this model:
- about this specific model:
* https://doi.org/10.1038/s41467-025-65662-7
* https://arxiv.org/abs/2601.16195
- about the architecture of this model:
* LLPR (uncertainty method):
https://iopscience.iop.org/article/10.1088/2632-2153/ad805f
* LPR (if using per-atom uncertainty):
https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704
* https://arxiv.org/abs/2305.19302v3
Found 'energy_uncertainty' output, we will check for atoms with high uncertainty on the energy predictions
Running simulation on cpu device with float32 data
step temp pe etotal press vol
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- LLPR (uncertainty method): https://iopscience.iop.org/article/10.1088/2632-2153/ad805f
- LPR (if using per-atom uncertainty): https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704
- https://arxiv.org/abs/2305.19302v3
- https://doi.org/10.1038/s41467-025-65662-7
- https://arxiv.org/abs/2601.16195
The log file lists these citations in BibTeX format.
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 50000, page size: 500000
master list distance cutoff = 17
ghost atom cutoff = 17
binsize = 8.5, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair metatomic, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Setting up Verlet run ...
Unit style : metal
Current step : 0
Time step : 0.0005
0 400.00000000000011369 -1009.419189453125 -999.54371437512497778 6880.9341641322689611 1964.7040162035737012
Per MPI rank memory allocation (min/avg/max) = 58.34 | 58.34 | 58.34 Mbytes
Step Temp PotEng TotEng Press Volume
0 400 -1009.4192 -999.54371 6880.9342 1964.704
10 353.47653296494610231 -1008.317138671875 -999.5902669419921267 -1875.0560057972775212 1964.7040162035737012
10 353.47653 -1008.3171 -999.59027 -1875.056 1964.704
20 350.42526619262594068 -1008.11572265625 -999.46418269878301999 12577.770941488042808 1964.7040162035737012
20 350.42527 -1008.1157 -999.46418 12577.771 1964.704
30 336.10029235010358661 -1007.68682861328125 -999.38895346125138985 -3756.7607257036411283 1964.7040162035737012
30 336.10029 -1007.6868 -999.38895 -3756.7607 1964.704
40 373.63773186297868278 -1008.28289794921875 -999.05827267618553833 13656.813329813132441 1964.7040162035737012
40 373.63773 -1008.2829 -999.05827 13656.813 1964.704
50 368.5959097082605922 -1007.88623046875 -998.78608116830832842 -6488.2319969945274352 1964.7040162035737012
50 368.59591 -1007.8862 -998.78608 -6488.232 1964.704
60 377.41980255308385495 -1008.47088623046875 -999.1528865953271179 15124.697008263327007 1964.7040162035737012
60 377.4198 -1008.4709 -999.15289 15124.697 1964.704
70 360.77879833824755451 -1007.9412841796875 -999.03412910053714313 -5968.3692601929305965 1964.7040162035737012
70 360.7788 -1007.9413 -999.03413 -5968.3693 1964.704
80 349.77139698879364005 -1008.0147705078125 -999.37937372291230531 14524.177444334149186 1964.7040162035737012
80 349.7714 -1008.0148 -999.37937 14524.177 1964.704
90 359.54610845135925956 -1007.82354736328125 -998.94682577977300753 -4206.6181520106811149 1964.7040162035737012
90 359.54611 -1007.8235 -998.94683 -4206.6182 1964.704
100 388.60342318732813283 -1008.54681396484375 -998.95270541256388697 10931.334516390959834 1964.7040162035737012
100 388.60342 -1008.5468 -998.95271 10931.335 1964.704
110 369.89698396173662331 -1008.023193359375 -998.89092224302123668 -2798.5261001346830199 1964.7040162035737012
110 369.89698 -1008.0232 -998.89092 -2798.5261 1964.704
120 358.4364739306418528 -1007.99346923828125 -999.14414307491063028 11552.623184759069773 1964.7040162035737012
120 358.43647 -1007.9935 -999.14414 11552.623 1964.704
130 360.78575506611468882 -1007.8367919921875 -998.92946516055542361 -2903.7168920290414462 1964.7040162035737012
130 360.78576 -1007.8368 -998.92947 -2903.7169 1964.704
140 395.74326774041327326 -1008.54547119140625 -998.77508924676442348 9687.1034852705633966 1964.7040162035737012
140 395.74327 -1008.5455 -998.77509 9687.1035 1964.704
150 394.10476648023046664 -1008.53729248046875 -998.80736298172746501 -2159.3437106676587973 1964.7040162035737012
150 394.10477 -1008.5373 -998.80736 -2159.3437 1964.704
160 399.73292534463774928 -1008.686279296875 -998.817397941632521 8889.1503999479646154 1964.7040162035737012
160 399.73293 -1008.6863 -998.8174 8889.1504 1964.704
170 393.3922335601019995 -1008.6815185546875 -998.96918055868366082 -2420.7938442363438298 1964.7040162035737012
170 393.39223 -1008.6815 -998.96918 -2420.7938 1964.704
180 391.78783200917331442 -1008.68365478515625 -999.01092735798067679 8432.7676495726755093 1964.7040162035737012
180 391.78783 -1008.6837 -999.01093 8432.7676 1964.704
190 406.13323686600864448 -1008.752685546875 -998.72578889933060964 -1333.4729356841435219 1964.7040162035737012
190 406.13324 -1008.7527 -998.72579 -1333.4729 1964.704
200 389.63352619113197761 -1008.76507568359375 -999.14553523995925843 7129.5604074434359063 1964.7040162035737012
200 389.63353 -1008.7651 -999.14554 7129.5604 1964.704
210 394.64275527491787443 -1008.83770751953125 -999.09449578345447662 74.417537510458714678 1964.7040162035737012
210 394.64276 -1008.8377 -999.0945 74.417538 1964.704
220 381.54895312030015475 -1008.4151611328125 -998.99521818887126301 5541.0441526995400636 1964.7040162035737012
220 381.54895 -1008.4152 -998.99522 5541.0442 1964.704
230 381.5605907535324377 -1008.43719482421875 -999.01696456238505561 923.50414944911187831 1964.7040162035737012
230 381.56059 -1008.4372 -999.01696 923.50415 1964.704
240 373.48083557483442974 -1008.4359130859375 -999.21516137636274379 5091.0037727340350102 1964.7040162035737012
240 373.48084 -1008.4359 -999.21516 5091.0038 1964.704
250 387.02700888869412665 -1008.6348876953125 -999.07969874332957261 1589.0489354563010238 1964.7040162035737012
250 387.02701 -1008.6349 -999.0797 1589.0489 1964.704
260 356.23187800302292771 -1008.2626953125 -999.46779772948002574 2719.2092128853205395 1964.7040162035737012
260 356.23188 -1008.2627 -999.4678 2719.2092 1964.704
270 366.62014164853036391 -1008.1405029296875 -999.08913274983024166 4084.0568258974362834 1964.7040162035737012
270 366.62014 -1008.1405 -999.08913 4084.0568 1964.704
280 368.77508807125030899 -1008.3409423828125 -999.23636940372523441 -1704.0600552628070545 1964.7040162035737012
280 368.77509 -1008.3409 -999.23637 -1704.0601 1964.704
290 370.72760995187638855 -1008.38494873046875 -999.23217054845304119 6642.4267149415691165 1964.7040162035737012
290 370.72761 -1008.3849 -999.23217 6642.4267 1964.704
300 368.67942271623121542 -1008.09228515625 -998.99007402923609789 -3882.1219608663950567 1964.7040162035737012
300 368.67942 -1008.0923 -998.99007 -3882.122 1964.704
310 358.98855740838195061 -1008.0296630859375 -999.16670670600342419 7508.1292896342565655 1964.7040162035737012
310 358.98856 -1008.0297 -999.16671 7508.1293 1964.704
320 349.97856115777409514 -1007.760498046875 -999.1199866505052114 -6355.3941278957872782 1964.7040162035737012
320 349.97856 -1007.7605 -999.11999 -6355.3941 1964.704
330 372.3279874498741151 -1008.10009765625 -998.90780825399212972 9369.0369249690720608 1964.7040162035737012
330 372.32799 -1008.1001 -998.90781 9369.0369 1964.704
340 349.43505847958954291 -1007.6844482421875 -999.05735521370081642 -6740.2585452965558943 1964.7040162035737012
340 349.43506 -1007.6844 -999.05736 -6740.2585 1964.704
350 338.32700753580570563 -1007.50921630859375 -999.15636648075837911 9456.441735884442096 1964.7040162035737012
350 338.32701 -1007.5092 -999.15637 9456.4417 1964.704
360 325.71402229925269012 -1007.151123046875 -999.10967127244646235 -4990.9973497849650812 1964.7040162035737012
360 325.71402 -1007.1511 -999.10967 -4990.9973 1964.704
370 354.15092999653302286 -1007.5224609375 -998.77893922992177522 7604.8726757293034098 1964.7040162035737012
370 354.15093 -1007.5225 -998.77894 7604.8727 1964.704
380 370.26939235590901944 -1007.7275390625 -998.58607367160755075 -3774.1151608931404553 1964.7040162035737012
380 370.26939 -1007.7275 -998.58607 -3774.1152 1964.704
390 370.98275451399257463 -1007.41815185546875 -998.25907448904195007 2424.1474178763392047 1964.7040162035737012
390 370.98275 -1007.4182 -998.25907 2424.1474 1964.704
400 355.28560185264274196 -1006.99615478515625 -998.22461951848629269 421.13148763585382994 1964.7040162035737012
400 355.2856 -1006.9962 -998.22462 421.13149 1964.704
410 357.52390025816629304 -1007.2379150390625 -998.41111912209032653 -950.00345787494893557 1964.7040162035737012
410 357.5239 -1007.2379 -998.41112 -950.00346 1964.704
420 370.23825164916195263 -1007.41839599609375 -998.27769942838472161 1959.6486710188260076 1964.7040162035737012
420 370.23825 -1007.4184 -998.2777 1959.6487 1964.704
430 361.6084686073494936 -1007.01629638671875 -998.08865783740463939 -4094.0986162878302821 1964.7040162035737012
430 361.60847 -1007.0163 -998.08866 -4094.0986 1964.704
440 336.39752277667162161 -1006.65399169921875 -998.34877831801384218 4010.0829042558898436 1964.7040162035737012
440 336.39752 -1006.654 -998.34878 4010.0829 1964.704
450 342.11558432205066538 -1006.59765625 -998.15127143308041013 -4113.0683865876835625 1964.7040162035737012
450 342.11558 -1006.5977 -998.15127 -4113.0684 1964.704
460 373.11163960504717352 -1007.12127685546875 -997.90964010989034705 3005.3891900957901271 1964.7040162035737012
460 373.11164 -1007.1213 -997.90964 3005.3892 1964.704
470 358.06661347184433453 -1006.99041748046875 -998.15022268645611803 -5493.9066189660179589 1964.7040162035737012
470 358.06661 -1006.9904 -998.15022 -5493.9066 1964.704
480 374.20262019249537389 -1007.23858642578125 -998.00001480119806274 1194.8449489803365395 1964.7040162035737012
480 374.20262 -1007.2386 -998.00001 1194.8449 1964.704
490 387.95455574330549098 -1007.21051025390625 -997.63242138730731767 -3981.8270205404078297 1964.7040162035737012
490 387.95456 -1007.2105 -997.63242 -3981.827 1964.704
500 383.19323472019789278 -1007.38958740234375 -997.9290493034999372 -253.72782315248522877 1964.7040162035737012
500 383.19323 -1007.3896 -997.92905 -253.72782 1964.704
Loop time of 124.508 on 1 procs for 500 steps with 192 atoms
Performance: 0.173 ns/day, 138.342 hours/ns, 4.016 timesteps/s, 771.036 atom-step/s
97.6% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 123.04 | 123.04 | 123.04 | 0.0 | 98.82
Neigh | 1.4031 | 1.4031 | 1.4031 | 0.0 | 1.13
Comm | 0.038013 | 0.038013 | 0.038013 | 0.0 | 0.03
Output | 0.0099706 | 0.0099706 | 0.0099706 | 0.0 | 0.01
Modify | 0.0088997 | 0.0088997 | 0.0088997 | 0.0 | 0.01
Other | | 0.003586 | | | 0.00
Nlocal: 192 ave 192 max 192 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9642 ave 9642 max 9642 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 385200 ave 385200 max 385200 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 385200
Ave neighs/atom = 2006.25
Neighbor list builds = 8
Dangerous builds = 0
Total wall time: 0:02:06
CompletedProcess(args=['lmp', '-in', 'in_water_nvt.lmp'], returncode=0, stdout="LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-734-ga1c7f5baba)\nOMP_NUM_THREADS environment is not set. Defaulting to 1 thread.\n using 1 OpenMP thread(s) per MPI task\nReading data file ...\n orthogonal box = (0.73005488 0.73005488 0.73005488) to (13.254708 13.254708 13.254708)\n 1 by 1 by 1 MPI processor grid\n reading atoms ...\n 192 atoms\n reading velocities ...\n 192 velocities\n read_data CPU = 0.001 seconds\n\nThis is an unamed model\n=======================\n\nModel authors\n-------------\n\n- Arslan Mazitov ([email protected])\n- Filippo Bigi\n- Matthias Kellner\n- Paolo Pegolo\n- Davide Tisi\n- Guillaume Fraux\n- Sergey Pozdnyakov\n- Philip Loche\n- Michele Ceriotti ([email protected])\n\nModel references\n----------------\n\nPlease cite the following references when using this model:\n- about this specific model:\n * https://doi.org/10.1038/s41467-025-65662-7\n * https://arxiv.org/abs/2601.16195\n- about the architecture of this model:\n * LLPR (uncertainty method):\n https://iopscience.iop.org/article/10.1088/2632-2153/ad805f\n * LPR (if using per-atom uncertainty):\n https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704\n * https://arxiv.org/abs/2305.19302v3\n\nFound 'energy_uncertainty' output, we will check for atoms with high uncertainty on the energy predictions\nRunning simulation on cpu device with float32 data\nstep temp pe etotal press vol\n\nCITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE\n\nYour simulation uses code contributions which should be cited:\n- LLPR (uncertainty method): https://iopscience.iop.org/article/10.1088/2632-2153/ad805f\n- LPR (if using per-atom uncertainty): https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704\n- https://arxiv.org/abs/2305.19302v3\n- https://doi.org/10.1038/s41467-025-65662-7\n- https://arxiv.org/abs/2601.16195\nThe log file lists these citations in BibTeX format.\n\nCITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE\n\nNeighbor list info ...\n update: every = 1 steps, delay = 0 steps, check = yes\n max neighbors/atom: 50000, page size: 500000\n master list distance cutoff = 17\n ghost atom cutoff = 17\n binsize = 8.5, bins = 2 2 2\n 1 neighbor lists, perpetual/occasional/extra = 1 0 0\n (1) pair metatomic, perpetual\n attributes: full, newton on, ghost\n pair build: full/bin/ghost\n stencil: full/ghost/bin/3d\n bin: standard\nSetting up Verlet run ...\n Unit style : metal\n Current step : 0\n Time step : 0.0005\n0 400.00000000000011369 -1009.419189453125 -999.54371437512497778 6880.9341641322689611 1964.7040162035737012\nPer MPI rank memory allocation (min/avg/max) = 58.34 | 58.34 | 58.34 Mbytes\n Step Temp PotEng TotEng Press Volume \n 0 400 -1009.4192 -999.54371 6880.9342 1964.704 \n10 353.47653296494610231 -1008.317138671875 -999.5902669419921267 -1875.0560057972775212 1964.7040162035737012\n 10 353.47653 -1008.3171 -999.59027 -1875.056 1964.704 \n20 350.42526619262594068 -1008.11572265625 -999.46418269878301999 12577.770941488042808 1964.7040162035737012\n 20 350.42527 -1008.1157 -999.46418 12577.771 1964.704 \n30 336.10029235010358661 -1007.68682861328125 -999.38895346125138985 -3756.7607257036411283 1964.7040162035737012\n 30 336.10029 -1007.6868 -999.38895 -3756.7607 1964.704 \n40 373.63773186297868278 -1008.28289794921875 -999.05827267618553833 13656.813329813132441 1964.7040162035737012\n 40 373.63773 -1008.2829 -999.05827 13656.813 1964.704 \n50 368.5959097082605922 -1007.88623046875 -998.78608116830832842 -6488.2319969945274352 1964.7040162035737012\n 50 368.59591 -1007.8862 -998.78608 -6488.232 1964.704 \n60 377.41980255308385495 -1008.47088623046875 -999.1528865953271179 15124.697008263327007 1964.7040162035737012\n 60 377.4198 -1008.4709 -999.15289 15124.697 1964.704 \n70 360.77879833824755451 -1007.9412841796875 -999.03412910053714313 -5968.3692601929305965 1964.7040162035737012\n 70 360.7788 -1007.9413 -999.03413 -5968.3693 1964.704 \n80 349.77139698879364005 -1008.0147705078125 -999.37937372291230531 14524.177444334149186 1964.7040162035737012\n 80 349.7714 -1008.0148 -999.37937 14524.177 1964.704 \n90 359.54610845135925956 -1007.82354736328125 -998.94682577977300753 -4206.6181520106811149 1964.7040162035737012\n 90 359.54611 -1007.8235 -998.94683 -4206.6182 1964.704 \n100 388.60342318732813283 -1008.54681396484375 -998.95270541256388697 10931.334516390959834 1964.7040162035737012\n 100 388.60342 -1008.5468 -998.95271 10931.335 1964.704 \n110 369.89698396173662331 -1008.023193359375 -998.89092224302123668 -2798.5261001346830199 1964.7040162035737012\n 110 369.89698 -1008.0232 -998.89092 -2798.5261 1964.704 \n120 358.4364739306418528 -1007.99346923828125 -999.14414307491063028 11552.623184759069773 1964.7040162035737012\n 120 358.43647 -1007.9935 -999.14414 11552.623 1964.704 \n130 360.78575506611468882 -1007.8367919921875 -998.92946516055542361 -2903.7168920290414462 1964.7040162035737012\n 130 360.78576 -1007.8368 -998.92947 -2903.7169 1964.704 \n140 395.74326774041327326 -1008.54547119140625 -998.77508924676442348 9687.1034852705633966 1964.7040162035737012\n 140 395.74327 -1008.5455 -998.77509 9687.1035 1964.704 \n150 394.10476648023046664 -1008.53729248046875 -998.80736298172746501 -2159.3437106676587973 1964.7040162035737012\n 150 394.10477 -1008.5373 -998.80736 -2159.3437 1964.704 \n160 399.73292534463774928 -1008.686279296875 -998.817397941632521 8889.1503999479646154 1964.7040162035737012\n 160 399.73293 -1008.6863 -998.8174 8889.1504 1964.704 \n170 393.3922335601019995 -1008.6815185546875 -998.96918055868366082 -2420.7938442363438298 1964.7040162035737012\n 170 393.39223 -1008.6815 -998.96918 -2420.7938 1964.704 \n180 391.78783200917331442 -1008.68365478515625 -999.01092735798067679 8432.7676495726755093 1964.7040162035737012\n 180 391.78783 -1008.6837 -999.01093 8432.7676 1964.704 \n190 406.13323686600864448 -1008.752685546875 -998.72578889933060964 -1333.4729356841435219 1964.7040162035737012\n 190 406.13324 -1008.7527 -998.72579 -1333.4729 1964.704 \n200 389.63352619113197761 -1008.76507568359375 -999.14553523995925843 7129.5604074434359063 1964.7040162035737012\n 200 389.63353 -1008.7651 -999.14554 7129.5604 1964.704 \n210 394.64275527491787443 -1008.83770751953125 -999.09449578345447662 74.417537510458714678 1964.7040162035737012\n 210 394.64276 -1008.8377 -999.0945 74.417538 1964.704 \n220 381.54895312030015475 -1008.4151611328125 -998.99521818887126301 5541.0441526995400636 1964.7040162035737012\n 220 381.54895 -1008.4152 -998.99522 5541.0442 1964.704 \n230 381.5605907535324377 -1008.43719482421875 -999.01696456238505561 923.50414944911187831 1964.7040162035737012\n 230 381.56059 -1008.4372 -999.01696 923.50415 1964.704 \n240 373.48083557483442974 -1008.4359130859375 -999.21516137636274379 5091.0037727340350102 1964.7040162035737012\n 240 373.48084 -1008.4359 -999.21516 5091.0038 1964.704 \n250 387.02700888869412665 -1008.6348876953125 -999.07969874332957261 1589.0489354563010238 1964.7040162035737012\n 250 387.02701 -1008.6349 -999.0797 1589.0489 1964.704 \n260 356.23187800302292771 -1008.2626953125 -999.46779772948002574 2719.2092128853205395 1964.7040162035737012\n 260 356.23188 -1008.2627 -999.4678 2719.2092 1964.704 \n270 366.62014164853036391 -1008.1405029296875 -999.08913274983024166 4084.0568258974362834 1964.7040162035737012\n 270 366.62014 -1008.1405 -999.08913 4084.0568 1964.704 \n280 368.77508807125030899 -1008.3409423828125 -999.23636940372523441 -1704.0600552628070545 1964.7040162035737012\n 280 368.77509 -1008.3409 -999.23637 -1704.0601 1964.704 \n290 370.72760995187638855 -1008.38494873046875 -999.23217054845304119 6642.4267149415691165 1964.7040162035737012\n 290 370.72761 -1008.3849 -999.23217 6642.4267 1964.704 \n300 368.67942271623121542 -1008.09228515625 -998.99007402923609789 -3882.1219608663950567 1964.7040162035737012\n 300 368.67942 -1008.0923 -998.99007 -3882.122 1964.704 \n310 358.98855740838195061 -1008.0296630859375 -999.16670670600342419 7508.1292896342565655 1964.7040162035737012\n 310 358.98856 -1008.0297 -999.16671 7508.1293 1964.704 \n320 349.97856115777409514 -1007.760498046875 -999.1199866505052114 -6355.3941278957872782 1964.7040162035737012\n 320 349.97856 -1007.7605 -999.11999 -6355.3941 1964.704 \n330 372.3279874498741151 -1008.10009765625 -998.90780825399212972 9369.0369249690720608 1964.7040162035737012\n 330 372.32799 -1008.1001 -998.90781 9369.0369 1964.704 \n340 349.43505847958954291 -1007.6844482421875 -999.05735521370081642 -6740.2585452965558943 1964.7040162035737012\n 340 349.43506 -1007.6844 -999.05736 -6740.2585 1964.704 \n350 338.32700753580570563 -1007.50921630859375 -999.15636648075837911 9456.441735884442096 1964.7040162035737012\n 350 338.32701 -1007.5092 -999.15637 9456.4417 1964.704 \n360 325.71402229925269012 -1007.151123046875 -999.10967127244646235 -4990.9973497849650812 1964.7040162035737012\n 360 325.71402 -1007.1511 -999.10967 -4990.9973 1964.704 \n370 354.15092999653302286 -1007.5224609375 -998.77893922992177522 7604.8726757293034098 1964.7040162035737012\n 370 354.15093 -1007.5225 -998.77894 7604.8727 1964.704 \n380 370.26939235590901944 -1007.7275390625 -998.58607367160755075 -3774.1151608931404553 1964.7040162035737012\n 380 370.26939 -1007.7275 -998.58607 -3774.1152 1964.704 \n390 370.98275451399257463 -1007.41815185546875 -998.25907448904195007 2424.1474178763392047 1964.7040162035737012\n 390 370.98275 -1007.4182 -998.25907 2424.1474 1964.704 \n400 355.28560185264274196 -1006.99615478515625 -998.22461951848629269 421.13148763585382994 1964.7040162035737012\n 400 355.2856 -1006.9962 -998.22462 421.13149 1964.704 \n410 357.52390025816629304 -1007.2379150390625 -998.41111912209032653 -950.00345787494893557 1964.7040162035737012\n 410 357.5239 -1007.2379 -998.41112 -950.00346 1964.704 \n420 370.23825164916195263 -1007.41839599609375 -998.27769942838472161 1959.6486710188260076 1964.7040162035737012\n 420 370.23825 -1007.4184 -998.2777 1959.6487 1964.704 \n430 361.6084686073494936 -1007.01629638671875 -998.08865783740463939 -4094.0986162878302821 1964.7040162035737012\n 430 361.60847 -1007.0163 -998.08866 -4094.0986 1964.704 \n440 336.39752277667162161 -1006.65399169921875 -998.34877831801384218 4010.0829042558898436 1964.7040162035737012\n 440 336.39752 -1006.654 -998.34878 4010.0829 1964.704 \n450 342.11558432205066538 -1006.59765625 -998.15127143308041013 -4113.0683865876835625 1964.7040162035737012\n 450 342.11558 -1006.5977 -998.15127 -4113.0684 1964.704 \n460 373.11163960504717352 -1007.12127685546875 -997.90964010989034705 3005.3891900957901271 1964.7040162035737012\n 460 373.11164 -1007.1213 -997.90964 3005.3892 1964.704 \n470 358.06661347184433453 -1006.99041748046875 -998.15022268645611803 -5493.9066189660179589 1964.7040162035737012\n 470 358.06661 -1006.9904 -998.15022 -5493.9066 1964.704 \n480 374.20262019249537389 -1007.23858642578125 -998.00001480119806274 1194.8449489803365395 1964.7040162035737012\n 480 374.20262 -1007.2386 -998.00001 1194.8449 1964.704 \n490 387.95455574330549098 -1007.21051025390625 -997.63242138730731767 -3981.8270205404078297 1964.7040162035737012\n 490 387.95456 -1007.2105 -997.63242 -3981.827 1964.704 \n500 383.19323472019789278 -1007.38958740234375 -997.9290493034999372 -253.72782315248522877 1964.7040162035737012\n 500 383.19323 -1007.3896 -997.92905 -253.72782 1964.704 \nLoop time of 124.508 on 1 procs for 500 steps with 192 atoms\n\nPerformance: 0.173 ns/day, 138.342 hours/ns, 4.016 timesteps/s, 771.036 atom-step/s\n97.6% CPU use with 1 MPI tasks x 1 OpenMP threads\n\nMPI task timing breakdown:\nSection | min time | avg time | max time |%varavg| %total\n---------------------------------------------------------------\nPair | 123.04 | 123.04 | 123.04 | 0.0 | 98.82\nNeigh | 1.4031 | 1.4031 | 1.4031 | 0.0 | 1.13\nComm | 0.038013 | 0.038013 | 0.038013 | 0.0 | 0.03\nOutput | 0.0099706 | 0.0099706 | 0.0099706 | 0.0 | 0.01\nModify | 0.0088997 | 0.0088997 | 0.0088997 | 0.0 | 0.01\nOther | | 0.003586 | | | 0.00\n\nNlocal: 192 ave 192 max 192 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nNghost: 9642 ave 9642 max 9642 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nNeighs: 0 ave 0 max 0 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nFullNghs: 385200 ave 385200 max 385200 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\n\nTotal # of neighbors = 385200\nAve neighs/atom = 2006.25\nNeighbor list builds = 8\nDangerous builds = 0\nTotal wall time: 0:02:06\n")
As a first sanity check we plot the temperature and potential energy along the trajectory: the thermostat should hold the temperature near its 400 K target (fluctuations are expected, given the small system). After a brief equilibration the potential energy should settle around a stable mean, with no long-term drift.
water_thermo = np.loadtxt("water_thermo.out", skiprows=1)
# columns: step temp pe etotal press vol
time_ps = water_thermo[:, 0] * 0.0005 # step × dt (0.5 fs) in ps
fig, axes = plt.subplots(1, 2, figsize=(10, 4), dpi=200)
axes[0].plot(time_ps, water_thermo[:, 1])
axes[0].set(xlabel="Time (ps)", ylabel="Temperature (K)", title="Temperature")
axes[1].plot(time_ps, water_thermo[:, 2])
axes[1].set(
xlabel="Time (ps)", ylabel="Potential energy (eV)", title="Potential energy"
)
fig.tight_layout()
plt.show()

We can also inspect the trajectory interactively. Water molecules diffuse and the hydrogen-bond network continuously rearranges.
water_traj = ase.io.read("water_traj.lammpstrj", ":", format="lammps-dump-text")
for frame in water_traj:
frame.wrap()
chemiscope.show(
structures=water_traj,
mode="structure",
settings=chemiscope.quick_settings(
trajectory=True,
structure_settings={"playbackDelay": 20, "unitCell": True},
),
)
Adding ions: NaCl in water¶
PET-MAD can handle in principle any stable chemical element. We start by dissolving
two NaCl units (two Na⁺ and two Cl⁻ ions) in 60 water molecules, a roughly 1.8 M
solution. The only change to the LAMMPS input is the element map: the pair_coeff
line now also assigns Na (Z=11) and Cl (Z=17). No new parameters and no retraining
are involved: the same weights describe ion-water and ion-ion interactions out of the
box.
# NaCl aqueous solution NVT at 400 K with PET-MAD-xs
# Atom types: 1=H, 2=O, 3=Na, 4=Cl
units metal
atom_style atomic
variable seed index 23456
variable t_target equal 400.0
variable tdamp equal 100*dt
variable nsteps equal 500 # 500 * 0.5 fs = 0.25 ps
variable dump_every equal 10
read_data data/nacl.data
pair_style metatomic pet-mad-xs-v1.5.0.pt device cpu
pair_coeff * * 1 8 11 17
timestep 0.0005
neighbor 2.0 bin
neigh_modify one 50000 page 500000
thermo_style custom step temp pe etotal press vol
thermo 10
velocity all create ${t_target} ${seed} mom yes rot yes dist gaussian
reset_timestep 0
fix nve_int all nve
fix thermostat all temp/csvr ${t_target} ${t_target} ${tdamp} ${seed}
print "step temp pe etotal press vol" file nacl_thermo.out
fix thermofile all print ${dump_every} "$(step) $(temp) $(pe) $(etotal) $(press) $(vol)" append nacl_thermo.out
dump traj all custom ${dump_every} nacl_traj.lammpstrj id type element xu yu zu
dump_modify traj element H O Na Cl sort id
run ${nsteps}
run_command("lmp -in in_nacl_nvt.lmp", print_output=True)
LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-734-ga1c7f5baba)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread.
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (0.95507965 0.95507965 0.95507965) to (13.141811 13.141811 13.141811)
1 by 1 by 1 MPI processor grid
reading atoms ...
184 atoms
reading velocities ...
184 velocities
read_data CPU = 0.001 seconds
This is an unamed model
=======================
Model authors
-------------
- Arslan Mazitov ([email protected])
- Filippo Bigi
- Matthias Kellner
- Paolo Pegolo
- Davide Tisi
- Guillaume Fraux
- Sergey Pozdnyakov
- Philip Loche
- Michele Ceriotti ([email protected])
Model references
----------------
Please cite the following references when using this model:
- about this specific model:
* https://doi.org/10.1038/s41467-025-65662-7
* https://arxiv.org/abs/2601.16195
- about the architecture of this model:
* LLPR (uncertainty method):
https://iopscience.iop.org/article/10.1088/2632-2153/ad805f
* LPR (if using per-atom uncertainty):
https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704
* https://arxiv.org/abs/2305.19302v3
Found 'energy_uncertainty' output, we will check for atoms with high uncertainty on the energy predictions
Running simulation on cpu device with float32 data
step temp pe etotal press vol
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- LLPR (uncertainty method): https://iopscience.iop.org/article/10.1088/2632-2153/ad805f
- LPR (if using per-atom uncertainty): https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704
- https://arxiv.org/abs/2305.19302v3
- https://doi.org/10.1038/s41467-025-65662-7
- https://arxiv.org/abs/2601.16195
The log file lists these citations in BibTeX format.
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 50000, page size: 500000
master list distance cutoff = 17
ghost atom cutoff = 17
binsize = 8.5, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair metatomic, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Setting up Verlet run ...
Unit style : metal
Current step : 0
Time step : 0.0005
0 400.0000000000003979 -959.44195556640625 -949.98011295240621621 6335.8115156452404335 1809.9298793830914747
Per MPI rank memory allocation (min/avg/max) = 60.24 | 60.24 | 60.24 Mbytes
Step Temp PotEng TotEng Press Volume
0 400 -959.44196 -949.98011 6335.8115 1809.9299
10 357.76270659228413251 -958.8070068359375 -950.34427077860038935 -4157.873541186843795 1809.9298793830914747
10 357.76271 -958.80701 -950.34427 -4157.8735 1809.9299
20 368.23139204903532118 -958.78961181640625 -950.07924312365094011 6893.2694823659276153 1809.9298793830914747
20 368.23139 -958.78961 -950.07924 6893.2695 1809.9299
30 377.54332981132716895 -958.9130859375 -949.98244702089937164 -3363.332712781025748 1809.9298793830914747
30 377.54333 -958.91309 -949.98245 -3363.3327 1809.9299
40 401.97239722381931415 -959.4512939453125 -949.94279505105237149 3892.0707109330105595 1809.9298793830914747
40 401.9724 -959.45129 -949.9428 3892.0707 1809.9299
50 390.11841952954830504 -958.847412109375 -949.61931439334750849 -3125.7104419333436454 1809.9298793830914747
50 390.11842 -958.84741 -949.61931 -3125.7104 1809.9299
60 386.20374322879843021 -958.65234375 -949.51684616157865548 4062.1104519074865493 1809.9298793830914747
60 386.20374 -958.65234 -949.51685 4062.1105 1809.9299
70 353.71212896512167845 -958.32366943359375 -949.95674819626663066 865.07940051853313435 1809.9298793830914747
70 353.71213 -958.32367 -949.95675 865.0794 1809.9299
80 359.76800731554232016 -958.33544921875 -949.82527856181980042 1907.7835643037094542 1809.9298793830914747
80 359.76801 -958.33545 -949.82528 1907.7836 1809.9299
90 352.06663285403175223 -957.8079833984375 -949.47998572417304786 3621.0033904156225617 1809.9298793830914747
90 352.06663 -957.80798 -949.47999 3621.0034 1809.9299
100 358.18212824550715823 -958.34326171875 -949.87060440723359989 2566.3726441843054999 1809.9298793830914747
100 358.18213 -958.34326 -949.8706 2566.3726 1809.9299
110 363.88274961787334405 -958.43194580078125 -949.82444253369658327 1235.122888984255269 1809.9298793830914747
110 363.88275 -958.43195 -949.82444 1235.1229 1809.9299
120 373.82303473288243367 -958.70697021484375 -949.86433341451777324 2094.792903441918952 1809.9298793830914747
120 373.82303 -958.70697 -949.86433 2094.7929 1809.9299
130 368.08434854495430955 -958.37591552734375 -949.66902509082103734 -378.32898061973384074 1809.9298793830914747
130 368.08435 -958.37592 -949.66903 -378.32898 1809.9299
140 368.2742166351679316 -958.5618896484375 -949.85050795694724002 3698.6375516646144206 1809.9298793830914747
140 368.27422 -958.56189 -949.85051 3698.6376 1809.9299
150 363.86467558350227591 -958.3436279296875 -949.73655219677436889 -1021.6090206868265113 1809.9298793830914747
150 363.86468 -958.34363 -949.73655 -1021.609 1809.9299
160 376.88552270247186016 -958.6251220703125 -949.71004332204768161 3817.8606688513386871 1809.9298793830914747
160 376.88552 -958.62512 -949.71004 3817.8607 1809.9299
170 370.01808788471782918 -958.2957763671875 -949.54314408744141929 -1560.4191223795719452 1809.9298793830914747
170 370.01809 -958.29578 -949.54314 -1560.4191 1809.9299
180 375.20728711719476678 -958.2528076171875 -949.37742687136551467 7268.9739796888143246 1809.9298793830914747
180 375.20729 -958.25281 -949.37743 7268.974 1809.9299
190 368.71576143530830905 -958.04571533203125 -949.32388907202607697 -1773.618242888537452 1809.9298793830914747
190 368.71576 -958.04572 -949.32389 -1773.6182 1809.9299
200 395.51661966586942754 -958.2454833984375 -948.88969338218817029 7414.2819726236984934 1809.9298793830914747
200 395.51662 -958.24548 -948.88969 7414.282 1809.9299
210 408.67822495446688436 -958.30596923828125 -948.63884662756106536 -5245.8067787496211167 1809.9298793830914747
210 408.67822 -958.30597 -948.63885 -5245.8068 1809.9299
220 390.90832138262459239 -958.05902099609375 -948.81223846253044485 9911.0873614329029806 1809.9298793830914747
220 390.90832 -958.05902 -948.81224 9911.0874 1809.9299
230 364.83976192302611707 -957.48828125 -948.85814023338775769 -2397.7520413672350514 1809.9298793830914747
230 364.83976 -957.48828 -948.85814 -2397.752 1809.9299
240 386.76913828626283021 -957.663330078125 -948.51445829208239502 8077.2597182856734435 1809.9298793830914747
240 386.76914 -957.66333 -948.51446 8077.2597 1809.9299
250 370.72888763585552852 -957.7017822265625 -948.93233625837808631 -2306.666476768661596 1809.9298793830914747
250 370.72889 -957.70178 -948.93234 -2306.6665 1809.9299
260 383.43143381591545449 -958.25830078125 -949.18838108118359287 6073.5376813198799937 1809.9298793830914747
260 383.43143 -958.2583 -949.18838 6073.5377 1809.9299
270 373.25451203016410773 -958.096923828125 -949.26773520863798694 507.63278864000778867 1809.9298793830914747
270 373.25451 -958.09692 -949.26774 507.63279 1809.9299
280 368.81288017276079927 -958.204345703125 -949.48022213759827537 2777.3294260395937272 1809.9298793830914747
280 368.81288 -958.20435 -949.48022 2777.3294 1809.9299
290 376.21715149448073134 -958.04461669921875 -949.14534800889828148 1492.3404590559830467 1809.9298793830914747
290 376.21715 -958.04462 -949.14535 1492.3405 1809.9299
300 374.30656992692831864 -958.2183837890625 -949.36430915397556873 -645.19317116196270945 1809.9298793830914747
300 374.30657 -958.21838 -949.36431 -645.19317 1809.9299
310 361.44463838373059161 -958.01593017578125 -949.4660994706287056 3105.10523086793728 1809.9298793830914747
310 361.44464 -958.01593 -949.4661 3105.1052 1809.9299
320 349.80718860066542675 -957.9735107421875 -949.69895933272425737 -379.21762201207667431 1809.9298793830914747
320 349.80719 -957.97351 -949.69896 -379.21762 1809.9299
330 355.28287490367972623 -957.98529052734375 -949.58121391287363622 1854.7118657400042139 1809.9298793830914747
330 355.28287 -957.98529 -949.58121 1854.7119 1809.9299
340 381.02170332282827303 -958.4072265625 -949.3943080891029922 -840.32934561823844888 1809.9298793830914747
340 381.0217 -958.40723 -949.39431 -840.32935 1809.9299
350 373.81735230784346413 -957.98480224609375 -949.1422998612962374 2730.1105650062213499 1809.9298793830914747
350 373.81735 -957.9848 -949.1423 2730.1106 1809.9299
360 386.35599061686576761 -958.38494873046875 -949.24584978998666429 911.5232847970861485 1809.9298793830914747
360 386.35599 -958.38495 -949.24585 911.52328 1809.9299
370 366.83786501129628732 -958.5029296875 -949.82552432851832691 -2075.0632474180529243 1809.9298793830914747
370 366.83787 -958.50293 -949.82552 -2075.0632 1809.9299
380 380.42348441931261505 -958.4874267578125 -949.4886589171999276 4381.3613346831316449 1809.9298793830914747
380 380.42348 -958.48743 -949.48866 4381.3613 1809.9299
390 347.34853255605867162 -957.69537353515625 -949.47898066703305631 -2456.4012853338526838 1809.9298793830914747
390 347.34853 -957.69537 -949.47898 -2456.4013 1809.9299
400 352.97678137482381544 -957.91729736328125 -949.56777048386902607 7865.5382789132772814 1809.9298793830914747
400 352.97678 -957.9173 -949.56777 7865.5383 1809.9299
410 353.10742978607129317 -957.73779296875 -949.38517565257529895 -4989.6623986945824072 1809.9298793830914747
410 353.10743 -957.73779 -949.38518 -4989.6624 1809.9299
420 369.13102049929534587 -958.275634765625 -949.54398571585113586 8734.624330532791646 1809.9298793830914747
420 369.13102 -958.27563 -949.54399 8734.6243 1809.9299
430 341.24824563537009681 -957.77471923828125 -949.70262625701752768 -5312.8507264829158885 1809.9298793830914747
430 341.24825 -957.77472 -949.70263 -5312.8507 1809.9299
440 338.93691509133924455 -957.77581787109375 -949.75839850442139323 10912.807344898290467 1809.9298793830914747
440 338.93692 -957.77582 -949.7584 10912.807 1809.9299
450 347.03526600147500858 -957.72906494140625 -949.52008227037231336 -5333.7624288737997631 1809.9298793830914747
450 347.03527 -957.72906 -949.52008 -5333.7624 1809.9299
460 356.21710711318678477 -957.97454833984375 -949.54837283004530946 8940.5278602900270926 1809.9298793830914747
460 356.21711 -957.97455 -949.54837 8940.5279 1809.9299
470 370.31699177439799087 -958.2576904296875 -949.49798769603933124 -3376.5060369404395715 1809.9298793830914747
470 370.31699 -958.25769 -949.49799 -3376.506 1809.9299
480 366.28767501554000319 -958.01123046875 -949.34683963763745851 6831.6896648894307873 1809.9298793830914747
480 366.28768 -958.01123 -949.34684 6831.6897 1809.9299
490 366.21258018247442578 -957.998779296875 -949.33616480449143182 -1089.5075029549846022 1809.9298793830914747
490 366.21258 -957.99878 -949.33616 -1089.5075 1809.9299
500 365.2719367208960648 -958.096923828125 -949.45655988671478553 4678.6242040794350032 1809.9298793830914747
500 365.27194 -958.09692 -949.45656 4678.6242 1809.9299
Loop time of 120.903 on 1 procs for 500 steps with 184 atoms
Performance: 0.179 ns/day, 134.336 hours/ns, 4.136 timesteps/s, 760.942 atom-step/s
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 119.61 | 119.61 | 119.61 | 0.0 | 98.93
Neigh | 1.233 | 1.233 | 1.233 | 0.0 | 1.02
Comm | 0.037525 | 0.037525 | 0.037525 | 0.0 | 0.03
Output | 0.0089155 | 0.0089155 | 0.0089155 | 0.0 | 0.01
Modify | 0.0078946 | 0.0078946 | 0.0078946 | 0.0 | 0.01
Other | | 0.003459 | | | 0.00
Nlocal: 184 ave 184 max 184 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9765 ave 9765 max 9765 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 383610 ave 383610 max 383610 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 383610
Ave neighs/atom = 2084.837
Neighbor list builds = 7
Dangerous builds = 0
Total wall time: 0:02:02
CompletedProcess(args=['lmp', '-in', 'in_nacl_nvt.lmp'], returncode=0, stdout="LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-734-ga1c7f5baba)\nOMP_NUM_THREADS environment is not set. Defaulting to 1 thread.\n using 1 OpenMP thread(s) per MPI task\nReading data file ...\n orthogonal box = (0.95507965 0.95507965 0.95507965) to (13.141811 13.141811 13.141811)\n 1 by 1 by 1 MPI processor grid\n reading atoms ...\n 184 atoms\n reading velocities ...\n 184 velocities\n read_data CPU = 0.001 seconds\n\nThis is an unamed model\n=======================\n\nModel authors\n-------------\n\n- Arslan Mazitov ([email protected])\n- Filippo Bigi\n- Matthias Kellner\n- Paolo Pegolo\n- Davide Tisi\n- Guillaume Fraux\n- Sergey Pozdnyakov\n- Philip Loche\n- Michele Ceriotti ([email protected])\n\nModel references\n----------------\n\nPlease cite the following references when using this model:\n- about this specific model:\n * https://doi.org/10.1038/s41467-025-65662-7\n * https://arxiv.org/abs/2601.16195\n- about the architecture of this model:\n * LLPR (uncertainty method):\n https://iopscience.iop.org/article/10.1088/2632-2153/ad805f\n * LPR (if using per-atom uncertainty):\n https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704\n * https://arxiv.org/abs/2305.19302v3\n\nFound 'energy_uncertainty' output, we will check for atoms with high uncertainty on the energy predictions\nRunning simulation on cpu device with float32 data\nstep temp pe etotal press vol\n\nCITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE\n\nYour simulation uses code contributions which should be cited:\n- LLPR (uncertainty method): https://iopscience.iop.org/article/10.1088/2632-2153/ad805f\n- LPR (if using per-atom uncertainty): https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704\n- https://arxiv.org/abs/2305.19302v3\n- https://doi.org/10.1038/s41467-025-65662-7\n- https://arxiv.org/abs/2601.16195\nThe log file lists these citations in BibTeX format.\n\nCITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE\n\nNeighbor list info ...\n update: every = 1 steps, delay = 0 steps, check = yes\n max neighbors/atom: 50000, page size: 500000\n master list distance cutoff = 17\n ghost atom cutoff = 17\n binsize = 8.5, bins = 2 2 2\n 1 neighbor lists, perpetual/occasional/extra = 1 0 0\n (1) pair metatomic, perpetual\n attributes: full, newton on, ghost\n pair build: full/bin/ghost\n stencil: full/ghost/bin/3d\n bin: standard\nSetting up Verlet run ...\n Unit style : metal\n Current step : 0\n Time step : 0.0005\n0 400.0000000000003979 -959.44195556640625 -949.98011295240621621 6335.8115156452404335 1809.9298793830914747\nPer MPI rank memory allocation (min/avg/max) = 60.24 | 60.24 | 60.24 Mbytes\n Step Temp PotEng TotEng Press Volume \n 0 400 -959.44196 -949.98011 6335.8115 1809.9299 \n10 357.76270659228413251 -958.8070068359375 -950.34427077860038935 -4157.873541186843795 1809.9298793830914747\n 10 357.76271 -958.80701 -950.34427 -4157.8735 1809.9299 \n20 368.23139204903532118 -958.78961181640625 -950.07924312365094011 6893.2694823659276153 1809.9298793830914747\n 20 368.23139 -958.78961 -950.07924 6893.2695 1809.9299 \n30 377.54332981132716895 -958.9130859375 -949.98244702089937164 -3363.332712781025748 1809.9298793830914747\n 30 377.54333 -958.91309 -949.98245 -3363.3327 1809.9299 \n40 401.97239722381931415 -959.4512939453125 -949.94279505105237149 3892.0707109330105595 1809.9298793830914747\n 40 401.9724 -959.45129 -949.9428 3892.0707 1809.9299 \n50 390.11841952954830504 -958.847412109375 -949.61931439334750849 -3125.7104419333436454 1809.9298793830914747\n 50 390.11842 -958.84741 -949.61931 -3125.7104 1809.9299 \n60 386.20374322879843021 -958.65234375 -949.51684616157865548 4062.1104519074865493 1809.9298793830914747\n 60 386.20374 -958.65234 -949.51685 4062.1105 1809.9299 \n70 353.71212896512167845 -958.32366943359375 -949.95674819626663066 865.07940051853313435 1809.9298793830914747\n 70 353.71213 -958.32367 -949.95675 865.0794 1809.9299 \n80 359.76800731554232016 -958.33544921875 -949.82527856181980042 1907.7835643037094542 1809.9298793830914747\n 80 359.76801 -958.33545 -949.82528 1907.7836 1809.9299 \n90 352.06663285403175223 -957.8079833984375 -949.47998572417304786 3621.0033904156225617 1809.9298793830914747\n 90 352.06663 -957.80798 -949.47999 3621.0034 1809.9299 \n100 358.18212824550715823 -958.34326171875 -949.87060440723359989 2566.3726441843054999 1809.9298793830914747\n 100 358.18213 -958.34326 -949.8706 2566.3726 1809.9299 \n110 363.88274961787334405 -958.43194580078125 -949.82444253369658327 1235.122888984255269 1809.9298793830914747\n 110 363.88275 -958.43195 -949.82444 1235.1229 1809.9299 \n120 373.82303473288243367 -958.70697021484375 -949.86433341451777324 2094.792903441918952 1809.9298793830914747\n 120 373.82303 -958.70697 -949.86433 2094.7929 1809.9299 \n130 368.08434854495430955 -958.37591552734375 -949.66902509082103734 -378.32898061973384074 1809.9298793830914747\n 130 368.08435 -958.37592 -949.66903 -378.32898 1809.9299 \n140 368.2742166351679316 -958.5618896484375 -949.85050795694724002 3698.6375516646144206 1809.9298793830914747\n 140 368.27422 -958.56189 -949.85051 3698.6376 1809.9299 \n150 363.86467558350227591 -958.3436279296875 -949.73655219677436889 -1021.6090206868265113 1809.9298793830914747\n 150 363.86468 -958.34363 -949.73655 -1021.609 1809.9299 \n160 376.88552270247186016 -958.6251220703125 -949.71004332204768161 3817.8606688513386871 1809.9298793830914747\n 160 376.88552 -958.62512 -949.71004 3817.8607 1809.9299 \n170 370.01808788471782918 -958.2957763671875 -949.54314408744141929 -1560.4191223795719452 1809.9298793830914747\n 170 370.01809 -958.29578 -949.54314 -1560.4191 1809.9299 \n180 375.20728711719476678 -958.2528076171875 -949.37742687136551467 7268.9739796888143246 1809.9298793830914747\n 180 375.20729 -958.25281 -949.37743 7268.974 1809.9299 \n190 368.71576143530830905 -958.04571533203125 -949.32388907202607697 -1773.618242888537452 1809.9298793830914747\n 190 368.71576 -958.04572 -949.32389 -1773.6182 1809.9299 \n200 395.51661966586942754 -958.2454833984375 -948.88969338218817029 7414.2819726236984934 1809.9298793830914747\n 200 395.51662 -958.24548 -948.88969 7414.282 1809.9299 \n210 408.67822495446688436 -958.30596923828125 -948.63884662756106536 -5245.8067787496211167 1809.9298793830914747\n 210 408.67822 -958.30597 -948.63885 -5245.8068 1809.9299 \n220 390.90832138262459239 -958.05902099609375 -948.81223846253044485 9911.0873614329029806 1809.9298793830914747\n 220 390.90832 -958.05902 -948.81224 9911.0874 1809.9299 \n230 364.83976192302611707 -957.48828125 -948.85814023338775769 -2397.7520413672350514 1809.9298793830914747\n 230 364.83976 -957.48828 -948.85814 -2397.752 1809.9299 \n240 386.76913828626283021 -957.663330078125 -948.51445829208239502 8077.2597182856734435 1809.9298793830914747\n 240 386.76914 -957.66333 -948.51446 8077.2597 1809.9299 \n250 370.72888763585552852 -957.7017822265625 -948.93233625837808631 -2306.666476768661596 1809.9298793830914747\n 250 370.72889 -957.70178 -948.93234 -2306.6665 1809.9299 \n260 383.43143381591545449 -958.25830078125 -949.18838108118359287 6073.5376813198799937 1809.9298793830914747\n 260 383.43143 -958.2583 -949.18838 6073.5377 1809.9299 \n270 373.25451203016410773 -958.096923828125 -949.26773520863798694 507.63278864000778867 1809.9298793830914747\n 270 373.25451 -958.09692 -949.26774 507.63279 1809.9299 \n280 368.81288017276079927 -958.204345703125 -949.48022213759827537 2777.3294260395937272 1809.9298793830914747\n 280 368.81288 -958.20435 -949.48022 2777.3294 1809.9299 \n290 376.21715149448073134 -958.04461669921875 -949.14534800889828148 1492.3404590559830467 1809.9298793830914747\n 290 376.21715 -958.04462 -949.14535 1492.3405 1809.9299 \n300 374.30656992692831864 -958.2183837890625 -949.36430915397556873 -645.19317116196270945 1809.9298793830914747\n 300 374.30657 -958.21838 -949.36431 -645.19317 1809.9299 \n310 361.44463838373059161 -958.01593017578125 -949.4660994706287056 3105.10523086793728 1809.9298793830914747\n 310 361.44464 -958.01593 -949.4661 3105.1052 1809.9299 \n320 349.80718860066542675 -957.9735107421875 -949.69895933272425737 -379.21762201207667431 1809.9298793830914747\n 320 349.80719 -957.97351 -949.69896 -379.21762 1809.9299 \n330 355.28287490367972623 -957.98529052734375 -949.58121391287363622 1854.7118657400042139 1809.9298793830914747\n 330 355.28287 -957.98529 -949.58121 1854.7119 1809.9299 \n340 381.02170332282827303 -958.4072265625 -949.3943080891029922 -840.32934561823844888 1809.9298793830914747\n 340 381.0217 -958.40723 -949.39431 -840.32935 1809.9299 \n350 373.81735230784346413 -957.98480224609375 -949.1422998612962374 2730.1105650062213499 1809.9298793830914747\n 350 373.81735 -957.9848 -949.1423 2730.1106 1809.9299 \n360 386.35599061686576761 -958.38494873046875 -949.24584978998666429 911.5232847970861485 1809.9298793830914747\n 360 386.35599 -958.38495 -949.24585 911.52328 1809.9299 \n370 366.83786501129628732 -958.5029296875 -949.82552432851832691 -2075.0632474180529243 1809.9298793830914747\n 370 366.83787 -958.50293 -949.82552 -2075.0632 1809.9299 \n380 380.42348441931261505 -958.4874267578125 -949.4886589171999276 4381.3613346831316449 1809.9298793830914747\n 380 380.42348 -958.48743 -949.48866 4381.3613 1809.9299 \n390 347.34853255605867162 -957.69537353515625 -949.47898066703305631 -2456.4012853338526838 1809.9298793830914747\n 390 347.34853 -957.69537 -949.47898 -2456.4013 1809.9299 \n400 352.97678137482381544 -957.91729736328125 -949.56777048386902607 7865.5382789132772814 1809.9298793830914747\n 400 352.97678 -957.9173 -949.56777 7865.5383 1809.9299 \n410 353.10742978607129317 -957.73779296875 -949.38517565257529895 -4989.6623986945824072 1809.9298793830914747\n 410 353.10743 -957.73779 -949.38518 -4989.6624 1809.9299 \n420 369.13102049929534587 -958.275634765625 -949.54398571585113586 8734.624330532791646 1809.9298793830914747\n 420 369.13102 -958.27563 -949.54399 8734.6243 1809.9299 \n430 341.24824563537009681 -957.77471923828125 -949.70262625701752768 -5312.8507264829158885 1809.9298793830914747\n 430 341.24825 -957.77472 -949.70263 -5312.8507 1809.9299 \n440 338.93691509133924455 -957.77581787109375 -949.75839850442139323 10912.807344898290467 1809.9298793830914747\n 440 338.93692 -957.77582 -949.7584 10912.807 1809.9299 \n450 347.03526600147500858 -957.72906494140625 -949.52008227037231336 -5333.7624288737997631 1809.9298793830914747\n 450 347.03527 -957.72906 -949.52008 -5333.7624 1809.9299 \n460 356.21710711318678477 -957.97454833984375 -949.54837283004530946 8940.5278602900270926 1809.9298793830914747\n 460 356.21711 -957.97455 -949.54837 8940.5279 1809.9299 \n470 370.31699177439799087 -958.2576904296875 -949.49798769603933124 -3376.5060369404395715 1809.9298793830914747\n 470 370.31699 -958.25769 -949.49799 -3376.506 1809.9299 \n480 366.28767501554000319 -958.01123046875 -949.34683963763745851 6831.6896648894307873 1809.9298793830914747\n 480 366.28768 -958.01123 -949.34684 6831.6897 1809.9299 \n490 366.21258018247442578 -957.998779296875 -949.33616480449143182 -1089.5075029549846022 1809.9298793830914747\n 490 366.21258 -957.99878 -949.33616 -1089.5075 1809.9299 \n500 365.2719367208960648 -958.096923828125 -949.45655988671478553 4678.6242040794350032 1809.9298793830914747\n 500 365.27194 -958.09692 -949.45656 4678.6242 1809.9299 \nLoop time of 120.903 on 1 procs for 500 steps with 184 atoms\n\nPerformance: 0.179 ns/day, 134.336 hours/ns, 4.136 timesteps/s, 760.942 atom-step/s\n99.8% CPU use with 1 MPI tasks x 1 OpenMP threads\n\nMPI task timing breakdown:\nSection | min time | avg time | max time |%varavg| %total\n---------------------------------------------------------------\nPair | 119.61 | 119.61 | 119.61 | 0.0 | 98.93\nNeigh | 1.233 | 1.233 | 1.233 | 0.0 | 1.02\nComm | 0.037525 | 0.037525 | 0.037525 | 0.0 | 0.03\nOutput | 0.0089155 | 0.0089155 | 0.0089155 | 0.0 | 0.01\nModify | 0.0078946 | 0.0078946 | 0.0078946 | 0.0 | 0.01\nOther | | 0.003459 | | | 0.00\n\nNlocal: 184 ave 184 max 184 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nNghost: 9765 ave 9765 max 9765 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nNeighs: 0 ave 0 max 0 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nFullNghs: 383610 ave 383610 max 383610 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\n\nTotal # of neighbors = 383610\nAve neighs/atom = 2084.837\nNeighbor list builds = 7\nDangerous builds = 0\nTotal wall time: 0:02:02\n")
Does that hold up quantitatively? The standard structural probe of solvation is the ion-oxygen radial distribution function g(r): the density of water oxygens at a distance r from each ion, normalized to the bulk density. A tall first peak followed by a deep minimum is the fingerprint of a well-defined hydration shell, and that first minimum sets the shell radius.
nacl_traj = ase.io.read("nacl_traj.lammpstrj", ":", format="lammps-dump-text")
g_na = []
r_na = []
g_cl = []
r_cl = []
for frame in nacl_traj:
g_na_, r_na_ = get_rdf(frame, 6.0, 100, elements=["Na", "O"])
g_cl_, r_cl_ = get_rdf(frame, 6.0, 100, elements=["Cl", "O"])
g_na.append(g_na_)
r_na.append(r_na_)
g_cl.append(g_cl_)
r_cl.append(r_cl_)
g_na = np.array(g_na).mean(axis=0)
r_na = np.array(r_na).mean(axis=0)
g_cl = np.array(g_cl).mean(axis=0)
r_cl = np.array(r_cl).mean(axis=0)
fig, ax = plt.subplots(figsize=(7, 4), dpi=200)
ax.plot(r_na, g_na, color="tab:orange", label="Na⁺-O")
ax.plot(r_cl, g_cl, color="tab:green", label="Cl⁻-O")
ax.axvline(3.1, color="tab:orange", ls="--", lw=0.8)
ax.axvline(3.8, color="tab:green", ls="--", lw=0.8)
ax.set(xlabel="r (Å)", ylabel="g(r)", title="Ion-oxygen radial distribution")
ax.legend()
plt.show()

If sampled for longer, g(r) of both ions would show a structured first peak and a clear first minimum (dashed lines, near 3.1 Å for Na⁺ and 3.8 Å for Cl⁻). Counting the water oxygens inside those radii every frame gives a coordination number, which we attach to the trajectory and show on the map beside the structure below. It fluctuates around 5-6 for Na⁺ and about 7 for Cl⁻. The default chemiscope visualization shows the Na⁺ coordination as the y-axis, but you can switch to the Cl⁻ one with the dropdown menu.
def first_shell_count(
traj: list[ase.Atoms], ion: str, cutoff: float, other: str = "O"
) -> np.ndarray:
"""
Mean number of other atoms within cutoff of each ion.
:param traj: trajectory to analyze
:param ion: element symbol of the ion (e.g. "Na" or "Cl")
:param cutoff: shell radius in Å
:param other: element symbol of the other species (default: "O")
:return: array of shape (n_frames,) with the average count per ion at each frame
"""
sym = np.array(traj[0].get_chemical_symbols())
i_ion = np.where(sym == ion)[0]
i_other = np.where(sym == other)[0]
counts = []
for frame in traj:
d = frame.get_all_distances(mic=True)[i_ion, :][:, i_other]
counts.append((d < cutoff).sum(axis=1).mean())
return np.array(counts)
n_na = first_shell_count(nacl_traj, "Na", 3.1)
n_cl = first_shell_count(nacl_traj, "Cl", 3.8)
time_ps = np.arange(len(nacl_traj)) * 0.0005 * 10 # 0.5 fs step, dumped every 10
for frame in nacl_traj:
frame.wrap()
chemiscope.show(
structures=nacl_traj,
properties={
"time [ps]": {"target": "structure", "values": time_ps},
"Na+ first-shell waters": {"target": "structure", "values": n_na},
"Cl- first-shell waters": {"target": "structure", "values": n_cl},
},
mode="default",
settings=chemiscope.quick_settings(
trajectory=True,
x="time [ps]",
y="Na+ first-shell waters",
structure_settings={"playbackDelay": 20, "unitCell": True},
map_settings={"markerOutline": False},
),
)
An organic mixture: ethanol-water¶
Ethanol (C₂H₅OH) adds a third element, carbon. For LAMMPS this is simply a third
atom type, and the pair_coeff line grows by one entry to map C (Z=6). The model
handles the new C-H, C-C, C-O and carbon-water interactions with no extra input. This
kind of mixed organic/aqueous environment is common in chemistry, but can be tedious
to parameterize with traditional force fields.
# Ethanol-water mixture NVT at 400 K with PET-MAD-xs
# Atom types: 1=H, 2=O, 3=C
units metal
atom_style atomic
variable seed index 34567
variable t_target equal 400.0
variable tdamp equal 100*dt
variable nsteps equal 500 # 500 * 0.5 fs = 0.25 ps
variable dump_every equal 10
read_data data/ethanol_water.data
pair_style metatomic pet-mad-xs-v1.5.0.pt device cpu
pair_coeff * * 1 8 6
timestep 0.0005
neighbor 2.0 bin
neigh_modify one 50000 page 500000
thermo_style custom step temp pe etotal press vol
thermo 10
velocity all create ${t_target} ${seed} mom yes rot yes dist gaussian
reset_timestep 0
fix nve_int all nve
fix thermostat all temp/csvr ${t_target} ${t_target} ${tdamp} ${seed}
print "step temp pe etotal press vol" file ethanol_thermo.out
fix thermofile all print ${dump_every} "$(step) $(temp) $(pe) $(etotal) $(press) $(vol)" append ethanol_thermo.out
dump traj all custom ${dump_every} ethanol_traj.lammpstrj id type element xu yu zu
dump_modify traj element H O C sort id
run ${nsteps}
run_command("lmp -in in_ethanol_nvt.lmp", print_output=True)
LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-734-ga1c7f5baba)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread.
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (0.56573683 0.56573683 0.56573683) to (13.499283 13.499283 13.499283)
1 by 1 by 1 MPI processor grid
reading atoms ...
192 atoms
reading velocities ...
192 velocities
read_data CPU = 0.001 seconds
This is an unamed model
=======================
Model authors
-------------
- Arslan Mazitov ([email protected])
- Filippo Bigi
- Matthias Kellner
- Paolo Pegolo
- Davide Tisi
- Guillaume Fraux
- Sergey Pozdnyakov
- Philip Loche
- Michele Ceriotti ([email protected])
Model references
----------------
Please cite the following references when using this model:
- about this specific model:
* https://doi.org/10.1038/s41467-025-65662-7
* https://arxiv.org/abs/2601.16195
- about the architecture of this model:
* LLPR (uncertainty method):
https://iopscience.iop.org/article/10.1088/2632-2153/ad805f
* LPR (if using per-atom uncertainty):
https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704
* https://arxiv.org/abs/2305.19302v3
Found 'energy_uncertainty' output, we will check for atoms with high uncertainty on the energy predictions
Running simulation on cpu device with float32 data
step temp pe etotal press vol
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- LLPR (uncertainty method): https://iopscience.iop.org/article/10.1088/2632-2153/ad805f
- LPR (if using per-atom uncertainty): https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704
- https://arxiv.org/abs/2305.19302v3
- https://doi.org/10.1038/s41467-025-65662-7
- https://arxiv.org/abs/2601.16195
The log file lists these citations in BibTeX format.
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 50000, page size: 500000
master list distance cutoff = 17
ghost atom cutoff = 17
binsize = 8.5, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair metatomic, perpetual
attributes: full, newton on, ghost
pair build: full/bin/ghost
stencil: full/ghost/bin/3d
bin: standard
Setting up Verlet run ...
Unit style : metal
Current step : 0
Time step : 0.0005
0 400 -1028.9742431640625 -1019.0987680860624778 717.55190204634152451 2163.4799322060885061
Per MPI rank memory allocation (min/avg/max) = 48.77 | 48.77 | 48.77 Mbytes
Step Temp PotEng TotEng Press Volume
0 400 -1028.9742 -1019.0988 717.5519 2163.4799
10 349.42213445484418344 -1027.592529296875 -1018.9657553455990637 -3486.3148388166205223 2163.4799322060885061
10 349.42213 -1027.5925 -1018.9658 -3486.3148 2163.4799
20 355.95326170939773647 -1027.8218994140625 -1019.0338805017025834 2142.687479957175583 2163.4799322060885061
20 355.95326 -1027.8219 -1019.0339 2142.6875 2163.4799
30 334.17426807615618145 -1027.2874755859375 -1019.037151445700033 -2718.8351152862355775 2163.4799322060885061
30 334.17427 -1027.2875 -1019.0372 -2718.8351 2163.4799
40 362.92841749775209337 -1027.7923583984375 -1018.8321320431949744 -1186.9515458930659406 2163.4799322060885061
40 362.92842 -1027.7924 -1018.8321 -1186.9515 2163.4799
50 353.89795204380908444 -1027.4453125 -1018.7080364860903501 -4482.7208773100237522 2163.4799322060885061
50 353.89795 -1027.4453 -1018.708 -4482.7209 2163.4799
60 374.43738058077292408 -1027.9898681640625 -1018.7455006135699023 -1737.8646692485569929 2163.4799322060885061
60 374.43738 -1027.9899 -1018.7455 -1737.8647 2163.4799
70 365.46092382714982705 -1027.596435546875 -1018.5736849337803278 -1459.6725163026806058 2163.4799322060885061
70 365.46092 -1027.5964 -1018.5737 -1459.6725 2163.4799
80 358.77841690494483373 -1027.21728515625 -1018.3595168695773054 1656.1671016771047107 2163.4799322060885061
80 358.77842 -1027.2173 -1018.3595 1656.1671 2163.4799
90 381.54082357003767356 -1027.7908935546875 -1018.3711513186736966 -1895.6136715591496795 2163.4799322060885061
90 381.54082 -1027.7909 -1018.3712 -1895.6137 2163.4799
100 382.82953233232888124 -1027.853759765625 -1018.4022010014492707 -1163.6755370641824356 2163.4799322060885061
100 382.82953 -1027.8538 -1018.4022 -1163.6755 2163.4799
110 377.19127750382733666 -1027.6220703125 -1018.3097126609299039 -3631.7029951482249999 2163.4799322060885061
110 377.19128 -1027.6221 -1018.3097 -3631.703 2163.4799
120 363.76303925605952827 -1027.15673828125 -1018.1759062100730944 4850.1438181882022036 2163.4799322060885061
120 363.76304 -1027.1567 -1018.1759 4850.1438 2163.4799
130 349.80153083084297805 -1026.567138671875 -1017.9309979219593743 -2141.1820442872990498 2163.4799322060885061
130 349.80153 -1026.5671 -1017.931 -2141.182 2163.4799
140 356.03460250628006634 -1026.57373046875 -1017.7837033588589293 7723.7167597667403243 2163.4799322060885061
140 356.0346 -1026.5737 -1017.7837 7723.7168 2163.4799
150 368.82209939435449542 -1026.542236328125 -1017.4365027011634766 -4841.5585602210048819 2163.4799322060885061
150 368.8221 -1026.5422 -1017.4365 -4841.5586 2163.4799
160 381.17748897401668273 -1026.6846923828125 -1017.2739204011686525 5882.4789488939395596 2163.4799322060885061
160 381.17749 -1026.6847 -1017.2739 5882.4789 2163.4799
170 373.09423593261027463 -1026.7027587890625 -1017.491551717317634 -4756.7475616044648632 2163.4799322060885061
170 373.09424 -1026.7028 -1017.4916 -4756.7476 2163.4799
180 390.22747017196127217 -1026.848388671875 -1017.2141845307895665 6978.4171429711623205 2163.4799322060885061
180 390.22747 -1026.8484 -1017.2142 6978.4171 2163.4799
190 394.16253363564175061 -1027.2427978515625 -1017.5114421575622146 -1389.1419301245871338 2163.4799322060885061
190 394.16253 -1027.2428 -1017.5114 -1389.1419 2163.4799
200 400.37621657402218034 -1027.137939453125 -1017.2531760816233373 3610.4004194254812319 2163.4799322060885061
200 400.37622 -1027.1379 -1017.2532 3610.4004 2163.4799
210 405.17880687453794053 -1026.8817138671875 -1016.8783808436293157 -815.21376679188585967 2163.4799322060885061
210 405.17881 -1026.8817 -1016.8784 -815.21377 2163.4799
220 420.06113738646951106 -1027.5062255859375 -1017.1354673521964287 -2095.6545490822873035 2163.4799322060885061
220 420.06114 -1027.5062 -1017.1355 -2095.6545 2163.4799
230 392.82516958748107072 -1027.119384765625 -1017.4210468349442635 904.64349544830326977 2163.4799322060885061
230 392.82517 -1027.1194 -1017.421 904.6435 2163.4799
240 381.13676693650819516 -1027.0189208984375 -1017.6091542904600828 -1332.8640889845860329 2163.4799322060885061
240 381.13677 -1027.0189 -1017.6092 -1332.8641 2163.4799
250 392.56850692044235984 -1027.026611328125 -1017.3346100618737182 5604.049767909309594 2163.4799322060885061
250 392.56851 -1027.0266 -1017.3346 5604.0498 2163.4799
260 394.15188813409565682 -1027.0113525390625 -1017.2802596685252183 -1792.5331386162042691 2163.4799322060885061
260 394.15189 -1027.0114 -1017.2803 -1792.5331 2163.4799
270 380.18470229478452893 -1026.7059326171875 -1017.319671235815008 2910.505582353673617 2163.4799322060885061
270 380.1847 -1026.7059 -1017.3197 2910.5056 2163.4799
280 374.36817811958258062 -1026.6458740234375 -1017.4032149908970268 -3824.7342851174130374 2163.4799322060885061
280 374.36818 -1026.6459 -1017.4032 -3824.7343 2163.4799
290 391.94823880678990236 -1027.187255859375 -1017.5105681988688957 -2012.2412955700799557 2163.4799322060885061
290 391.94824 -1027.1873 -1017.5106 -2012.2413 2163.4799
300 376.63479416077336737 -1026.712646484375 -1017.4140276762690291 -2754.1567809877897162 2163.4799322060885061
300 376.63479 -1026.7126 -1017.414 -2754.1568 2163.4799
310 360.6535005111276746 -1026.343994140625 -1017.4399325003972763 794.28471678951177637 2163.4799322060885061
310 360.6535 -1026.344 -1017.4399 794.28472 2163.4799
320 385.5030983651691372 -1026.5064697265625 -1016.9889041255700022 3231.5989945970327426 2163.4799322060885061
320 385.5031 -1026.5065 -1016.9889 3231.599 2163.4799
330 377.58250445295851705 -1026.158935546875 -1016.8369190153399586 1454.8563971467474403 2163.4799322060885061
330 377.5825 -1026.1589 -1016.8369 1454.8564 2163.4799
340 396.18272267891381944 -1026.6485595703125 -1016.8673280599380178 1650.7089177439061132 2163.4799322060885061
340 396.18272 -1026.6486 -1016.8673 1650.7089 2163.4799
350 387.84255114783405816 -1026.211181640625 -1016.635858020504088 -5903.2512812860677514 2163.4799322060885061
350 387.84255 -1026.2112 -1016.6359 -5903.2513 2163.4799
360 410.46359251803255574 -1026.4061279296875 -1016.2723204838420088 1431.1422043081106494 2163.4799322060885061
360 410.46359 -1026.4061 -1016.2723 1431.1422 2163.4799
370 385.92796670183378183 -1025.6885986328125 -1016.1605435901445844 -2692.1644819427992843 2163.4799322060885061
370 385.92797 -1025.6886 -1016.1605 -2692.1645 2163.4799
380 416.70659213850734659 -1026.1011962890625 -1015.8132573753071028 4342.6805074934263757 2163.4799322060885061
380 416.70659 -1026.1012 -1015.8133 4342.6805 2163.4799
390 409.72348405271662841 -1025.88134765625 -1015.7658125171651591 -3451.2733744410825238 2163.4799322060885061
390 409.72348 -1025.8813 -1015.7658 -3451.2734 2163.4799
400 394.80930063598879087 -1025.7027587890625 -1015.9554352665792294 2653.0792940437108882 2163.4799322060885061
400 394.8093 -1025.7028 -1015.9554 2653.0793 2163.4799
410 422.82278567593692742 -1026.1741943359375 -1015.7352546300543281 -225.89447594785369233 2163.4799322060885061
410 422.82279 -1026.1742 -1015.7353 -225.89448 2163.4799
420 413.89891053069089821 -1026.1680908203125 -1015.949469880919537 2078.903089415494378 2163.4799322060885061
420 413.89891 -1026.1681 -1015.9495 2078.9031 2163.4799
430 395.27490764582336169 -1025.7569580078125 -1015.998139259274808 1347.4321410504228425 2163.4799322060885061
430 395.27491 -1025.757 -1015.9981 1347.4321 2163.4799
440 380.74670725404155291 -1025.70556640625 -1016.3054298599553249 -2874.4325279575396053 2163.4799322060885061
440 380.74671 -1025.7056 -1016.3054 -2874.4325 2163.4799
450 400.66895436790105123 -1026.021240234375 -1016.1292495509036371 581.46951370915360258 2163.4799322060885061
450 400.66895 -1026.0212 -1016.1292 581.46951 2163.4799
460 398.14896401665032499 -1025.8626708984375 -1016.0328954697425843 -1074.760530735015891 2163.4799322060885061
460 398.14896 -1025.8627 -1016.0329 -1074.7605 2163.4799
470 380.37343928816210337 -1025.58349609375 -1016.1925750436914768 3331.7108166372490814 2163.4799322060885061
470 380.37344 -1025.5835 -1016.1926 3331.7108 2163.4799
480 422.64436689183702356 -1026.5401611328125 -1016.1056263525689474 650.8316999328003476 2163.4799322060885061
480 422.64437 -1026.5402 -1016.1056 650.8317 2163.4799
490 411.6930719698732446 -1026.0535888671875 -1015.8894271871281489 -1348.0538159198374615 2163.4799322060885061
490 411.69307 -1026.0536 -1015.8894 -1348.0538 2163.4799
500 409.15464883757709913 -1025.697998046875 -1015.5965067027666464 4266.5451725709908715 2163.4799322060885061
500 409.15465 -1025.698 -1015.5965 4266.5452 2163.4799
Loop time of 117.766 on 1 procs for 500 steps with 192 atoms
Performance: 0.183 ns/day, 130.851 hours/ns, 4.246 timesteps/s, 815.179 atom-step/s
97.7% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 116.49 | 116.49 | 116.49 | 0.0 | 98.92
Neigh | 1.2219 | 1.2219 | 1.2219 | 0.0 | 1.04
Comm | 0.034625 | 0.034625 | 0.034625 | 0.0 | 0.03
Output | 0.0095062 | 0.0095062 | 0.0095062 | 0.0 | 0.01
Modify | 0.0077677 | 0.0077677 | 0.0077677 | 0.0 | 0.01
Other | | 0.003648 | | | 0.00
Nlocal: 192 ave 192 max 192 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9037 ave 9037 max 9037 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 349944 ave 349944 max 349944 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 349944
Ave neighs/atom = 1822.625
Neighbor list builds = 8
Dangerous builds = 0
Total wall time: 0:01:59
CompletedProcess(args=['lmp', '-in', 'in_ethanol_nvt.lmp'], returncode=0, stdout="LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-734-ga1c7f5baba)\nOMP_NUM_THREADS environment is not set. Defaulting to 1 thread.\n using 1 OpenMP thread(s) per MPI task\nReading data file ...\n orthogonal box = (0.56573683 0.56573683 0.56573683) to (13.499283 13.499283 13.499283)\n 1 by 1 by 1 MPI processor grid\n reading atoms ...\n 192 atoms\n reading velocities ...\n 192 velocities\n read_data CPU = 0.001 seconds\n\nThis is an unamed model\n=======================\n\nModel authors\n-------------\n\n- Arslan Mazitov ([email protected])\n- Filippo Bigi\n- Matthias Kellner\n- Paolo Pegolo\n- Davide Tisi\n- Guillaume Fraux\n- Sergey Pozdnyakov\n- Philip Loche\n- Michele Ceriotti ([email protected])\n\nModel references\n----------------\n\nPlease cite the following references when using this model:\n- about this specific model:\n * https://doi.org/10.1038/s41467-025-65662-7\n * https://arxiv.org/abs/2601.16195\n- about the architecture of this model:\n * LLPR (uncertainty method):\n https://iopscience.iop.org/article/10.1088/2632-2153/ad805f\n * LPR (if using per-atom uncertainty):\n https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704\n * https://arxiv.org/abs/2305.19302v3\n\nFound 'energy_uncertainty' output, we will check for atoms with high uncertainty on the energy predictions\nRunning simulation on cpu device with float32 data\nstep temp pe etotal press vol\n\nCITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE\n\nYour simulation uses code contributions which should be cited:\n- LLPR (uncertainty method): https://iopscience.iop.org/article/10.1088/2632-2153/ad805f\n- LPR (if using per-atom uncertainty): https://pubs.acs.org/doi/10.1021/acs.jctc.3c00704\n- https://arxiv.org/abs/2305.19302v3\n- https://doi.org/10.1038/s41467-025-65662-7\n- https://arxiv.org/abs/2601.16195\nThe log file lists these citations in BibTeX format.\n\nCITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE\n\nNeighbor list info ...\n update: every = 1 steps, delay = 0 steps, check = yes\n max neighbors/atom: 50000, page size: 500000\n master list distance cutoff = 17\n ghost atom cutoff = 17\n binsize = 8.5, bins = 2 2 2\n 1 neighbor lists, perpetual/occasional/extra = 1 0 0\n (1) pair metatomic, perpetual\n attributes: full, newton on, ghost\n pair build: full/bin/ghost\n stencil: full/ghost/bin/3d\n bin: standard\nSetting up Verlet run ...\n Unit style : metal\n Current step : 0\n Time step : 0.0005\n0 400 -1028.9742431640625 -1019.0987680860624778 717.55190204634152451 2163.4799322060885061\nPer MPI rank memory allocation (min/avg/max) = 48.77 | 48.77 | 48.77 Mbytes\n Step Temp PotEng TotEng Press Volume \n 0 400 -1028.9742 -1019.0988 717.5519 2163.4799 \n10 349.42213445484418344 -1027.592529296875 -1018.9657553455990637 -3486.3148388166205223 2163.4799322060885061\n 10 349.42213 -1027.5925 -1018.9658 -3486.3148 2163.4799 \n20 355.95326170939773647 -1027.8218994140625 -1019.0338805017025834 2142.687479957175583 2163.4799322060885061\n 20 355.95326 -1027.8219 -1019.0339 2142.6875 2163.4799 \n30 334.17426807615618145 -1027.2874755859375 -1019.037151445700033 -2718.8351152862355775 2163.4799322060885061\n 30 334.17427 -1027.2875 -1019.0372 -2718.8351 2163.4799 \n40 362.92841749775209337 -1027.7923583984375 -1018.8321320431949744 -1186.9515458930659406 2163.4799322060885061\n 40 362.92842 -1027.7924 -1018.8321 -1186.9515 2163.4799 \n50 353.89795204380908444 -1027.4453125 -1018.7080364860903501 -4482.7208773100237522 2163.4799322060885061\n 50 353.89795 -1027.4453 -1018.708 -4482.7209 2163.4799 \n60 374.43738058077292408 -1027.9898681640625 -1018.7455006135699023 -1737.8646692485569929 2163.4799322060885061\n 60 374.43738 -1027.9899 -1018.7455 -1737.8647 2163.4799 \n70 365.46092382714982705 -1027.596435546875 -1018.5736849337803278 -1459.6725163026806058 2163.4799322060885061\n 70 365.46092 -1027.5964 -1018.5737 -1459.6725 2163.4799 \n80 358.77841690494483373 -1027.21728515625 -1018.3595168695773054 1656.1671016771047107 2163.4799322060885061\n 80 358.77842 -1027.2173 -1018.3595 1656.1671 2163.4799 \n90 381.54082357003767356 -1027.7908935546875 -1018.3711513186736966 -1895.6136715591496795 2163.4799322060885061\n 90 381.54082 -1027.7909 -1018.3712 -1895.6137 2163.4799 \n100 382.82953233232888124 -1027.853759765625 -1018.4022010014492707 -1163.6755370641824356 2163.4799322060885061\n 100 382.82953 -1027.8538 -1018.4022 -1163.6755 2163.4799 \n110 377.19127750382733666 -1027.6220703125 -1018.3097126609299039 -3631.7029951482249999 2163.4799322060885061\n 110 377.19128 -1027.6221 -1018.3097 -3631.703 2163.4799 \n120 363.76303925605952827 -1027.15673828125 -1018.1759062100730944 4850.1438181882022036 2163.4799322060885061\n 120 363.76304 -1027.1567 -1018.1759 4850.1438 2163.4799 \n130 349.80153083084297805 -1026.567138671875 -1017.9309979219593743 -2141.1820442872990498 2163.4799322060885061\n 130 349.80153 -1026.5671 -1017.931 -2141.182 2163.4799 \n140 356.03460250628006634 -1026.57373046875 -1017.7837033588589293 7723.7167597667403243 2163.4799322060885061\n 140 356.0346 -1026.5737 -1017.7837 7723.7168 2163.4799 \n150 368.82209939435449542 -1026.542236328125 -1017.4365027011634766 -4841.5585602210048819 2163.4799322060885061\n 150 368.8221 -1026.5422 -1017.4365 -4841.5586 2163.4799 \n160 381.17748897401668273 -1026.6846923828125 -1017.2739204011686525 5882.4789488939395596 2163.4799322060885061\n 160 381.17749 -1026.6847 -1017.2739 5882.4789 2163.4799 \n170 373.09423593261027463 -1026.7027587890625 -1017.491551717317634 -4756.7475616044648632 2163.4799322060885061\n 170 373.09424 -1026.7028 -1017.4916 -4756.7476 2163.4799 \n180 390.22747017196127217 -1026.848388671875 -1017.2141845307895665 6978.4171429711623205 2163.4799322060885061\n 180 390.22747 -1026.8484 -1017.2142 6978.4171 2163.4799 \n190 394.16253363564175061 -1027.2427978515625 -1017.5114421575622146 -1389.1419301245871338 2163.4799322060885061\n 190 394.16253 -1027.2428 -1017.5114 -1389.1419 2163.4799 \n200 400.37621657402218034 -1027.137939453125 -1017.2531760816233373 3610.4004194254812319 2163.4799322060885061\n 200 400.37622 -1027.1379 -1017.2532 3610.4004 2163.4799 \n210 405.17880687453794053 -1026.8817138671875 -1016.8783808436293157 -815.21376679188585967 2163.4799322060885061\n 210 405.17881 -1026.8817 -1016.8784 -815.21377 2163.4799 \n220 420.06113738646951106 -1027.5062255859375 -1017.1354673521964287 -2095.6545490822873035 2163.4799322060885061\n 220 420.06114 -1027.5062 -1017.1355 -2095.6545 2163.4799 \n230 392.82516958748107072 -1027.119384765625 -1017.4210468349442635 904.64349544830326977 2163.4799322060885061\n 230 392.82517 -1027.1194 -1017.421 904.6435 2163.4799 \n240 381.13676693650819516 -1027.0189208984375 -1017.6091542904600828 -1332.8640889845860329 2163.4799322060885061\n 240 381.13677 -1027.0189 -1017.6092 -1332.8641 2163.4799 \n250 392.56850692044235984 -1027.026611328125 -1017.3346100618737182 5604.049767909309594 2163.4799322060885061\n 250 392.56851 -1027.0266 -1017.3346 5604.0498 2163.4799 \n260 394.15188813409565682 -1027.0113525390625 -1017.2802596685252183 -1792.5331386162042691 2163.4799322060885061\n 260 394.15189 -1027.0114 -1017.2803 -1792.5331 2163.4799 \n270 380.18470229478452893 -1026.7059326171875 -1017.319671235815008 2910.505582353673617 2163.4799322060885061\n 270 380.1847 -1026.7059 -1017.3197 2910.5056 2163.4799 \n280 374.36817811958258062 -1026.6458740234375 -1017.4032149908970268 -3824.7342851174130374 2163.4799322060885061\n 280 374.36818 -1026.6459 -1017.4032 -3824.7343 2163.4799 \n290 391.94823880678990236 -1027.187255859375 -1017.5105681988688957 -2012.2412955700799557 2163.4799322060885061\n 290 391.94824 -1027.1873 -1017.5106 -2012.2413 2163.4799 \n300 376.63479416077336737 -1026.712646484375 -1017.4140276762690291 -2754.1567809877897162 2163.4799322060885061\n 300 376.63479 -1026.7126 -1017.414 -2754.1568 2163.4799 \n310 360.6535005111276746 -1026.343994140625 -1017.4399325003972763 794.28471678951177637 2163.4799322060885061\n 310 360.6535 -1026.344 -1017.4399 794.28472 2163.4799 \n320 385.5030983651691372 -1026.5064697265625 -1016.9889041255700022 3231.5989945970327426 2163.4799322060885061\n 320 385.5031 -1026.5065 -1016.9889 3231.599 2163.4799 \n330 377.58250445295851705 -1026.158935546875 -1016.8369190153399586 1454.8563971467474403 2163.4799322060885061\n 330 377.5825 -1026.1589 -1016.8369 1454.8564 2163.4799 \n340 396.18272267891381944 -1026.6485595703125 -1016.8673280599380178 1650.7089177439061132 2163.4799322060885061\n 340 396.18272 -1026.6486 -1016.8673 1650.7089 2163.4799 \n350 387.84255114783405816 -1026.211181640625 -1016.635858020504088 -5903.2512812860677514 2163.4799322060885061\n 350 387.84255 -1026.2112 -1016.6359 -5903.2513 2163.4799 \n360 410.46359251803255574 -1026.4061279296875 -1016.2723204838420088 1431.1422043081106494 2163.4799322060885061\n 360 410.46359 -1026.4061 -1016.2723 1431.1422 2163.4799 \n370 385.92796670183378183 -1025.6885986328125 -1016.1605435901445844 -2692.1644819427992843 2163.4799322060885061\n 370 385.92797 -1025.6886 -1016.1605 -2692.1645 2163.4799 \n380 416.70659213850734659 -1026.1011962890625 -1015.8132573753071028 4342.6805074934263757 2163.4799322060885061\n 380 416.70659 -1026.1012 -1015.8133 4342.6805 2163.4799 \n390 409.72348405271662841 -1025.88134765625 -1015.7658125171651591 -3451.2733744410825238 2163.4799322060885061\n 390 409.72348 -1025.8813 -1015.7658 -3451.2734 2163.4799 \n400 394.80930063598879087 -1025.7027587890625 -1015.9554352665792294 2653.0792940437108882 2163.4799322060885061\n 400 394.8093 -1025.7028 -1015.9554 2653.0793 2163.4799 \n410 422.82278567593692742 -1026.1741943359375 -1015.7352546300543281 -225.89447594785369233 2163.4799322060885061\n 410 422.82279 -1026.1742 -1015.7353 -225.89448 2163.4799 \n420 413.89891053069089821 -1026.1680908203125 -1015.949469880919537 2078.903089415494378 2163.4799322060885061\n 420 413.89891 -1026.1681 -1015.9495 2078.9031 2163.4799 \n430 395.27490764582336169 -1025.7569580078125 -1015.998139259274808 1347.4321410504228425 2163.4799322060885061\n 430 395.27491 -1025.757 -1015.9981 1347.4321 2163.4799 \n440 380.74670725404155291 -1025.70556640625 -1016.3054298599553249 -2874.4325279575396053 2163.4799322060885061\n 440 380.74671 -1025.7056 -1016.3054 -2874.4325 2163.4799 \n450 400.66895436790105123 -1026.021240234375 -1016.1292495509036371 581.46951370915360258 2163.4799322060885061\n 450 400.66895 -1026.0212 -1016.1292 581.46951 2163.4799 \n460 398.14896401665032499 -1025.8626708984375 -1016.0328954697425843 -1074.760530735015891 2163.4799322060885061\n 460 398.14896 -1025.8627 -1016.0329 -1074.7605 2163.4799 \n470 380.37343928816210337 -1025.58349609375 -1016.1925750436914768 3331.7108166372490814 2163.4799322060885061\n 470 380.37344 -1025.5835 -1016.1926 3331.7108 2163.4799 \n480 422.64436689183702356 -1026.5401611328125 -1016.1056263525689474 650.8316999328003476 2163.4799322060885061\n 480 422.64437 -1026.5402 -1016.1056 650.8317 2163.4799 \n490 411.6930719698732446 -1026.0535888671875 -1015.8894271871281489 -1348.0538159198374615 2163.4799322060885061\n 490 411.69307 -1026.0536 -1015.8894 -1348.0538 2163.4799 \n500 409.15464883757709913 -1025.697998046875 -1015.5965067027666464 4266.5451725709908715 2163.4799322060885061\n 500 409.15465 -1025.698 -1015.5965 4266.5452 2163.4799 \nLoop time of 117.766 on 1 procs for 500 steps with 192 atoms\n\nPerformance: 0.183 ns/day, 130.851 hours/ns, 4.246 timesteps/s, 815.179 atom-step/s\n97.7% CPU use with 1 MPI tasks x 1 OpenMP threads\n\nMPI task timing breakdown:\nSection | min time | avg time | max time |%varavg| %total\n---------------------------------------------------------------\nPair | 116.49 | 116.49 | 116.49 | 0.0 | 98.92\nNeigh | 1.2219 | 1.2219 | 1.2219 | 0.0 | 1.04\nComm | 0.034625 | 0.034625 | 0.034625 | 0.0 | 0.03\nOutput | 0.0095062 | 0.0095062 | 0.0095062 | 0.0 | 0.01\nModify | 0.0077677 | 0.0077677 | 0.0077677 | 0.0 | 0.01\nOther | | 0.003648 | | | 0.00\n\nNlocal: 192 ave 192 max 192 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nNghost: 9037 ave 9037 max 9037 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nNeighs: 0 ave 0 max 0 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\nFullNghs: 349944 ave 349944 max 349944 min\nHistogram: 1 0 0 0 0 0 0 0 0 0\n\nTotal # of neighbors = 349944\nAve neighs/atom = 1822.625\nNeighbor list builds = 8\nDangerous builds = 0\nTotal wall time: 0:01:59\n")
We claimed that the two species mix and hydrogen-bond to each other; we can count those bonds explicitly. Using the standard geometric definition (an O-H…O motif with the two oxygens within 3.5 Å and an O-H…O angle above 150°) we classify each hydrogen bond as water-water or water-ethanol. (A hydroxyl H is identified as the H whose nearest heavy neighbor is an oxygen; an ethanol O is one bonded to a carbon.)
def count_hbonds(
traj: list[ase.Atoms], r_oo: float = 3.5, angle: float = 150.0
) -> tuple[np.ndarray, np.ndarray]:
"""
Per-frame counts of (water-water, water-ethanol) hydrogen bonds.
A hydrogen bond is counted with the usual geometric criterion: a covalent donor O-H
pointing at an acceptor oxygen, with the two oxygens closer than ``r_oo`` and the
O-H...O angle wider than ``angle``. Each bond is then labelled water-water or
water-ethanol from the identity of its two oxygens.
:param traj: trajectory to analyze
:param r_oo: O-O distance cutoff in Å
:param angle: O-H...O angle cutoff in degrees
:return: tuple of two arrays of shape (n_frames,) with the counts of water-water and
water-ethanol H-bonds at each frame
"""
sym = np.array(traj[0].get_chemical_symbols())
L = traj[0].get_cell()[0, 0] # cubic box edge (minimum-image convention)
iO = np.where(sym == "O")[0]
iH = np.where(sym == "H")[0]
iC = np.where(sym == "C")[0]
heavy = np.concatenate([iO, iC]) # all heavy atoms, oxygens first then carbons
def mic(a, b):
# Minimum-image displacement vectors a[i] -> b[j] for a cubic box. We roll this
# by hand because it is far cheaper than ASE's general-cell minimum image for
# these small systems (we only need a few atom-pair blocks per frame).
d = a[:, None, :] - b[None, :, :]
return d - np.round(d / L) * L
# An ethanol oxygen is the one with a carbon neighbour; the bonding topology never
# changes, so we flag the ethanol oxygens once, from the first frame (one bool per
# atom in ``iO``).
p0 = traj[0].get_positions()
eth_O = (np.linalg.norm(mic(p0[iO], p0[iC]), axis=-1) < 1.7).any(axis=1)
cos_thr = np.cos(np.radians(angle)) # angle > thr <=> cos(angle) < cos(thr)
ww, we = [], []
for frame in traj:
p = frame.get_positions()
# Assign each H to its nearest heavy atom; keep it as a donor only if that
# neighbour is an oxygen within a covalent O-H bond length (1.3 Å).
dist_H = np.linalg.norm(mic(p[iH], p[heavy]), axis=-1)
nn = np.argmin(dist_H, axis=1)
is_oh = (nn < len(iO)) & (dist_H[np.arange(len(iH)), nn] < 1.3)
Hd, Od = iH[is_oh], iO[nn[is_oh]] # donor hydrogens and their donor oxygens
# For every (donor H, candidate acceptor O) pair, build the two bond vectors
# that meet at the hydrogen, plus the donor-acceptor oxygen distance.
vHD = p[Od] - p[Hd]
vHD -= np.round(vHD / L) * L # H -> donor O
vHA = -mic(p[Hd], p[iO]) # H -> every candidate acceptor O
rDA = np.linalg.norm(mic(p[Od], p[iO]), axis=-1) # donor O .. acceptor O
nHD = np.linalg.norm(vHD, axis=-1)
nHA = np.linalg.norm(vHA, axis=-1)
# cos of the O-H...O angle at the hydrogen, for every donor/acceptor pair.
cos = (vHD[:, None, :] * vHA).sum(-1) / (nHD[:, None] * nHA + 1e-9)
# Keep pairs that are both close and near-linear. A donor's own oxygen pairs
# with itself at cos = 1, so it never passes the angle test.
hbond = (rDA < r_oo) & (cos < cos_thr)
# Split the surviving bonds by whether their donor / acceptor oxygen is ethanol.
donor_eth = eth_O[nn[is_oh]][:, None]
accpt_eth = eth_O[None, :]
ww.append(int((hbond & ~donor_eth & ~accpt_eth).sum())) # water-water
we.append(int((hbond & (donor_eth ^ accpt_eth)).sum())) # water-ethanol
return np.array(ww), np.array(we)
ethanol_traj = ase.io.read("ethanol_traj.lammpstrj", ":", format="lammps-dump-text")
hb_ww, hb_we = count_hbonds(ethanol_traj)
time_ps = np.arange(len(ethanol_traj)) * 0.0005 * 10
At every instant there are roughly a dozen water-ethanol hydrogen bonds and about forty water-water ones. That persistent water-ethanol count is the molecular signature of a miscible mixture: ethanol is not trapped in a pocket but stitched into the water hydrogen-bond network. Both counts are attached to the trajectory below: you can switch the map axis between the two curves.
for frame in ethanol_traj:
frame.wrap()
chemiscope.show(
structures=ethanol_traj,
properties={
"time [ps]": {"target": "structure", "values": time_ps},
"water-ethanol H-bonds": {"target": "structure", "values": hb_we},
"water-water H-bonds": {"target": "structure", "values": hb_ww},
},
mode="default",
settings=chemiscope.quick_settings(
trajectory=True,
x="time [ps]",
y="water-ethanol H-bonds",
structure_settings={"playbackDelay": 20, "unitCell": True},
map_settings={"markerOutline": False},
),
)
Extreme conditions: superionic water¶
The last system pushes far outside everyday chemistry. Deep inside the ice-giant planets (Uranus and Neptune) water is thought to exist in a superionic phase: the oxygen atoms stay locked on a crystalline lattice while the protons melt and diffuse through it like a liquid, turning the material into an ionic conductor. Reaching it requires roughly 3000 K and ~140 GPa. At these conditions common empirical water models are undefined, whereas an MLIP is reactive by construction.
We start from an ice-X-like configuration (a 4×4×4 supercell of a body-centered-cubic
oxygen lattice, 128 water molecules) and hold it at 3000 K and fixed volume. Two
settings change relative to the runs above: the temperature is much higher, and the
timestep is shortened to 0.2 fs (timestep 0.0002) because atoms move much faster
at 3000 K and the integration must stay stable.
# Superionic water NVT at 3000 K with PET-MAD-xs
# Pre-equilibrated at ~140 GPa; NVT keeps the volume fixed.
# Atom types: 1=H, 2=O
units metal
atom_style atomic
variable seed index 45678
variable t_target equal 3000.0
variable tdamp equal 100*dt
variable nsteps equal 50000 # 50000 * 0.2 fs = 10 ps
variable dump_every equal 25
read_data data/superionic_ice.data
pair_style metatomic pet-mad-xs-v1.5.1.pt device cpu
pair_coeff * * 1 8
timestep 0.0002 # 0.2 fs (shorter for high-T/P stability)
neighbor 2.0 bin
neigh_modify one 50000 page 500000
thermo_style custom step temp pe etotal press vol
thermo 10
velocity all create ${t_target} ${seed} mom yes rot yes dist gaussian
reset_timestep 0
fix nve_int all nve
fix thermostat all temp/csvr ${t_target} ${t_target} ${tdamp} ${seed}
print "step temp pe etotal press vol" file superionic_thermo.out
fix thermofile all print ${dump_every} "$(step) $(temp) $(pe) $(etotal) $(press) $(vol)" append superionic_thermo.out
dump traj all custom ${dump_every} superionic_traj.lammpstrj id type element xu yu zu
dump_modify traj element H O sort id
run ${nsteps}
lmp -in in_superionic_nvt.lmp
The clearest signature of the superionic phase is the mean-squared displacement (MSD) of each species. If the phase is truly superionic, the hydrogen MSD should grow linearly in time (Fickian diffusion, exactly as in a liquid) while the oxygen MSD stays small and flat, meaning that atoms can only rattle around fixed lattice sites.
Because the trajectory was dumped with unwrapped coordinates, the MSD is a plain average of squared displacements, with no periodic-boundary correction needed:
def compute_msd(traj: list, species: str) -> np.ndarray:
symbols = np.array(traj[0].get_chemical_symbols())
mask = symbols == species
pos = np.array([f.get_positions()[mask] for f in traj])
return np.mean(np.sum((pos - pos[0][np.newaxis]) ** 2, axis=-1), axis=-1)
sup_traj = ase.io.read("superionic_traj.lammpstrj", ":", format="lammps-dump-text")
dt_ps = 0.0002 # timestep in ps (0.2 fs)
dump_every = 25
time_ps = np.arange(len(sup_traj)) * dt_ps * dump_every
msd_H = compute_msd(sup_traj, "H")
msd_O = compute_msd(sup_traj, "O")
fig, ax = plt.subplots(figsize=(7, 4), dpi=200)
ax.plot(time_ps, msd_H, label="H")
ax.plot(time_ps, msd_O, label="O")
ax.set(
xlabel="Time (ps)",
ylabel="MSD (Ų)",
title="Superionic water (3000 K, ~140 GPa)",
)
ax.legend()
plt.show()

The two curves behave just as expected: hydrogen diffuses freely while oxygen
oscillated around lattice sites. To watch the transition itself, we ramp the
temperature from 300 K to 3000 K over a single trajectory. The input is the one above
with a single change: the thermostat target sweeps from 300 K to 3000 K instead of
being held fixed (fix temp/csvr 300 3000 ...). Run it with:
lmp -in in_superionic_ramp.lmp
While visualizing the trajectory, notice how the oxygen lattice stays ordered while the hydrogen atoms progressively diffuse and begin to flow between sites.
sup_ramp_traj = ase.io.read(
"superionic_ramp_traj.lammpstrj", ":", format="lammps-dump-text"
)
sup_ramp_thermo = np.loadtxt("superionic_ramp_thermo.out", skiprows=1)
ramp_time_ps = sup_ramp_thermo[:, 0] * 0.0002
ramp_temp_K = sup_ramp_thermo[:, 1]
chemiscope.show(
structures=sup_ramp_traj,
properties={
"time [ps]": {"target": "structure", "values": ramp_time_ps},
"temperature [K]": {"target": "structure", "values": ramp_temp_K},
},
mode="default",
settings=chemiscope.quick_settings(
trajectory=True,
x="time [ps]",
y="temperature [K]",
structure_settings={"playbackDelay": 5, "unitCell": True},
map_settings={"markerOutline": False},
),
)
Where to go next¶
Throughout this recipe we used a foundational model out of the box, changing only the system and never the potential. That is often enough for a qualitative picture, a starting structure, or a screening study. For quantitative accuracy at a specific thermodynamic state, though, one often needs fine-tuning: a small, targeted set of DFT calculations specializes the universal model to the system or conditions of interest, at a fraction of the cost of training from scratch.
To go further:
PET-MAD tutorial—how to set up and run PET-MAD yourself with ASE, i-PI and LAMMPS, for a diverse array of applications.
Fine-tuning PET-MAD—how to specialize a foundational model to a target system for production-quality accuracy.
Mendeleev’s nano-soup—the same model pushed to the limit: sampling a 102-element nanoparticle with replica-exchange MD and Monte Carlo atom swaps.
Total running time of the script: (6 minutes 32.044 seconds)