How stress is computed when forces are velocity dependent?

Dear LAMMPS developers,

According to the User Document, “Details of how LAMMPS computes the virial for individual atoms for either pairwise or manybody potentials, and including the effects of periodic boundary conditions is discussed in [Thompson, Plimpton, Mattson, J Chem Phys, 131, 154107 (2009)].” I have read the mentioned paper carefully, where the virial is derived from the potential function, which depends only on the instantaneous atom positions.

However, in some problems forces are dependent on velocities as well. I’m really curious to know how LAMMPS computes stress in such cases, and how the algorithm could be justified physically.

Best regards,

Arham Amouei

Stress has a kinetic term which included velocities, see the compute stress/atom and compute pressure doc pages.


Thank you. I doubt if my question was conveyed well. According to your valuable paper, which was mentioned,

P = N k_B T / V + / 3V, (1)


W = -3V dU/dV . (2)

T in the first term of Eq. (1) depends on total kinetic energy, and I think the algorithm used to compute it is independent of whether the forces have direct velocity dependency or not.

Assuming that the forces are of the form F = -grad U({r}) + Z(v), where Z(v) is some function of particle’s velocity, W as defined in Eq. (2) does not take account of Z(v), as if the forces are of the form F = -grad U({r}) .

Best regards,

Arham Amouei