1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#!/bin/sh
# check whether echo has the -e option
if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi
MY_QE='../../../../bin/'
OUTDIR='./fd_files/'
IN_DIR='./fd_files/'
FORCEDIR='./fd_files/'
# scf calculation
$MY_QE/pw.x < si.scf.in> si.scf.out
$MY_QE/fd.x < fd.in > fd.out
# scf calculation for displacements
$MY_QE/pw.x < $IN_DIR/displaced.0.0.0.in > $OUTDIR/displaced.0.0.0.out
for i in `seq 1 1 ` ; do
for n in `seq 1 1 ` ; do
for m in `seq 1 1 ` ; do
$MY_QE/pw.x < $IN_DIR/displaced.$m.$i.$n.in > $OUTDIR/displaced.$m.$i.$n.out
done
done
done
grep 'force = ' $OUTDIR/displaced.0.0.0.out | grep ' atom ' > forces
awk '{printf("% 18.12f % 18.12f % 18.12f \n",$7,$8,$9)}' < forces > $FORCEDIR/force.0.0.0
rm forces
for i in `seq 1 1 ` ; do
for n in `seq 1 1 ` ; do
for m in `seq 1 1 ` ; do
grep 'force = ' $OUTDIR/displaced.$m.$i.$n.out | grep ' atom ' > forces
awk '{printf("% 18.12f % 18.12f % 18.12f \n",$7,$8,$9)}' < forces > $FORCEDIR/force.$m.$i.$n
rm forces
done
done
done
$MY_QE/fd_ifc.x < fd_ifc.in > fd_ifc.out
|