I have a question about the concept of pressure.
Generally there are two ways to calculate the pressure along one axial direction for crystalls. One is Viral theorem which is commonly used in LAMMPS, another is to calculate the first order of total energy (dE/dl) which is often used for first-principle calculations.
My questions are
(1) Whether the two methods are equivalent (although they can be derived from each other)
(2) Which of them is better numerically