#!/bin/sh ########################################## ############################################################# # self-consistent calculation ############################################################# lamboot OMP_NUM_THREADS=1 export OMP_NUM_THREADS rm -f in_out/si.scf.in cat > in_out/si.scf.in << EOF &control calculation = 'scf' restart_mode='from_scratch', prefix='silicon', tstress = .true. tprnfor = .true. pseudo_dir = './', outdir='./' / &system ibrav= 2, celldm(1) =10.21, nat= 2, ntyp= 1, ecutwfc =18, / &electrons diagonalization='cg' mixing_mode = 'plain' mixing_beta = 0.7 conv_thr = 1.0d-8 / ATOMIC_SPECIES Si 28.086 Si.vbc.UPF ATOMIC_POSITIONS Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS automatic 12 12 12 0 0 0 EOF rm -f in_out/si.scf.out mpirun -np 2 ./pw.x < in_out/si.scf.in > in_out/si.scf.out echo "self-consistent calculation done" ############################################################# # band structure calculation ############################################################# rm -f in_out/si.band.in cat > in_out/si.band.in << EOF &control calculation='nscf' pseudo_dir = './', outdir='./', prefix='silicon' / &system ibrav= 2, celldm(1) =10.21, nat= 2, ntyp= 1, ecutwfc =18, nbnd = 8, / &electrons diagonalization='david' / ATOMIC_SPECIES Si 28.086 Si.vbc.UPF ATOMIC_POSITIONS Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS 2 0.0 0.0 0.1 1.0 0.0 0.0 0.2 1.0 EOF rm -f in_out/si.band.out mpirun -np 2 ./pw.x < in_out/si.band.in > in_out/si.band.out echo "band structure calculation done"