root / examples / Test / Dep_tscan_m @ 8
Historique | Voir | Annoter | Télécharger (2,7 ko)
1 |
#!/bin/bash |
---|---|
2 |
export LANG=C |
3 |
if [ $# -lt 3 ]; then |
4 |
echo "Use: $0 File.out [PES] [T]" |
5 |
exit |
6 |
fi |
7 |
Fout=$1 |
8 |
ItMax=`grep MAXCYC $Fout | tail -1 | awk '{print $3}'` |
9 |
Nom=`grep PATHNAME $Fout | tail -1 | awk '{print $3}'` |
10 |
PES=$2 |
11 |
Tgt=$3 |
12 |
|
13 |
WDir=`dirname $0` |
14 |
|
15 |
NomGplot=${Nom}_m.gplot |
16 |
yr="[-0.50:-0.42]" |
17 |
|
18 |
if [ ! -s list ]; then |
19 |
echo "File list is missing" |
20 |
exit |
21 |
fi |
22 |
awk -f $WDir/Dep_tgt.awk $Fout |
23 |
cat <<EOF > $NomGplot |
24 |
#!/usr/bin/gnuplot -persist |
25 |
set pointsize 2 |
26 |
unset key |
27 |
EOF |
28 |
let ItM=ItMax-1 |
29 |
for i in `seq 0 $ItM` |
30 |
do |
31 |
xyz2scan ${Nom}_cart.${i} > /dev/null |
32 |
mv Scan.dat ${Nom}_${i}.dat |
33 |
cat <<EOF >> $NomGplot |
34 |
set multiplot |
35 |
set origin 0.,0. |
36 |
set size 0.5 |
37 |
clear |
38 |
set xrange [1.:2.5] |
39 |
set yrange [-10:190] |
40 |
plot "HCN_irc.dat" u 1:3 w l |
41 |
EOF |
42 |
if [ "$PES" != "" ]; then |
43 |
echo "replot \"HCN_PES_2D.dat\" u 1:2 w l 2, \"HCN_PES_2D.dat\" u 1:(-\$2) w l 2,\"HCN_PES_2D.dat\" u 1:(360-\$2) w l 2" >> $NomGplot |
44 |
fi |
45 |
if [ -s ${Nom}_spline.${i} ]; then |
46 |
echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot |
47 |
echo "replot \"${Nom}_spline.${i}\" u 2:4 w l" >> $NomGplot |
48 |
elif [ -s ${Nom}_dbgtgt_${i}.dat ]; then |
49 |
echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot |
50 |
echo "replot \"${Nom}_dbgtgt_${i}.dat\" u 2:(\$4*180./pi) w l" >> $NomGplot |
51 |
else |
52 |
echo "replot \"${Nom}_${i}.dat\" u 1:3 w lp 5" >> $NomGplot |
53 |
fi |
54 |
if [ "$Tgt" != "" ]; then |
55 |
echo "replot \"${Nom}_tgt_${i}.dat\" u 1:3 w l" >> $NomGplot |
56 |
fi |
57 |
cat <<EOF >> $NomGplot |
58 |
set origin .505,0. |
59 |
# set size 0.5 |
60 |
clear |
61 |
set yrange $yr |
62 |
set xrange [-10:190] |
63 |
EOF |
64 |
echo "plot \"${Nom}_${i}.dat\" u 3:4 t \"E\" w lp" >> $NomGplot |
65 |
echo "unset multiplot" >> $NomGplot |
66 |
echo "pause -1" >> $NomGplot |
67 |
done |
68 |
let i=ItMax |
69 |
xyz2scan ${Nom}_cart.${i} > /dev/null |
70 |
mv Scan.dat ${Nom}_${i}.dat |
71 |
cat <<EOF >> $NomGplot |
72 |
set multiplot |
73 |
set origin 0.,0. |
74 |
# set size 0.5 |
75 |
clear |
76 |
set xrange [1.:2.5] |
77 |
set yrange [-10:190] |
78 |
plot "HCN_irc.dat" u 1:3 w l |
79 |
EOF |
80 |
if [ "$PES" != "" ]; then |
81 |
echo "replot \"HCN_PES_2D.dat\" u 1:2 w l 2, \"HCN_PES_2D.dat\" u 1:(-\$2) w l 2,\"HCN_PES_2D.dat\" u 1:(360-\$2) w l 2" >> $NomGplot |
82 |
fi |
83 |
if [ -s ${Nom}_spline.${i} ]; then |
84 |
echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot |
85 |
echo "replot \"${Nom}_spline.${i}\" u 2:4 w l" >> $NomGplot |
86 |
elif [ -s ${Nom}_dbgtgt_${i}.dat ]; then |
87 |
echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot |
88 |
echo "replot \"${Nom}_dbgtgt_${i}.dat\" u 2:(\$4*180./pi) w l" >> $NomGplot |
89 |
else |
90 |
echo "replot \"${Nom}_${i}.dat\" u 1:3 w lp 5" >> $NomGplot |
91 |
fi |
92 |
cat <<EOF >> $NomGplot |
93 |
set origin .505,0. |
94 |
# set size 0.5 |
95 |
clear |
96 |
set yrange $yr |
97 |
set xrange [-10:190] |
98 |
EOF |
99 |
echo "plot \"${Nom}_${i}.dat\" u 3:4 t \"E\" w lp" >> $NomGplot |
100 |
echo "unset multiplot" >> $NomGplot |
101 |
echo "pause -1" >> $NomGplot |
102 |
|
103 |
chmod u+x ./$NomGplot |
104 |
echo "./$NomGplot to see the path" |