You are on page 1of 34

Outline(

XSEDE,(Stampede(
Basic(linux(commands,(etc.(
Input(les(
Pseudopoten;als(
Energy(cuto(
KApoint(sampling(
SubmiCng(and(monitoring(jobs(
Output(les(
Convergence(tes;ng(
LaCce(constant(op;miza;on(
Band(structure(and(density(of(states((DOS)(

XSEDE(User(Portal(

https://portal.xsede.org/"

XSEDE(Alloca;on(

Stampede(

Logging(on(to(Stampede(

OR: Create a TACC account at https://portal.tacc.utexas.edu/"


Then use ssh:"

More details: https://portal.xsede.org/web/xup/tacc-stampede#access"

Stampede($HOME(directory(

Stampede($WORK(directory(

Some(basic(linux(commands(
ls

"

"

"(list files and subdirectories in current directory)"

pwd

!(show pathname of current directory)"

cd mydir
"

"
"

"(change directory to mydir, where mydir is within the


"
"current directory)"

cd /home/user/test/ex1

"(full pathname of directory to which you want to go)"

mv file1 file2

"

"(move file1 to file2 i.e., rename file1)"

cp file1 file2

"

"(make a copy of file1 and call it file2)"

rm file1 "

"

"(remove file1)"

rm *

"

"

"(remove all files in current directory)"

rm r * "

"

"(remove all files and subdirectories in current directory)"

Edi;ng(input(les(
emacs "

"

""

https://www.cs.rutgers.edu/LCSR-Computing/some-docs/emacs-chart.html"

vi

!!

http://www.cs.rit.edu/~cslab/vi.html"

Quantum(Espresso(
http://www.quantum-espresso.org/usersmanual/input-data-description/"

Quantum(Espresso(on(Stampede(

Input(le((scf(calcula;on(
&control"
calculation='scf',"
restart_mode='from_scratch',"
pseudo_dir = '.',"
outdir='.',"
prefix='cubic_SrTiO3',"
/"
&system"
ibrav = 1,"
celldm(1) = 7.41"
nat = 5,"
ntyp = 3,"
nbnd = 30,"
ecutwfc = 30.0,"
occupations='smearing',"
degauss=0.01"
/"
&electrons"
conv_thr = 1.0e-9"
mixing_beta = 0.3"
/"

ATOMIC_SPECIES"
O 16.00 o.uspp.UPF"
Ti 44.00 ti.uspp.UPF"
Sr 76.00 sr.uspp.UPF"
ATOMIC_POSITIONS {alat}"
Sr 0.000000 0.000000 0.000000"
O 0.500000 0.500000 0.000000"
Ti 0.500000 0.500000 0.500000"
O 0.500000 0.000000 0.500000"
O 0.000000 0.500000 0.500000"
K_POINTS (automatic)"
6 6 6 1 1 1"

Plane(wave(basis(func;ons(
most(common(approaches(use(plane(wave(expansion:(

k (r ) = exp(ik r ) uk (r )
uk (r ) = u k (G) exp(iG r )

k (r ) = u k (G) exp[i(G + k) r ]
G

subs;tu;ng(into(KohnASham(equa;ons(converts(par;al(dieren;al(
equa;on(to(linearAalgebra(problem(

Planewave(expansion(&(energy(cuto(

KPT(Sampling(

KPT(Sampling(

Pseudopoten;als(
Chosen(to(match(the(allAelectron(
wavefunc;on(outside(chosen(cuto(radius(rc(

(Larger(rc,(so`er(poten;al(

((lower(cuto(energy)(

(Assumes(no(overlap(between(core(and(valence(
states((i.e.,(all(chemistry(with(valence(states)(
(Reduces(size(of(basis(set((lowers(cuto(energy)(
(Reduces(number(of(electrons(in(calcula;on(
(Many(transi;on(metals(require(inclusion(of(semiA
core(states(for(sucient(accuracy(

Input(le((scf(calcula;on(
&control"
calculation='scf',"
restart_mode='from_scratch',"
pseudo_dir = '.',"
outdir='.',"
prefix='cubic_SrTiO3',"
/"
&system"
ibrav = 1,"
celldm(1) = 7.41"
nat = 5,"
ntyp = 3,"
nbnd = 30,"
ecutwfc = 30.0,"
occupations='smearing',"
degauss=0.01"
/"
&electrons"
conv_thr = 1.0e-9"
mixing_beta = 0.3"
/"

ATOMIC_SPECIES"
O 16.00 o.uspp.UPF"
Ti 44.00 ti.uspp.UPF"
Sr 76.00 sr.uspp.UPF"
ATOMIC_POSITIONS {alat}"
Sr 0.000000 0.000000 0.000000"
O 0.500000 0.500000 0.000000"
Ti 0.500000 0.500000 0.500000"
O 0.500000 0.000000 0.500000"
O 0.000000 0.500000 0.500000"
K_POINTS (automatic)"
6 6 6 1 1 1"

Output((scf(calcula;on(
login2$ grep 'total energy scf.out "
total energy
= -284.24928231 Ry"
total energy
= -284.59044408 Ry"
total energy
= -284.60891782 Ry"
total energy
= -284.61103682 Ry"
total energy
= -284.61197546 Ry"
total energy
= -284.61229732 Ry"
total energy
= -284.61248659 Ry"
total energy
= -284.61248279 Ry"
total energy
= -284.61248632 Ry"
total energy
= -284.61248634 Ry"
total energy
= -284.61248639 Ry"
! total energy
= -284.61248639 Ry"

Job(submission(
Job submission script named runscript:"
#!/bin/bash"
#SBATCH -J test
"# job name"
#SBATCH -o test.o%j
"# output and error file name (%j expands to jobID)"
#SBATCH -n 32
"# total number of mpi tasks requested"
#SBATCH -p development
"# queue -- normal, development, etc."
#SBATCH -t 01:30:00
"
"# run time (hh:mm:ss) - 1.5 hours"
#SBATCH -A TG-DMR140043
"# allocation"
ibrun pw.x -in scf.in > scf.out "

To submit to queue:"
sbatch runscript"

Job(monitoring(
showq u userid!

login2$ showq -u kolpak"


SUMMARY OF JOBS FOR USER: <kolpak>"
ACTIVE JOBS--------------------"
JOBID JOBNAME USERNAME
STATE CORE REMAINING STARTTIME"
================================================================"
WAITING JOBS------------------------"
JOBID JOBNAME USERNAME
STATE CORE WCLIMIT QUEUETIME"
================================================================"
Total Jobs: 0

Active Jobs: 0

Idle Jobs: 0

Blocked Jobs: 0 "

LaCce(constant(op;miza;on(
_"

_"

_"

_"

_"

Input(le((vcArelax(calcula;on(
&control"
calculation=vc-relax',"
restart_mode='from_scratch',"
pseudo_dir = '.',"
outdir='.',"
prefix='cubic_SrTiO3',"
/"
&system"
ibrav = 1,"
celldm(1) = 7.41"
nat = 5,"
ntyp = 3,"
nbnd = 30,"
ecutwfc = 30.0,"
occupations='smearing',"
degauss=0.01"
/"
&electrons"
conv_thr = 1.0e-9"
mixing_beta = 0.3"
/"

&ions"
ion_dynamics = 'bfgs'"
/"
&cell"
cell_dynamics = 'bfgs'"
cell_dofree = 'xyz'"
/"
ATOMIC_SPECIES"
O 16.00 o.uspp.UPF"
Ti 44.00 ti.uspp.UPF"
Sr 76.00 sr.uspp.UPF"
ATOMIC_POSITIONS {alat}"
Sr 0.000000 0.000000 0.000000"
O 0.500000 0.500000 0.000000"
Ti 0.500000 0.500000 0.500000"
O 0.500000 0.000000 0.500000"
O 0.000000 0.500000 0.500000"
K_POINTS (automatic)"
6 6 6 1 1 1"

Energy(and(laCce(constant(vs(kApts(
#kpts
1x1x1
2x2x2
4x4x4
6x6x6
8x8x8

" E_tot (Ry)


-284.90450643
-284.63976357
-284.61364505
-284.61261662
-284.61257578

a_opt (alat_init)
0.995706000
1.000704257
1.001893029
1.001964159
1.001967789

CPU time (s)


3.62
2.31
6.70
14.14
26.28

A3872.01(
A3872.51(
A3873.01(
A3873.51(
A3874.01(
A3874.51(
A3875.01(
A3875.51(
A3876.01(
A3876.51(
0(

2(

4(

6(

8(

10(

WALL time (s)"


"6.60"
"3.98"
"8.64"
16.32"
29.35"

Density of states
The density of states is a measure of the number of states in a
given energy interval that are available to be occupied.
The density of states can be computed from the band structure.
Here are some examples for metals and semi-conductors:
bcc iron

diamond

Density(of(states(calcula;ons(
Step 1: Non-self consistent field (nscf) calculation restart from converged wave functions"
&control"
calculation=nscf',"
restart_mode=restart',"
pseudo_dir = '.',"
outdir='.',"
prefix='cubic_SrTiO3',"
/"
&system"
ibrav = 1,"
celldm(1) = 7.41"
nat = 5,"
ntyp = 3,"
nbnd = 30,"
ecutwfc = 30.0,"
occupations=tetrahedra,"
/"

&electrons"
conv_thr = 1.0e-9"
mixing_beta = 0.3"
/"
ATOMIC_SPECIES"
O 16.00 o.uspp.UPF"
Ti 44.00 ti.uspp.UPF"
Sr 76.00 sr.uspp.UPF"
ATOMIC_POSITIONS {alat}"
Sr 0.000000 0.000000 0.000000"
O 0.500000 0.500000 0.000000"
Ti 0.500000 0.500000 0.500000"
O 0.500000 0.000000 0.500000"
O 0.000000 0.500000 0.500000"
K_POINTS (automatic)"
12 12 12 1 1 1"
increase K_POINTS to get accurate DOS"

Density(of(states(calcula;ons(
Step 2: Run dos.x to get the total density of states"
&dos"
outdir='.'"
prefix=cubic_srtio3'"
fildos=dos,"
Emin=-10.0, Emax=20.0, DeltaE=0.005"
/"
Step 3: Run projwfc.x to get the atomic-orbital projected DOS (pDOS)"
&projwfc"
outdir='.'"
prefix=cubic_srtio3',"
Emin=-10.0, Emax=20.0, DeltaE=0.005"
ngauss=1, degauss=0.01"
/"

Density(of(states(calcula;ons(
Output files:"

Example output for p-orbital:"

prefix.pdos_total"

# E (eV) ldos(E) pdos(E) pdos(E) pdos(E) "


-10.000 0.161E+00 0.285E-01 0.580E-01 0.748E-01"
-9.995 0.121E+00 0.292E-01 0.405E-01 0.513E-01"
-9.990 0.853E-01 0.299E-01 0.250E-01 0.305E-01"
-9.985 0.543E-01 0.306E-01 0.114E-01 0.123E-01"
-9.980 0.276E-01 0.313E-01 -0.230E-03 -0.346E-02"
"

prefix.pdos_atm#1(Ti)_wfc#1(s)"
prefix.pdos_atm#1(Ti)_wfc#2(p)"
prefix.pdos_atm#1(Ti)_wfc#3(d)"
prefix.pdos_atm#2(O)_wfc#1(s)"
prefix.pdos_atm#2(O)_wfc#2(p)"
prefix.pdos_atm#3(O)_wfc#1(s)"
prefix.pdos_atm#3(O)_wfc#2(p)"
"

Output order (p-orbital):"


E, (px+py+pz), pz, px, py"
Output order (d-orbital):"
E, (dz2+dx2-y2+dxy+dxz+dyz), dz2, dzx, dzy, dx2-y2, dxy"

Atom-Projected DOS: Example

SrTiO3
t2g((3)(
px,'py(
Eg(

eg((2)(

Band(structure(calcula;ons(
Starting with your converged wavefunctions, run a pw.x band calculation with a
set of k-points defining a path along the high-symmetry points in the Brillouin zone"
&control"
calculation=band',"
restart_mode=restart',"
pseudo_dir = '.',"
outdir='.',"
prefix='cubic_SrTiO3',"
/"
&system"
ibrav = 1,"
celldm(1) = 7.41"
nat = 5,"
ntyp = 3,"
nbnd = 30,"
ecutwfc = 30.0,"
occupations=tetrahedra,"
/&electrons"
conv_thr = 1.0e-9"
mixing_beta = 0.3"
/"

ATOMIC_SPECIES"
O 16.00 o.uspp.UPF"
Ti 44.00 ti.uspp.UPF"
Sr 76.00 sr.uspp.UPF"
ATOMIC_POSITIONS {alat}"
Sr 0.000000 0.000000 0.000000"
O 0.500000 0.500000 0.000000"
Ti 0.500000 0.500000 0.500000"
O 0.500000 0.000000 0.500000"
O 0.000000 0.500000 0.500000"
K_POINTS"
define k-point list"

Band(structure(calcula;ons(

R
M
X

"(0, 0, 0)"
"(, , )"
"(, , 0)"
"(0, , 0)"

For high-symmetry points in various space groups:"


http://www.cryst.ehu.es/cgi-bin/cryst/programs/
nph-kv-list?gnum=221"

Step 2: Run bands.x"


&bands"
prefix=cubic_SrTiO3',
outdir=.'
For more input options, see: "
filband=band'
http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_BANDS.html"
lsym=.true.,
/"

Band(structure(calcula;ons(
Step 3: Run plotband.x interactively: (just type plotband.x in your terminal and
then supply the requested input information)"
prompt> plotband.x"
input file > bands.dat"
Reading 8 bands at 36 k-points"
Range: -5.6680 16.4950eV Emin, Emax > -6.0 10.0"
high-symmetry point: 0.5000 0.5000 0.5000"
high-symmetry point: 0.0000 0.0000 0.0000"
high-symmetry point: 0.0000 0.0000 1.0000"
high-symmetry point: 0.0000 1.0000 1.0000"
high-symmetry point: 0.0000 0.0000 0.0000"
output file (xmgr) > prefix.bands.xmgr"
bands in xmgr format written to file prefix.bands.xmgr"
output file (ps) > prefix.bands.ps"
Efermi > 6.337"
deltaE, reference E (for tics) 1.0, 6.337"
bands in PostScript format written to file prefix.bands.ps"

Computed(electronic(structure(of(SrTiO3(
SrTiO3
" (eg,(p//)(
" (t2g,(p)(

t2g((3)(

" (t2g,(p)(
(

px,'py(

Eg(

" (eg,(p//)(

eg((2)(

k'

Computed(electronic(structure(of(SrTiO3(
A useful plotting program: xmgrace"
http://plasma-gate.weizmann.ac.il/Grace/"

" (eg,(p//)(

And a tutorial:"
http://mintaka.sdsu.edu/reu/grace.tutorial.html"

" (t2g,(p)(

t2g((3)(

" (t2g,(p)(
(

px,'py(

Eg(

" (eg,(p//)(

eg((2)(

k'