Getting Started with VASP on XSEDE

VASP stands for Vienna ab initio Simulation Package. VASP is a popular implementation for DFT (density functional theory) modeling and can simulate atomic-scale behavior of materials. The gist of DFT is that it uses the Born-Oppenheimer approximation to separate the wavefunctions of the atomic nucleus and core electrons (ionic potentials) from the valence electrons (electronic potentials) and then smears the potentials instead of dealing with each particle individually. This is of course oversimplified. You can read way more about VASP at the website here. The workshop slides are also very helpful to read through.

I’m currently using VASP to calculate binding energy of atoms to 2D materials, but it can be used for a huge range of simulation work, including bulk materials, calculating optical/electronic/magnetic behavior, and can do molecular dynamics as well. This is a record of how I set up my own account to get started with VASP, which will hopefully help any students that come after me.

Running VASP requires a VASP license, which is not free, as well as supercomputing access to run any interesting job in a reasonable amount of time. I use XSEDE but other possibilities include NERSC or your own campus resources. The rest of this will be specific to XSEDE and the Windows operating system.  

As a graduate student you can be a PI on your own small Startup allocation through XSEDE if you’ve won or gotten honorable mention for the NSF GRFP. You can also be good friends with someone that did. The application is essentially an abstract and at least for the Stampede2 supercomputer I was granted 1600 hours. This allows you to learn the ropes of VASP and run some preliminary tests, do convergence testing, and produce the code scaling document you’ll need for any larger proposal.

In order to run VASP jobs, you need to prep 5 VASP files in the same directory on the TACC server for your account. These 5 files are:

  1. INCAR–list of job parameters. Specifies job accuracy, timing, spin-polarization, etc.
  2. KPOINTS–short file that provides k point grid to produce.
  3. POSCAR–position coordinates for all the atoms in your system.
  4. POTCAR–list of atomic psuedopotentials. Must download and concatenate these files from the VASP website. They must be in the same order as the elements are listed in the POSCAR file.
  5. Arbitrarily named script file–mine is “test.job” but you can name this whatever you want. You run this file to actually launch your job. Contains SLURM commands to specify how many nodes/processors you want to use, how much time you want to dedicate, and which allocation you will be billing to.

The VASP files must have these exact names. It will not work if INCAR is named INCAR2, for example. Label your directories descriptively so you don’t forget what you were running.

When your VASP job finishes running there will be a ton of new files in your directory. Successful jobs will have a blank slurm-<timestamp> file and complete timing information at the end of the OUTCAR file. Sanity check the CONTCAR file regularly. For my own work, sometimes atoms don’t bind and will waste time drifting away from the substrate.

VESTA-farewell

See you later space cowboy… I made this in VESTA 3.4.4.

Come up with an organizational system early on to make your life easier. Once you have an XSEDE account and access to hours, you can start running VASP jobs.

To access the TACC server with a GUI:

  • Download WinSCP: https://winscp.net/eng/download.php
  • Configure login:
    • Host: stampede2.tacc.utexas.edu
    • Username: <username>
    • Password: <password>
  • Set up your jobs on your local machine first and then move them to file directories on the TACC server.

For a command line interface:

  • Download PuTTY.
  • To run your script file:
    • >> sbatch test.job
  • Check if your job successfully landed:
    • >> squeue -u <username>
    • If the timer has started, your job is running
  • If you’ve never navigated a bash shell before, I would recommend reading this.

To visualize VASP POSCAR and CONTCAR files:

VESTA is a crystallography program that allows you to construct unit cells, place individual atoms, and export that information as a VASP POSCAR. You can also open VASP CONTCAR or POSCAR files to see what’s going on. Very useful.

I use the Stampede2 supercomputer, so another good resource is the TACC user portal

In time I’ll post my own tutorials for specific materials/quantities of interest.

 

Leave a comment