openmm / openmm-ml

High level API for using machine learning models in OpenMM simulations
Other
80 stars 25 forks source link

Feature request: Interface with NEQUIP #48

Open asedova opened 1 year ago

asedova commented 1 year ago

Excited to see the ANI interface. I wonder how hard it would be to interface with NEQUIP? https://github.com/mir-group/nequip It's also PyTorch based and gets really exceptional performance on condensed matter systems. Currently NEQUIP runs MD with LAMMPS which is a pain.

peastman commented 1 year ago

(I transferred this issue from the main OpenMM repository, since this is where interfaces to ML codes live.)

It ought to be straightforward. There are two levels of interfacing. The lower level piece is the OpenMM-Torch plugin. It lets you use arbitrary PyTorch models as forces. You create a thin wrapper with the right interface around whatever model you want to use, and add it to your System.

Once you have a general purpose pre-trained model and you want to make it easily available to users for running simulations, OpenMM-ML provides a higher level API. You create new subclasses of MLPotentialImpl and MLPotentialImplFactory, and register the factory. Here is the API, and here is the ANI implementation which can serve as an example.

asedova commented 1 year ago

Thanks! And thanks for transferring, I was confused as to which ML-related repo would be the one to post to.

asedova commented 1 year ago

Left a note on NEQUIP's page and got the following response, which is very promising. Still could be tricky for us higher-level users, but I am willing to try. https://github.com/mir-group/nequip/issues/288