forked from draskot/Vini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapolar
executable file
·47 lines (40 loc) · 1 KB
/
apolar
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
NULL=0
error=0
while true
do
sleep 1
if [ -e MD_prep.out ]; then
grep Error MD_prep.out > gromacs_errors
fi
if [ -e MD_run.out ]; then
grep Error MD_run.out >> gromacs_errors
fi
if [ -e ndx.out ]; then
grep Error ndx.out >> gromacs_errors
fi
if [ -e ndx.error ]; then
echo "ndx error" >> gromacs_errors
fi
nolines=`wc -l < gromacs_errors`
if [ $nolines -gt $NULL ]; then
echo "one of gromacs jobs failed. exiting loop."
error=1 ; break
fi
if [ -e md_0_1.log ] #exit w/o error if MD_run job finished
then
grep Finished md_0_1.log > tmp
if [ -s tmp ]
then
error=0 ; break
fi
fi
done
rm -f end
if [ $error -eq $NULL ]
then
while [ ! -e md_0_1.ndx ] #wait until ndx job finishes
do
sleep 1
done
echo 1 13 | g_mmpbsa -f md_0_1.xtc -s md_0_1.tpr -n md_0_1.ndx -i apolar_sasa.mdp -nomme -pbsa -decomp -apol sasa.xvg -apcon sasa_contrib.dat
fi