Skip to content

Clarification on the definition of stress/virial #323

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

You must be logged in to vote

Hi @weilaigit ,

Yes, I think there is a difference in terms here. In nequip "stress" and "virial" are both gradients of the potential energy, but the differ by a sign flip and a factor of the volume $V$ of the box:

  • "Virial" means $-\nabla_{\text{box}}E_\text{potential}$, a symmetric 3x3 tensor
  • "Stress" means $-\frac{1}{V} \times \text{virial} = \frac{1}{V} \nabla_{\text{box}}E_\text{potential}$

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.

It seems that stress …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@weilaigit
Comment options

Answer selected by weilaigit
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