SALMON TUTORIAL, TSUKUBA, 2017

How to Use SALMON-2:
Periodic Systems
Exercise

Atsushi Yamada
Center for Computational Sciences, University of Tsukuba
Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/1Basic Calculation Exercise(Periodic System)
Introduction
Option for crystal system(periodic boundary condition):“iperiodic = 3”

Menu of the exercise(Input file)....
sysname = 'Si'/&system
iperiodic = 3
al = 10.26d0,10.26d0,10.26d0
isym = 1
nstate = 32....

Calculations of silicon (Si) :1. Ground State
2. Dielectric Function
3. Real-Time TDDFT Simulation with Incident Laser Pulse
Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20172

1. Ground State Calculation(Job Script)%> sbatch./job.shPut following input files in the same directory#!/bin/bash#SBATCH -J test
#SBATCH -p mixed#SBATCH -N 4
#SBATCH --ntasks-per-node=2#SBATCH --cpus-per-task=10#SBATCH -t 0:30:00#SBATCH -o stdout.log#SBATCH -e stderr.log

 Si_sc_gs.inp(input file) Si_rps.dat (pseudo potential data file of Si)
Check parallelization and calculation time etc

export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
module load intel intelmpi mkl
cd $SLURM_SUBMIT_DIR
input=./Si_sc_gs.inp
program=salmon.cpu

Write input file name

Check path of program file

mpirun -np $SLURM_NTASKS $program < $input > out.log

Write output file name for standard log

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20173

1. Ground State Calculation(input file)
Input File: Si_sc_gs.inp(Calculation Type)&calculation
calc_mode = 'GS'/
&control (Control)
sysname = 'Si'/

It specifies ground statecalculation only

Body name of output file names.
e.x. “Si_GS.out”(one of output file names)&functional (Functional)
xc ='BJ_PW'
Functional/(space grid)&rgridnum_rgrid = 12,12,12/

Atomic unit [a.u.] is used as default.
To use Å/fs/eV unit system, give&unitsunit_system='A_eV_fs'/(but W/cm2 for electric field(laser) strength)(multiples of ４ only）
division number ofunit cell length(# of ｋ-points) （Even number only. User
&kgridspecific k-points is available with
num_kgrid = 4,4,4
reading option of external file）/&system (System)
Unit cell length
iperiodic = 3(cuboid only)(Parameters of Ground State SCF)
&scf
al = 10.26d0,10.26d0,10.26d0
nscf = 120
isym = 1
no symmetry
Maximum iteration number
threshold=1.0d-7
nstate = 32
# of bands used in the calculation
SCF convergence threshold:/nelec = 32
（usually, the same # of
# of electrons
electron density difference per one electron
occupied and unoccupied
nelem = 1
# of atomic species orbitals can be used）&atomic_red_coor
natom = 8
(atomic coordinates)# of atoms'Si' .0 .0 .0 1/
'Si' .25 .25 .25 1(Pseudopotential) Atomic number of the 1-th'Si' .5 .0 .5 1
&pseudo[species, x,y,z, species-ID]'Si' .0 .5 .5 1
iZatom(1)=14
atomic species'Si' .5 .5 .0 1
pseudo_file(1) = './Si_rps.dat'
Here is reduced coordinate (unitFile name of pseudopotential'Si' .75 .25 .75 1 cell length unit).
Lloc_ps(1)=2
Number of the Reference
Use ”&atomic_coor” for a.u.(orangular momentum'Si' .25 .75 .75 1 Å) unit,/
Scalable（given
Ab-initio
Light-Matter
for Optics
in thepseudo- simulator 'Si'
.75 and.75Nanosciences.25 1
4
http://salmon-tddft.jp/
potential data file） SALMON
TUTORIAL,TSUKUBA,2017/

1. Ground State Calculation(Job Submission, Output files)
Job submission on COMA
Check of jobs:
Job cancel：%> sbatch./job.sh%> squeue –u (user name)%> scancel (JOBID)

List of Output Files:•

variables.log --- List of inputted variables(keywords) in the calculation•

out.log•

Si_gs_info.data --- Information of GS SCF calculation etc•

Si_k.data•

Si_eigen.data --- Orbital eigen energy values in GS ( band structure)•

gs_wfn_k/--- Standard output log（file name given in your job script(job.sh)）--- k-points information--- GS wave function(This can be used as initial guess in the next calculation)•

PS_Si_KY_n.dat--- Temporary data of pseudopotential•

stdout.log--- Standard output of system（file name given in job.sh）•stderr.log--- Standard error of system （file name given in job.sh）

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20175

1. Ground State Calculation(Check of results)
Following printed parts are useful to check the calculation results.

1. Convergence of SCF calculation（next page）• Standard output (out.log).
• Si_gs_info.out (this file is generated after SCF finished)

2. Band gap•

Si_gs_info.out
Band gaps are printed in the lines of ”Fundamental gap”(indirecttransition) and ”BG between same k-point”(direct transition).

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20176

1. Ground State Calculation(Check of Convergence of SCF)
out.log…. (omit) …..
Iteration number----------------------------------------------iter =62
Total Energy = -31.2252432282157 -2.500217455292386E-007
Total energy, total energy difference from the last stepjav(1),jav(2),jav(3)= 0.551402E-12 -0.197001E-10 0.131539E-10(orbital eigen energies)
1 -0.150535 2 -0.122854 3 -0.122854 4 -0.122854
Eigen orbital energy of the first k-point
5 -0.027750 6 -0.027750 7 -0.027750 8 0.001569
9 0.129800 10 0.129800 11 0.129800 12 0.151207
13 0.151207 14 0.151207 15 0.168080 16 0.168080
17 0.300588 18 0.304820 19 0.304820 20 0.304820
21 0.338168 22 0.338168 23 0.349556 24 0.349556（Information of GS convergence is also
25 0.349556 26 0.360471 27 0.360471 28 0.360471
printed in Si_GS.out after the SCF finished）
29 0.487072 30 0.487079 31 0.487096 32 0.515053(forces on atoms)
1 -0.000000 -0.000000
0.000000
Forces on each atom
2 -0.000000 -0.000000 -0.000000
30.000000
0.000000
0.000000
4 -0.000000
0.000000
0.000000
50.000000
0.000000 -0.000000
60.000000
0.000000 -0.000000
Average and Maximum of Eigen energy difference
7 -0.000000 -0.000000 -0.000000
80.000000
0.000000 -0.000000
Total electron density difference (square root of diff.),e_var_ave,e_var_max= 2.807887450831825E-009 6.335738233753371E-008
Electron density difference per one electron
diff-dns,ddns/nelec= 1.019596987160528E-007 7.949054588372419E-008----------------------------------------------(absolute value of the diff.)
GS converged at 62
Convergence(The red one is used as default to judge convergence)…. (omit) …..

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20177

2. Calculation of Dielectric Function(Input File)
1.Copy the pre-calculated
ground state data%> cp -r (pre-calculation directory)/gs_wfn_k/

2.Input file for dielectric constant calculation:
Si_sc_dielec.inp&calculation
calc_mode = 'RT'/
Real-Time:i.e. RS-TDDFT&controlsysname = 'Si'/&system
iperiodic = 3
al = 10.26d0,10.26d0,10.26d0
isym = 1
nstate = 32
nelec = 32
nelem = 1
natom = 8/
&pseudoiZatom(1)=14
pseudo_file(1) = './Si_rps.dat'
Lloc_ps(1)=2/&functional
xc ='BJ_PW'/&rgridnum_rgrid = 12,12,12/&kgridnum_kgrid = 4,4,4/(time grid)&tgrid# of time steps
nt=3000
dt=0.16
Time step size [a.u.]/&propagation (time integration)
propagator='etrs'
Algorithm of/time integration./

Change the input file name in job script file.

Put in the same directory:
Si_rps.dat (Si pseudopotential data)(Laser/External field)&emfield“Transverse”
trans_longi = 'tr'
Type of Laser
ae_shape1 = 'impulse'(or electric field)
epdir_re1 = 0.,0.,1.
Direction ofelectric field vector/(analysis)&analysis# of energy grid used fornenergy=1000
dielectric function
de=0.001
Energy grid size for/dielectric function&atomic_red_coor'Si' .0 .0 .0 1
'Si' .25 .25 .25 1….. (omit) ….
/

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20178

2. Calculation of Dielectric Function(Output File)
List of Output Files:•

variables.log ---•out.log---•

Si_rt.data---

Same as the example 1 (see example 1)energies, vector potential, electric fields, current densities,
etc, at each time step•

Si_lr.data---

data from linear response calculation including dielectric

function ε(ω) (in the case of ”impulse” keyword)•

Si_force.data•

PS_Si_KY_n.dat ---•stdout.log---•

stderr.log---•

sc_performance_20171027_155208.log---

forces on each atoms at each time step

Log from system (see example 1)--- measured calculation time

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20179

2. Calculation of Dielectric Function(Check of results)
 Output file format of Si_lr.data
Column 1: Energy (au)Column 2-7: Re(σ_x), Re(σ_y), Re(σ_z), Im(σ_x), Im(σ_y), Im(σ_z),
Column 8-13: Re(ε_x), Re(ε_y), Re(ε_z), Im(ε_x), Im(ε_y), Im(ε_z)
Imaginary part of Dielectric function,
which can be easily converted to absorption spectrum%> gnuplot
gnuplot> p “Si_lr.data” u 1:13 w lor Imaginary part of dielectric function (z-component)
as a function of energy

gnuplot> p “Si_lr.data” u ($1*27.2114):13 w l

1au(Hartree)=27.2114eV※Tips to get beautiful ε(ω):


See K.Yabana, et.al., Phys.Rev.B 85,045134 (2012) for the treatment in the small region of ω.

Use relatively short simulation time because smooth ε（ω）curve can not be obtained with long simulation time
due to the discrete k-points.

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201710

3. Real-Time TDDFT Simulation
with Incident Laser pulse (Input File)(Although you can use option to read the ground state wave function as the last example,
run of both of GS calculation & Real-Time TDDFT simulation is shown here. )Input File: Si_sc_pulse.inp

Change the input file name in job script file.
Put in the same directory:
Si_rps.dat (Si pseudopotential data)&calculation
calc_mode = 'GS_RT'/&controlsysname = 'Si'/

GS + RT(i.e. Ground State calc.
+ Real-Time TDDFT)&system
iperiodic = 3
al = 10.26d0,10.26d0,10.26d0
isym = 1
nstate = 32
nelec = 32
nelem = 1
natom = 8/
&pseudoiZatom(1)=14
pseudo_file(1) = './Si_rps.dat'
Lloc_ps(1)=2/&functional
xc ='TBmBJ'/&rgridnum_rgrid = 12,12,12/&kgridnum_kgrid = 4,4,4/&tgridnt=3000
dt=0.16/&scf
nscf = 120
threshold=1.0d-7/
Type of External Electric Field.

&emfield
Vector potential with cos2trans_longi = 'tr'
type envelop
ae_shape1 = 'Acos2'
Strength of electricrlaser_int_wcm2_1 = 1d14
field [W/cm2]
Time width of pulse
pulse_tw1 = 441.195136248d0
omega1 = 0.05696145187d0
Frequency of pulse
epdir_re1 = 0.,0.,1.
(photon energy)/&atomic_red_coor'Si' .0 .0 .0 1
&propagation'Si' .25 .25 .25 1
propagator='etrs'….. and(omit)…..
Scalable Ab-initio
Light-Matter simulator for Optics
Nanosciences//
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201711

3. Real-Time TDDFT Simulation
with Incident Laser pulse (Input File)
Other analysis options are available.
( use &analysis block in input file)For example:
 Print DOS

 Use keyword like “out_dos=‘y’” Print projection analysis

 Use keyword like “projection_option=‘gs’”( number of excited electrons and holes)
 Print electron density (cube format etc)

 use keywords like
out_dns_rt = 'y'out_dns_rt_step = 3000
format3d = 'cube'

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201712

3. Real-Time TDDFT Simulation
with Incident Laser pulse (Output File)
List of Output Files:（※Other output files can be generated with analysis options in input file)•variables.log---•

out.log•

Si_gs_info.data•

Si_eigen.data•

Si_k.data•

Si_rt.data•

Si_lr.data•

Si_force.out•

PS_Si_KY_n.dat•

stdout.log•

stderr.log•

sc_performance_20171027_155208.log---

Same as the example 1,2 (see example 1,2)

Output for ground state calculation (see example 1)

Output for RT-TDDFT calculation (see example 2)

Log from system (see example 1,2)

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201713

3. Real-Time TDDFT Simulation
with Incident Laser pulse (Check of Results)
 Format of output file: Si_rt.data

units are all [a.u.]c = light speed

1: 𝑡
2:𝐴𝑒𝑥𝑡𝑡 /c, 3:𝐴𝑒𝑥𝑡𝑡 /c,
4:𝐴𝑒𝑥𝑡𝑡 /c𝑥𝑦𝑧
5:𝐸𝑥𝑒𝑥𝑡 𝑡
6:𝐸𝑦𝑒𝑥𝑡 𝑡
7:𝐸𝑧𝑒𝑥𝑡 𝑡
8:𝐴𝑡𝑜𝑡9:𝐴𝑡𝑜𝑡
10:𝐴𝑡𝑜𝑡𝑡 /c
𝑥 𝑡 /c𝑦 𝑡 /c𝑧
11:𝐸𝑥𝑡𝑜𝑡 𝑡
12:𝐸𝑦𝑡𝑜𝑡 𝑡
13:𝐸𝑧𝑡𝑜𝑡 𝑡
14:𝐽𝑥𝑚 𝑡
15:𝐽𝑦𝑚 𝑡
16:𝐽𝑧𝑚 𝑡
17:𝐸𝑡𝑜𝑡 (𝑡)18:𝐸𝑡𝑜𝑡 𝑡 − 𝐸𝑡𝑜𝑡 (0) 19:𝑇𝑖𝑜𝑛 (𝑡)Total Energy

Excitation Energy

External Vector Potential
External Electric Field
Total (External+Induced) Vector Potential
Total (External+Induced) Electric Field
Current Density of Matter

Kinetic Energy of Ion%> gnuplot
gnuplot> p “Si_rt.data” u 1:($18*27.2114) w l  Excitation Energy as a function of time

gnuplot> p “Si_rt.data” u 1:7 w lgnuplot> p “Si_rt.data” u 1:16 w l Incident Electric Field (z-component) Current Density as a function of t (z-component)

Scalable Ab-initio Light-Matter simulator for Optics and Nanosciences
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201714