Page 1 of 1

Energy conservation in MD

Posted: Wed Jan 11, 2023 1:27 am
by IBRAHIM
Hi,

For checking energy conservation in MD with NVT-langevin thermostat, which value for total energy is used; E, F, or E0?

In Si example (wiki/index.php/Liquid_Si_-_Standard_MD), the free energy was used.

Thanks 

Re: Energy conservation in MD

Posted: Wed Jan 11, 2023 5:08 pm
by andreas.singraber
Hello!

First, total energy is not a conserved quantity in the NVT ensemble! Some thermostats, like the Nosé-Hoover thermostat, provide a "pseudo-Hamiltonian", i.e. a similar conserved quantity, which one can check for conservation even in the case of an NVT simulation. However, I am not aware that this is possible with the Langevin thermostat.

In case you want to use the Langevin thermostat, you can only check energy conservation by setting LANGEVIN_GAMMA to zero, which actually disables the thermostat and results in an NVE simulation. Then, the conserved energy is provided in the following ways:

(1) OSZICAR: In the line

Code: Select all

      1 T=   295. E= -.40126502E+02 F= -.40431392E+02 E0= -.40431392E+02  EK= 0.30489E+00 SP= 0.00E+00 SK= 0.00E+00
E corresponds to the conserved total energy, which is the sum E = F + EK (actually + SP + SK, but these terms are zero for the Langevin thermostat).

(2) OUTCAR: In the sections

Code: Select all

  FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV)
  ---------------------------------------------------
  free  energy   TOTEN  =       -40.43139170 eV

  energy  without entropy=      -40.43139170  energy(sigma->0) =      -40.43139170
and

Code: Select all

  ENERGY OF THE ELECTRON-ION-THERMOSTAT SYSTEM (eV)
  ---------------------------------------------------
% ion-electron   TOTEN  =       -40.431392  see above
  kinetic energy EKIN   =         0.304889
  kin. lattice  EKIN_LAT=         0.000000  (temperature  294.84 K)
  nose potential ES     =         0.000000
  nose kinetic   EPS    =         0.000000
  ---------------------------------------------------
  total energy   ETOTAL =       -40.126502 eV
ETOTAL is the conserved energy which is the sum ETOTAL = TOTEN + EKIN (actually + EKIN_LAT + ES + EPS, but these terms are again all zero here).

Often, if one is only interested in single-structure energies, the energy E0 (energy(sigma->0) = ...) is reported as potential energy. However, the potential energy surface corresponding to the analytic forces provided by VASP is given by F (TOTEN). Usually, the difference is tiny, it depends on the smearing parameter ISMEAR.

Best,
Andreas Singraber