#!/bin/csh -f setenv pwx /home/javad/espresso-3.2/bin/pw.x set outdirectory=/batch/home/mfh/hashemi/ set kpointxy=12 set kpointz=8 set ecut=30 foreach clat (1.390) set zposition2=`echo "$clat/4" | bc -l` set zposition3=`echo "2*$clat/4" | bc -l` set zposition4=`echo "3*$clat/4" | bc -l` set filename=1g-1c-${clat}-kp${kpointxy}x${kpointz}-ecut${ecut} rm -f ${filename}.inscf cat << tah1 > ${filename}.inscf ##### making the input file &control calculation='relax' restart_mode='from_scratch', prefix='${filename}', pseudo_dir = '/home/javad/pseudopotentials/', tstress=.TRUE., tprnfor=.TRUE., outdir='$outdirectory', / &system ibrav=6, celldm(1)=7.67210858, celldm(3)=$clat, nat=4, ntyp=3, ecutwfc = $ecut, ecutrho = 288.0, nspin=2, starting_magnetization(3)=0.7, starting_magnetization(2)=0.4, starting_magnetization(4)=0.4, occupations='smearing', smearing='methfessel-paxton', degauss=0.02 / &electrons conv_thr = 1.0e-6 mixing_beta = 0.7 / &ions ion_dynamics = "bfgs", bfgs_ndim = 3, pot_extrapolation = "second_order", wfc_extrapolation = "second_order", / ATOMIC_SPECIES Ga 69.723 Ga.pbe-nsp-van.UPF As 74.922 As.pbe-n-van.UPF Cr 51.996 Cr.pbe-sp-van.UPF ATOMIC_POSITIONS Ga 0.000 0.000 0.00000000 As 0.000 0.500 $zposition2 Cr 0.500 0.500 $zposition3 As 0.500 0.000 $zposition4 K_POINTS automatic $kpointxy $kpointxy $kpointz 1 1 1 tah1 ########### end of input file ################# /afs/ipp/i386_sles9/bin/mpirun -np 2 $pwx < ${filename}.inscf > ${filename}.outscf end # clat loop