[Pw_forum] MD restart algorithm in Quantum Espresso

Axel Kohlmeyer akohlmey at gmail.com
Sun Aug 19 07:10:51 CEST 2012


On Sun, Aug 19, 2012 at 12:09 AM, Alexey Akimov <aakimov at z.rochester.edu> wrote:
> Dear Paolo,
>
> Thank you for your kind reply (I already though that nobody will ever answer this :) ).
> 1) about first part - yes, i meant BOMD calculations. So are you saying that the difference arises because of the convergence criteria for the  electronic problem at restart and during continuous MD run are different? In that case will setting the threshold for this problem to very small value help to prevent such divergence (perhaps for the cost of extra iterations)? Also I tried used the potential and wavefunction interpolation during MD simulation (i hope to accelerate calculations) in MD simulations. Do you think this can interfere with the MD restart algorithm?

convergence criteria are the same , but only the wavefunction, not the
potential is saved, since the latter can be constructed from the
former. the issue is a principal one. there will *always* be
differences and the trajectories will diverge (usually exponentialls),
since you are using floating point math, which is not like real math.
floating point math does not commute, i.e. the result depends on the
order of operations and floating point math does not have infinite
accuracy.

this is already a problem in classical MD, but in BOMD it is worse,
since one typically does not save the forces to a restart, but
recomputes them, which explains the additional SCF step at the
beginning of a run.

add to this the fact that MD is a chaotic process (coupled
differential equation), the divergence is inevitable unless you use
fixed point math and only use NVE dynamics (no thermostat). tightening
the convergence will reduce the divergence initially, but since it is
an exponential process, it is a useless enterprise.

when using extrapolation, divergence will be larger, since the amount
of history will determine your initial guess and there will some
little "memory" of the initial guess (which is why extrapolation is a
good thing, as it improves energy conservation and allows using a less
tight convergence). but the not fully deterministic nature of
restarting an MD is really not a problem, since the trajectory after
the restart is statistically mechanically equivalent to the one from
the uninterrupted run. for *proper* analysis you would actually need
both and the huge number of other equivalent runs to average over and
have a good sample of the ensemble.

> 2) about nstep - do you suggest to look into code?  i just though this might have some faster explanation without digging into code. I think it might be good if someone could make it in accord with the naive expectation that nstep = 1 will make only one MD step, not 2. I suspect that the code performs 1 extra step at the end of simulation. In case of long trajectory e.g. nstep=100 this will not make a difference, but if i want to do the sequence : 1 MD step - (do something) - restart and do one more step - etc..., then 1 extra MD step at each calculation will double the computational expenses. So is it possible to change such behavior e.g. in next versions?

no. restarting is a bad idea in this case as you'd double the number
of SCF calculations.
you better integrate your "do something" into the QE-code.

axel.

>
> Thank you,
> Alexey
>
> ----- Original Message -----
> From: "Paolo Giannozzi" <giannozz at democritos.it>
> To: "PWSCF Forum" <pw_forum at pwscf.org>
> Sent: Friday, August 17, 2012 1:25:40 PM
> Subject: Re: [Pw_forum] MD restart algorithm in Quantum Espresso
>
> About the first point: are you referring to MD on the ground state
> ("Born-Oppenheimer" MD), done with PWscf (not Car-Parrinello)?
> I think that the restart does the correct thing, i.e. use the Verlet
> algorithm as if the run was not interrupted, but there might be
> some subtle differences in how the threshold for convergence is
> calculated, that are more than sufficient to have the two MD
> simulations diverge.
>
> About the difference between nstep and the number of steps actually
> performed: it shouldn't be difficult to follow variable "nstep" and
> see why
> this happen
>
> P.
> On Aug 1, 2012, at 24:51 , Alexey Akimov wrote:
>
>> I tried to perform md simulations in Quantum Espresso in 2
>> different ways:
>> 1) simply run a single continuous trajectory (e.g. 10 steps)
>> 2) run first step of MD as a new calculation (restart_mode =
>> from_scratch, default)
>>   and run all other (remaining 9) steps as restarts (restart_mode =
>> restart), doing this for every step
>>
>> As a result after a few steps the total energies, atomic forces and
>> position started to deviate between two approaches.
>>
>> I suspect that some information from the previous step may be
>> dropped during the restart (e.g. by using the first-order Euler
>> scheme instead of the Verlet algorithm), eventually leading to such
>> divergence. So my question is: what is restart algorithm for MD in
>> quantum espresso and is there any possibility to use method 2 (see
>> above) without accumulation of the integration errors?
>>
>> Also can someone clarify why if i specify nstep = 1 in my input
>> file (request to perform a single MD step), the program actually
>> makes 2 MD steps?
>>
>>
>> Thank you,
>> Alexey
>>
>>
>>
>>
>> --
>> Dr. Alexey V. Akimov
>>
>> Postdoctoral Research Associate
>> Department of Chemistry
>> University of Rochester
>>
>> aakimov at z.rochester.edu
>> _______________________________________________
>> Pw_forum mailing list
>> Pw_forum at pwscf.org
>> http://www.democritos.it/mailman/listinfo/pw_forum
>
> ---
> Paolo Giannozzi, Dept of Chemistry&Physics&Environment,
> Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
> Phone +39-0432-558216, fax +39-0432-558222
>
>
>
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
> --
> Dr. Alexey V. Akimov
>
> Postdoctoral Research Associate
> Department of Chemistry
> University of Rochester
>
> aakimov at z.rochester.edu
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum



-- 
Dr. Axel Kohlmeyer  akohlmey at gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.



More information about the users mailing list