SlideShare a Scribd company logo
1 of 48
INL/CON-20-59245
Introduction to the
Vienna Ab Initio Simulation Package
(VASP)
Idaho National Laboratory
INL/CON-20-59245
Online Resources for VASP
• John Kitchin’s book: “Modeling materials using density functional
theory” (2012)
– http://kitchingroup.cheme.cmu.edu/dft-book/dft.html
• VASP Workshop Lectures:
– https://www.vasp.at/documentation/
• VASP Wiki:
– https://www.vasp.at/wiki/index.php/The_VASP_Manual
• NERSC VASP Tutorial
– https://www.nersc.gov/assets/Uploads/VASP-lecture-Basics.pdf
• NERSC Examples for VASP:
– https://www.nersc.gov/assets/Uploads/VASP-tutorial-
AtomsMoleculesBulk.pdf
• Atomic Simulation Environment
– https://wiki.fysik.dtu.dk/ase/tutorials/tutorials.html
INL/CON-20-59245
Density Functional Theory -- Resources
DFT from a chemistry perspective: A chemical and theoretical way to look at
bonding on surfaces
By Ronald Hoffmann
https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.60.601
DFT Review Article: Density Functional Theory as a Major Tool in
Computational Materials Science
By Arthur Freeman
https://www.annualreviews.org/doi/10.1146/annurev.ms.25.080195.000255
DFT Implementation details for VASP: Efficiency of ab-initio total energy
calculations for metals and semiconductors using a plane-wave basis set
By Kresse and Furthmüller
https://doi.org/10.1016/0927-0256(96)00008-0
INL/CON-20-59245
Density Functional Theory -- Background
1926:
For a time-independent n-body system:
where
is the wave function for an n-body system
For systems with small number of electrons ( ~O(10) ), solving this is doable.
But for larger systems, this becomes too complicated to solve.
INL/CON-20-59245
Density Functional Theory -- Background
Solution: The Hohenberg-Kohn-Sham theory: a systematic way to map
the many-body problem onto a single-body problem
(Courtesy NERSC)
Why is solving the Schrödinger equation for the many-body problem too
difficult for anything but a relatively small number of electrons?
Storage for example…
INL/CON-20-59245
Density Functional Theory -- Background
What is a functional?
Suppose f(x) = x2 ; we call f(x) a function since when we give it a
number, it returns a number.
A functional returns a number when we give it a function: e.g.
g(f(x) is a functional; if I give it f(x) = sin(x), g(f(x)) returns 2.
INL/CON-20-59245
Density Functional Theory -- Background
Walter Kohn (Nobel Prize in Chemistry 1998)
The key idea:
Don’t rely on the wave function; express material properties
(ground state) as a functional of the charge density
Why is this important? The charge density is only 3 dimension
regardless of the number of electrons!
The Hohenberg – Kohn theorems (1964) ensure that the functional exists but
doesn’t say how to find it!
So the ground state energy of system can be written as:
where is some functional of
Nobel Lecture: Electronic structure of matter—wave functions and
density functionals by W. Kohn
https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.71.1253
INL/CON-20-59245
Density Functional Theory -- Background
What is an exchange correlation functional?
Generally written in this form:
where is the exchange correlation
energy density (it represents the energy per
electron )
and is the charge density (or number of
electrons per unit volume)
INL/CON-20-59245
Density Functional Theory -- Background
There are several types of exchange-correlation
functionals:
Local Density Approximation (LDA)
-- Assumes that the exchange-correlation
energy density at every position in space is the
same as a uniform electron gas
INL/CON-20-59245
Density Functional Theory -- Background
There are several types of exchange-correlation functionals:
Generalized Gradient Approximation (GGA)
-- Incorporates the gradients of the charge density at a point as well
as the value, i.e.
GGA functionals are generally constructed as a correction term, e.g.
INL/CON-20-59245
Density Functional Theory -- Background
There are several types of exchange-correlation functionals:
Meta-Generalized Gradient Approximation (GGA)
-- Incorporates the Laplacian of the density
Hybrid functionals (or Adiabatic Connection Method functionals)
-- Include fractions of exact Hartree-Fock exchange energy
INL/CON-20-59245
Density Functional Theory -- Background
Specific exchange-correlation functionals can be selected by setting the
GGA flag in the INCAR file of VASP:
GGA default is the type of exchange-correlation specified in the POTCAR file
Many functionals contains empirical parameters with values fitted to
reproduce experiments. Others have no empirically determined
parameters (e.g. PW91).
INL/CON-20-59245
Density Functional Theory -- Background
Example: Geometry optimization of water using different exchange
correlation functionals
From C.K. Skylaris
INL/CON-20-59245
Density Functional Theory -- Background
In VASP the time independent Schrödinger equation becomes
where is the eigenvector dependent exchange correlation functional
replacing the Hamiltonian operator
are the eigenvalues as a function of the eigenvectors or energy
bands
and the wavefunction is replaced by a radial density expansion that is a
superposition of plane waves:
where are constants.
INL/CON-20-59245
Density Functional Theory -- Background
Why plane waves?
1. Good choice for systems with repeating
structure because it enables a periodic density
expansion
2. We can use FFT’s to evaluate the action of the
Hamiltonian on the orbitals. FFT’s are O(N log N)
and so this approach is computationally
compelling.
Is VASP the only DFT software that uses plane waves?
No. CASTEP also does, among others.
INL/CON-20-59245
The VASP ENCUT parameter can be used to control this
Density Functional Theory -- Background
Do we need an infinite number of plane waves?
The coefficients of the planewaves ( ) go to zero for high energy planewaves.
So we can truncate above a cutoff energy. But the cutoff energy is element
dependent!
Cutoff energies (eV) for two different elements
and two different precision levels. (from John
Kitchin)
INL/CON-20-59245
History of VASP
• Based on code written by Mike Payne (then @ MIT)
– VASP is similar to CASTEP code because of this
(CASTEP = Cambridge Serial Total Energy Package)
• 1989 Jürgen Hafner brought the code to U. Vienna
• 1993 VASP written by J. Furthmüller and G. Kresse
• Development continues under G. Kresse
• Stable Releases over the past 10 years:
– V6.1.0 28 Jan 2020
– V5.4.4 18 April 2017
– V5.3.3 18 Dec 2012
– V5.2.11 Dec 2010
INL/CON-20-59245
Pseudopotentials
• The core electrons of an atom are computationally expensive with
planewave basis sets
– Large number of planewaves are required to expand their
wavefunctions
– Contributions of core electrons versus valence electrons to
bonding is usually negligible
• To address this, we replace the atomic potential due the to core
electrons with a pseudopotential which has the same effect on valence
electrons: (see also “Efficient pseudopotentials for plane-wave
calculations by Troullier and Martins:
– https://journals.aps.org/prb/abstract/10.1103/PhysRevB.43.1993)
• VASP provides a database of pseudopotentials based on the Project
Augmented-Wave (PAW) method. These are called PAW potentials.
– https://journals.aps.org/prb/abstract/10.1103/PhysRevB.50.17953
– https://journals.aps.org/prb/abstract/10.1103/PhysRevB.59.1758
INL/CON-20-59245
Pseudopotentials
• PAW potentials come in two varieties:
– Norm-conserving soft pseudopotentials
– Vanderbilt ultrasoft potentials (requires fewer plane waves to
expand by a factor of 2-3 times):
https://journals.aps.org/prb/abstract/10.1103/PhysRevB.41.7892
• Pseudopoentials are not unique!
• Predicted properties do depend on them!
(From G. Kresse)
Wavefunction for different angular
momentum quantum numbers
INL/CON-20-59245
CAR Files
• Input and output data in VASP are read from or written to “CAR” files ( a
reference to “CARDS” when I/O on computers was done by punchcards
• VASP requires at least four CAR files to run: INCAR, POSCAR,
POTCAR, and KPOINTS
• VASP may also read in: CHGCAR, WAVECAR
• VASP will detect the presence of a STOPCAR file
• Some VASP output files include: CHG, CHGCAR, CONTCAR,
DOSCAR, EIGENVAL, ELFCAR, IBZKPT, LOCPOT, OSZICAR,
OUTCAR, PARCHG, PCDAT, PROCAR, WAVECAR,XDATCAR
INPUT
OUTPUT
INL/CON-20-59245
INCAR
• This is the central input file of VASP. Tip: tabs in this file cause
problems with VASP – avoid tabs!
Simple Example:
IBRION = 2
ISIF = 3
NSW = 100
POTIM = 0.5
ENCUT = 400
PREC = Accurate
NBANDS = 20
INL/CON-20-59245
POSCAR
• The “position” card. Contains the lattice geometry and the ion positions.
• The first line is a comment line (put your system name here!)
• The second line is a scaling factor.
• The next three lines are vectors describing the unit cell of the system
• Line 6 tells the elements in the system (in order of appearance in the POTCAR file)
• Line 7 tells the number of atoms for each atom type
• Line 8: May either say “Selective Dynamics” or “Cartesian” or “Direct” coordinates
• Next line: positions of the atoms
Simple Example:
INL/CON-20-59245
KPOINTS
• The “K” comes from reciprocal space (or k-space). This file specifies
the reciprocal lattice for integration in k-space over the first Brillouin
zone.
Example: the first Brillouin
zone of a square lattice
INL/CON-20-59245
POTCAR
• The “Potential” CAR holding the pseudopotentials. Each element has
one or more PAW dataset; they can be concatenated together.
• VASP comes with a library of PAW datasets.
• When you have more than one type of atom, you have to concatenate
the PAW datasets IN THE SAME ORDER as atomic species is
specified in the POSCAR file.
• Each individual PAW data set starts with a descriptive section,
specifying amongst other things:
– Parameters that were required to generate the dataset:
– Number of valence electrons
– Atomic mass
– Default energy cutoffs
INL/CON-20-59245
OUTPUT Files
Coutesy NERSC
INL/CON-20-59245
Compiling VASP
• Most of the time VASP will already be compiled for you, but it is
distributed in source code form so it is likely at some point you will
need to compile it.
• Compiling VASP requires manual modification of the makefile.include
file.
• The core computations of VASP are FFT’s and dense linear algebra
including eigenvector and eigenvalue computations; hence, the better
the BLAS and FFT support you have, the better the performance.
• Compiling VASP against OpenBLAS, LAPACK, ScaLAPACK, and
FFTW (all open source libraries) is possible and easily done; however,
performance is about 3X worse compared with linking against Intel’s
MKL libraries (closed, proprietary).
• VASP will also compile on ARM architectures; benchmarks show it
about 20% slower than Broadwell 22c
INL/CON-20-59245
VASP on ARM
• Cray User 2018 Study on VASP on ARM by Simon McIntosh-Smith:
https://uob-hpc.github.io/assets/cug-2018.pdf
Calculations by VASP are dominated by floating-point intensive routines which favors x86
processors. ARM gives higher core counts to compensate but benchmarks show VASP about
20% slower than Broadwell and half the speed of Skylake
INL/CON-20-59245
Profiling VASP
• VASP is already fully instrumented for profiling
• Add the –DPROFILING flag to the CPP_OPTIONS in makefile.include
• Profiling output will be written to the OUTCAR
• Profile includes both a flat profile and Cumulative profile
INL/CON-20-59245
Profiling VASP
• You can add custom profiling by encapsulating routines of interest with
the API call: PROFILING_START and PROFILING_STOP, e.g.
PROFILING_START(‘my_profile_check’)
…
PROFILING_STOP(‘my_profile_check’)
INL/CON-20-59245
VASP Executables
• There are three executables associated with VASP:
– VASP_STD
• This is the standard version – for general k-point meshes with
collinear spins
– VASP_GAM
• The “Gamma Point only” version – typical for large unit cells
– VASP_NCL
• The “non-collinear” version
• For general k-point meshes
• Used for magnetic structure calculations OR to include spin-
orbit interactions in a calculation
• Runs 3-D FFT’s on mesh twice the size of VASP_STD
INL/CON-20-59245
VASP GPU
Not all INCAR options are supported in the GPU version
(e.g. LREAL = .FALSE. is not supported)
• Benchmark comparison (siHugeShort) on Sawtooth:
– vasp_gpu on 4 GPUs (one node): 3 min 0 secs
– vasp_std on 48 cores (one node): 4 min 32 secs
INL/CON-20-59245
VASP on Sawtooth @ INL
• Sawtooth has a CPU version and a GPU version of VASP
• CPU Executable names are: vasp_std, vasp_gam, and vasp_ncl
• GPU Executable names: vasp_gpu
Note: Not all INCAR options are supported in the GPU version
(e.g. LREAL = .FALSE. is not supported)
• Benchmark comparison (siHugeShort):
– vasp_gpu on 4 GPUs (one node): 3 min 0 secs
– vasp_std on 48 cores (one node): 4 min 32 secs
INL/CON-20-59245
Running VASP in parallel:
ways to extract concurrency
• VASP has 3 levels of parallelism
– Over k-points
– Over bands
– Over plane-wave coefficients
• Related fundamentals:
– The number of k-points
– The number of bands (determined indirectly by the number of
atoms and electrons)
– The number of plane waves (which gives the number of grid points
in the FFTs)
INL/CON-20-59245
The Number of Bands
• Parallelization over bands is controlled by the NPAR parameter
• NPAR determines the number of bands that are treated in parallel
• Extreme limit is 1 band per core; this is usually too little work to get
good efficiency.
• Good rule of thumb: number of bands per core equal to the average
number of valence electrons (4-8).
• Make sure NPAR evenly divides the number of cores available on a
node, e.g.:
– On Sawtooth (48 cores/node), best efficiency for NPAR is 6
– On Lemhi (40 cores/node), best efficiency for NPAR is 8
– On Falcon (36 cores/node), best efficiency for NPAR is 6
INL/CON-20-59245
The Number of K-points
• VASP can treat each k-point independently
• The number of k-point groups that run concurrently is set by the KPAR
parameter
• The upper limit for KPAR is the total number of k-points
• Larger KPAR values increase the memory overhead
• It rarely makes sense to have KPAR larger than the number of
compute nodes requested
INL/CON-20-59245
Basis Set Size
• This determines the grid size of the FFTs
• 3-D FFT’s in VASP are computed in a plane-wise manner by default
(to reduce communication between ranks)
• Each of the NPAR groups works on a 2D plane
• NGZ is the number of grid points in the Z direction for the FFT
• Generally you want NGZ to be evenly divisible by NPAR for best load
balancing
• You can tune NGZ by adjusting ENCUT or explicitly setting NGZ
INL/CON-20-59245
Simple Example: Molecular Dynamics run on
32-atom cell
• INCAR:
# electronic degrees
ENCUT = 300
LREAL = A # real space projection
PREC = Normal # chose Low only after tests
EDIFF = 1E-5 # do not use default (too large drift)
ISMEAR = 1 ; SIGMA = 0.1 # Fermi smearing: 2000 K 0.086 10-3
ALGO = Very Fast # recommended for MD (fall back ALGO = Fast)
MAXMIX = 40 # reuse mixer from one MD step to next
NCORE= 4 # one orbital on 4 cores
ISYM = 0 # no symmetry
NELMIN = 4 # minimum 4 steps per time step, avoid breaking after 2 steps
# MD (do little writing to save disc space)
IBRION = 0 ; NSW = 100000 ; NWRITE = 0 ; LCHARG = .FALSE. ; LWAVE = .FALSE.
TEBEG = 3063 ; TEEND = 3063
# canonic (Nose) MD with XDATCAR updated every 50 steps
INL/CON-20-59245
Simple Example: Molecular Dynamics run on
32-atom cell
• POSCAR:
AgPd (50% Pd) -3% Volume
4.11171
0.00000000 2.00000000 0.00000000
0.00000000 0.00000000 2.00000000
2.00000000 0.00000000 0.00000000
16 16
D
0.00000000 0.00000000 0.00000000
0.25000000 0.00000000 0.25000000
0.25000000 0.25000000 0.00000000
0.00000000 0.50000000 0.00000000
0.25000000 0.50000000 0.25000000
0.75000000 0.25000000 0.00000000
0.00000000 0.00000000 0.50000000
0.25000000 0.25000000 0.50000000
0.00000000 0.75000000 0.75000000
0.25000000 0.75000000 0.50000000
INL/CON-20-59245
Simple Example: Molecular Dynamics run on
32-atom cell
• KPOINTS:
Gamma-point only
1 ! one k-point
rec ! in units of the reciprocal lattice vector
0 0 0 1 ! 3 coordinates and weight
INL/CON-20-59245
Some Use Cases for VASP
• Calculating surface energies
• Calculating formation energies
• Calculating reaction energies
• Calculating energy barriers
– Generally done using the Nudged Elastic Band (NEB) method
– VASP Transition State Tools (VTST) assists this
• Vibrational Frequency Calculations
• Calculating Density of States (DOS)
• Calculating band structures
-5 -4 -3 -2 -1 0
total
s
p
t2g
eg
DOS (Courtesy Zongtang Fang)
INL/CON-20-59245
Tools for VASP
VASP Transition State Tools (VTST): http://theory.cm.utexas.edu/vtsttools/
• Provides nudged elastic band (NEB) method implementation for finding
saddle points and minimum energy paths
• Comes as source code that is added to VASP and then VASP is
recompiled
INL/CON-20-59245
Tools for VASP
• Pymatgen (Python Materials Genomics)
• I/O support for VASP, Gaussian, ABINT
• Python based
• Is the analysis engine for https://www.materialsproject.org/
• Works in Jupyter notebook (already available on INL HPC systems)
(From Germain Vallverdu)
INL/CON-20-59245
Tools for VASP
• Atomic Simulation Environment (https://wiki.fysik.dtu.dk/ase/index.html)
• Python Based
• Used VASP as a calculator
• NEB calculations
INL/CON-20-59245
Tools for VASP
• Enumlib (optionally included in pymatgen): https://github.com/msg-
byu/enumlib
• Generates derivative superstructures – deals with combinatorial explosion
when supercells are large
INL/CON-20-59245
VASP6: What’s new?
• On-the-fly machine learning for force fields via Bayesian inference
• Demonstrated for predicting melting points:
– https://journals.aps.org/prb/abstract/10.1103/PhysRevB.100.014105
Large number of machine learning force field (ML
FF) parameters added for INCAR, i.e.
INL/CON-20-59245
VASP6: What’s New?
• Faster performance for hybrid DFT calculation
• Hybrid OpenMP and MPI parallelization
• OpenACC support for GPUs
• HDF5 support
• Libxc support for gradient correct functionals
• Time evolution support for frequency dependent response
functions
INL/CON-20-59245
Machine Learning Opportunities for VASP
• Neural network architectures for modeling atomic systems
– Quantum-chemical insights from deep tensor neural networks
https://www.nature.com/articles/ncomms13890
– A deep learning Toolbox for atomistic systems
https://pubs.acs.org/doi/10.1021/acs.jctc.8b00908
– Transfer Learning for material properties
https://arxiv.org/pdf/2006.16420.pdf
• Databases from high-throughput ab initio calculations for training like
AFLOWLIB: https://doi.org/10.1016/j.commatsci.2012.02.002
• On-the-fly Learning: On-the-fly machine learning force field generation:
Application to melting points
– https://journals.aps.org/prb/abstract/10.1103/PhysRevB.100.014105
INL/CON-20-59245
Some Resources for VASP
• VEST: http://jp-minerals.org/vesta/en/
– Free crystal structure viewer and building. Can read and write
POSCAR and CONTCAR files; can read CHGCAR, PARCHG,
LOCPOT, and ELFCAR.
• RINGS: http://rings-code.sourceforge.net/
– Extracts pair distribution functions
• VTST Tools: http://theory.cm.utexas.edu/vtsttools/
– Transition state tools for finding saddle points.
• VMD: http://www.uni-due.de/~hp0058/?file=vmdplugins.html&lang=en.
– Used to visualize structures and trajectories
• CIF2Cell: http://sourceforge.net/projects/cif2cell
– Tool to generate a POSCAR from a Crystallographic Information
Framework (CIF) file.
• Atomic Simulation Environment: https://wiki.fysik.dtu.dk/ase/
• Pymatgen: https://pymatgen.org/index.html
• Others: https://www.vasp.at/index.php/resources

More Related Content

What's hot

Physics barriers and tunneling
Physics barriers and tunnelingPhysics barriers and tunneling
Physics barriers and tunneling
Mohamed Anwar
 
Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14
cjfoss
 
Solar Power: THE PEROVSKITE
Solar Power: THE PEROVSKITESolar Power: THE PEROVSKITE
Solar Power: THE PEROVSKITE
Cyra Mae Soreda
 

What's hot (20)

Physics barriers and tunneling
Physics barriers and tunnelingPhysics barriers and tunneling
Physics barriers and tunneling
 
Quantum mechanics
Quantum mechanicsQuantum mechanics
Quantum mechanics
 
Lecture7
Lecture7Lecture7
Lecture7
 
The Variational Method
The Variational MethodThe Variational Method
The Variational Method
 
Phonons & Phonopy: Pro Tips (2015)
Phonons & Phonopy: Pro Tips (2015)Phonons & Phonopy: Pro Tips (2015)
Phonons & Phonopy: Pro Tips (2015)
 
Approximations in DFT
Approximations in DFTApproximations in DFT
Approximations in DFT
 
Tight binding
Tight bindingTight binding
Tight binding
 
Mathematical Formulation of Quantum Mechanics
Mathematical Formulation of Quantum Mechanics Mathematical Formulation of Quantum Mechanics
Mathematical Formulation of Quantum Mechanics
 
VASP And Wannier90: A Quick Tutorial
VASP And Wannier90: A Quick TutorialVASP And Wannier90: A Quick Tutorial
VASP And Wannier90: A Quick Tutorial
 
2.BH curve hysteresis in ferro ferrimagnets
2.BH curve  hysteresis in ferro ferrimagnets2.BH curve  hysteresis in ferro ferrimagnets
2.BH curve hysteresis in ferro ferrimagnets
 
Introduction to DFT Part 2
Introduction to DFT Part 2Introduction to DFT Part 2
Introduction to DFT Part 2
 
Quantum Mechanics_ 500 Problems with Solutions ( PDFDrive ).pdf
Quantum Mechanics_ 500 Problems with Solutions ( PDFDrive ).pdfQuantum Mechanics_ 500 Problems with Solutions ( PDFDrive ).pdf
Quantum Mechanics_ 500 Problems with Solutions ( PDFDrive ).pdf
 
Wannier tutorial
Wannier tutorialWannier tutorial
Wannier tutorial
 
bloch.pdf
bloch.pdfbloch.pdf
bloch.pdf
 
Frustration and Low Dimenionality
Frustration and Low DimenionalityFrustration and Low Dimenionality
Frustration and Low Dimenionality
 
Basics of DFT+U
Basics of DFT+U Basics of DFT+U
Basics of DFT+U
 
Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14
 
Solar Power: THE PEROVSKITE
Solar Power: THE PEROVSKITESolar Power: THE PEROVSKITE
Solar Power: THE PEROVSKITE
 
Energy band theory of solids
Energy band theory of solidsEnergy band theory of solids
Energy band theory of solids
 
II_Quantum Hall Effects&Quantum Transport
II_Quantum Hall Effects&Quantum TransportII_Quantum Hall Effects&Quantum Transport
II_Quantum Hall Effects&Quantum Transport
 

Similar to vasp_tutorial.pptx

Romiya_HR_presenetation
Romiya_HR_presenetationRomiya_HR_presenetation
Romiya_HR_presenetation
Romiya Bose
 
The Effect of RF Power on ion current and sheath current by electrical circui...
The Effect of RF Power on ion current and sheath current by electrical circui...The Effect of RF Power on ion current and sheath current by electrical circui...
The Effect of RF Power on ion current and sheath current by electrical circui...
irjes
 
6) A beam of light with red and blue components of wavelengths.docx
6) A beam of light with red and blue components of wavelengths.docx6) A beam of light with red and blue components of wavelengths.docx
6) A beam of light with red and blue components of wavelengths.docx
alinainglis
 
SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...
SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...
SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...
VLSICS Design
 

Similar to vasp_tutorial.pptx (20)

Ijetcas14 318
Ijetcas14 318Ijetcas14 318
Ijetcas14 318
 
Quantum Computation for Predicting Electron and Phonon Properties of Solids
Quantum Computation for Predicting Electron and Phonon Properties of SolidsQuantum Computation for Predicting Electron and Phonon Properties of Solids
Quantum Computation for Predicting Electron and Phonon Properties of Solids
 
qring_study
qring_studyqring_study
qring_study
 
D010432135
D010432135D010432135
D010432135
 
Romiya_HR_presenetation
Romiya_HR_presenetationRomiya_HR_presenetation
Romiya_HR_presenetation
 
3 d single gaas co axial nanowire solar cell for nanopillar-array photovoltai...
3 d single gaas co axial nanowire solar cell for nanopillar-array photovoltai...3 d single gaas co axial nanowire solar cell for nanopillar-array photovoltai...
3 d single gaas co axial nanowire solar cell for nanopillar-array photovoltai...
 
CAD Simulation of ion channels
CAD Simulation of ion channelsCAD Simulation of ion channels
CAD Simulation of ion channels
 
A new dynamic single row routing for channel
A new dynamic single row routing for channelA new dynamic single row routing for channel
A new dynamic single row routing for channel
 
Current Research on Quantum Algorithms.ppt
Current Research on Quantum Algorithms.pptCurrent Research on Quantum Algorithms.ppt
Current Research on Quantum Algorithms.ppt
 
Nanometric Modelization of Gas Structure, Multidimensional using COMSOL Soft...
Nanometric Modelization of Gas Structure, Multidimensional  using COMSOL Soft...Nanometric Modelization of Gas Structure, Multidimensional  using COMSOL Soft...
Nanometric Modelization of Gas Structure, Multidimensional using COMSOL Soft...
 
On The Fundamental Flaws of Qubit Concept for General-Purpose Quantum Computing
	On The Fundamental Flaws of Qubit Concept for General-Purpose Quantum Computing	On The Fundamental Flaws of Qubit Concept for General-Purpose Quantum Computing
On The Fundamental Flaws of Qubit Concept for General-Purpose Quantum Computing
 
Some possible interpretations from data of the CODALEMA experiment
Some possible interpretations from data of the CODALEMA experimentSome possible interpretations from data of the CODALEMA experiment
Some possible interpretations from data of the CODALEMA experiment
 
report
reportreport
report
 
Analytical Estimation and Numerical Simulation of Vibration based Piezoelectr...
Analytical Estimation and Numerical Simulation of Vibration based Piezoelectr...Analytical Estimation and Numerical Simulation of Vibration based Piezoelectr...
Analytical Estimation and Numerical Simulation of Vibration based Piezoelectr...
 
The Effect of RF Power on ion current and sheath current by electrical circui...
The Effect of RF Power on ion current and sheath current by electrical circui...The Effect of RF Power on ion current and sheath current by electrical circui...
The Effect of RF Power on ion current and sheath current by electrical circui...
 
Modeling and test validation of a 15 kV - 24 MVA superconducting fault curren...
Modeling and test validation of a 15 kV - 24 MVA superconducting fault curren...Modeling and test validation of a 15 kV - 24 MVA superconducting fault curren...
Modeling and test validation of a 15 kV - 24 MVA superconducting fault curren...
 
6) A beam of light with red and blue components of wavelengths.docx
6) A beam of light with red and blue components of wavelengths.docx6) A beam of light with red and blue components of wavelengths.docx
6) A beam of light with red and blue components of wavelengths.docx
 
Guillemaud Thesis
Guillemaud ThesisGuillemaud Thesis
Guillemaud Thesis
 
Atmosphere Clouds Model Algorithm for Solving Optimal Reactive Power Dispatch...
Atmosphere Clouds Model Algorithm for Solving Optimal Reactive Power Dispatch...Atmosphere Clouds Model Algorithm for Solving Optimal Reactive Power Dispatch...
Atmosphere Clouds Model Algorithm for Solving Optimal Reactive Power Dispatch...
 
SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...
SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...
SIMULTANEOUS OPTIMIZATION OF STANDBY AND ACTIVE ENERGY FOR SUB-THRESHOLD CIRC...
 

Recently uploaded

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

vasp_tutorial.pptx

  • 1. INL/CON-20-59245 Introduction to the Vienna Ab Initio Simulation Package (VASP) Idaho National Laboratory
  • 2. INL/CON-20-59245 Online Resources for VASP • John Kitchin’s book: “Modeling materials using density functional theory” (2012) – http://kitchingroup.cheme.cmu.edu/dft-book/dft.html • VASP Workshop Lectures: – https://www.vasp.at/documentation/ • VASP Wiki: – https://www.vasp.at/wiki/index.php/The_VASP_Manual • NERSC VASP Tutorial – https://www.nersc.gov/assets/Uploads/VASP-lecture-Basics.pdf • NERSC Examples for VASP: – https://www.nersc.gov/assets/Uploads/VASP-tutorial- AtomsMoleculesBulk.pdf • Atomic Simulation Environment – https://wiki.fysik.dtu.dk/ase/tutorials/tutorials.html
  • 3. INL/CON-20-59245 Density Functional Theory -- Resources DFT from a chemistry perspective: A chemical and theoretical way to look at bonding on surfaces By Ronald Hoffmann https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.60.601 DFT Review Article: Density Functional Theory as a Major Tool in Computational Materials Science By Arthur Freeman https://www.annualreviews.org/doi/10.1146/annurev.ms.25.080195.000255 DFT Implementation details for VASP: Efficiency of ab-initio total energy calculations for metals and semiconductors using a plane-wave basis set By Kresse and Furthmüller https://doi.org/10.1016/0927-0256(96)00008-0
  • 4. INL/CON-20-59245 Density Functional Theory -- Background 1926: For a time-independent n-body system: where is the wave function for an n-body system For systems with small number of electrons ( ~O(10) ), solving this is doable. But for larger systems, this becomes too complicated to solve.
  • 5. INL/CON-20-59245 Density Functional Theory -- Background Solution: The Hohenberg-Kohn-Sham theory: a systematic way to map the many-body problem onto a single-body problem (Courtesy NERSC) Why is solving the Schrödinger equation for the many-body problem too difficult for anything but a relatively small number of electrons? Storage for example…
  • 6. INL/CON-20-59245 Density Functional Theory -- Background What is a functional? Suppose f(x) = x2 ; we call f(x) a function since when we give it a number, it returns a number. A functional returns a number when we give it a function: e.g. g(f(x) is a functional; if I give it f(x) = sin(x), g(f(x)) returns 2.
  • 7. INL/CON-20-59245 Density Functional Theory -- Background Walter Kohn (Nobel Prize in Chemistry 1998) The key idea: Don’t rely on the wave function; express material properties (ground state) as a functional of the charge density Why is this important? The charge density is only 3 dimension regardless of the number of electrons! The Hohenberg – Kohn theorems (1964) ensure that the functional exists but doesn’t say how to find it! So the ground state energy of system can be written as: where is some functional of Nobel Lecture: Electronic structure of matter—wave functions and density functionals by W. Kohn https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.71.1253
  • 8. INL/CON-20-59245 Density Functional Theory -- Background What is an exchange correlation functional? Generally written in this form: where is the exchange correlation energy density (it represents the energy per electron ) and is the charge density (or number of electrons per unit volume)
  • 9. INL/CON-20-59245 Density Functional Theory -- Background There are several types of exchange-correlation functionals: Local Density Approximation (LDA) -- Assumes that the exchange-correlation energy density at every position in space is the same as a uniform electron gas
  • 10. INL/CON-20-59245 Density Functional Theory -- Background There are several types of exchange-correlation functionals: Generalized Gradient Approximation (GGA) -- Incorporates the gradients of the charge density at a point as well as the value, i.e. GGA functionals are generally constructed as a correction term, e.g.
  • 11. INL/CON-20-59245 Density Functional Theory -- Background There are several types of exchange-correlation functionals: Meta-Generalized Gradient Approximation (GGA) -- Incorporates the Laplacian of the density Hybrid functionals (or Adiabatic Connection Method functionals) -- Include fractions of exact Hartree-Fock exchange energy
  • 12. INL/CON-20-59245 Density Functional Theory -- Background Specific exchange-correlation functionals can be selected by setting the GGA flag in the INCAR file of VASP: GGA default is the type of exchange-correlation specified in the POTCAR file Many functionals contains empirical parameters with values fitted to reproduce experiments. Others have no empirically determined parameters (e.g. PW91).
  • 13. INL/CON-20-59245 Density Functional Theory -- Background Example: Geometry optimization of water using different exchange correlation functionals From C.K. Skylaris
  • 14. INL/CON-20-59245 Density Functional Theory -- Background In VASP the time independent Schrödinger equation becomes where is the eigenvector dependent exchange correlation functional replacing the Hamiltonian operator are the eigenvalues as a function of the eigenvectors or energy bands and the wavefunction is replaced by a radial density expansion that is a superposition of plane waves: where are constants.
  • 15. INL/CON-20-59245 Density Functional Theory -- Background Why plane waves? 1. Good choice for systems with repeating structure because it enables a periodic density expansion 2. We can use FFT’s to evaluate the action of the Hamiltonian on the orbitals. FFT’s are O(N log N) and so this approach is computationally compelling. Is VASP the only DFT software that uses plane waves? No. CASTEP also does, among others.
  • 16. INL/CON-20-59245 The VASP ENCUT parameter can be used to control this Density Functional Theory -- Background Do we need an infinite number of plane waves? The coefficients of the planewaves ( ) go to zero for high energy planewaves. So we can truncate above a cutoff energy. But the cutoff energy is element dependent! Cutoff energies (eV) for two different elements and two different precision levels. (from John Kitchin)
  • 17. INL/CON-20-59245 History of VASP • Based on code written by Mike Payne (then @ MIT) – VASP is similar to CASTEP code because of this (CASTEP = Cambridge Serial Total Energy Package) • 1989 Jürgen Hafner brought the code to U. Vienna • 1993 VASP written by J. Furthmüller and G. Kresse • Development continues under G. Kresse • Stable Releases over the past 10 years: – V6.1.0 28 Jan 2020 – V5.4.4 18 April 2017 – V5.3.3 18 Dec 2012 – V5.2.11 Dec 2010
  • 18. INL/CON-20-59245 Pseudopotentials • The core electrons of an atom are computationally expensive with planewave basis sets – Large number of planewaves are required to expand their wavefunctions – Contributions of core electrons versus valence electrons to bonding is usually negligible • To address this, we replace the atomic potential due the to core electrons with a pseudopotential which has the same effect on valence electrons: (see also “Efficient pseudopotentials for plane-wave calculations by Troullier and Martins: – https://journals.aps.org/prb/abstract/10.1103/PhysRevB.43.1993) • VASP provides a database of pseudopotentials based on the Project Augmented-Wave (PAW) method. These are called PAW potentials. – https://journals.aps.org/prb/abstract/10.1103/PhysRevB.50.17953 – https://journals.aps.org/prb/abstract/10.1103/PhysRevB.59.1758
  • 19. INL/CON-20-59245 Pseudopotentials • PAW potentials come in two varieties: – Norm-conserving soft pseudopotentials – Vanderbilt ultrasoft potentials (requires fewer plane waves to expand by a factor of 2-3 times): https://journals.aps.org/prb/abstract/10.1103/PhysRevB.41.7892 • Pseudopoentials are not unique! • Predicted properties do depend on them! (From G. Kresse) Wavefunction for different angular momentum quantum numbers
  • 20. INL/CON-20-59245 CAR Files • Input and output data in VASP are read from or written to “CAR” files ( a reference to “CARDS” when I/O on computers was done by punchcards • VASP requires at least four CAR files to run: INCAR, POSCAR, POTCAR, and KPOINTS • VASP may also read in: CHGCAR, WAVECAR • VASP will detect the presence of a STOPCAR file • Some VASP output files include: CHG, CHGCAR, CONTCAR, DOSCAR, EIGENVAL, ELFCAR, IBZKPT, LOCPOT, OSZICAR, OUTCAR, PARCHG, PCDAT, PROCAR, WAVECAR,XDATCAR INPUT OUTPUT
  • 21. INL/CON-20-59245 INCAR • This is the central input file of VASP. Tip: tabs in this file cause problems with VASP – avoid tabs! Simple Example: IBRION = 2 ISIF = 3 NSW = 100 POTIM = 0.5 ENCUT = 400 PREC = Accurate NBANDS = 20
  • 22. INL/CON-20-59245 POSCAR • The “position” card. Contains the lattice geometry and the ion positions. • The first line is a comment line (put your system name here!) • The second line is a scaling factor. • The next three lines are vectors describing the unit cell of the system • Line 6 tells the elements in the system (in order of appearance in the POTCAR file) • Line 7 tells the number of atoms for each atom type • Line 8: May either say “Selective Dynamics” or “Cartesian” or “Direct” coordinates • Next line: positions of the atoms Simple Example:
  • 23. INL/CON-20-59245 KPOINTS • The “K” comes from reciprocal space (or k-space). This file specifies the reciprocal lattice for integration in k-space over the first Brillouin zone. Example: the first Brillouin zone of a square lattice
  • 24. INL/CON-20-59245 POTCAR • The “Potential” CAR holding the pseudopotentials. Each element has one or more PAW dataset; they can be concatenated together. • VASP comes with a library of PAW datasets. • When you have more than one type of atom, you have to concatenate the PAW datasets IN THE SAME ORDER as atomic species is specified in the POSCAR file. • Each individual PAW data set starts with a descriptive section, specifying amongst other things: – Parameters that were required to generate the dataset: – Number of valence electrons – Atomic mass – Default energy cutoffs
  • 26. INL/CON-20-59245 Compiling VASP • Most of the time VASP will already be compiled for you, but it is distributed in source code form so it is likely at some point you will need to compile it. • Compiling VASP requires manual modification of the makefile.include file. • The core computations of VASP are FFT’s and dense linear algebra including eigenvector and eigenvalue computations; hence, the better the BLAS and FFT support you have, the better the performance. • Compiling VASP against OpenBLAS, LAPACK, ScaLAPACK, and FFTW (all open source libraries) is possible and easily done; however, performance is about 3X worse compared with linking against Intel’s MKL libraries (closed, proprietary). • VASP will also compile on ARM architectures; benchmarks show it about 20% slower than Broadwell 22c
  • 27. INL/CON-20-59245 VASP on ARM • Cray User 2018 Study on VASP on ARM by Simon McIntosh-Smith: https://uob-hpc.github.io/assets/cug-2018.pdf Calculations by VASP are dominated by floating-point intensive routines which favors x86 processors. ARM gives higher core counts to compensate but benchmarks show VASP about 20% slower than Broadwell and half the speed of Skylake
  • 28. INL/CON-20-59245 Profiling VASP • VASP is already fully instrumented for profiling • Add the –DPROFILING flag to the CPP_OPTIONS in makefile.include • Profiling output will be written to the OUTCAR • Profile includes both a flat profile and Cumulative profile
  • 29. INL/CON-20-59245 Profiling VASP • You can add custom profiling by encapsulating routines of interest with the API call: PROFILING_START and PROFILING_STOP, e.g. PROFILING_START(‘my_profile_check’) … PROFILING_STOP(‘my_profile_check’)
  • 30. INL/CON-20-59245 VASP Executables • There are three executables associated with VASP: – VASP_STD • This is the standard version – for general k-point meshes with collinear spins – VASP_GAM • The “Gamma Point only” version – typical for large unit cells – VASP_NCL • The “non-collinear” version • For general k-point meshes • Used for magnetic structure calculations OR to include spin- orbit interactions in a calculation • Runs 3-D FFT’s on mesh twice the size of VASP_STD
  • 31. INL/CON-20-59245 VASP GPU Not all INCAR options are supported in the GPU version (e.g. LREAL = .FALSE. is not supported) • Benchmark comparison (siHugeShort) on Sawtooth: – vasp_gpu on 4 GPUs (one node): 3 min 0 secs – vasp_std on 48 cores (one node): 4 min 32 secs
  • 32. INL/CON-20-59245 VASP on Sawtooth @ INL • Sawtooth has a CPU version and a GPU version of VASP • CPU Executable names are: vasp_std, vasp_gam, and vasp_ncl • GPU Executable names: vasp_gpu Note: Not all INCAR options are supported in the GPU version (e.g. LREAL = .FALSE. is not supported) • Benchmark comparison (siHugeShort): – vasp_gpu on 4 GPUs (one node): 3 min 0 secs – vasp_std on 48 cores (one node): 4 min 32 secs
  • 33. INL/CON-20-59245 Running VASP in parallel: ways to extract concurrency • VASP has 3 levels of parallelism – Over k-points – Over bands – Over plane-wave coefficients • Related fundamentals: – The number of k-points – The number of bands (determined indirectly by the number of atoms and electrons) – The number of plane waves (which gives the number of grid points in the FFTs)
  • 34. INL/CON-20-59245 The Number of Bands • Parallelization over bands is controlled by the NPAR parameter • NPAR determines the number of bands that are treated in parallel • Extreme limit is 1 band per core; this is usually too little work to get good efficiency. • Good rule of thumb: number of bands per core equal to the average number of valence electrons (4-8). • Make sure NPAR evenly divides the number of cores available on a node, e.g.: – On Sawtooth (48 cores/node), best efficiency for NPAR is 6 – On Lemhi (40 cores/node), best efficiency for NPAR is 8 – On Falcon (36 cores/node), best efficiency for NPAR is 6
  • 35. INL/CON-20-59245 The Number of K-points • VASP can treat each k-point independently • The number of k-point groups that run concurrently is set by the KPAR parameter • The upper limit for KPAR is the total number of k-points • Larger KPAR values increase the memory overhead • It rarely makes sense to have KPAR larger than the number of compute nodes requested
  • 36. INL/CON-20-59245 Basis Set Size • This determines the grid size of the FFTs • 3-D FFT’s in VASP are computed in a plane-wise manner by default (to reduce communication between ranks) • Each of the NPAR groups works on a 2D plane • NGZ is the number of grid points in the Z direction for the FFT • Generally you want NGZ to be evenly divisible by NPAR for best load balancing • You can tune NGZ by adjusting ENCUT or explicitly setting NGZ
  • 37. INL/CON-20-59245 Simple Example: Molecular Dynamics run on 32-atom cell • INCAR: # electronic degrees ENCUT = 300 LREAL = A # real space projection PREC = Normal # chose Low only after tests EDIFF = 1E-5 # do not use default (too large drift) ISMEAR = 1 ; SIGMA = 0.1 # Fermi smearing: 2000 K 0.086 10-3 ALGO = Very Fast # recommended for MD (fall back ALGO = Fast) MAXMIX = 40 # reuse mixer from one MD step to next NCORE= 4 # one orbital on 4 cores ISYM = 0 # no symmetry NELMIN = 4 # minimum 4 steps per time step, avoid breaking after 2 steps # MD (do little writing to save disc space) IBRION = 0 ; NSW = 100000 ; NWRITE = 0 ; LCHARG = .FALSE. ; LWAVE = .FALSE. TEBEG = 3063 ; TEEND = 3063 # canonic (Nose) MD with XDATCAR updated every 50 steps
  • 38. INL/CON-20-59245 Simple Example: Molecular Dynamics run on 32-atom cell • POSCAR: AgPd (50% Pd) -3% Volume 4.11171 0.00000000 2.00000000 0.00000000 0.00000000 0.00000000 2.00000000 2.00000000 0.00000000 0.00000000 16 16 D 0.00000000 0.00000000 0.00000000 0.25000000 0.00000000 0.25000000 0.25000000 0.25000000 0.00000000 0.00000000 0.50000000 0.00000000 0.25000000 0.50000000 0.25000000 0.75000000 0.25000000 0.00000000 0.00000000 0.00000000 0.50000000 0.25000000 0.25000000 0.50000000 0.00000000 0.75000000 0.75000000 0.25000000 0.75000000 0.50000000
  • 39. INL/CON-20-59245 Simple Example: Molecular Dynamics run on 32-atom cell • KPOINTS: Gamma-point only 1 ! one k-point rec ! in units of the reciprocal lattice vector 0 0 0 1 ! 3 coordinates and weight
  • 40. INL/CON-20-59245 Some Use Cases for VASP • Calculating surface energies • Calculating formation energies • Calculating reaction energies • Calculating energy barriers – Generally done using the Nudged Elastic Band (NEB) method – VASP Transition State Tools (VTST) assists this • Vibrational Frequency Calculations • Calculating Density of States (DOS) • Calculating band structures -5 -4 -3 -2 -1 0 total s p t2g eg DOS (Courtesy Zongtang Fang)
  • 41. INL/CON-20-59245 Tools for VASP VASP Transition State Tools (VTST): http://theory.cm.utexas.edu/vtsttools/ • Provides nudged elastic band (NEB) method implementation for finding saddle points and minimum energy paths • Comes as source code that is added to VASP and then VASP is recompiled
  • 42. INL/CON-20-59245 Tools for VASP • Pymatgen (Python Materials Genomics) • I/O support for VASP, Gaussian, ABINT • Python based • Is the analysis engine for https://www.materialsproject.org/ • Works in Jupyter notebook (already available on INL HPC systems) (From Germain Vallverdu)
  • 43. INL/CON-20-59245 Tools for VASP • Atomic Simulation Environment (https://wiki.fysik.dtu.dk/ase/index.html) • Python Based • Used VASP as a calculator • NEB calculations
  • 44. INL/CON-20-59245 Tools for VASP • Enumlib (optionally included in pymatgen): https://github.com/msg- byu/enumlib • Generates derivative superstructures – deals with combinatorial explosion when supercells are large
  • 45. INL/CON-20-59245 VASP6: What’s new? • On-the-fly machine learning for force fields via Bayesian inference • Demonstrated for predicting melting points: – https://journals.aps.org/prb/abstract/10.1103/PhysRevB.100.014105 Large number of machine learning force field (ML FF) parameters added for INCAR, i.e.
  • 46. INL/CON-20-59245 VASP6: What’s New? • Faster performance for hybrid DFT calculation • Hybrid OpenMP and MPI parallelization • OpenACC support for GPUs • HDF5 support • Libxc support for gradient correct functionals • Time evolution support for frequency dependent response functions
  • 47. INL/CON-20-59245 Machine Learning Opportunities for VASP • Neural network architectures for modeling atomic systems – Quantum-chemical insights from deep tensor neural networks https://www.nature.com/articles/ncomms13890 – A deep learning Toolbox for atomistic systems https://pubs.acs.org/doi/10.1021/acs.jctc.8b00908 – Transfer Learning for material properties https://arxiv.org/pdf/2006.16420.pdf • Databases from high-throughput ab initio calculations for training like AFLOWLIB: https://doi.org/10.1016/j.commatsci.2012.02.002 • On-the-fly Learning: On-the-fly machine learning force field generation: Application to melting points – https://journals.aps.org/prb/abstract/10.1103/PhysRevB.100.014105
  • 48. INL/CON-20-59245 Some Resources for VASP • VEST: http://jp-minerals.org/vesta/en/ – Free crystal structure viewer and building. Can read and write POSCAR and CONTCAR files; can read CHGCAR, PARCHG, LOCPOT, and ELFCAR. • RINGS: http://rings-code.sourceforge.net/ – Extracts pair distribution functions • VTST Tools: http://theory.cm.utexas.edu/vtsttools/ – Transition state tools for finding saddle points. • VMD: http://www.uni-due.de/~hp0058/?file=vmdplugins.html&lang=en. – Used to visualize structures and trajectories • CIF2Cell: http://sourceforge.net/projects/cif2cell – Tool to generate a POSCAR from a Crystallographic Information Framework (CIF) file. • Atomic Simulation Environment: https://wiki.fysik.dtu.dk/ase/ • Pymatgen: https://pymatgen.org/index.html • Others: https://www.vasp.at/index.php/resources