Set up and analyze VASP calculations with QuantumATK

In this tutorial, you will explore how QuantumATK can be used as a graphical interface (GUI) for VASP calculations. In particular, you will learn how to easily create your structure and generate all the relevant VASP input files. Also, you will be able to analyze your VASP output files with QuantumATK, and plot the results.

Note that this tutorial is not a user guide to VASP, nor does QuantumWise provide access to the VASP code. It is assumed that the user has already obtained and installed VASP website from its official source, and is familiar with the code.


Contents:


Note

Click to read information about all input () and output () VASP files.

  • POSCAR, INCAR, KPOINTS, POTCAR
  • OUTCAR, CONTCAR, CHGCAR, DOSCAR, EIGENVAL, CHG, PARCHG, ELFCAR

intro0

Important

Read the The VASP Scripter AddOn tutorial in order to:

  1. configure the VASP scripter;
  2. install the VASP pseudopotential libraries.

Setting up the configuration using QuantumATK

You can use one of the many import, build, and export options as shown in the next pictures:

snap1

snap2

snap3

Note

Note that whatever operation you will perform on your structure you will always be able to export the configuration to the POSCAR file format by File ‣ Export Configuration. Under the Save as type select VASP.

  • Example: open the Builder builder_icon and Add ‣ From Database ‣ Cassiterite (SnO2). Modify the lattice paramenters to a=4.834 Å and c=3.244 Å in order to reproduce the results of Godinho et al.. From the Builder, open Bulk Tools ‣ Lattice Parameters, and keep fractional coordinates fixed and modify the a and c vectors:

snap4

Use the VASP Scripter to set up the calculation

  1. Open the VASP scripter: (from the main QuantumATK window) Custom Scripters ‣ Scripters ‣ VASP Scripter.

  2. Once your structure is ready, drag ‘n’ drop it from the Stash in the VASP scripter. Then you will see the structure embedded in the Configuration tab of the VASP scripter:

    snap5

  3. Set up you simulation. For a detailed instruction on how the set up you simulation with the VASP Scripter, refer to the The VASP Scripter AddOn tutorial. In this example, we want to optimize the geometry of the bulk SnO2 structure imported from QuantumATK. So, we choose Setup ‣ Task to Structural optimization and adjust all the parameters according to your needs.

    Note

    Setting constraints: If you may want to constrain some specific atoms during the geometry optimization. You can do that by assigning the tag name constraints to these atoms in the Builder through the Select ‣ Tags tool. The proper F and T flags will be added to the exported POSCAR.

  4. Choose the directory where to save the files and press Save to write the INCAR, POSCAR, KPOINTS and POTCAR files.

    snap6

  5. Run VASP!

Analyzing the results

  • When the calculation is done and you have the VASP output files in the project directory, QuantumATK will automatically recognize their file format and add them to the LabFloor as shown below:

snap7

For example, from CONTCAR you can check the optimized structure by selecting it on the LabFloor and click on Show in 3D Viewer, or send it directly to the Builder for further modifications. Using CHGCAR you can inspect the charge density as described below by using different tools such as the 1D Projector, the Grid Operations and the 3D Viewer tools, which you can find in the right-hand side plugin panel.

1D Projections of 3D grids

By using this tool you will be able to easily plot charge density projections of different types (sum, avarage or through a point) along the three axes (x,y,z). The window is interactive and by selecting a point on the graph you will have detailed information in the left-hand side of the window. This tool is pretty handy to analyze CHGCAR or LOCPOT files:

  • select the CHGCAR element in the LabFloor and click the 1D Operations button/bar.

    snap8

  • If you have performed a potential simulation you can check the Local Potential property in the VASP Scripter (VASP keyword LVTOT = .TRUE.), the LOCPOT file is written by VASP and it will appear in the LabFloor. You can analyze the content of this file with the 1D Projector or plot an isosurface or a plane cut in the Viewer. The figure below show the projection of the local potential along the C axis of a 2L-MgO/Fe(100) system. You can see that the dipole correction in the middle of the vacuum region has been applied.

    quantumatk_locpot

Operations with two or more 3D grids

This tool allows you to perform any kind of arithmetic operation with two or more CHGCAR files (or any other 3D grid). Just select the CHGCAR files from the LabFloor (by holding down Ctrl) and click on Grid Operations. A new window will open. Here you can write the arithmetic expression in the f(x) field (+, −, × and ÷ are allowed). A preview of the result is also showed. You can save the resulting grid in a NetCDF file for more detailed analysis (e.g. in the 1D projetor, or the 3D Viewer, see below). For example, this can be very useful to analyze the charge density difference of a system with and without a defect or before and after adsorption of a molecule/cluster on a surface and so on.

snap9

Visualize 3D grids as density, isosurface, or cut plane

This tool that allows you to display 3D grid data, such as the real-space charge density from CHGCAR, as isosurfaces or contour plots. Select the object from the LabFloor, click the Viewer button at the right and choose to plot an isosurface, a density or a plane cut. If your calculation is spin-polarized you will be able to plot the total charge density (↑+↓), the spin density difference (↑−↓) or only the spin-up (↑) or spin-down (↓) density.

snap10

Hint

You can Drag and Drop other elements from the LabFloor directly into this window and overlap the charge density plot with the structure contained in the CONTCAR file or even with the same CHGCAR file to show a different plot type:

Click on Properties on the right-hand side of the Viewer window to have full control over all the aspects of the plot such as isovalue, positions of the cut planes, colors, ... .

Plot density of states

  • Step A. Open the VASP Scripter as described above and drag ‘n’ drop the CONTCAR file into it.
  • Step B. Now select a self-consistent Static run (SC) from the list of tasks (in Setup tab).
  • Step C. Eventually modify other parameters to run a well converged DOS calculation, e.g. increase the density of k-point sampling and the number of bands.
  • Step D. Save the input files and run VASP!

At the end of the run, the DOSCAR file (and all the other output files) will appear on the LabFloor. Select the DOSCAR object and click on Show 2D Plot to generate the DOS plot.

snap11

Plot bandstructure

  • Step A. Once again, open the VASP Scripter and drag ‘n’ drop the CONTCAR file into it.
  • Step B. From the list of (Setup tab) task, select Bandstructure.
  • Step C. The Bandstructure tab is now active and you can set up the desired path in the Brillouin zone.
  • Step D. Save the input files including the KPOINTS file and run VASP. Remember that in order to run a band structure calculation with VASP you have to use a preconverged CHGCAR file in the same directory!

From the LabFloor select the EIGENVAL object and click the Bandstructure analyzer in the plugin panel. A new interactive window will open. Here you can zoom into a small region of the plot and measure the band gap, for example.

snap12

Analyze MD trajectories

You can analyze your VASP molecular dynamics trajectory directly within QuantumATK. The information are read from the OUTCAR file, when selected the MDTrajectory object will be loaded in the LabFloor. Select this object and use either the MD analyzer or the Movie Tool plugin to analyze in detail you simulation.

  • Using the MD Analyzer

    This tool will allow you to perform a series of analyses to your MD trajectory. See the Reference Manual for more details about each anlysis.

    • Angular distribution
    • Coordination number
    • Density profile
    • Kinetic energy distribution
    • Mean square displacement
    • Nearest neighbor
    • Neutron scattering
    • Partial structure factor
    • Radial distribution
    • Temperature profile
    • Velocity autocorrelation
    • Velocity distribution

    snap13

    Note

    You can perform these analysis for static configurations as well, i.e. with your POSCAR and CONTCAR configurations.

  • Using the Movie Tool

    With this tool you can visualize all frames you MD trajectory. An interactive plot reporting energies and temperatures is showed on the left side.

    snap13a snap13b

    Tip

    You can select any frame and use tha arrow on the bottom-right corner to export the corresponding configuration to the Builder or to the Scripter for further investigation.

Visualize vibrational modes

Select the VibrationalMode object present in your OUTCAR file and use the Vibrational Visualizer plugin to select a specific mode and visualize it in a new window. Here, you can select the mode, the number of repetitions for your structure, the visualization option, and other convenient parameters.

snap15a snap15b

Visualize forces

If present in your OUTCAR file, forces can be visualized as arrows in the Viewer.

snap14