#!/bin/bash

cell=21.528
SCPH="SCPH+4_offdiag"

for ((i=10;i<100;i+=10))
do
cat <<EOF > input_BTE${i}.txt
&general
PREFIX = BGG_${SCPH}_${i}K_999
MODE = RTA
NKD = 3
KD = Ba Ga Ge
MASS = 137.327 69.723 72.64

FCSXML = BGG_FPMD800K_random_lasso1.xml
FC2XML = BGG_${SCPH}_${i}K.xml

ISMEAR = -1;
TMIN = 0; TMAX = 1000; DT = 5
/

&cell
 ${cell}
  1.0 0.0 0.0
  0.0 1.0 0.0
  0.0 0.0 1.0
/

&kpoint
2
9 9 9
/

&analysis
 ISOTOPE = 2
 ISOFACT = 1.27171e-05 1.18488e-04 1.58000e-04
/
EOF

cat <<EOF > run_BTE${i}.sh
#!/bin/sh
#QSUB -queue F144cpu
#QSUB -node 72
#QSUB -mpi 432
#QSUB -omp 4
#QSUB -place pack
#QSUB -over false
#PBS -l walltime=03:00:00
#PBS -N BGG.${SCPH}.${i}K.RTA
#PBS -m be

cd \${PBS_O_WORKDIR}
. /etc/profile.d/modules.sh

mpijob ~/src/ALAMODE_priv/anphon/anphon input_BTE${i}.txt > BTE_${i}K_999.log
EOF
    
done
