I read in a tutorial that applying two fixes, one for nve and a second one of langevin thermostat is practically an nvt dynamics (that is supposed to be done with a singne nvt fix). Is this right? Why when we opt for the 1st choice?
From thermodynamic pov, in nve ensemble temperature is allowed to vary while keeping the energy constant. Adding thermostat will impose constant T. I don’t understand the logic of having such two fixes. In nvt it is clear that we want to keep the T constant while the energy can vary.
I hope I am clear in expressing my question and I hope to get a reply from you soon.
Note quite. You have to dig deep into statistical thermodynamics to find a specific explanation why.
The result is similar in such a what as both fix nvt with a Nose-Hoover thermostat and fix nve+langevin with Langevin dynamics model as system which behaves as if it was exchanging kinetic energy with a larger heat bath. Only with fix nvt you can sample at true NVT statistical mechanical ensemble (provided you are otherwise fulfilling all requirements) with fix langevin you have a different mechanism. In the limit of extremely weak coupling both will morph into NVE dynamics.
Using fix langevin has the advantage that its algorithm (viscous damping balanced with addition of randomized kinetic energy) promotes dissipation of kinetic energy. With very large damping and corresponding random kinetic energy addition you can approximate the effect of a solvent implicitly.
That is not quite right. At least not for finite size systems and when you use numerical time integration. Only in the limit of an infinitely large system will you have a true “constant” energy. For finite size systems NVE means that the system does not exchange energy with its environment.
That is not correct either. Adding a thermostat will adjust the dynamics so that you have a desired temperature on average (and that refers to averaging over space and - if the system is in equilibrium - over time).
If you want to truly understand the subtleties, you need to study statistical thermodynamics (there are several quite popular text books).