File: run_fd

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (47 lines) | stat: -rwxr-xr-x 1,129 bytes parent folder | download | duplicates (5)
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