Skip to content

Converting units of trained Allegro/NequIP model to match LAMMPS #298

Answered by Linux-cpp-lisp
ankur56 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ankur56 ,

The final step in our default NequIP/Allegro models is RescaleEnergyEtc, which scales the network's predictions into "physical" or "real" units, i.e. those in which it was trained. This rescaling can be easily modified in a deployed model to create a new deployed model that predicts in different energy units. You can use this to create a model that takes Angstroms and predicts eV (LAMMPS metal units) or Angstrom and kcal/mol (real units). Please note that it is not straightforwardly possible to change the length units of a trained model, only the energy units.

Given a deployed model deployed.pth, it should basically be this:

import torch
from nequip.scripts.deploy import loa…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@yangqifanshihaoren
Comment options

@yangqifanshihaoren
Comment options

@Linux-cpp-lisp
Comment options

@yangqifanshihaoren
Comment options

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