[Pw_forum] Problem in energy conservation in NVE MD using cp.x

Nicola Marzari marzari at MIT.EDU
Tue Jul 14 14:01:37 CEST 2009


CC: Paolo Giannozzi, Carlo Cavazzoni, Roberto Car. Notes below
also relevant for BO dynamics with pwscf. Please focus on
the bottom part of the email.


Dear Hiroshi,


well spotted. To summarize, for all - this is a single water molecule,
almost relaxed at equilibrium. The oxygen atom is clamped (allowing it 
to move does not change the problem). When the microcanonical cp
dynamics starts, the ionic temperature oscillates around 1 or 2 degrees
Kelvin, but after 0.2-0.4 ps it picks up.

Hiroshi: I do not believe it's an exponential increase - if you continue 
the simulations for longer, it starts oscillating between 0 and 50 
Kelvin, instead of between 0 and 2 Kelvin, although after 1ps or so
I believe the molecule has started to move so fast that the integration
breaks down, and things start getting worse.

I believe the problem is this: you are seeing a transfer of quantity of
motion between the subset of the ions, and the electronic fictitious
degrees of freedom. Remember this: the cp lagrangian, when integrated
correctly (i.e. with a small time step) evolves correctly the full
dynamical system with all degrees of freedom (physical ionic masses,
fictitious electronic masses). If there is an electronic gap in your
system (like here) the two subsets of ions and electrons evolve without
exchanging energy between each other, and conserving the momentum
(linear and angular) of the mixed system (ionic + fictitious
electronic). The center of mass of the physical subset (e.g. ions) can
pick up momentum (both linear and angular momentum), provided this is
cancelled out by the fictitious momentum of the electrons (and it will 
cancel out, if the equation of motions are integrated properly).

So, I think (also due to your use of normconserving psp, leading to a 
lot of plane waves) that you are seeing transfer of momentum from the
fictitious electrons to the ions. Also, your ions have almost no kinetic
energy, so instead of giving it to the fictioous electronic degrees of
freedom (as would usually happen, say, in a simulation with a small gap)
they are slowly picking up kinetic energy from the electrons.

On top of this, the routine that calculates the temperature removes
the contribution from the motion of the center of mass - it is in 
Modules, so I believe this is also used for pwscf. I believe this
is never the right thing to do, and maybe this is a good time to
sort this out.

So, these would be my recommendations, starting from the easy ones:

1) for BO dynamics in CP and PWSCF: I believe the right procedure is
to force the sum of the hellmann-fenyman forces to be zero (it will 
never be exactly zero to imperfect convergence), and never remove the
motion of the center of mass from the temperature. This will assure that
the system does not start moving. For an isolated system, the same 
should also be done for the angular momentum. For an extended system,
not sure - a solid will never pick up angular momentum, a liquid could,
in principle.

2) for CP dynamics in CP: I'm not sure what would be the best strategy.
I believe again we should calculate the temperature without removing
the center of mass, and I believe we should fix, in the move_ions, the
center of mass. This is what used to happen in previous version of the
codes (like - 10 years ago).

			nicola



SAKUMA Hiroshi wrote:
> Dear all,
> 
> I was running the cp.x using the example input files in
> a folder of "examples_cp/water-cp" provided by Summer School 2006, Quantum Espresso Lab.
> After the wavefunction optimization, I tried a MD run of NVE ensemble using the h2o_mol.in.03.
> The total energy (econt) was almost constant until 0.2 ps, 
> however it exponentially increased after 0.2 ps.
> This is not affected by the choice of time step and fictious mass.
> 
> I used the Quantum-espresso 4.0.5 and 4.0.3.
> 
> Do you have any idea about this problem?

-- 
---------------------------------------------------------------------
Prof Nicola Marzari   Department of Materials Science and Engineering
13-5066   MIT   77 Massachusetts Avenue   Cambridge MA 02139-4307 USA
tel 617.4522758 fax 2586534 marzari at mit.edu http://quasiamore.mit.edu



More information about the users mailing list