I am trying to understand the implementation of Nose-Hoover chain algorithm for simulating NVT ensemble in LAMMPS. I am unable to pinpoint exactly which paper is followed to write the NHC algorithm although some references are given in the documentation of the " fix nvt " command. Could anyone please refer me to that paper ?
Why not just follow the documentation? It has the following:
The equations of motion used are those of Shinoda et al in (Shinoda), which combine the hydrostatic equations of Martyna, Tobias and Klein in (Martyna) with the strain energy proposed by Parrinello and Rahman in (Parrinello). The time integration schemes closely follow the time-reversible measure-preserving Verlet and rRESPA integrators derived by Tuckerman et al in (Tuckerman).
That explains it quite nicely, I think.
Thanks for pointing this out.
I have another question. While thermostatting in LAMMPS, the target temperature (denoted by the variable ’ t_target ’ ) is dynamically changed. What I mean is that at every timestep during thermostatting ’ t_target ’ is calculated according to,
t_target = t_start + delta * ( t_stop - t_start ). ’ t_target ’ goes into the thermostat algorithm.
Why can’t the target temperature be fixed as ’ t_target = t_stop ’ at the start of the simulation instead of changing it at every time step ?
Because when you request a temperature ramp you want a (linear) temperature ramp, because that is what the documentation is promising. Please note that in most inputs t_start == t_stop.
Thanks for the prompt response. What is the physics behind this choice ( i.e, linear temperature ramp ) ?
If you change the temperature drastically with rescaling, you add a shockwave to the system, if you give a largely different target temperature from the current temperature, the Nose-Hoover fictitious dynamic might get out-of-whack. A temperature ramp avoids this. However, Nose-Hoover thermostats are good at maintaining a temperature. If you need to move a large amount of kinetic energy into or out of a system, switching temporarily to a dissipative thermostat would be better.
I have another question regarding the NHC alogorithm of LAMMPS. It uses a parameter ’ tdof ’ which is I think the degrees of freedom. But I have not been able to find how and where exactly in the code it is defined.
$ grep -n tdof fix_nh*
fix_nh.cpp:738: // tdof needed by compute_temp_target()
fix_nh.cpp:741: tdof = temperature->dof;
fix_nh.cpp:782: eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq);
fix_nh.cpp:899: tdof = temperature->dof;
fix_nh.cpp:1454: // where L = tdof
fix_nh.cpp:1758: double kecurrent = tdof * boltz * t_current;
fix_nh.cpp:1763: eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq);
fix_nh.cpp:1796: kecurrent = tdof * boltz * t_current;
fix_nh.cpp:2210: ke_target = tdof * boltz * t_target;
fix_nh.cpp:2255: mtk_term1 = tdof * boltz * t_current;
fix_nh.h:48: double boltz, nktv2p, tdof;
Thanks. I have seen these occurrences of ’ tdof ’ in the code. But how can I find the exact value of ‘tdof’. For example, is it like tdof = 3*N -3 ?
Sorry, but this is no longer a question of the LAMMPS code, but an issue of your C++ programming skills. I have no intention to give you a C++ programming class here and that is off-topic for this forum anyway.
As a piece of general advice: when people respond to your question with just some command, its output and no further explanation, or just a copy of a chunk of text in the manual, that is a strong warning sign, and an indication that you should figure this out on your own.
Thanks for your advice.