ASE example #115
-
Hi, I followed the tutorial yesterday at the MRS meeting, and was playing a bit with the colab notebook. I wanted to try to use the ASE interface instead of LAMMPS. Do you have an example of how to do that? Basically, how do I load a model created with Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi Jakob, Thanks for coming to our tutorial and for reaching out! Once you have deployed your model using from nequip.ase import NequIPCalculator
atoms.calc = NequIPCalculator.from_deployed_model(
model_path="path/to/deployed.pth",
species_to_type_name = {
"C": "NequIPTypeNameForCarbon",
"H": "NequIPTypeNameForHydrogen",
}
) The keys in Two very important other parameters are You can also pass a |
Beta Was this translation helpful? Give feedback.
Hi Jakob,
Thanks for coming to our tutorial and for reaching out!
Once you have deployed your model using
nequip-deploy
(just as in the colab notebook we did for LAMMPS, the process is the same), you can later load that model for use in ASE in Python with:The keys in
species_to_type_name
are chemical symbols and the values are the names of the corresponding types in your NequIP model, which you can find in your original YAML config by looking …