12:05:04 PM PST - Thu, Dec 28th 2017 |
|
There is a bug in the MD code for the Langevin thermostat. Since the dynamics are performed in Cartesian coordinates and the Langevin thermostat is a local thermostat, there are 3*N degrees of freedom as far as the thermostat is concerned (N is the number of atoms). However, the temperature is calculated assuming 3*N-6 (or 3*N-5 for a linear molecule) degrees of freedom. Now, since by default center-of-mass translations and rotations are removed and the velocities rescaled to maintain the same kinetic energy after removal, the calculated temperature is (approximately) reflective of the temperature for the internal degrees of freedom. Until this gets fixed in a future version of the code, you have three options:
1) Set the com_step keyword to 1 so that there is no center-of-mass motion, and set targ_temp to [(3*N-6)/(3*N)] T where T is the actual temperature you want. The temperature reported in the output will then be the temperature of the internal degrees of freedom.
2) Set com_step to larger than nstep_nucl, and set targ_temp to the temperature you want. The temperature in the output will then be (3*N)/(3*N-6) times larger than the actual temperature of the system, but the dynamics will correspond to a system at the target temperature. Note, that for this set up your system will experience center-of-mass motion and the temperature associated with the internal degrees of freedom will be lower than your target temperature.
3) Use a different thermostat. In particular, I suggest the stochastic velocity rescaling thermostat. This thermostat correctly samples the canonical ensemble, is a global version of the Langevin thermostat, minimally perturbs the dynamics of the system away from Hamiltonian dynamics, and the results are less sensitive to the choice of relaxation parameter.
|