This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
Unified torch-based short-range MD interface #45
agoscinski
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MLP packages
allegro (e3nn based)
Python
https://github.com/mir-group/allegro/blob/71ea80992f70a84fc65ecfb5a5ca45e8a82c6031/allegro/nn/_allegro.py#L418
LAMMPS interface
https://github.com/mir-group/pair_allegro/blob/a7899a9c4c6be0620e11bef0bca8d06d9f7f32a8/pair_allegro.cpp#L426-L432
For backwards compatability (torch <=1.10), they reimplement some buggy torch::jit::freeze code from torch, that freezes the model if it is not already so.
They need to do so, because their network is based on e3nn objects that pytorch model can only handle frozen.
TorchANI
https://github.com/aiqm/torchani/blob/40cf334dbdf71903f30be8560784ca793b830221/torchani/models.py#L83-L85
LAMMPS
TODO haven't found anything, but haven't searched much. There are ANI interfaces with OpenKIM so it is definetly available with LAMMPS
OpenMM-ML
https://github.com/openmm/openmm-ml/blob/main/openmmml/models/anipotential.py
OpenMM-Torch
https://github.com/openmm/openmm-torch/blob/master/tutorials/openmm-torch-nnpops.ipynb
nequip (message-passing, e3nn based)
Message-passing
TODO don't know exactly, the use some edge_cell_shifts
https://github.com/mir-group/nequip/blob/c56f48fcc9b4018a84e1ed28f762fadd5bc763f1/nequip/data/AtomicDataDict.py#L47-L55
Python
the same as in allegro
https://github.com/mir-group/pair_nequip/blob/b3680ef1288747fd8694693c1a747be4dd6a76b9/pair_nequip.cpp#L445-L451
OpenMM interface
open issue mir-group/nequip#288
Schnet (message-passing)
Message-passing
I don't know how they handle it
https://github.com/atomistic-machine-learning/schnetpack/blob/3f6eecee4b35ea5bb6e5f883ae70b789f2bd3e75/src/schnetpack/model/base.py#L172
https://github.com/atomistic-machine-learning/schnetpack/blob/3f6eecee4b35ea5bb6e5f883ae70b789f2bd3e75/src/schnetpack/representation/schnet.py#L138-L142
LAMMPS interface (the pair potential is a based on the one from nequip)
https://github.com/atomistic-machine-learning/schnetpack/blob/3f6eecee4b35ea5bb6e5f883ae70b789f2bd3e75/interfaces/lammps/pair_schnetpack.cpp#L323-L332
https://schnetpack.readthedocs.io/en/latest/howtos/lammps.html
MACE (message-passing)
Message-passing
https://github.com/ACEsuit/lammps/blob/4ee087496324a8ce320459dc0bdf58b8e5e74ab0/src/ML-MACE/pair_mace.cpp#L362-L363
Python
https://github.com/ACEsuit/mace/blob/44b6da4a5edaa4c3ef867a11728555403d1d475d/mace/modules/models.py#L150-L158
LAMMPS interface
https://github.com/ACEsuit/lammps/blob/4ee087496324a8ce320459dc0bdf58b8e5e74ab0/src/ML-MACE/pair_mace.cpp#L204-L216
https://mace-docs.readthedocs.io/en/latest/guide/lammps.html
OpenMM Python interface
https://github.com/jharrymoore/openmm-ml/blob/main/openmmml/models/mace_potential.py
Neighborlist https://github.com/felixmusil/torch_nl
MD packages
GPUMD
no interface
GROMACS
no interface
LAMMPS
You get a neighbour list by list of atoms and a flat neighbour list with offsets to determine which section corresponds to which atom
CPU (dynamics) <--> GPU (potential)
OpenMM
It has several relevant modules for us
TorchMD
I dunno
ACEMD
I dunno, seems closed source
Prototyping unified MD interface
Requirements
Core idea:
Why not OpenKIM?
Neighbourlist
---> We need to offer CPU and GPU neighbourlist for potential
Atomic numbers
Unit conversion
Message-passing
Pseudo Code
Mainly inspired from Allegro and ANI, beause the others are entangled with message-passing options that I don't fully understand
Beta Was this translation helpful? Give feedback.
All reactions