QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: GJK on April 12, 2015, 12:33
-
Hi,
It is well known that the enthalpy is given by H=U-pV , we can get the enthalpy from total energy and volume from lattice parameters but how to get the pressure so that we can easily find out internal internal energy and hence calculate the behavior of two interacting systems.
Kindly provide the codes for calculating pressure if possible?
Thanks & Regards
GJK
-
For a static system (i.e. obtained from a geometry optimization), the pressure can be calculated from the stress tensor via P = -1/3 (s_xx + s_yy + s_zz) (see attached script).
At finite temperature (i.e. in a molecular dynamics run) there would be an additional contribution of the kinetic energy: P = 2/3 E_kin/V - 1/3 (s_xx + s_yy + s_zz).
If you want to compare the enthalpy of two systems, you have to simulate them at the desired target pressure. In a molecular dynamics simulation, this can easily be achieved by employing one the NPT-methods. If you intend to obtain the structures via a geometry optimization, you have to optimize the cell until the desired target stress is reached. In ATK2015, this can easily be achieved via the target_stress parameter.