Skip to content

ASE example #115

Answered by Linux-cpp-lisp
schiotz asked this question in Q&A
Nov 30, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

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:

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 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 …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@schiotz
Comment options

@schiotz
Comment options

@Linux-cpp-lisp
Comment options

Answer selected by schiotz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants