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

VASP Tutorial for Computational Magnetism

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)
245 views30 pages

VASP Tutorial for Computational Magnetism

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

[Link]@[Link] (CMP) CQM 1 / 30


Outline

Login
VASP
Exercises

[Link]@[Link] (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:

[Link]@[Link] (CMP) CQM 3 / 30


Login

1 From the terminal login to VSC:


ssh -X [Link] 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 [Link]
You can open [Link] 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!
[Link]@[Link] (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

[Link]@[Link] (CMP) CQM 5 / 30


VASP: output files

The main output files:

OUTCAR: central output file.

[Link]: output data


Can be open with the graphical interface P4Vasp
p4v [Link]
([Link] can be renamed: p4v [Link])

[Link]@[Link] (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)

[Link]@[Link] (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

[Link]@[Link] (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

[Link]@[Link] (CMP) CQM 9 / 30


VASP inputs; Example 01 (01Nifcc)

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

[Link]@[Link] (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

[Link]@[Link] (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.
[Link]

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

3 Spin spirals in fcc Fe


[Link]
4 Magnetic Anisotropy Energy (MAE) in strained CoO
[Link]
[Link]@[Link] (CMP) CQM 12 / 30
Exercises: howto VISUALIZE

All results can be visualized using:


1 p4v
VASP graphical interface: see [Link]

2 xmgrace or gnuplot

3 open OUTCAR file with some editors

[Link]@[Link] (CMP) CQM 13 / 30


Exercise 01: 01_Nifcc/01/

1 ./00_volume.sh

2 xmgrace [Link]

3 Output

minimum at a ∼ 3.542

[Link]@[Link] (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

[Link]@[Link] (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

[Link]@[Link] (CMP) CQM 16 / 30


Exercise 01: 01_Nifcc/01/

1 ./02_bands.sh

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

3 Output

[Link]@[Link] (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’

[Link]@[Link] (CMP) CQM 18 / 30


Exercise 01: 01_Nifcc/02/

1 ./[Link]

2 xmgrace mag_energy.dat

3 Output

in agreement with PRL 77 334 (1996)

[Link]@[Link] (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

[Link]@[Link] (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
[Link]@[Link] (CMP) CQM 21 / 30
Exercise 02: 02_MnO/01_AFMII

1 ./[Link]
2 p4v vasprun_pbe.xml
p4v vasprun_pbe+[Link]
p4v vasprun_hse.xml
3 Output

Experimental gap ≈ 4 eV
[Link]@[Link] (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!


./[Link] output: 9.39 meV, in agreement with PRB 84 115114 2011

[Link]@[Link] (CMP) CQM 23 / 30


Exercise 03: 03_Fefcc

[Link]@[Link] (CMP) CQM 24 / 30


Exercise 03: 03_Fefcc

[Link]@[Link] (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.

./[Link]
xmgrace energies_GX.dat

[Link]@[Link] (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

[Link]@[Link] (CMP) CQM 27 / 30


Exercise 04: 04_CoO

1 ./[Link]

2 xmgrace [Link]

[Link]@[Link] (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

[Link]@[Link] (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

[Link]@[Link] (CMP) CQM 30 / 30

You might also like