VASP via AMS¶
VASP support in the Amsterdam Modeling Suite¶
With AMS2019.3, the graphical user interface supports setting up, running and visualizing some results from calculations run using the Vienna Ab initio Simulation Package, VASP, version 5.X. VASP itself is not included in the Amsterdam Modeling Suite, but needs to be obtained and installed separately. As the VASP code has not been developed by SCM, we cannot give support for VASP issues other than use via our GUI or PLAMS.
This feature is currently under active development, and should be considered experimental. We encourage users to report any problems they encounter, and to inform us about what type of features they would like to see added.
VASP as an external engine¶
The GUI supports setting up calculations with VASP as an external engine to the AMS driver, hence “VASP via AMS”. This means that the AMS driver handles all changes to the system’s geometry during for example a geometry optimization, NEB calculation, or molecular dynamics simulation. The energy and forces at each step are calculated by a single point VASP calculation. Efficient use of restart files minimize the resulting overhead.
VASP can also natively perform geometry optimizations, NEB calculations, and molecular dynamics simulations, but the VASP-via-AMS feature only supports those types of calculations via the AMS driver.
AMS driver tasks that change the number of atoms from one step to the next, for example Grand-Canonical Monte Carlo, Molecule Gun, or the numerical calculation of phonons (via a supercell), are currently not supported by the VASP-via-AMS interface.
Setting up a VASP calculation¶
VASP executable and number of processes (parallelization)¶
There needs to be a working VASP installation on the machine where the calculation is run.
Specify the exact command you would like to execute to run VASP as the Command to execute VASP
on the main VASP page in AMSinput. For example, set it to
mpirun -np 16 vasp, if you use mpirun to launch VASP and would like to
parallelize over 16 processes.
The environment variable NSCM must be set to
1. This is automatically done by AMSinput.
Pseudopotentials and PAW potentials (POTCAR)¶
VASP requires that pseudopotentials or PAW potentials be used for each element. Such potentials are distributed with VASP in files called POTCAR or POTCAR.Z. For example, the following files might exist for PAW potentials intended for use with the PBE density functional:
/some/path/PBE_PAW/H/POTCAR /some/path/PBE_PAW/O/POTCAR /some/path/PBE_PAW/O_h/POTCAR /some/path/PBE_PAW/O_s/POTCAR
In this case,
/some/path/PBE_PAW would be a POTCAR Library, that can be
entered on the main VASP in AMSinput. That would by default use
for H and O, respectively. To specify other POTCAR files, for example the
harder (O_h) or softer (O_s) PAW potentials for O, select those files on the
Details → Pseudopotentials page.
If you set a POTCAR library, it will be remembered for the next time you launch AMSinput.
Note: The POTCAR library is a path on the machine running AMSinput, which need not be the same machine as where the calculation is eventually run.
Tip: If as an example you frequently use the
O_h/POTCAR file for O atoms, consider
creating a custom POTCAR library where this file is instead moved to
so that it is automatically selected if you specify the custom POTCAR library.
k-point sampling (KPOINTS)¶
You can specify the grid sizes for Monkhorst-Pack or Gamma-centered k-point grids, together with fractional k-point coordinate displacements, on the main page in AMSinput. If you would like to use a custom KPOINTS file (to be read by VASP), select your file under Details → Expert VASP → KPOINTS File. That file will override any other specified k-point settings.
Currently, to specify a path through the Brillouin zone for band structure calculations, or to use some manually specified set of k-points, you must generate such a KPOINTS file yourself.
Other settings (INCAR)¶
Many calculation settings can be set using the GUI, for example,
- The planewave energy cutoff (main panel)
- The exchange-correlation functional (main panel)
- Fractional occupation scheme (smearing) (main panel)
- van der Waals corrections (Model → Van der Waals correction)
- Hubbard U parameters for different elements (Model → Hubbard U)
- WAVECAR or CHGCAR files for restarting or initializing a calculation (Details → Expert VASP)
Moreover, you can set arbitrary settings as “Additional INCAR options” on the Details → Expert VASP page. In case of any conflict between these and other INCAR-related settings set in the GUI, the “Additional INCAR options” take precedence.
You can also use your own INCAR file (Details → Expert VASP). That will ignore all INCAR-related settings in the GUI.
Note: the INCAR tags NSW, IBRION, ISIF, and LWAVE are automatically set by the AMS driver before VASP is executed.
Running VASP via AMS¶
Running VASP with AMSjobs¶
You can run a VASP-via-AMS job just like any other job using AMSjobs. If a geometry optimization, molecular dynamics simulation, or NEB calculation was performed, you can visualize the results in AMSmovie.
Note that the AMS driver enforces that LWAVE be set to .TRUE., thus leaving the WAVECAR file on disk. This file can become rather large, so if you do not need it for post-analysis, or for initializing another calculation, you could consider removing this file after the calculation has completely finished.
Preprocessing the input¶
You can also choose to only do the necessary preprocessing of a job before VASP
is executed, by selecting “Only preprocess” on the Details → Expert VASP page.
By running such a job, the INCAR, POSCAR, POTCAR, KPOINTS, and any other
auxiliary input files will be left on disk in the folder
jobname.results/external, but VASP will not be executed. It may be useful
to manually inspect the contents of these files, to see exactly what the input
to VASP is. For the preprocessing step, no working installation of VASP is needed.
VASP via AMS without the GUI¶
This section describes how to set up a VASP-via-AMS calculation without the GUI. Please note that the keyword names, and the syntax for setting up a VASP-via-AMS calculation, may change in future versions of the Amsterdam Modeling Suite. For this reason, we recommend setting up the calculation via the GUI.
Before ams is executed, the pertinent POTCAR (as read by VASP) must be created in $AMS_RESULTSDIR.
VASP runs as an external engine to the AMS driver. The engine block to the AMS input file should read:
Engine External InputDefinition $AMSBIN/input_def/vasp.json Execute "$AMSBIN"/amspython "$AMSHOME"/scripting/standalone/external_engines/vasp.py Input ... EndInput EndEngine
$AMSBIN are replaced by their respective values, and
where the allowed settings in the Input block are the following:
Type: String GUI name: CHGCAR file Description: Use a custom CHGCAR file for initializing the charge density. Note: You must also set ICHARG to an appropriate value for this CHGCAR file to be read by VASP.
Type: Multiple Choice Default value: FreeEnergy Options: [FreeEnergy, EnergyWithoutEntropy, EnergySigmaToZero] GUI name: Energy from OUTCAR Description: The energy from the VASP output which is used with the AMS driver.
Type: Float Default value: 400.0 Unit: eV GUI name: Planewave energy cutoff Description: The energy cutoff for the planewave basis set. VASP keyword: ENCUT
Type: String GUI name: INCAR file Description: Use a custom INCAR file. The keywords NSW, IBRION, ISIF, and LWAV must not be set in this INCAR file, since they are controlled by the AMS driver.
Type: String GUI name: WAVECAR file Description: Path to a WAVECAR (wavefunction) file from a previous calculation that is used to initialize the present calculation. If specified, the file will be copied into the new calculation directory and the VASP keyword ISTART will be set to 1.
Type: String GUI name: KPOINTS file Description: Use a custom KPOINTS file. This will override any other settings related to the k-point sampling.
Type: Multiple Choice Default value: Monkhorst-Pack Options: [Gamma-centered, Monkhorst-Pack] GUI name: Type of k-point grid Description: Type of regular k-point grid. Gamma-centered k-point grids always include the Gamma point, whereas Monkhorst-Pack grids do not include the Gamma point if any of the k-point grid dimensions is even. To use a custom set of k-points, or to specify paths in the Brillouin zone, prepare such a KPOINTS file manually and set the KPOINTSFile setting.
Type: Bool Default value: No GUI name: Use DFT+U Description: Enables a DFT+U calculation. The options LMAXMIX, LDAUType, LDAUU, LDAUJ, and LDAUL must also be set.
Type: Float List Description:
Type: String Description:
Type: Multiple Choice Default value: 2 Options: [1, 2, 4] GUI name: Hubbard U-Type Description: 1: The rotationally invariant DFT+U introduced by Liechtenstein et al. 2: The simplified (rotationally invariant) approach to DFT+U, introduced by Dudarev et al. 4: Same as type 1, but without exchange splitting. VASP keyword: LDAUTYPE.
Type: Float List Description:
Type: Integer Default value: 2 GUI name: LMAXMIX Description: VASP keyword: LMAXMIX
Type: Non-standard block GUI name: Additional INCAR options Description: The contents of this block are copied verbatim into the VASP INCAR file. Note: do not set NSW, IBRION, ISIF or LWAV in this block, as those keys are set by the AMS driver.
Type: Integer Default value: 1 Description: Number of k-points in the first dimension
Type: Integer Default value: 1 Description: Number of k-points in the second dimension
Type: Integer Default value: 1 Description: Number of k-points in the third dimension
Type: Multiple Choice Default value: Gaussian Options: [Gaussian, Fermi, 1stOrderMethfesselPaxton, 2ndOrderMethfesselPaxton, TetrahedronMethodWithoutBlochlCorrections, TetrahedronMethodWithBlochlCorrections] GUI name: Type of smearing Description: Type of electronic smearing (fractional occupation scheme). VASP keyword: ISMEAR
Type: Bool Default value: No GUI name: Only preprocess Description: If Yes, VASP will not be executed. Instead, the first set of input files (e.g. INCAR, POSCAR, POTCAR, KPOINTS) that would have been read by VASP will be left on disk for inspection.
Type: String GUI name: Path to POTCAR library Description: Path to the POTCAR (pseudopotential) library, as delivered with VASP. This library must be accessible on the machine currently running AMSinput. For example, setting this to /library/PBE/PAW/ will use /library/PBE/PAW/Cu/POTCAR as the POTCAR file for Cu atoms by default. Click the arrow to see or change exactly which POTCAR files are used.
Type: Multiple Choice Default value: Normal Options: [Single, Normal, Accurate] GUI name: Precision Description: VASP keyword: PREC
Type: Float Default value: 0.0 Description: Fractional shift of the k-mesh in the first dimension
Type: Float Default value: 0.0 Description: Fractional shift of the k-mesh in the second dimension
Type: Float Default value: 0.0 Description: Fractional shift of the k-mesh in the third dimension
Type: Float Default value: 0.2 Unit: eV GUI name: Smearing width Description: VASP keyword: SIGMA
Type: Bool Default value: No GUI name: Spin-polarization Description: Determines if a spin-polarized calculation is performed. If set, the VASP keyword ISPIN is set to 2.
Type: String Default value: GUI name: Command to execute VASP Description: Command used to execute VASP. For example: mpirun -np 4 vasp
Type: Multiple Choice Default value: Disable Options: [Disable, DFT-D2, DFT-D3, DFT-D3(BJ), TS, TSWithIterativeHirshfeldPartitioning, ManyBodyDispersionEnergyMethod, IDVW=4] GUI name: van der Waals method Description: The van der Waals correction method. VASP keyword: IVDW Default: IVDW = 0 (Disable)
Type: Bool Default value: No GUI name: Verbosity Description: If set, more detailed information is printed in the output file.
Type: Multiple Choice Default value: Auto Options: [Auto, LDA, PBE, PW91, HF, PBE0, HSE06, B3LYP, 03, 05, 10, 20, 91, AM, B3, B5, BF, BO, CA, CO, HL, MK, OR, PE, PL, PS, PZ, RA, RE, RP, VW, WI] GUI name: XC functional Description: The exchange-correlation functional. This setting *must* be consistent with POTCAR. If your desired functional is not present in the list, choose Auto and set the GGA tag manually under Additional INCAR options. Note: not all functionals are implemented in all versions of VASP. Auto: The XC functional is determined by the information in POTCAR. The GGA setting is not set. LDA: the VASP GGA setting is set to an empty string. PBE: sets GGA = PE. PW91: sets GGA = 91. HF: Hartree-Fock. Sets LHFCALC = .TRUE, AEXX = 1, ALDAC = 0, AGGAC = 0. PBE0: sets GGA = PE, LHFCALC = .TRUE. HSE06: sets GGA = PE, LHFCALC = .TRUE., HFSCREEN = 0.2. B3LYP: sets LHFCALC = .TRUE., GGA = B3, AEXX = 0.2, AGGAX = 0.72, AGGAC = 0.81, ALDAC = 0.19. All other options set the VASP GGA setting to the corresponding value. For more information, see the VASP manual.