Hello Lammps community!
I am currently working on my own Magnetoelastic pair potential within the SPIN package. I’m utilizing the a modified version of the magnetoelastic energy equation from Kittel (see here) and an atomistic strain tenson developed by Zimmerman (see here).
In my current implementation, an atom’s magnetoelastic energy is calculated through the atomic strain tensor via a displacement gradient of my neighboring atoms given an initial configuration at time t=0, and the orientation of the current atom’s spin vector direction.
In taking the derivative of this energy interaction with respect to displacement, I am left with only a single net force on my atom instead of the force between two atoms. I want this force to be added into the virial calculation so I can monitor its contribution to the stress arrays during energy minimization. What would be the best way to do this? The only method I saw in pair.cpp that does this was ev_tally_xyz_full but I don’t know if this is the ideal way to calculate its virial contribution.