el1='Sn'
name='sn_a4'

mkdir $WORK_DIR/$name

cat > $WORK_DIR/$name/$name.d <<EOF
$el1
 &control
    calculation = 'scf'
    prefix='$name',
    pseudo_dir = '$PSEUDO_DIR',
    outdir='$TMP_DIR'
 /
 &system
    ibrav=  2, 
    celldm(1) =$sn_a4, 
    nat=  2, 
    ntyp= 1,
    noncolin=$ncol,
    lspinorb=$lso,
    occupations='smearing',
    smearing='$smearing_type',
    degauss=$degauss
    ecutwfc =$ecutwfc,
    ecutrho =$ecutrho
 /
 &electrons
    conv_thr =  1.0d-10
 /
ATOMIC_SPECIES
$el1  0.0    $pseudo_sn
ATOMIC_POSITIONS
$el1  0.0000000   0.00000000   0.0
$el1  0.2500000   0.25000000   0.25
K_POINTS AUTOMATIC
$nki $nki $nki $ish $ish $ish
EOF
