Add `stress` to `MorsePotential`
Presently many classical potentials implemented in ASE do not calculate stress
(exceptions: LennardJones
, EMT
).
This MR adds stress
to MorsePotential
in the common formalism of Virial stress.
The test is done using numeric_stress
.
I also did:
- Document
MorsePotential
a bit more. - Refactor
MorsePotential
(mostly renaming variables to be somehow similar toLennardJones
). - Refactor
numeric_stress
mostly to give strain consistently in the Voigt notation.
When I have time, I would like to implement stress
also for more practical potentials like EAM
.
(EDIT: cf. Original MorsePotential
implementation in 3d74358a, smooth cutoff introduction in !2073 (merged))
Checklist
-
I am familiar with ASE's contribution guidelines. -
Doc strings in code changed in this MR are up to date. -
Unit tests have been added for new or changed code. -
Issue is resolved via "closes #XXXX" if applicable.
Edited by Yuji Ikeda