-
Notifications
You must be signed in to change notification settings - Fork 0
/
count.
45 lines (41 loc) · 1.15 KB
/
count.
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
#!/bin/bash -l
#=====================================================
# count. ### count pore water molecules and ###
# ### ions ###
# parameters
# $1 processing option
# options: <null> - count everything
# T - count everything in channel 0 (top)
# t - count waters in channel 0
# ti - count ions in channel 0
# B - count everything in channel 1 (bot)
# t - count waters in channel 1
# ti - count ions in channel 1
#_____________________________________________________
declare -a fyles
fyles=(twat twatt tca tan tcat tant bwat bwatt bca ban bcat bant)
i=0
last=11
if [ "${1}" == "T" ]; then
last=5
elif [ "${1}" == "t" ]; then
last=1
elif [ "${1}" == "ti" ]; then
i=2
last=5
elif [ "${1}" == "B" ]; then
i=6
elif [ "${1}" == "b" ]; then
i=6
last=7
elif [ "${1}" == "bi" ]; then
i=8
fi
while [ ${i} -le ${last} ]; do
if [ -a ${fyles[$i]}.xvg ]; then rm ${fyles[$i]}.xvg; fi
source ../jobs/select. ${fyles[$i]}
let "i=i+1"
done
for i in {0..1} {6..7}; do
source ../jobs/stddev.awk ${fyles[$i]}.xvg > ${fyles[$i]}.std
done