IMAGES: Difference between revisions

From VASP Wiki
(Created page with "{{TAGDEF|IMAGES|[integer]|0}} Description: {{TAG|IMAGES}} defines how many instances of VASP are started. These instances execute VASP calculations in separate directories 01...")
 
m (NTEMPER=0 added)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{TAGDEF|IMAGES|[integer]|0}}
{{TAGDEF|IMAGES|[integer]|0}}


Description: {{TAG|IMAGES}} defines how many instances of VASP are started. These instances execute VASP calculations in separate directories 01, 02, 03, etc. This flag is used to support elastic band calculations, parallel tempering, thermodynamic integration as well as other scenaria where a simultaneous calculation of several VASP instances is required.
Description: Defines the number of VASP calculations in separate directories, (e.g., 01, 02, 03, etc.) for [[Nudged elastic bands|nudged elastic band]] calculations, [[LTEMPER|parallel tempering]], and [[VCAIMAGES|thermodynamic integration]].
----


----
{{TAG|IMAGES}} sets the number of independent VASP calculations in separate directories. The primary {{FILE|INCAR}} file should be located in the root directory.
VASP supports various modes where simultaneous calculations for different INCAR, KPOINTS, POTCAR, or POSCAR file are performed.  
Other files such as {{FILE|KPOINTS}}, {{FILE|POTCAR}}, and {{FILE|POSCAR}} can be placed in subdirectories, e.g., 01, 02, 03, etc., or in the root directory. Files in subdirectories take precedence over those in the root directory.
The elastic band method to calculate energy barriers, as well as parallel tempering are explained in this section.
 
See [[#Use cases|use cases]] described below.
== File handling ==
When VASP starts, it reads the file {{FILE|INCAR}} in the root directory.
Subsequently, VASP splits the MPI communicator into subgroups for each image.
If an {{FILE|INCAR}} file is present in the subdirectories 01, 02, 03, ..., VASP will process those afterward.
Otherwise, VASP continues reading from the root {{FILE|INCAR}} file.  
You can also provide image-specific data in the root {{FILE|INCAR}}  file if the files are very similar


Generally a primary  {{TAG|INCAR}} file must be located in the root directory. Most of the other files, including {{TAG|KPOINTS}}, {{TAG|POTCAR}}, {{TAG|POSCAR}} can either reside in the subdirectories (named 00, 01, 02...) or in the root directory.
  # general INCAR tags
The files in the subdirectories take precedence over those in the root directory (for details
  IMAGES = 4
see the paragraph "File handling" below). The tag
  TEBEG = 600
{{TAG|IMAGES}} = number of images
 
forces VASP to execute multiple instances, performing calculations in the subdirectors 01, 02, .., number of images.
  # INCAR tags only on IMAGE 1
The number of nodes must be dividable by the number of images (the tags {{TAG|NCORE}}, {{TAG|KPAR}} or {{TAG|NPAR}} can still be use and might even be different, if INCAR files are supplied in the subdirectories).
  IMAGE_1 {
VASP divides the nodes in groups, and each group then works on one ''image'' 01, 02, ... IMAGES.
    TEBEG = 400
For nudged elastic band calculations, it is usually sufficient to provide all input files in the root directory,
  }
except for the POSCAR files which need to be provided in the subdirectories.
 
The first group of nodes will then read the {{TAG|POSCAR}} file from  the directory 01, the second group from 02 etc.
  # INCAR tags only on IMAGE 2
In the elastic band method, the endpoints are kept fixed, and the position
  IMAGE_2 {
of the end points must be supplied in the files 00/POSCAR and XX/POSCAR, where  XX is
    TEBEG = 500
XX = number of images+1.
  }
(the directories 00 and XX are only required for elastic band calculations).


If the tag {{TAG| LTEMPER}}=.TRUE. is set in the {{TAG| INCAR}} file, VASP performs parallel tempering calculations. In this case, it is necessary to supply different {{TAG| INCAR}} and {{TAG| POSCAR}} files in each subdirectory. For each subdirectory a different simulation temperature should be supplied using the tags  {{TAG| TEBEG}} in the INCAR files of the subdirectories. For further details, we refer to the description of the tag {{TAG| LTEMPER}}.
Here, images 3 and 4 would use {{TAG|TEBEG}}=600 because the value is not specified for the image.
The files {{TAG|KPOINTS}} and {{TAG|POTCAR}} will be read from the subdirectory if available and from the root directory otherwise.
All output files ({{TAG|OUTCAR}}, {{TAG|WAVECAR}}, {{TAG|CHGCAR}} etc.) are all written to the subdirectories.
The {{TAG|POSCAR}} file and all other input files are always read from the subdirectories.
Since no nodes are executing for the positions supplied in the
All [[:Category:Output files|output files]] (including {{TAG|OUTCAR}} and {{TAG|OSZICAR}}) are always written to the subdirectories.
directories 00 and XX, no output files will be created in these sub directories.
Image 01 writes to the usual stdout file, located in the directory from which VASP is started,
the other images write to the files 02/stdout, 03/stdout etc.
In addition to the {{TAG|IMAGES}} tag, a spring constant can be
supplied in the {{TAG|SPRING}} tag. The default is
{{TAG|SPRING}}= -5
The '''nudged elastic band method'''<ref name="jons95"/><ref name="jons98"/> is applied
when {{TAG|SPRING}} is set to a negative value, e.g.
{{TAG|SPRING}}= -5. This is also the recommended setting.
Compared to the previous case, additional tangential springs
are introduced to keep the images equidistant
during the relaxation (remember the constraint is only
conserved to first order otherwise). Do not use too large values,
because this can slow down convergence. The default value
usually works reliably.


One problem of the nudged elastic band method is
To summarize, to run a calculation with {{TAG|IMAGES}}, you provide:
that the constraint (i.e movements only
in the hyper-plane perpendicular to the current tangent) is
non linear. Therefore, the CG algorithm usually fails
to converge, and  we recommended to use
the RMM-DIIS algorithm ({{TAG|IBRION}}=1) or the quick-min algorithm ({{TAG|IBRION}}=3).
Additionally,
the non-linear constraint (equidistant images) tends to be  violated
significantly during the first few steps (it is only enforced to first order).
If this problem is
encountered, a very low dimensionality parameter ({{TAG|IBRION}}=1, {{TAG|NFREE}}=2)
should be applied in the first few steps, or a steepest
descent minimization without line optimization ({{TAG|IBRION}}=3, {{TAG|SMASS}}=2).
should be used, to  pre-converge the images.


If all degrees of freedom are allowed to relax (isolated
* an {{FILE|INCAR}} file in the root directory
molecules, no surface, etc.), make sure that
* optionally an overwriting {{FILE|INCAR}} file in the subdirectories
the sum of all positions  is the same for each cell. In other words,
* {{FILE|POSCAR}} files in the subdirectories
* {{FILE|KPOINTS}} and {{FILE|POTCAR}} either in the root or in the subdirectories


<math> \sum_{i=1,N_{ions}} \vec R_i^{\alpha} </math>
== Use cases ==


must be equal for all images. Otherwise ''fake'' forces
; Nudged elastic bands
are introduced, and the images drift against
: If {{TAG|IMAGES}} is set without any other tag, an elastic-band calculation is performed. This defaults to the recommended nudged-elastic-band method, but other options are available by modifying the {{TAG|SPRING}} tag. Please consider the [[Nudged elastic bands|nudged-elastic-bands how-to]] and the {{TAG|SPRING}} tag for more information.
each other (this will not introduce problems
during the VASP calculations, but it is awkward to visualize
the final results).
Often an initial linearly interpolated  starting guess is
appropriate, this can e.g. be done with a small script called
interpolatePOS
The script also removes as an option the center-of-mass motion.


Finally, we strongly recommend to keep the number of images
; Thermodynamic coupling-constant integrations
to an absolute minimum. The fewer images are used, the faster
: When {{TAG|VCAIMAGES}} is set in the {{FILE|INCAR}} file, VASP computes a thermodynamic coupling-constant integration. This, in turn, sets {{TAG|IMAGES}}=2, running two VASP calculations in the subdirectories 01 and 02. Since this is a special case where the two calculations may have different computational costs, {{TAG|NCORE_IN_IMAGE1}} can be set to force an unequal split of the processes across the two images. The tag {{TAG|VCAIMAGES}} describes in more detail how to set up these calculations.
to convergence to the groundstate is. Often, it is
advisable to start with a single image between the two endpoints,
and to increase the number of images, once this first run has converged.


<!-- This should become a specialized form of the short description in the parallelization
; Parallel tempering/replica-exchange method and performing independent calculations
File handling: When VASP is started, it reads the file {{TAG|INCAR}} in the root directory.
: If the tag {{TAG|LTEMPER}}=.TRUE. is set in the {{FILE|INCAR}} file, VASP will perform parallel tempering calculations. In this case, it is necessary to provide different {{FILE|POSCAR}} files in each subdirectory and modify the {{TAG|TEBEG}} either by separate {{FILE|INCAR}} files or nested IMAGE_''X''/{{TAG|TEBEG}} definitions in the root {{FILE|INCAR}} file. For further details, refer to the description of the {{TAG|LTEMPER}} tag. The combination {{TAG|LTEMPER}}=.TRUE. and {{TAG|NTEMPER}}=0, also allows to run entirely independent calculations in the individual subdirectories. This might be helpful to make better use of nodes with many cores.
The following tags are also read from the root {{TAG|INCAR}} file:
{{TAG|NCORE_IN_IMAGES1}}, {{TAG|IMAGES}}, {{TAG|KIMAGES}}, {{TAG|FOURORBIT}}, {{TAG|KPAR}}, {{TAG|NCORE}},
{{TAG|NCORES_PER_BAND}}, {{TAG|NPAR}}, {{TAG|NCSHMEM}}. Subsequently, VASP
splits the MPI communicator into subgroups and continues reading from the {{TAG|INCAR}}
file in the subdirectories 01, 02, 03, ... If the INCAR files are not present in the subdirectories,  
VASP continues reading from the root INCAR file. The same logic is used from the files {{TAG|KPOINTS}} and {{TAG|POTCAR}}:
if they exist in the subdirectories, they will be read from the subdirectories; if they
are missing, the files are read from the root directory. The {{TAG|POSCAR}} file and all other input files
are always read from the subdirectories 01, 02, etc.. All output files (including {{TAG|OUTCAR}} and {{TAG|OSZICAR}})
are always written to the subdirectories.  
For the nudged elastic band method, it is recommended that all input files, except the {{TAG|POSCAR}}, {{TAG|WAVECAR}} and {{TAG|CHGCAR}} file, reside in the root directory.  
-->


== Related tags and articles ==
== Related tags and articles ==
{{TAG|SPRING}},
{{TAG|VCAIMAGES}},
{{TAG|NPAR}},
{{TAG|LTEMPER}},
{{TAG|IBRION}},
[[Nudged elastic bands|nudged-elastic-bands how-to]],
{{TAG|NFREE}},
{{TAG|SPRING}}
{{TAG|SMASS}},
{{TAG|VCAIMAGES}}


{{sc|IMAGES|Examples|Examples that use this tag}}
{{sc|IMAGES|Examples|Examples that use this tag}}


== References ==
<references>
<ref name="jons95">[http://dx.doi.org/10.1016/0039-6028(94)00731-4 G. Mills, H. Jonsson and G. K. Schenter, Surface Science, 324, 305 (1995).]</ref>
<ref name="jons98">H. Jonsson, G. Mills and K. W. Jacobsen,
''Nudged Elastic Band Method for Finding Minimum Energy Paths of Transitions'',
in ''Classical and Quantum Dynamics in Condensed Phase Simulations'',
ed. B. J. Berne, G. Ciccotti and D. F. Coker (World Scientific, 1998).</ref>
</references>
----
----


[[Category:INCAR tag]][[Category:Transition States]][[Category:Elastic band method]][[Category:Parallelization]]
[[Category:INCAR tag]][[Category:Transition states]][[Category:Parallelization]]

Latest revision as of 16:41, 12 March 2024

IMAGES = [integer]
Default: IMAGES = 0 

Description: Defines the number of VASP calculations in separate directories, (e.g., 01, 02, 03, etc.) for nudged elastic band calculations, parallel tempering, and thermodynamic integration.


IMAGES sets the number of independent VASP calculations in separate directories. The primary INCAR file should be located in the root directory. Other files such as KPOINTS, POTCAR, and POSCAR can be placed in subdirectories, e.g., 01, 02, 03, etc., or in the root directory. Files in subdirectories take precedence over those in the root directory.

See use cases described below.

File handling

When VASP starts, it reads the file INCAR in the root directory. Subsequently, VASP splits the MPI communicator into subgroups for each image. If an INCAR file is present in the subdirectories 01, 02, 03, ..., VASP will process those afterward. Otherwise, VASP continues reading from the root INCAR file. You can also provide image-specific data in the root INCAR file if the files are very similar

 # general INCAR tags
 IMAGES = 4
 TEBEG = 600
 
 # INCAR tags only on IMAGE 1
 IMAGE_1 {
   TEBEG = 400
 }
 
 # INCAR tags only on IMAGE 2
 IMAGE_2 {
   TEBEG = 500
 }

Here, images 3 and 4 would use TEBEG=600 because the value is not specified for the image. The files KPOINTS and POTCAR will be read from the subdirectory if available and from the root directory otherwise. The POSCAR file and all other input files are always read from the subdirectories. All output files (including OUTCAR and OSZICAR) are always written to the subdirectories.

To summarize, to run a calculation with IMAGES, you provide:

  • an INCAR file in the root directory
  • optionally an overwriting INCAR file in the subdirectories
  • POSCAR files in the subdirectories
  • KPOINTS and POTCAR either in the root or in the subdirectories

Use cases

Nudged elastic bands
If IMAGES is set without any other tag, an elastic-band calculation is performed. This defaults to the recommended nudged-elastic-band method, but other options are available by modifying the SPRING tag. Please consider the nudged-elastic-bands how-to and the SPRING tag for more information.
Thermodynamic coupling-constant integrations
When VCAIMAGES is set in the INCAR file, VASP computes a thermodynamic coupling-constant integration. This, in turn, sets IMAGES=2, running two VASP calculations in the subdirectories 01 and 02. Since this is a special case where the two calculations may have different computational costs, NCORE_IN_IMAGE1 can be set to force an unequal split of the processes across the two images. The tag VCAIMAGES describes in more detail how to set up these calculations.
Parallel tempering/replica-exchange method and performing independent calculations
If the tag LTEMPER=.TRUE. is set in the INCAR file, VASP will perform parallel tempering calculations. In this case, it is necessary to provide different POSCAR files in each subdirectory and modify the TEBEG either by separate INCAR files or nested IMAGE_X/TEBEG definitions in the root INCAR file. For further details, refer to the description of the LTEMPER tag. The combination LTEMPER=.TRUE. and NTEMPER=0, also allows to run entirely independent calculations in the individual subdirectories. This might be helpful to make better use of nodes with many cores.

Related tags and articles

VCAIMAGES, LTEMPER, nudged-elastic-bands how-to, SPRING

Examples that use this tag