mir-group / nequip

NequIP is a code for building E(3)-equivariant interatomic potentials
https://www.nature.com/articles/s41467-022-29939-5
MIT License
633 stars 139 forks source link

What is the unit of virials❓ [QUESTION] #404

Closed YuanbinLiu closed 1 month ago

YuanbinLiu commented 9 months ago

I'd like to train virials as well. Could you point out what unit is used for the virial fitting?

Linux-cpp-lisp commented 9 months ago

What do you mean by "as well"? There is no reason to train virials and stresses simultaneously as they are fully redundant.

YuanbinLiu commented 9 months ago

Sorry for the unclear description. I want to train on energy, forces, and virials (not stresses). I need to know which unit I have to use for fitting virials so that I can adjust them to the suitable format. Could it be GPa or eV? @Linux-cpp-lisp

Linux-cpp-lisp commented 9 months ago

Aha, I see: we do not do any unit conversions for either virials or stress, since nequip has no formal sense of units and just inherits the units of the dataset. So presumably eV in this case.

See for some more details comments throughout: https://github.com/mir-group/nequip/blob/develop/nequip/nn/_grad_output.py#L346-L351