SALMON TUTORIAL, TSUKUBA, 2017

How to Use SALMON-1:
Isolated Systems
ExerciseTakashi Takeuchi
Institute for Molecular Science
Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/

1Demonstration for C2H2
• Linear response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_response.inp• Pulse response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_pulse.inp

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

Demonstration for C2H2
• Linear response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_response.inp• Pulse response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_pulse.inp

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

Submit job• cp -r /work/SALMON/tutor02/tutorial/1_isolated/ .
• cd 1_isolated/1_C2H2_gs_rt_response/• cp /work/SALMON/tutor02/tutorial/job.sh ./job_gs.sh• cp /work/SALMON/tutor02/tutorial/job.sh ./job_rt.sh• sbatch job_gs.sh#!/bin/bash#SBATCH -J gs• squeue -u <UserName> #SBATCH -p salmon#SBATCH -N 4
#SBATCH --ntasks-per-node=2#SBATCH --cpus-per-task=10#SBATCH -o stdout.log#SBATCH -e stderr.log
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
module load intel intelmpi mkl
cd $SLURM_SUBMIT_DIR
input=./C2H2_gs.inp
program=salmon.cpu
mpirun -np $SLURM_NTASKS $program < $input > out_gs.log
Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20174

Ground state calculation by C2H2_gs.inp
Basic rules for an input file

• &units /• &calculation /• &control /• &system /• &pseudo /• &rgrid /• &scf /• &atomic_coor /&category
keyword = xxx/
→ The input file consists of category and keyword withan input value and equal sign( = ).
→ A character input value requires
single quotation marks ( ‘ ’ ).
→ A real input value can be written in Fortran style.
→ e.g. 1.0d-5→ “ ! ” is used as comment out.
→ Space free.
→ “ &atomic_coor/atomic_red_coor ”
has to be set as the last category.
→ All keywords are described in the SALMON manual.

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

Ground state calculation by C2H2_gs.inp• &units /• &calculation /unit_system = ‘A_eV_fs’→ Unit system byÅ, eV, and fs.
→ Default is atomic unit system.

• &control /• &system /• &pseudo /• &rgrid /• &scf /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20176

Ground state calculation by C2H2_gs.inp• &units /• &calculation /• &control /calc_mode = ‘GS'
→ Ground state calculation.

• &system /• &pseudo /• &rgrid /• &scf /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20177

Ground state calculation by C2H2_gs.inp• &units /• &calculation /• &control /• &system /sysname = 'C2H2'→ Name of calculation.
→ This is used for a prefix of output files.

• &pseudo /• &rgrid /• &scf /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 20178Ground state calculation by C2H2_gs.inp• &units /• &calculation /• &control /iperiodic = 0→ Dimension for periodic boundary condition.
→ 0 is for isolated systems.
al = 16d0, 16d0, 16d0
→ Computational domain length.

• &system /• &pseudo /nstate = 5→ Number of states.

• &rgrid /• &scf /• &atomic_coor /nelem = 2
→ Number of elements that will be used in calculations.

natom = 4
→ Number of atoms.
nelec = 10
→ Number of valence electrons.

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

Ground state calculation by C2H2_gs.inp• &units /izatom(1) = 6, izatom(2) = 1→ Atomic number.

• &calculation /• &control /pseudo_file(1) = 'C.cpi', pseudo_file(2) = 'H.cpi'→ Name of pseudopotential files.

• &system /lmax_ps(1) = 1, lmax_ps(2) = 0→ Maximum angular momentum of
pseudopotential projectors.

• &pseudo /• &rgrid /• &scf /• &atomic_coor /• 𝑉𝑖𝑜𝑛 = 𝑉𝑙𝑜𝑐𝑎𝑙 + σ𝑙𝑚lloc_ps (1) = 1, lloc_ps(2) = 0→ Angular momentum of pseudopotentialthat will be treated as local.
𝑃𝑆𝑃𝑆|𝜓𝑙𝑚
𝑣𝑙 ⟩⟨𝑣𝑙 𝜓𝑙𝑚 |𝑃𝑆𝑃𝑆⟨𝜓𝑙𝑚𝑣𝑙 𝜓𝑙𝑚⟩

𝑉𝑙𝑜𝑐𝑎𝑙 : local part of pseudopotential
𝑣𝑙 : non-local part of pseudopotential
𝑃𝑆
Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience𝜓𝑙𝑚: pseudowavefunction
http://salmon-tddft.jp/

SALMON TUTORIAL, TSUKUBA, 201710

Ground state calculation by C2H2_gs.inp• &units /• &calculation /• &control /• &system /• &pseudo /dl = 0.25d0, 0.25d0, 0.25d0→ Spacing of real-space grids.

• &rgrid /• &scf /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201711

Ground state calculation by C2H2_gs.inp• &units /• &calculation /• &control /ncg = 4
→ Number of iteration of Conjugate-Gradient method
for each scf-cycle.
→ Default is 5.
nscf = 1000
→ Number of maximum scf cycle.

• &system /• &pseudo /• &rgrid /• &scf /• &atomic_coor /convergence = 'norm_rho_dng‘→ Convergence is checked by||rho_iter(ix)-rho_iter-1(ix)||2 / (number of grids).
→ Default is rho_dne
sum_ix|rho(ix,iter)-rho(ix,iter-1)|2dx.
threshold_norm_rho = 1.d-15→ Threshold for convergence check.
→ Default is 1d-17.

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

Ground state calculation by C2H2_gs.inp• &units /• &calculation /• &control /• &system /• &pseudo /• &rgrid /• &scf /• &atomic_coor /

zxy↓
↓
↓
'C' 0.000000 0.000000 0.599672 1'H' 0.000000 0.000000 1.662257 2'C' 0.000000 0.000000 -0.599672 1'H' 0.000000 0.000000 -1.662257 2→ Positions of atoms written in Cartesian coordinates.

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

Result of GS calculation by C2H2_gs.inp• variables.log→ Information of input values.

• out_gs.log→ Standard output file.
• C2H2_info.data→ System information including number of states, electrons, and energy, etc..
• C2H2_gs.bin→ Temporary file used for RT calculation.
• C2H2_eigen.data→ 1-particle energies

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

Result of GS calculation by C2H2_gs.inp• $ cat out_gs .log
iteration count----------------------------------------------iter =43

Total Energy =1-18.4623

5-7.3428

2

Iteration count for Vh-340.06681205-14.0001

3-12.3943

14-7.3428

1-particle energies

iter and ||rho_i(ix)-rho_i-1(ix)||**2/(# of grids) =Ne=

Vh iteration =10.0000000000000

Number of electros

43 0.52144155E-15

Convergence check

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

Result of GS calculation by C2H2_gs.inp
Electron density

Electron localized function

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

Demonstration for C2H2
• Linear response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_response.inp• Pulse response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_pulse.inp

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

Submit job• sbatch job_rt.sh• squeue -u <UserName>

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

Real-time calculation by C2H2_rt_response.inp• &units /• &calculation /• &control /• &system /• &pseudo /• &tgrid /• &emfield /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201719

Real-time calculation by C2H2_rt_response.inp• &units /• &calculation /• &control /calc_mode = ‘RT'
→ Real time calculation.

• &system /• &pseudo /• &tgrid /• &emfield /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201720

Real-time calculation by C2H2_rt_response.inp• &units /• &calculation /• &control /• &system /dt = 1.25d-3→ Time step.

• &pseudo /• &tgrid /nt = 5000→ Number of total time steps for real-time propagation.

• &emfield /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201721

Real-time calculation by C2H2_rt_response.inp• &units /• &calculation /• &control /• &system /• &pseudo /ae_shape1 = 'impulse'→ Impulsive fields.

• &tgrid /• &emfield /• &atomic_coor /epdir_re1 = 0.d0,0.d0,1.d0→ Real part of polarization vector the pulse.

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

Result of GS calculation by C2H2_gs.inp• out_rt.log→ Standard output file.
timesteptime[fs]

Dipole moment(xyz)[A]

electrons

Total energy[eV]iterVh------------------------------------------------------1

0.00125000

0.29011063E-09

0.17076226E-09

0.27413687E-02

10.00000000-340.05311442

97• C2H2_p.data→The time response for the dipole moment.
• C2H2_lr.data→ The dipole moment in frequency domain and Oscillator strength.

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

Result of RT calculation by C2H2_rt_response.inp• $ gnuplot

Oscillator strength [1/eV]• $ plot 'C2H2_lr.data' using 1:10 w l lw 2

Energy [eV]Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201724

Demonstration for C2H2
• Linear response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_response.inp• Pulse response calculation:• Ground state calculation → C2H2_gs.inp• Real-time calculation → C2H2_rt_pulse.inp

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

Submit job• cd ../2_C2H2_gs_rt_pulse/• cp /work/SALMON/tutor02/tutorial/job.sh ./job_gs.sh• cp /work/SALMON/tutor02/tutorial/job.sh ./job_rt.sh• sbatch job_gs.sh• sbatch job_rt.sh• squeue -u <UserName>

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

Real-time calculation by C2H2_rt_pulse.inp• &units /• &calculation /• &control /• &system /• &pseudo /• &tgrid /• &emfield /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201727

Real-time calculation by C2H2_rt_pulse.inp• &units /• &calculation /• &control /• &system /dt = 1.25d-3→ Time step.

• &pseudo /• &tgrid /nt = 4800→ Number of total time steps for real-time propagation.

• &emfield /• &atomic_coor /Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201728

Real-time calculation by C2H2_rt_pulse.inp• &units /• &calculation /• &control /ae_shape1 = 'Ecos2'→ Envelope of cos2 for a scalar potential.
epdir_re1 = 0.d0,0.d0,1.d0→ Real part of polarization vector the pulse.

• &system /rlaser_int_wcm2_1 = 1.d8
→ Peak laser intensity (W/cm2) the pulse.

• &pseudo /• &tgrid /omega1 = 9.28d0→ Mean photon energy of the pulse.

• &emfield /• &atomic_coor /pulse_tw1 = 6.d0
→ Duration of the pulse.

phi_cep1 = 0.75d0→ Carrier envelope phase of the pulse.
Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/SALMON TUTORIAL, TSUKUBA, 201729

Result of RT calculation by C2H2_rt_pulse.inp• $ gnuplot

C2H2_ps.data→ The dipole moment in frequency domain and the power spectrum.

dipole moment [Å]• $ plot 'C2H2_p.data' using 1:4 w l lw 2Time [fs]Scalable Ab-initio Light-Matter simulator for Optics and Nanoscience
http://salmon-tddft.jp/
SALMON TUTORIAL, TSUKUBA, 201730