[Pw_forum] How to adjust emass,dt and cutoff in cp.x calculation?

Axel Kohlmeyer akohlmey at vitae.cmm.upenn.edu
Wed Apr 12 21:49:32 CEST 2006


On Wed, 12 Apr 2006, Paul Tangney wrote:


hi paul (and the others).

just to add one more detail to that.

[...]

PT> Most people either don't know about this issue or use the
PT> ostrich approach to computer simulation and skip step 5 but
PT> the tests that have been published suggest that this is
PT> a mistake.

well put. 

[...]

PT> You could also just use Born-Oppenheimer MD, which is
PT> always faster for a chosen level of accuracy on the forces
PT> or the Kohn-Sham energy.
PT> It doesn't conserve energy as well, but the energy that
PT> is conserved in Car-Parrinello MD is a physically meaningless
PT> quantity anyway, so who cares?
PT> If temperature drifts too much, attach a weak thermostat.

...also it actually does not drift as much if you use 
wavefunction extrapolation with BO-MD. in my tests 4th-order
extrapolation gives not only a _very_ good guess, i.e. reduces
the number of iterations needed for convergence, but also seems
to reduce the drift in kinetic energy, _even_ if you losen the 
convergence criterion. we recently had somebody here presenting
MD studies with gaussian 03 and he was seeing the same.

regards,
   axel.

PT> 
PT> 
PT> Regards,
PT> 
PT> Paul
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> What Nicola says is entirely correct, and you should pay special
PT> attention when studying metallic systems with CP (or seriously
PT> considering using extensions of the CP method like the ones pioneered by
PT> Nicola and by others).
PT> 
PT> However, should you still be willing to study Na with CP as a test case,
PT> or should you consider studying "easier" (say, nonmetallic) systems in
PT> the future, the recipe for setting emass, emass_cutoff, and dt is
PT> roughly as follows:
PT> 
PT> 1) set emass to a physical sound value. The value of emass determines
PT> how much the fictitiuous dynamics of the electrons couples with the real
PT> dynamics of the ions. A small emass guarantees decoupling. How small is
PT> small is typically determined by the excitation gap E_gap of your
PT> system. The minimum frequency of the fictitious electronic dynamics
PT> scales like sqrt(E_gap/emass) [see, e.g., Pastore et al, PRA 44, 6334
PT> (1991)], and this has to be much higher than the maximum frequency of
PT> the ion dynamics. Typically a factor of three larger is enough. As you
PT> see, metallic systems, where E_gap=0 are a bit of a nightmare for CP,
PT> unless the finite size of your system introduces a finite gap, but then
PT> you have to be extra-careful...
PT> 
PT> 2) start playing with emass_ecutoff, by fixing it to a starting value,
PT> and checking what is the maximum dt that alllows you to integrate the
PT> equations of motion. The error you got is precisely a sign that the dt
PT> you used is too large for the integrator to converge.
PT> 
PT> 3) choose the value of emass_ecutoff that allows you to use the largest dt.
PT> 
PT> 4) Set dt accordingly.
PT> 
PT> Points (2-4) are described in detail in Tassone, Mauri, Car, PRB 50,
PT> 10561 (1994).
PT> 
PT> Regards,
PT> Sandro
PT> 
PT> 
PT> Ruijuan Xiao wrote:
PT> 
PT>  >Dear all,
PT>  >I met some problems when I do some calculations by cp.x. What I 
PT> calculated is a cubic box in which 54 Na atoms exist. When I use 
PT> dt=5.0d0, emass=400.0d0, and emass_cutoff=3.0d0, it can run without any 
PT> problems. When I put dt=5.0d0,emass=400.0d0, then change the value of 
PT> emass_cutoff, the calculation also runs without problems.
PT>  >
PT>  >But when I put emass=400.0d0 and emass_cutoff=3.0d0,then change dt 
PT> into 10.0d0, the following error message appears and the program stopped.
PT>  >-----------------------------------
PT>  >%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PT>  >     from ortho : error #        21
PT>  >     max number of iterations exceeded
PT>  > 
PT> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PT>  >
PT>  >     stopping ...
PT>  >------------------------------------
PT>  >
PT>  >When I put dt=5.0d0 and emass_cutoff=3.0d0, but change emass into 
PT> 200.0d0, the program stopped after 12 iterations. The message is :
PT>  >------------------------------------
PT>  >  nfi    ekinc  temph  tempp        etot      enthal       econs 
PT>   econt    vnhh   xnhh0    vnhp   xnhp0
PT>  >   10 ********    0.0    0.0    41.82500    41.82500    41.82500 
PT> 146.23636  0.0000  0.0000  0.0000  0.0000
PT>  >   11  NaN        0.0    0.0    58.16717    58.16717    58.16717  NaN 
PT>          0.0000  0.0000  0.0000  0.0000
PT>  >   12  NaN        0.0    0.0  NaN         NaN         NaN         NaN 
PT>          0.0000  0.0000  0.0000  0.0000
PT>  >
PT>  >   MAIN:          EKINC   (thr)          DETOT   (thr)       MAXFORCE 
PT>    (thr)
PT>  >   MAIN:  NaN            0.1D-03 NaN            0.1D-08  0.000000D+00 
PT>   0.1D+11
PT>  >   MAIN: convergence achieved for system relaxation
PT>  >
PT>  >
PT>  >              averaged quantities :
PT>  >         ekinc          ekin          epot          etot     tempp
PT>  > NaN           NaN           NaN           NaN                 0.0
PT>  >-----------------------------------
PT>  >It seems that the calculation is sensitive to these parameters. Since 
PT> on the page 37 of the maunal, it says that "unless you are already 
PT> experienced with the system you are studying or with the code internals, 
PT> usually you need to tune some
PT>  >input parameters, like emass, dt, and cut-offs.", so these parameters 
PT> must be important for calculations, but now I am puzzled about how to 
PT> adjust emass,dt and cutoff in cp calculations.Would you like to give me 
PT> any information or any suggestion about that?
PT>  >
PT>  >Thank you very much.
PT>  >
PT>  >
PT>  >Best regards,
PT>  >
PT>  >Sincerely,
PT>  >Ruijuan Xiao
PT>  >Institute of Physics,
PT>  >Chinese Academy of Sciences
PT>  >
PT>  >
PT>  >
PT>  >_______________________________________________
PT>  >Pw_forum mailing list
PT>  >Pw_forum at pwscf.org
PT>  >http://www.democritos.it/mailman/listinfo/pw_forum
PT>  >
PT>  >
PT>  >
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 
PT> 

-- 
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.




More information about the Pw_forum mailing list