0% found this document useful (0 votes)
528 views30 pages

Vasp Tutorial

The document is a tutorial for a VASP (Vienna Ab-initio Simulation Package) course at the University of Vienna, detailing login procedures, input and output files, and exercises for computational magnetism. It outlines the necessary input files for VASP simulations, such as INCAR, KPOINTS, POSCAR, and POTCAR, and provides examples of exercises related to magnetic materials. Additionally, it includes instructions on how to run and visualize the results of various simulations.

Uploaded by

abhijeetseth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
528 views30 pages

Vasp Tutorial

The document is a tutorial for a VASP (Vienna Ab-initio Simulation Package) course at the University of Vienna, detailing login procedures, input and output files, and exercises for computational magnetism. It outlines the necessary input files for VASP simulations, such as INCAR, KPOINTS, POSCAR, and POTCAR, and provides examples of exercises related to magnetic materials. Additionally, it includes instructions on how to run and visualize the results of various simulations.

Uploaded by

abhijeetseth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Winter School Computational Magnetism

VASP Tutorial

C. Franchini, B. Kim, M. Marsman, M. Reticcioli

University of Vienna

[email protected] (CMP) CQM 1 / 30


Outline

Login
VASP
Exercises

[email protected] (CMP) CQM 2 / 30


Login on PC

1 Each PC is associated with a number from 01 to 29, let’s label it: ##

2 login on your PC
username: training
password: Vicom_2017

3 Open a terminal window on your PC:

[email protected] (CMP) CQM 3 / 30


Login

1 From the terminal login to VSC:


ssh -X vsc3.vsc.ac.at password: Vicom_2017

2 Go to your working directory


cd ##/vasp mind ##=your PC number [01-29]
Type ls. Find 4 directories (one for each exercise) and a readme file:
01_Nifcc 02_MnO 03_Fefcc 04_CoO readme.txt
You can open readme.txt with any editor: nano, vi, emacs
3 To run the examples it is necessary login to a compute node.
i Allocate one compute node:
salloc -J pc##
ii Find which node has been allocated
node
iii Login to allocated node:
ssh -X ’output of node’ (i.e. ssh -X n41-005)
iv cd ##/vasp
v Ready to run the examples!
[email protected] (CMP) CQM 4 / 30
VASP: input files

VASP requires the following input files:

INCAR: central input file, it determines ’what to do and how to do it’


(many parameters: refer to VASP manual).

KPOINTS: contains the k-point coordinates and weights or the mesh


size for creating the k-point grid.

POSCAR: contains the lattice geometry and the ionic positions.

POTCAR: contains the atomic pseudopotential.

⇒ All inputs files are already available in your directories

[email protected] (CMP) CQM 5 / 30


VASP: output files

The main output files:

OUTCAR: central output file.

vasprun.xml: output data


Can be open with the graphical interface P4Vasp
p4v vasprun.xml
(vasprun.xml can be renamed: p4v newname.xml)

[email protected] (CMP) CQM 6 / 30


VASP inputs; Example 01 (01Nifcc)

POSCAR
fcc Ni –> Title
3.524 –> Lattice constant
0.5 0.5 0.0 –> Bravais Matrix (in this case FCC)
0.0 0.5 0.5
0.5 0.0 0.5
Ni –>Atom Type
1 –> Number of atoms
cartesian –> Type of coordinates: cartesian or direct
0 0 0 –> atom positions (x, y, z)

[email protected] (CMP) CQM 7 / 30


VASP inputs; Example 01 (01Nifcc)

Refer to online VASP manual for detailed description of flags

INCAR
System = fcc Ni
ISTART = 0 –> start from scratch
ISMEAR = -5 –> integration method in reciprocal space
ISPIN = 2 –> spin-polatized calculation, 2 spins
MAGMOM = 1.0 –> Initial magnetic moment

[email protected] (CMP) CQM 8 / 30


VASP inputs; Example 01 (01Nifcc)

KPOINTS
K-Points –> Title
0 –> Number of k-points (0 = automatic generation)
Monkhorst Pack –> Type of grid
11 11 11 –> subdivisions along reciprocal lattice vectors
0 0 0 –> Optional shift

[email protected] (CMP) CQM 9 / 30


VASP inputs; Example 01 (01Nifcc)

POTCAR
PAW_PBE Ni 06Sep2000
10.00000000000000000
parameters from PSCTR are:
VRHFIN =Ni:
LEXCH = PE
...

[email protected] (CMP) CQM 10 / 30


Exercises

1 fcc Ni
1 Simple FM element: Volume, DOS & Bands
2 Energy as a function of the size of the magnetic moment.

2 MnO
1 AFM ordering: moment and gap using DFT, DFT+U & HSE
2 Nearest-neighbour exchange parameter J1

3 Spin spirals in fcc Fe

4 Magnetic Anisotropy Energy (MAE) in strained CoO

[email protected] (CMP) CQM 11 / 30


Exercises: howto RUN

All exercises can be run with available shell scripts:

1 fcc Ni
1 Simple FM element: Volume, DOS & Bands
00_volume.sh 01_dos.sh 02_bands.sh
2 Energy as a function of the size of the magnetic moment.
magmom.sh

2 MnO
1 AFM ordering: moment and gap using DFT, DFT+U & HSE
dos.sh
2 Nearest-neighbour exchange parameter J1
j.sh

3 Spin spirals in fcc Fe


spirals.sh
4 Magnetic Anisotropy Energy (MAE) in strained CoO
mae.sh
[email protected] (CMP) CQM 12 / 30
Exercises: howto VISUALIZE

All results can be visualized using:


1 p4v
VASP graphical interface: see www.p4vasp.at

2 xmgrace or gnuplot

3 open OUTCAR file with some editors

[email protected] (CMP) CQM 13 / 30


Exercise 01: 01_Nifcc/01/

1 ./00_volume.sh

2 xmgrace volume.dat

3 Output

minimum at a ∼ 3.542

[email protected] (CMP) CQM 14 / 30


Exercise 01: 01_Nifcc/01/

1 ./01_dos.sh

2 p4v (click DOS+bands)

3 Output

minimum at a ∼ 3.542

[email protected] (CMP) CQM 15 / 30


Exercise 01: 01_Nifcc/01/

Value of spin moment written in OUTCAR

magnetization (x)

# of ion s p d tot
----------------------------------------
1 -0.007 -0.027 0.635 0.600

total charge

# of ion s p d tot
----------------------------------------
1 0.495 0.490 8.326 9.311

[email protected] (CMP) CQM 16 / 30


Exercise 01: 01_Nifcc/01/

1 ./02_bands.sh

2 p4v (click DOS+bands –> Show-Bands)

3 Output

[email protected] (CMP) CQM 17 / 30


Exercise 01: 01_Nifcc/02/

Goal: Total energy vs. magnetic moment


How: Constrained magnetic moment calculations
Flags in INCAR:

LNONCOLLINEAR = .TRUE.
SAXIS = 0 0 1
RWIGS = 1.0
I_CONSTRAINED_M=2 (constrain direction & size)
M_CONSTR = 0 0 size (x, y, z components of magmom)
LAMBDA = 20

the script will compute the energy for different value of ’size’

[email protected] (CMP) CQM 18 / 30


Exercise 01: 01_Nifcc/02/

1 ./magmom.sh

2 xmgrace mag_energy.dat

3 Output

in agreement with PRL 77 334 (1996)

[email protected] (CMP) CQM 19 / 30


Exercise 02: 02_MnO/01_AFMII

Goal: DOS for AFM-II ordered MnO at different level of theory

MnO: ’cubic’ rock-salt structure with spins AFM aligned along 111
How (1): AFM ordering, 4 atoms unit cell (p4v POSCAR –> show)
ISPIN = 2
MAGMOM = 5.0 -5.0 0 0

[email protected] (CMP) CQM 20 / 30


Exercise 02: 02_MnO/01_AFMII

How (2): PBE, PBE+U and HSE (Hybrid functionals)


DFT+U
LDAU = .TRUE.
LDAUTYPE = 2
LDAUL = 2 -1
LDAUU = 7.00 0.00
LDAUJ = 1.00 0.00
LDAUPRINT = 2

HSE
LHFCALC = .TRUE.
ALGO = All ; TIME = 0.4
HFSCREEN = 0.2
PRECFOCK = Fast
NKRED = 2
[email protected] (CMP) CQM 21 / 30
Exercise 02: 02_MnO/01_AFMII

1 ./dos.sh
2 p4v vasprun_pbe.xml
p4v vasprun_pbe+u.xml
p4v vasprun_hse.xml
3 Output

Experimental gap ≈ 4 eV
[email protected] (CMP) CQM 22 / 30
Exercise 02: 02_MnO/01_AFMII

Goal: Compute J1 by total energy differences (per f.u.)

How: J1 = 1/8(EAF I − EF M ), check INCAR and POSCAR file!


./j.sh output: 9.39 meV, in agreement with PRB 84 115114 2011

[email protected] (CMP) CQM 23 / 30


Exercise 03: 03_Fefcc

[email protected] (CMP) CQM 24 / 30


Exercise 03: 03_Fefcc

[email protected] (CMP) CQM 25 / 30


Exercise 03: 03_Fefcc

How: LSPIRALS & QSPIRALS in INCAR


LNONCOLLINEAR = .TRUE.
MAGMOM = 3.0 0.0 0.0

LSPIRAL = .TRUE.
QSPIRAL = 0.5 0.00 0.5 = 2pi/a(0,0,1)
LZEROZ = .TRUE.

./spirals.sh
xmgrace energies_GX.dat

[email protected] (CMP) CQM 26 / 30


Exercise 04: 04_CoO

Goal: MAE in strained CoO-AFII, PRL 95 187205 (2005)


How: Constrain direction only of magnetic moment

LNONCOLLINEAR = .TRUE.
SAXIS = 0 0 1
# x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4
#MAGMOM = 0 0 3 0 0 -3 0 0 0 0 0 0 # 0
#MAGMOM = 3 0 0 3 0 0 0 0 0 0 0 0 #90

I_CONSTRAINED_M=1
RWIGS = 1.302 0.900
#M_CONSTR = 0 0 3 0 0 -3 0 0 0 0 0 0 # 0
#M_CONSTR = 3 0 0 3 0 0 0 0 0 0 0 0 #90

[email protected] (CMP) CQM 27 / 30


Exercise 04: 04_CoO

1 ./mae.sh

2 xmgrace MAE.dat

[email protected] (CMP) CQM 28 / 30


Exercise 04: 04_CoO

Large orbital moment (LORBMOM = .TRUE.)


In OUTCAR (90 deg):

orbital moment (x)

# of ion p d tot
----------------------------------------
1 -0.000 0.173 0.173
2 0.000 -0.173 -0.173
3 0.000 0.000 0.000
4 0.000 0.000 0.000
----------------------------------------
0.000 0.000 0.000

[email protected] (CMP) CQM 29 / 30


Exercise 04: 04_CoO

Spin moment, in OUTCAR (90 deg):

magnetization (x)

# of ion s p d tot
----------------------------------------
1 0.006 -0.005 2.285 2.286
2 -0.006 0.005 -2.284 -2.285
3 -0.000 0.000 0.000 0.000
4 -0.000 0.000 0.000 0.000
------------------------------------------------
tot 0.000 0.000 0.002 0.002

[email protected] (CMP) CQM 30 / 30

You might also like