variables omega and its time derivatives in fix_nh.cpp/.h

Hello Lammps community,

I have a question about variable omega variables. i believe the remap() in fix_nh.cpp corresponds to the 3rd equation of the (1) set of equations, in Shinoda’s paper

Shinoda, Wataru, Motoyuki Shiga, and Masuhiro Mikami. “Rapid estimation of elastic constants by molecular dynamics simulation under constant stress.” Physical Review B 69.13 (2004): 134103.

It’s also stated in the fix_nh.cpp itself
// h_dot = omega_dot * h

I know it is related to the barostat mass, and we also have etap variables to account for chain thermostat for barostat.

I’m quite confused between omega and etap variables. Could anyone please explain to me what is the difference and how is it implemented?

Another question is about mtk_term1/2; I believe they are referred to

Martyna, Glenn J., et al. “Explicit reversible integrators for extended systems dynamics.” Molecular Physics 87.5 (1996): 1117-1157.

In what equations are mtk_term calculated by?

Many thanks,

Anh Tran

PhD student

Georgia Institute of Technology

Aidan can explain.

Steve

You are asking about the mapping between equations in papers and formulas
coded in LAMMPS code. I could spend a lot of time spelling it out for you,
but it is better if you first read the Tuckerman paper (Tuckerman,
Alejandre, Lopez-Rendon, Jochim, and Martyna, J Phys A: Math Gen, 39, 5629
(2006)) carefully, then read the LAMMPS documentation for fix npt, and
then look at the code. Here are some additional pointers:

1. The key to understanding all of this is the equation on the doc page
for fix npt giving the Trotter factorization of the Liouville operator.
This equation carefully defines the order in which the various updates are
performed in the code. This factorization is similar to, but not identical
to, the factorization described by Tuckerman et al., and it uses the same
notation.
2. The comments in FixNH::compute_scalar() give some explicit mappings
between LAMMPS variables and those defined by Martyna et al.
3. The code is not directly based on the Shinoda paper, except for the
strain energy, which only matters if you are using a non-hydrostatic
target stress.

Aidan

Hello Aidan,

Thank you for pointing me to the key paper. I will read it and try to understand how it is handled in LAMMPS.

Kind regards,
Anh