INCAR: Difference between revisions

From Wiki
Jump to navigation Jump to search
Rgarcia (talk | contribs)
Rgarcia (talk | contribs)
No edit summary
Line 11: Line 11:




Back to [[Núria López and Group]] page.
Back to [[Núria López and Group]] / [[Scripts_for_VASP]].
=Ionic movement parameters=
=Ionic movement parameters=
You can find more information about this topic in the VASP manual [http://cms.mpi.univie.ac.at/vasp/vasp/IBRION_tag_NFREE_tag.html]
You can find more information about this topic in the VASP manual [http://cms.mpi.univie.ac.at/vasp/vasp/IBRION_tag_NFREE_tag.html]
Line 77: Line 77:
  grep curv OUTCAR
  grep curv OUTCAR


==Others ionic updates==


===Molecular Dynamics (MD) (IBRION=0)===
Back to [[Núria López and Group]] / [[Scripts_for_VASP]].
==Molecular Dynamics (MD) (IBRION=0)==
See [[Molecular Dynamics with VASP]]
See [[Molecular Dynamics with VASP]]
VASP manual: [http://cms.mpi.univie.ac.at/vasp/vasp/IBRION_0.html]
VASP manual: [http://cms.mpi.univie.ac.at/vasp/vasp/IBRION_0.html]


===Thermodynamics (IBRION=5,6)===
Back to [[Núria López and Group]] page.
==Thermodynamics (IBRION=5,6)==
See [http://cms.mpi.univie.ac.at/vasp/vasp/IBRION_5_IBRION_6.html]
See [http://cms.mpi.univie.ac.at/vasp/vasp/IBRION_5_IBRION_6.html]


Tip: If your system was obtained with a tight convergence criteria (eg: EDIFFG=-0.01), you can use NFREE=1 instead of 2 and reach a reasonable accuracy in the frequencies calculation with half of the computational cost.
Tip: If your system was obtained with a tight convergence criteria (eg: EDIFFG=-0.02), you can use NFREE=1 instead of 2. You will have a reasonable accuracy in the frequencies with half the computational cost.


Back to [[Núria López and Group]] page.
Back to [[Núria López and Group]] page.
Line 107: Line 108:
A thumb rule is EDIFF=EDDIFG*0.01 if EDDIFG is positive, or EDIFF=-EDDIFG*0.001 if using the force criterion.
A thumb rule is EDIFF=EDDIFG*0.01 if EDDIFG is positive, or EDIFF=-EDDIFG*0.001 if using the force criterion.


==What to do when experiencing convergence problems==
==Improving stability: Mixing Parameters==
If you have problems to reach convergence in the first electronic loop, and you are not reading WAVECAR, set:
If you have problems to reach convergence in the first electronic loop, and you are not reading WAVECAR, set:
  NELMDL = -9  # Number of non self-consistent electronic steps at the beginning (w/o CHG update)
  NELMDL = -9  # Number of non self-consistent electronic steps at the beginning (w/o CHG update)
Line 123: Line 124:
If problems persist, read this [[http://www.vasp.at/vasp-workshop/slides/optelectron.pdf]]
If problems persist, read this [[http://www.vasp.at/vasp-workshop/slides/optelectron.pdf]]


For further reading: [[http://www.vasp.at/vasp-workshop/slides/optelectron.pdf]]
References: [http://cms.mpi.univie.ac.at/vasp/guide/node131.html] and  [http://cms.mpi.univie.ac.at/vasp/vasp/Mixing_tags_IMIX_INIMIX_MAXMIX_AMIX_BMIX_AMIX_MAG_BMIX_MAG_AMIN_MIXPRE_WC.html]
 
Back to [[Núria López and Group]] page.
 
=Aditional parameters aka Parallelization=
 
==Speeding up with NSIM==


If your INCAR file states the following:


IALGO=48  or  ALGO=Fast  or  ALGO=VeryFast
Back to [[Núria López and Group]] / [[Scripts_for_VASP]].
=Parallelization=


You can speed up your calculation by ~15% varying the NSIM parameter. There should be no difference in the total energy and the convergence behavior in setting NSIM>1, only the performance should improve. The default value is 4.
==NPAR==  
 
  In c4m8        ==> NSIM = between 6 and 16
  In c8m24      ==> NSIM = between 8 and 16
  In c12m48ib    ==> NSIM = between 8 and 16
  In MareNostrum ==> NSIM = between 10 and 42
 
Recomended values:
NSIM =  8  for c4m8 & c8m24
NSIM = 12  for c12m48ib
NSIM = 32  for MareNostrum
 
For more information [http://cms.mpi.univie.ac.at/vasp/guide/node130.html]
 
==Improving Parallelisation==


Changing the parameter NPAR could increase the speed of calculation without affecting the global energy. Please see [http://cms.mpi.univie.ac.at/vasp/guide/node138.html] and made some test before set large systems.  
Changing the parameter NPAR could increase the speed of calculation without affecting the global energy. Please see [http://cms.mpi.univie.ac.at/vasp/guide/node138.html] and made some test before set large systems.  
Line 183: Line 164:
   64 MareNostrum3 ==> NPAR =  4
   64 MareNostrum3 ==> NPAR =  4
   
   
A calculation running on 8 processors-c8m24 will finish around 30% faster than on 8 processors-c4m8.
Back to [[Núria López and Group]] / [[Scripts_for_VASP]].
==NSIM==
If your INCAR file states the following:
IALGO=48  or  ALGO=Fast  or  ALGO=VeryFast
You can speed up your calculation by ~15% varying the NSIM parameter. There should be no difference in the total energy and the convergence behavior in setting NSIM>1, only the performance should improve. The default value is 4.


A calculation runing on 8 processors-c8m24 will finish around 30% faster than on 8 processors-c4m8.
  In c4m8        ==> NSIM = between 6 and 16
  In c8m24      ==> NSIM = between 8 and 16
  In c12m48ib    ==> NSIM = between 8 and 16
  In MareNostrum ==> NSIM = between 10 and 42


==van der Waals contributions==
Recomended values:
NSIM = 8  for c4m8 & c8m24
NSIM = 12  for c12m48ib
NSIM = 32  for MareNostrum
 
For more information [http://cms.mpi.univie.ac.at/vasp/guide/node130.html]
 
==Advanced parallelization==  


You can further increase the efficiency of your parallelization by setting KPAR and NBANDS. Check the VASP manual.


[[VdW_forces]]


Back to [[Núria López and Group]] / [[Scripts_for_VASP]].
=Additional parameters=


==Files to write==
==Files to write==
Line 200: Line 203:
   LELF  => ELFCAR        .FALSE. [http://cms.mpi.univie.ac.at/vasp/guide/node72.html]   
   LELF  => ELFCAR        .FALSE. [http://cms.mpi.univie.ac.at/vasp/guide/node72.html]   
   PARCHG => PARCHG        .FALSE.  
   PARCHG => PARCHG        .FALSE.  
  LAECHG => Bader charges .FALSE.
  LORBIT => PDOS/LDOS      0


'''Tip''': Set LWAVE=.FALSE. and LCHARG=.FALSE. to avoid that VASP writes WAVECAR, CHG & CHGCAR files. Set those values to .TRUE. if you plan to start a new calculation based on those results.
'''Tip''': Set "LWAVE = F" and "LCHARG = F" to avoid writing WAVECAR, CHG & CHGCAR files.  


==Mixing scheme==
==van der Waals contributions==
Please refer to [http://cms.mpi.univie.ac.at/vasp/guide/node131.html] and  [http://cms.mpi.univie.ac.at/vasp/vasp/Mixing_tags_IMIX_INIMIX_MAXMIX_AMIX_BMIX_AMIX_MAG_BMIX_MAG_AMIN_MIXPRE_WC.html]


Check here: [[VdW_forces]]


Back to [[Núria López and Group]] page.
 
 
 
Back to [[Núria López and Group]] / [[Scripts_for_VASP]].

Revision as of 15:57, 7 March 2018

go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP


By controling some parameters in the INCAR file, you can greatly increase the efficiency of your calculations.

Basic parameters

ISTART

ICHARG


Back to Núria López and Group / Scripts_for_VASP.

Ionic movement parameters

You can find more information about this topic in the VASP manual [1]

For a static calculation (e.g. No ions update), set:

NSW    = 1 

Ionic relaxation

There are five ionic relaxation algorithms implemented in VASP 5.x:

DIIS algorithm (IBRION=1)

The DIIS algorithm converges fast in systems that:

  • Are close to an energy minimum (or maximum).
  • Have low degrees of freedom.

Examples of those systems are:

  • Molecules in vacuum with short backbones (e.g. tert-butanol is one of the largest).
  • Bare metal slabs representing closed surfaces.

The algorithm builds up an approximation of the Hessian matrix, taking the last NFREE steeps. The forces should be calculated precisely, therefore you'd better set NELM=4 or even NELM=8. This forces a minimum of 4 to 8 electronic steps between each ionic step, and guarantees that the forces are well converged at each step. The NFREE number should be lower than the number of degrees of freedom, and it is set by VASP considering several constrains, unless it is specified by the user. For large values of NFREE this algorithm may diverge. For more information: [2] [3].

A test made with a gas-phase molecule in different conditions established that good POTIM values are between 0.15-0.40, with an optimum of POTIM=0.25. The algorithm is stable up to POTIM=0.80, even for weird, high-stressed structures. POTIM values smaller than 0.15, or larger than 0.40, only decrease the speed of convergence.

Conjugated Gradient algorithm (IBRION=2)

Is the recommended algorithm if you don't know what to do (See Ionic Relaxation Methods in [4]). It is faster and more stable than DIIS for medium and large systems, and always converges into a minimum (?).

The CG algorithm less sensitive to POTIM, and is stable for both stressed and pre-converged structures up to POTIM=1.00 (No larger values tested). However, the optimal value for both conditions is POTIM=0.15~0.20. Values lower than 0.15 reduces the speed of convergence.

Damped MD and QUICKMIN (IBRION=3)

Recomended for big systems, with many degrees of freedom.

If IBRION=3 is selected, VASP will use the QUICKMIN algorithm by default. If a SMASS value is feet in INCAR, VASP will switch to the damped Molecular Dynamic algorithm. Both suppose to be more efficient than CG and DIIS in large systems, but dMD can be faster than QUICKMIN if a good set of SMASS and POTIM is selected.

A good set of values for adsorption systems (tested on methanol on Pt(111) 2×2 surface) with reasonable initial guests is SMASS=0.20 and POTIM=0.16 ~ 0.20. The optimal set of values may change according to the size and nature of the system. Therefore, you'd better do a fast test in very soft conditions (Γ-point, ENCUT<250eV, NSW=10~20) to find the optimal parameters for your system. A good selection of SMASS can speed up the ionic convergence by one order of magnitude after 50 steps.

For IBRION=1,2 and 3 (dMD), POTIM is defined as a scaling constant for the forces. For QUICKMIN algorith, the IBRION flag has units (proportional to s/kg).

To set the stepest decend method, use IBRION=3 and SMASS=2.

Transition state optimization (IBRION=44)

Dimer method of G. Henkelman and H. Jónsson (J.Chem.Phys.,111,7010(1999)), implemented by Heyden et al[5]. Use these parametres:

electronic steps:
EDIFF  =   1E-6
improved dimer method:
IBRION =  44    
EDIFFG =  -0.050 # 
NSW    = 100     # Never use more than 200. Check periodically for divergence.   
POTIM  =   0.010 #    
NFREE  =   5     #   
FINDIFF=   2     #    
DIMER_DIST=0.010 #    
MINROT =   0.010 #    
STEP_SIZE= 0.010 #    
STEP_MAX=  0.100 # 

To check that it is converging well, (1) check with p4vasp that all forces are small, and (2) Check that the curvature is always negative. Normal values are between -1.0 and -30.0:

grep curv OUTCAR


Back to Núria López and Group / Scripts_for_VASP.

Molecular Dynamics (MD) (IBRION=0)

See Molecular Dynamics with VASP VASP manual: [6]

Back to Núria López and Group page.

Thermodynamics (IBRION=5,6)

See [7]

Tip: If your system was obtained with a tight convergence criteria (eg: EDIFFG=-0.02), you can use NFREE=1 instead of 2. You will have a reasonable accuracy in the frequencies with half the computational cost.

Back to Núria López and Group page.

Electronic relaxation parameters

For each ionic position, the electronic density and wave functions are updated (Born-Oppenheimer approximation). There are two control commands for this loop, EDIFF and NELM.

EDIFF  = 1E-5 # Default: 1E-4. [8]
NELM   = 150  # Default: 60. [9]

tip: Use values of NELM larger than 60 if you do not reach the energy threshold after 3 ionic steps.

For pre-converge a calculation, set:

EDIFF  = 1E-3 # Or 1E-4 for each moving nucleus in your POSCAR file
ENCUT  = 250  # Or the higher ENMIN value in your POTCAR file
NELMIN = 4    # Or 5. To increase this value further may rise computational burden without adding precision to the forces.  

For converge a calculation, set:

EDIFF  = 1E-5 # 
ENCUT  = 450  # This value must be consistent with all your converged calculations.
NELMIN = 3    # Or 2, that is the default.

A thumb rule is EDIFF=EDDIFG*0.01 if EDDIFG is positive, or EDIFF=-EDDIFG*0.001 if using the force criterion.

Improving stability: Mixing Parameters

If you have problems to reach convergence in the first electronic loop, and you are not reading WAVECAR, set:

NELMDL = -9   # Number of non self-consistent electronic steps at the beginning (w/o CHG update)

Otherwise, vary these mixing scheme parameters (you can play with them):

AMIX   = 0.10            
BMIX   = 0.01           
AMIN   = 0.10          

If problems persist, increase BMIX and reduce AMIN:

AMIX   = 0.10            
BMIX   = 3.00            
AMIN   = 0.01             

If problems persist, read this [[10]]

References: [11] and [12]


Back to Núria López and Group / Scripts_for_VASP.

Parallelization

NPAR

Changing the parameter NPAR could increase the speed of calculation without affecting the global energy. Please see [13] and made some test before set large systems.

Test results (Nº=Number of processors):

Nº Queue
  4 c4m8         ==> NPAR =  4
  8 c4m8         ==> NPAR =  2
 12 c4m8         ==> NPAR =  3
etc.
   
  8 c8m24        ==> NPAR =  8
 16 c8m24        ==> NPAR =  2
 24 c8m24        ==> NPAR =  3
etc.

 12 c12m48ib     ==> NPAR = 12
 24 c12m48ib     ==> NPAR =  2
 36 c12m48ib     ==> NPAR =  3
 48 c12m48ib     ==> NPAR =  4
etc.

 48 MareNostrum4 ==> NPAR = 48
 96 MareNostrum4 ==> NPAR =  2
144 MareNostrum4 ==> NPAR =  3
192 MareNostrum4 ==> NPAR =  4
etc.

 16 MareNostrum3 ==> NPAR = 16
 32 MareNostrum3 ==> NPAR =  2
 48 MareNostrum3 ==> NPAR =  3
 64 MareNostrum3 ==> NPAR =  4

A calculation running on 8 processors-c8m24 will finish around 30% faster than on 8 processors-c4m8.

Back to Núria López and Group / Scripts_for_VASP.

NSIM

If your INCAR file states the following:

IALGO=48   or   ALGO=Fast   or   ALGO=VeryFast

You can speed up your calculation by ~15% varying the NSIM parameter. There should be no difference in the total energy and the convergence behavior in setting NSIM>1, only the performance should improve. The default value is 4.

 In c4m8        ==> NSIM = between 6 and 16
 In c8m24       ==> NSIM = between 8 and 16
 In c12m48ib    ==> NSIM = between 8 and 16
 In MareNostrum ==> NSIM = between 10 and 42

Recomended values:

NSIM =  8   for c4m8 & c8m24
NSIM = 12   for c12m48ib
NSIM = 32   for MareNostrum

For more information [14]

Advanced parallelization

You can further increase the efficiency of your parallelization by setting KPAR and NBANDS. Check the VASP manual.


Back to Núria López and Group / Scripts_for_VASP.

Additional parameters

Files to write

There are several flags to state what files to be written.

 FLAG      FILE          DEFAULT
 LWAVE  => WAVECAR       .TRUE.  [15]
 LCHARG => CHG / CHGCAR  .TRUE.  [16] [17]
 LVTOT  => LOCPOT        .FALSE. [18]  
 LELF   => ELFCAR        .FALSE. [19]  
 PARCHG => PARCHG        .FALSE. 
 LAECHG => Bader charges .FALSE. 
 LORBIT => PDOS/LDOS       0

Tip: Set "LWAVE = F" and "LCHARG = F" to avoid writing WAVECAR, CHG & CHGCAR files.

van der Waals contributions

Check here: VdW_forces



Back to Núria López and Group / Scripts_for_VASP.