Clarification on the definition of stress/virial #323
-
I would appreciate it if the definition of stress/virial in NequIP could be clarified.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @weilaigit , Yes, I think there is a difference in terms here. In
The sign convention on and between these two quantities is, to the best of my understanding, arbitrary and varies between people and DFT codes. See https://github.com/mir-group/nequip/blob/main/nequip/nn/_grad_output.py#L327 for more discussion and links on the convention.
No, but we support them in many of the same places:
See https://github.com/mir-group/pair_nequip/blob/stress/pair_nequip.cpp#L478. We set the LAMMPS virial to our virial, and let LAMMPS handle the rest in terms of converting into pressure units, adding the kinetic term, etc.
In |
Beta Was this translation helpful? Give feedback.
Hi @weilaigit ,
Yes, I think there is a difference in terms here. In$V$ of the box:
nequip
"stress" and "virial" are both gradients of the potential energy, but the differ by a sign flip and a factor of the volumeThe sign convention on and between these two quantities is, to the best of my understanding, arbitrary and varies between people and DFT codes. See https://github.com/mir-group/nequip/blob/main/nequip/nn/_grad_output.py#L327 for more discussion and links on the convention.