HPC/Applications/vasp: Difference between revisions

From CNM Wiki
Jump to navigation Jump to search
 
(90 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Requesting Access ==
== Requesting Access ==
Both VASP-4 and VASP-5 major versions are available on Carbon, and require a license. VASP-5 is a separate license, which ''includes'' access to VASP-4 and potpaw_PBE potentials.
VASP versions 4, 5, and 6 are is available on Carbon, subject to confirmation for your group having a license for VASP major versions 4, 5, or 6.


You are welcome to use the Carbon binaries, but I ([[User:Stern|stern]]) need written or emailed confirmation of your license status.  Please kindly ask the vaspmaster to confirm to me that you hold or are covered by a license.  You may wish to use the following template.
To use VASP binaries on Carbon, send me (M. Sternberg), the following for the persons on your VASP license group who will be using VASP on Carbon:


  '''To:''' [mailto:vasp[email protected].at?subject=License%20confirmation&[email protected] vasp[email protected].at]
* For each person:
** Full name
** Email address that the person registered with at vasp.at
 
<!--
Please kindly ask the vaspmaster to confirm to me that you hold or are covered by a license.  You may wish to use the following template.
 
  '''To:''' [mailto:licensing@vasp.at?subject=License%20confirmation&[email protected] licensing@vasp.at]
  '''CC:''' [email protected]
  '''CC:''' [email protected]
  '''Subject:''' License confirmation
  '''Subject:''' License confirmation
 
  We are users of the Center for Nanoscale Materials at Argonne National Laboratory.
  We are users of the Center for Nanoscale Materials at Argonne National Laboratory.
  We would like to use the VASP installation at this site.
  We would like to use the VASP installation at this site.
   
   
  Please reply and confirm to Michael Sternberg <[email protected]> that we hold the license numbers
  Please confirm to Michael Sternberg <[email protected]> that the following people in my research group are eligible to use VASP:
VASP-4  …
VASP-5  …
with the following people in my research group:
   
   
- ...
- ...
   
   
  With best regards,
  With best regards,
 
  ...
-->


== Module considerations ==
== Module considerations ==
Line 29: Line 31:
** [[HPC/Software/Modules#vasp | vasp]], for VASP 4.x
** [[HPC/Software/Modules#vasp | vasp]], for VASP 4.x
** [[HPC/Software/Modules#vasp5 | vasp5]], for VASP 5.x
** [[HPC/Software/Modules#vasp5 | vasp5]], for VASP 5.x
** [[HPC/Software/Modules#vasp5 | vasp6]], for VASP 6.x
* Choose and [[HPC/Software/Module Setup#Shell Customizations|add '''one''' of the following lines to your ~/.bashrc]] file:
* Choose and [[HPC/Software/Module Setup#Shell Customizations|add '''one''' of the following lines to your ~/.bashrc]] file:
  module load vasp                # sets '''$VASP_HOME'''
  module load --auto vasp                # sets '''$VASP_HOME'''
<font color="grey"><strike>module load vasp-vtst          # sets '''$VASP_VTST_HOME'''</strike>  Obsolete; now included in vasp and vasp5</font>
<!-- <font color="grey"><strike>module load vasp-vtst          # sets '''$VASP_VTST_HOME'''</strike>  Obsolete; now included in vasp and vasp5</font> -->
  module load vasp5              # sets '''$VASP5_HOME'''
  module load --auto vasp5              # sets '''$VASP5_HOME'''
module load --auto vasp6              # sets '''$VASP6_HOME'''
: Each module points to an installation directory using an [[HPC/Software/Module Setup#Package home directories|environment variable corresponding to the module name]]. Do not hardcode the directory anywhere, as that location is determined by the module and may change in subsequent versions. There should not be a reason to do so, since <code>$PATH</code> will be managed appropriately.
: Each module points to an installation directory using an [[HPC/Software/Module Setup#Package home directories|environment variable corresponding to the module name]]. Do not hardcode the directory anywhere, as that location is determined by the module and may change in subsequent versions. There should not be a reason to do so, since <code>$PATH</code> will be managed appropriately.


* Each module provides several binaries (see [[#Available Binaries|next section]]).
* Each module provides several binaries (see [[#Binaries|next section]]).
* You do not need to specify a path for vasp for the mpirun statement in the PBS job script.
* You do not need to specify a path for vasp for the mpirun statement in the PBS job script.
* The modules are mutually exclusive.
* The modules are mutually exclusive.
* Potentials are available in <code>/opt/soft/vasp-pot</code>.
* Potentials are available in <code>/opt/soft/vasp-pot</code>.


In addition to VASP, there is an [[HPC/Software/Modules#vasp-vtstscripts|additional module with Graeme Henkelman's script suite]], which you can use with any of the above-mentioned vasp flavors:
To access Graeme Henkelman's script suite, load the [[HPC/Software/Modules#vasp-vtstscripts|vasp-vtstscripts module]]. It works with both the vasp and vasp5 modules above. In either case, choose one of the VTST-patched binaries from the table below. The unpatched vasp binaries will not interoperate with the script suite.


  module load vasp-vtstscripts
  module load vasp-vtstscripts


== Available Binaries ==
== Binaries ==
Some options for VASP cannot be configured at runtime (by input data) but must be chosen when compiling.
Some options for VASP cannot be configured at runtime (by input data) but must be chosen when compiling.
Since no single set of compile-time choices is appropriate for all uses, a number of binaries are provided, distinguished by their name.
Since no single set of compile-time choices is appropriate for all uses, a number of binaries are provided, distinguished by their name.
Line 57: Line 61:


To verify the binaries available for a module, run the appropriate command, once the module has been loaded:
To verify the binaries available for a module, run the appropriate command, once the module has been loaded:
  ls $VASP_HOME/bin
  ls $VASP_HOME/bin   # for VASP-4 (previous major version)
  ls $VASP5_HOME/bin
  ls $VASP5_HOME/bin


Line 63: Line 67:
There is no need for full path names.
There is no need for full path names.
Copy a sample job script from:
Copy a sample job script from:
  $VASP_HOME/vasp.job
  $VASP_HOME/vasp.job   # for VASP-4 (previous major version)
  $VASP5_HOME/vasp.job
  $VASP5_HOME/vasp.job


=== Available binaries and their flags ===
=== Available binaries and their compile-time flags used ===
<!--
<!--
sed -n '/DMPI_BLOCK/s/.*"//p' embody-5.2.12a-mkl-4/build.log  | uniq
sed -n '/DMPI_BLOCK/s/.*"//p' embody-5.2.12a-mkl-4/build.log  | uniq
Line 74: Line 78:
* combinations of preprocessor flags, and
* combinations of preprocessor flags, and
* variants of the source code, primarily enhancing capabilities of ionic updates.
* variants of the source code, primarily enhancing capabilities of ionic updates.


{| class="wikitable" cellpadding="5" style="text-align:left; font-family: monospace;"
{| class="wikitable" cellpadding="5" style="text-align:left; font-family: monospace;"
<!---------- HEADER ---------->
|- style="background:#e4e4e4; text-align:center; font-weight: bold; font-family: sans-serif;"
|- style="background:#e4e4e4; text-align:center; font-weight: bold; font-family: sans-serif;"
| rowspan="2" | MD capabilities
| rowspan="2" | Versions and capabilities
| rowspan="2" | Flags used
| rowspan="2" | Flags used
| colspan="3" align="center" | Binary name
| colspan="4" align="center" | Binary names
|- style="background:#e4e4e4; text-align:center; font-weight: bold; font-family: sans-serif;"
|- style="background:#e4e4e4; text-align:center; vertical-align:top; font-weight: bold; font-family: sans-serif;"
| Official source
| Official
| [http://theory.cm.utexas.edu/vtsttools/downloads/ Patched for VTST]
| Constrained Cell relaxation<sup>1</sup>
| [http://theory.cm.utexas.edu/vtsttools/dos/ Patched for Bader-projected DOS]<br>(in development)
| Patched for VTST<sup>2</sup>
| Patched for Bader-projected DOS<sup>3</sup>
|-
! colspan="6" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" |
|-
|-
! rowspan="4" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" | Conventional
<!---------- 4.x AND EARLY 5.x ---------->
! rowspan="4" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" | Conventional,<br>Versions 4.x–5.3
| style="background:#e4e4e4;" | (none)
| style="background:#e4e4e4;" | (none)
| style="background:none;" | '''vasp'''
| style="background:none;" | '''vasp'''
| style="background:#eed;" | '''vasp-cellz'''
| style="background:#ded;" | '''vasp-vtst'''
| style="background:#ded;" | '''vasp-vtst'''
| style="background:#fee;" | '''vasp-baderdos'''
| style="background:#fee;" | '''vasp-baderdos'''
Line 94: Line 103:
| style="background:#e4e4e4;" | -DNGZhalf
| style="background:#e4e4e4;" | -DNGZhalf
| style="background:none;" | '''vasp-chargehalf'''
| style="background:none;" | '''vasp-chargehalf'''
| style="background:#eed;" | '''vasp-cellz-chargehalf'''
| style="background:#ded;" | '''vasp-vtst-chargehalf'''
| style="background:#ded;" | '''vasp-vtst-chargehalf'''
| style="background:#fee;" | '''vasp-baderdos-chargehalf'''
| style="background:#fee;" | '''vasp-baderdos-chargehalf'''
Line 99: Line 109:
| style="background:#e4e4e4;" | -DwNGZhalf
| style="background:#e4e4e4;" | -DwNGZhalf
| style="background:none;" | '''vasp-gamma'''
| style="background:none;" | '''vasp-gamma'''
| style="background:#eed;" | '''vasp-cellz-gamma'''
| style="background:#ded;" | '''vasp-vtst-gamma'''
| style="background:#ded;" | '''vasp-vtst-gamma'''
| style="background:#fee;" | '''vasp-baderdos-gamma'''
| style="background:#fee;" | '''vasp-baderdos-gamma'''
Line 104: Line 115:
| style="background:#e4e4e4;" | -DwNGZhalf -DNGZhalf
| style="background:#e4e4e4;" | -DwNGZhalf -DNGZhalf
| style="background:none;" | '''vasp-gamma-chargehalf'''
| style="background:none;" | '''vasp-gamma-chargehalf'''
| style="background:#eed;" | '''vasp-cellz-gamma-chargehalf'''
| style="background:#ded;" | '''vasp-vtst-gamma-chargehalf'''
| style="background:#ded;" | '''vasp-vtst-gamma-chargehalf'''
| style="background:#fee;" | '''vasp-baderdos-gamma-chargehalf'''
| style="background:#fee;" | '''vasp-baderdos-gamma-chargehalf'''
|-
|-
! rowspan="4" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" | [http://cms.mpi.univie.ac.at/vasp/vasp/Advanced_MD_techniques.html Advanced<br>MD techniques] (vasp5 only)
! rowspan="4" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" | Advanced<br>MD techniques,<sup>4</sup><br>Versions 5.2 and 5.3
| style="background:#e4e4e4;" | -Dtbdyn
| style="background:#e4e4e4;" | -Dtbdyn
| style="background:#ddf;" | '''vasp-tbdyn'''
| style="background:#ddf;" | '''vasp-tbdyn'''
| rowspan="4" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" | not useful
| rowspan="4" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" |
| rowspan="4" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" | –
| rowspan="4" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" | not useful
| rowspan="4" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" | not useful
|-
|-
Line 121: Line 134:
| style="background:#e4e4e4;" | -Dtbdyn -DwNGZhalf -DNGZhalf
| style="background:#e4e4e4;" | -Dtbdyn -DwNGZhalf -DNGZhalf
| style="background:#ddf;" | '''vasp-tbdyn-gamma-chargehalf'''
| style="background:#ddf;" | '''vasp-tbdyn-gamma-chargehalf'''
<!---------- VERSION 5.4 ---------->
|-
! colspan="6" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" |
|-
! rowspan="5" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" | Version 5.4<sup>4,5</sup>
| style="background:#e4e4e4;" | -Dtbdyn
| style="background:#f0f0f0;" | '''vasp_ncl'''
| rowspan="5" style="background:#eed; text-align:center; font-family: sans-serif; " | (–o–)<sup>5</sup>
| style="background:#ded;" | '''vasp_vtst_ncl'''
| rowspan="5" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" | TBD
|-
| style="background:#e4e4e4;" | -Dtbdyn -DNGZhalf
| style="background:none;" | '''vasp_std'''
| style="background:#ded;" | '''vasp_vtst_std'''
|-
| style="background:#e4e4e4;" | -Dtbdyn -DwNGZhalf -DNGZhalf
| style="background:none;" | '''vasp_gam'''
| style="background:#ded;" | '''vasp_vtst_gam'''
|-
| style="background:#e4e4e4;" | (GPU<sup>6</sup>)
| style="background:none;" | '''vasp_<font color="purple">gpu</font>_ncl'''
| style="background:#ded;" | '''vasp_vtst_<font color="purple">gpu</font>_ncl'''
|-
| style="background:#e4e4e4;" | (GPU<sup>6</sup>) -DNGZhalf
| style="background:none;" | '''vasp_<font color="purple">gpu</font>'''
| style="background:#ded;" | '''vasp_vtst_<font color="purple">gpu</font>'''
<!---------- VERSION 6 ---------->
|-
! colspan="6" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" |
|-
! rowspan="4" style="background:#e4e4e4; text-align:center; font-family: sans-serif;" | Version 6 (prelim.)
| style="background:#e4e4e4;" |
| style="background:#f0f0f0;" | '''vasp_ncl'''
| rowspan="3" style="background:#eed; text-align:center; font-family: sans-serif; " | (–o–)<sup>5</sup>
| style="background:#ded;" | '''vasp_vtst_ncl'''
| rowspan="4" style="background:#f0f0f0; text-align:center; font-style:oblique; font-family: sans-serif;" | TBD
|-
| style="background:#e4e4e4;" |
| style="background:none;" | '''vasp_std'''
| style="background:#ded;" | '''vasp_vtst_std'''
|-
| style="background:#e4e4e4;" |
| style="background:none;" | '''vasp_gam'''
| style="background:#ded;" | '''vasp_vtst_gam'''
|}
|}


=== Explanantion of flags ===
<sup>1</sup>) Stress tensor selectively zeroed in subroutine <code>CONSTR_CELL_RELAX</code><br>
From file <code>vasp.5.2/makefile.linux_pg</code> in the souce code.
<sup>2</sup>) http://theory.cm.utexas.edu/vtsttools/ . The dimer method was broken for vasp5/5.3.3 prior to 5.3.3p3-mkl-2.<!-- The [http://theory.cm.utexas.edu/forum/viewtopic.php?f=2&t=1285 ''dimer method is broken'' in vasp5/5.3.3p1-mkl-1.] To run the dimer method at the moment, load the module version vasp5/5.3.2.--><br>
<sup>3</sup>) http://theory.cm.utexas.edu/vtsttools/dos/ (now defunct)<br>
<sup>4</sup>) http://cms.mpi.univie.ac.at/vasp/vasp/Advanced_MD_techniques.html <br>
<sup>5</sup>) [[#Constrained Cell Relaxation|Axis-selective constrained cell relaxation]], controlled via an optional input file <code>CELL_RELAX</code>, is compiled into ''all'' binaries.<br>
<sup>6</sup>) http://cms.mpi.univie.ac.at/wiki/index.php/GPU_port_of_VASP<br>
 
=== Explanation of flags ===
* File <code>vasp.5.2/makefile.linux_pg</code> in the souce code explains:
<pre>
<pre>
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
Line 145: Line 209:
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
</pre>
</pre>
* In the new build system (since version 5.4) the direct use of the <code>-D*NG*half</code> options has been replaced by predefined make(1) arguments <code>VERSION={std,gam,ncl}</code>.


=== Common flags ===
=== Common flags ===
  -DIFC -DRPROMU_DGEMV  -DRACCMU_DGEMV -DCACHE_SIZE=16000  -DMPI -DMPI_BLOCK=8000
  -DIFC -DRPROMU_DGEMV  -DRACCMU_DGEMV -DCACHE_SIZE=16000  -DMPI -DMPI_BLOCK=8000


== vdW-DF functional ==
== General patches ==
All binaries of the vasp5 module support the use of the [http://cms.mpi.univie.ac.at/vasp/vasp/vdW_DF_functional_Langreth_Lundqvist_et_al.html vdW-DF functional of Langreth and Lundqvist et al.]
 
The following modifications have been applied and are active in ''all binaries'':
 
=== vdW-DF functional ===
The [http://cms.mpi.univie.ac.at/vasp/vasp/vdW_DF_functional_Langreth_Lundqvist_et_al.html vdW-DF functional of Langreth and Lundqvist et al.]
is implemented in all the <code>*-chargehalf</code> binaries of the vasp5 module, and all versions above 5.4.
 
No specific preparations are needed other than setting the INCAR flags as documented. The binaries will find the required precalculated kernel  file <code>vdw_kernel.bindat</code> by means of the environment variable <code>$VASP5_HOME</code> which is set by the module.
 
This is a Carbon-specific extension.
 
=== Solvation Model ===
All binaries above build 5.4.1.3-8-* contain the [http://vaspsol.mse.ufl.edu VASPsol] solvation model of the Hennig group at Univ. of Florida..
 
=== Constrained Cell Relaxation ===
Likewise, in all binaries above build 5.4.1.3-8-* the relaxation of the unit cell may be constrained
along one or more axes by creating a supplementary input file <code>CELL_RELAX</code>.
The subroutine <code>CONSTR_CELL_RELAX</code>,
having been a placeholder in the original source files,
was extended to read (and re-read) this file in each call and apply the containts
to the force components of each basis vector.
The performance impact from the multiple reads is expected to be minimal.
 
This is a Carbon-specific extension.
 
; File format:
  cell relaxation    - fixed string, for validation only, leading spaces ignored.
  ix iy iz            - 3 integer flags, indicating which cartesian components of the
                        basis vectors are allowed to be changed; 0 means no (fixed),
                        non-zero means yes (can change).
; Examples:
* To relax the entire cell (identical to default behavior):
  cell relaxation
  1 1 1
* To relax along z only:
  cell relaxation
  0 0 1
; Output indicator:
To indicate if your chosen VASP binary (a) looked for and (b) did or did not find the <code>CELL_RELAX</code> file, the subroutine <code>CONSTR_CELL_RELAX</code> will output one of the following each time it has been called:
CELL_RELAX not present: performing unconstrained unit cell relaxation
: or:
CELL_RELAX: performing constrained unit cell relaxation in cartesian directions  1  0  1
Unit cell forces:
      1.1111111111111112      0.0000000000000000      2.2222222222222223
      0.0000000000000000      0.0000000000000000      0.0000000000000000
      2.2222222222222223      0.0000000000000000      3.3333333333333330
: (The force values shown here are contrived.)
; Author: Michael Sternberg.
 
== Usage under ASE ==
VASP calculations can be set up, run, and analyzed using the [https://wiki.fysik.dtu.dk/ase/ase/calculators/vasp.html calculator interface] of the [https://wiki.fysik.dtu.dk/ase/overview.html ASE] package, available on Carbon under both the [[../#ase3 | ase3]] and [[../#atk | atk]] modules.
ASE is told how to use VASP by means of environment variables which the modules define for you with sensible defaults:
VASP_PP_PATH
VASP_COMMAND
* The calculator will create and possibly overwrite VASP input files in the current directory, and then run VASP therein. To minimize clutter, consider setting up and changing into a run-specific directory before initializing the calculator.
* <code>VASP_COMMAND</code> normally uses the <code>vasp</code> binary ([[#Binaries|see above]]), and will run in parallel when called under a PBS job. That decision is based on the <code>PBS_NODEFILE</code> environment variable being present.
* You can supply another executable name or path in the variable <code>VASP_BINARY</code>. <!-- If you have experience with shell variables; after loading the ase3 or atk module or just prior to deploying the calculator in an ASE script. -->
* The ASE calculator supports an alternative calling interface, a python script named in <code>VASP_SCRIPT</code>. This variable is not set by default on Carbon. If you wish to define a personal <code>VASP_SCRIPT</code>, unset <code>VASP_COMMAND</code> in tandem.
** <code>VASP_COMMAND</code> takes precendence over <code>VASP_SCRIPT</code>.
** The stdout stream is redirected to a file under <code>VASP_COMMAND</code>, but will appear on ASE's stdout under <code>VASP_SCRIPT</code>.
** Inspect the [https://trac.fysik.dtu.dk/projects/ase/browser/trunk/ase/calculators/vasp.py#L519 calculator source code] for details; see function <code>run(self)</code>.


No specific preparations are needed other than setting the INCAR flags as documented. The binaries will find the required precalculated kernel  file <code>vdw_kernel.bindat</code> by means of the environment variable <code>$VASP5_HOME</code> which is set by the module. This is a Carbon-specific extension.
== Usage under ATK/VNL ==
The [http://quantumwise.com/documents/manuals/latest/ReferenceManual ATK] package ([[../#atk|module atk]]) supports two different ways to interface with VASP.
# The [http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/chap.python.html#sect1.appendix.nlpackages ase calculator interface] – see [[#Usage under ASE|previous section]].
# The [http://quantumwise.com/documents/tutorials/latest/VASPScripter VASPScripter] AddOn.
#* The scripter "merely" helps you to set up the VASP input files in VNL, the ATK GUI. It does not start or analyze a VASP run.
#* The directory for pseudopotentials is preconfigured to be the same as <code>$VASP_PP_PATH</code> for the ASE calculator.


<!--
== Node resources for VASP ==
== Node resources for VASP ==
Consider the follwing to specify PBS node resources (in job files and on the qsub command line).
Consider the follwing to specify PBS node resources (in job files and on the qsub command line).
Line 160: Line 291:
* When on gen1 nodes use ppn=4 and disallow sharing
* When on gen1 nodes use ppn=4 and disallow sharing
  #PBS -l nodes=1:ppn=4:gen1
  #PBS -l nodes=1:ppn=4:gen1
  #PBS -l naccesspolicy=SINGLEJOB
  #PBS -l naccesspolicy=SINGLEJOB -n
* When on gen2, use ppn=7 or 8
* When on gen2, use ppn=7 or 8
  #PBS -l nodes=1:ppn=8:gen2
  #PBS -l nodes=1:ppn=8:gen2
Line 168: Line 299:
  #PBS -l nodes=__:ppn=__:gen2
  #PBS -l nodes=__:ppn=__:gen2


* [[HPC/Benchmarks/Generation 1 vs 2|Benchmarks – Generation 1 vs 2]]
-->
=== See also ===
=== See also ===
* [[HPC/Benchmarks/Generation 1 vs 2|Benchmarks – Generation 1 vs 2]]
* [[HPC/Submitting and Managing Jobs/Advanced node selection|Advanced node selection]]
* [[HPC/Submitting and Managing Jobs/Advanced node selection|Advanced node selection]]

Latest revision as of 16:26, March 31, 2023

Requesting Access

VASP versions 4, 5, and 6 are is available on Carbon, subject to confirmation for your group having a license for VASP major versions 4, 5, or 6.

To use VASP binaries on Carbon, send me (M. Sternberg), the following for the persons on your VASP license group who will be using VASP on Carbon:

  • For each person:
    • Full name
    • Email address that the person registered with at vasp.at


Module considerations

module load --auto vasp                # sets $VASP_HOME
module load --auto vasp5               # sets $VASP5_HOME
module load --auto vasp6               # sets $VASP6_HOME
Each module points to an installation directory using an environment variable corresponding to the module name. Do not hardcode the directory anywhere, as that location is determined by the module and may change in subsequent versions. There should not be a reason to do so, since $PATH will be managed appropriately.
  • Each module provides several binaries (see next section).
  • You do not need to specify a path for vasp for the mpirun statement in the PBS job script.
  • The modules are mutually exclusive.
  • Potentials are available in /opt/soft/vasp-pot.

To access Graeme Henkelman's script suite, load the vasp-vtstscripts module. It works with both the vasp and vasp5 modules above. In either case, choose one of the VTST-patched binaries from the table below. The unpatched vasp binaries will not interoperate with the script suite.

module load vasp-vtstscripts

Binaries

Some options for VASP cannot be configured at runtime (by input data) but must be chosen when compiling. Since no single set of compile-time choices is appropriate for all uses, a number of binaries are provided, distinguished by their name.

The modules from versions vasp/4.6.35-mkl-13 and vasp5/5.2.12a-mkl-4 onwards, respectively, contain several binaries built using different sets of preprocessor flags in the Makefile. Earlier modules only contain two binaries, vasp and vasp-gamma. Additional binaries are provided for useful preprocessor flag combinations after applying patches from the group of Graeme Henkelman (UT Austin) to the source code:

To verify the binaries available for a module, run the appropriate command, once the module has been loaded:

ls $VASP_HOME/bin   # for VASP-4 (previous major version)
ls $VASP5_HOME/bin

Choose a binary appropriate for your task and pass its name to mpirun in the job script. There is no need for full path names. Copy a sample job script from:

$VASP_HOME/vasp.job   # for VASP-4 (previous major version)
$VASP5_HOME/vasp.job

Available binaries and their compile-time flags used

This table lists the names of the binaries compiled from

  • combinations of preprocessor flags, and
  • variants of the source code, primarily enhancing capabilities of ionic updates.
Versions and capabilities Flags used Binary names
Official Constrained Cell relaxation1 Patched for VTST2 Patched for Bader-projected DOS3
Conventional,
Versions 4.x–5.3
(none) vasp vasp-cellz vasp-vtst vasp-baderdos
-DNGZhalf vasp-chargehalf vasp-cellz-chargehalf vasp-vtst-chargehalf vasp-baderdos-chargehalf
-DwNGZhalf vasp-gamma vasp-cellz-gamma vasp-vtst-gamma vasp-baderdos-gamma
-DwNGZhalf -DNGZhalf vasp-gamma-chargehalf vasp-cellz-gamma-chargehalf vasp-vtst-gamma-chargehalf vasp-baderdos-gamma-chargehalf
Advanced
MD techniques,4
Versions 5.2 and 5.3
-Dtbdyn vasp-tbdyn not useful
-Dtbdyn -DNGZhalf vasp-tbdyn-chargehalf
-Dtbdyn -DwNGZhalf vasp-tbdyn-gamma
-Dtbdyn -DwNGZhalf -DNGZhalf vasp-tbdyn-gamma-chargehalf
Version 5.44,5 -Dtbdyn vasp_ncl (–o–)5 vasp_vtst_ncl TBD
-Dtbdyn -DNGZhalf vasp_std vasp_vtst_std
-Dtbdyn -DwNGZhalf -DNGZhalf vasp_gam vasp_vtst_gam
(GPU6) vasp_gpu_ncl vasp_vtst_gpu_ncl
(GPU6) -DNGZhalf vasp_gpu vasp_vtst_gpu
Version 6 (prelim.) vasp_ncl (–o–)5 vasp_vtst_ncl TBD
vasp_std vasp_vtst_std
vasp_gam vasp_vtst_gam

1) Stress tensor selectively zeroed in subroutine CONSTR_CELL_RELAX
2) http://theory.cm.utexas.edu/vtsttools/ . The dimer method was broken for vasp5/5.3.3 prior to 5.3.3p3-mkl-2.
3) http://theory.cm.utexas.edu/vtsttools/dos/ (now defunct)
4) http://cms.mpi.univie.ac.at/vasp/vasp/Advanced_MD_techniques.html
5) Axis-selective constrained cell relaxation, controlled via an optional input file CELL_RELAX, is compiled into all binaries.
6) http://cms.mpi.univie.ac.at/wiki/index.php/GPU_port_of_VASP

Explanation of flags

  • File vasp.5.2/makefile.linux_pg in the souce code explains:
#-----------------------------------------------------------------------
# possible options for CPP:
# NGXhalf             charge density   reduced in X direction
# wNGXhalf            gamma point only reduced in X direction
# avoidalloc          avoid ALLOCATE if possible
# IFC                 work around some IFC bugs
# CACHE_SIZE          1000 for PII,PIII, 5000 for Athlon, 8000 P4
# RPROMU_DGEMV        use DGEMV instead of DGEMM in RPRO (usually  faster)
# RACCMU_DGEMV        use DGEMV instead of DGEMM in RACC (faster on P4)
#  **** definitely use -DRACCMU_DGEMV if you use the mkl library
#-----------------------------------------------------------------------
…
#-----------------------------------------------------------------------
# additional options for CPP in parallel version (see also above):
# NGZhalf               charge density   reduced in Z direction
# wNGZhalf              gamma point only reduced in Z direction
# scaLAPACK             use scaLAPACK (usually slower on 100 Mbit Net)
#-----------------------------------------------------------------------
  • In the new build system (since version 5.4) the direct use of the -D*NG*half options has been replaced by predefined make(1) arguments VERSION={std,gam,ncl}.

Common flags

-DIFC -DRPROMU_DGEMV  -DRACCMU_DGEMV -DCACHE_SIZE=16000  -DMPI -DMPI_BLOCK=8000

General patches

The following modifications have been applied and are active in all binaries:

vdW-DF functional

The vdW-DF functional of Langreth and Lundqvist et al. is implemented in all the *-chargehalf binaries of the vasp5 module, and all versions above 5.4.

No specific preparations are needed other than setting the INCAR flags as documented. The binaries will find the required precalculated kernel file vdw_kernel.bindat by means of the environment variable $VASP5_HOME which is set by the module.

This is a Carbon-specific extension.

Solvation Model

All binaries above build 5.4.1.3-8-* contain the VASPsol solvation model of the Hennig group at Univ. of Florida..

Constrained Cell Relaxation

Likewise, in all binaries above build 5.4.1.3-8-* the relaxation of the unit cell may be constrained along one or more axes by creating a supplementary input file CELL_RELAX. The subroutine CONSTR_CELL_RELAX, having been a placeholder in the original source files, was extended to read (and re-read) this file in each call and apply the containts to the force components of each basis vector. The performance impact from the multiple reads is expected to be minimal.

This is a Carbon-specific extension.

File format
  cell relaxation     - fixed string, for validation only, leading spaces ignored.
  ix iy iz            - 3 integer flags, indicating which cartesian components of the
                        basis vectors are allowed to be changed; 0 means no (fixed),
                        non-zero means yes (can change).
Examples
  • To relax the entire cell (identical to default behavior):
  cell relaxation
  1 1 1
  • To relax along z only:
  cell relaxation
  0 0 1
Output indicator

To indicate if your chosen VASP binary (a) looked for and (b) did or did not find the CELL_RELAX file, the subroutine CONSTR_CELL_RELAX will output one of the following each time it has been called:

CELL_RELAX not present: performing unconstrained unit cell relaxation
or:
CELL_RELAX: performing constrained unit cell relaxation in cartesian directions  1  0  1
Unit cell forces:
      1.1111111111111112       0.0000000000000000       2.2222222222222223
      0.0000000000000000       0.0000000000000000       0.0000000000000000
      2.2222222222222223       0.0000000000000000       3.3333333333333330
(The force values shown here are contrived.)
Author
Michael Sternberg.

Usage under ASE

VASP calculations can be set up, run, and analyzed using the calculator interface of the ASE package, available on Carbon under both the ase3 and atk modules. ASE is told how to use VASP by means of environment variables which the modules define for you with sensible defaults:

VASP_PP_PATH
VASP_COMMAND
  • The calculator will create and possibly overwrite VASP input files in the current directory, and then run VASP therein. To minimize clutter, consider setting up and changing into a run-specific directory before initializing the calculator.
  • VASP_COMMAND normally uses the vasp binary (see above), and will run in parallel when called under a PBS job. That decision is based on the PBS_NODEFILE environment variable being present.
  • You can supply another executable name or path in the variable VASP_BINARY.
  • The ASE calculator supports an alternative calling interface, a python script named in VASP_SCRIPT. This variable is not set by default on Carbon. If you wish to define a personal VASP_SCRIPT, unset VASP_COMMAND in tandem.
    • VASP_COMMAND takes precendence over VASP_SCRIPT.
    • The stdout stream is redirected to a file under VASP_COMMAND, but will appear on ASE's stdout under VASP_SCRIPT.
    • Inspect the calculator source code for details; see function run(self).

Usage under ATK/VNL

The ATK package (module atk) supports two different ways to interface with VASP.

  1. The ase calculator interface – see previous section.
  2. The VASPScripter AddOn.
    • The scripter "merely" helps you to set up the VASP input files in VNL, the ATK GUI. It does not start or analyze a VASP run.
    • The directory for pseudopotentials is preconfigured to be the same as $VASP_PP_PATH for the ASE calculator.

See also