Statistiques
| Révision :

root / examples / Test / Cart / Dep_tscan_m @ 1

Historique | Voir | Annoter | Télécharger (2,59 ko)

1
#!/bin/bash
2
export LANG=C
3
if [ $# -lt 3 ]; then
4
 echo "Use: $0 File.out MaxCyc PathName [PES] [T]"
5
 exit
6
fi
7
Fout=$1
8
ItMax=$2
9
Nom=$3
10
PES=$4
11
Tgt=$5
12

    
13
NomGplot=${Nom}_m.gplot
14
yr="[-0.50:-0.42]"
15

    
16
if [ ! -s list ]; then
17
 echo "File list is missing"
18
 exit
19
fi
20
awk -f Dep_tgt.awk $Fout 
21
cat <<EOF > $NomGplot
22
#!/usr/bin/gnuplot -persist
23
 set pointsize 2
24
 unset key
25
EOF
26
let ItM=ItMax-1
27
for i in `seq 0 $ItM`
28
  do
29
 xyz2scan ${Nom}_cart.${i} > /dev/null
30
 mv Scan.dat ${Nom}_${i}.dat
31
 cat <<EOF >>  $NomGplot
32
 set multiplot
33
 set origin 0.,0.
34
 set size 0.5
35
 clear
36
 set xrange [1.:2.5]
37
 set yrange [-10:190]
38
 plot "HCN_irc.dat" u 1:3 w l
39
EOF
40
 if [ "$PES" != "" ]; then
41
  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
42
 fi
43
 if [ -s ${Nom}_spline.${i} ]; then
44
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot
45
 echo "replot \"${Nom}_spline.${i}\" u 2:4 w l" >> $NomGplot
46
 elif [  -s ${Nom}_dbgtgt_${i}.dat ]; then
47
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot
48
 echo "replot \"${Nom}_dbgtgt_${i}.dat\" u 2:(\$4*180./pi) w l" >> $NomGplot
49
 else
50
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w lp 5" >> $NomGplot
51
fi
52
 if [ "$Tgt" != "" ]; then
53
  echo "replot \"${Nom}_tgt_${i}.dat\" u 1:3 w l" >> $NomGplot
54
 fi
55
 cat <<EOF >>  $NomGplot
56
 set origin .505,0.
57
# set size 0.5
58
 clear
59
 set yrange $yr
60
 set xrange [-10:190]
61
EOF
62
 echo "plot \"${Nom}_${i}.dat\" u 3:4 t \"E\" w lp" >> $NomGplot
63
 echo "unset multiplot" >> $NomGplot
64
 echo "pause -1" >> $NomGplot
65
 done
66
let i=ItMax
67
 xyz2scan ${Nom}_cart.${i} > /dev/null
68
 mv Scan.dat ${Nom}_${i}.dat
69
 cat <<EOF >>  $NomGplot
70
 set multiplot
71
 set origin 0.,0.
72
# set size 0.5
73
 clear
74
 set xrange [1.:2.5]
75
 set yrange [-10:190]
76
 plot "HCN_irc.dat" u 1:3 w l
77
EOF
78
 if [ "$PES" != "" ]; then
79
  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
80
 fi
81
 if [ -s ${Nom}_spline.${i} ]; then
82
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot
83
 echo "replot \"${Nom}_spline.${i}\" u 2:4 w l" >> $NomGplot
84
 elif [  -s ${Nom}_dbgtgt_${i}.dat ]; then
85
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w p 5" >> $NomGplot
86
 echo "replot \"${Nom}_dbgtgt_${i}.dat\" u 2:(\$4*180./pi) w l" >> $NomGplot
87
 else
88
 echo "replot \"${Nom}_${i}.dat\" u 1:3 w lp 5" >> $NomGplot
89
fi
90
 cat <<EOF >>  $NomGplot
91
 set origin .505,0.
92
# set size  0.5
93
 clear
94
 set yrange $yr
95
 set xrange [-10:190]
96
EOF
97
 echo "plot \"${Nom}_${i}.dat\" u 3:4 t \"E\" w lp" >> $NomGplot
98
 echo "unset multiplot" >> $NomGplot
99
 echo "pause -1" >> $NomGplot
100

    
101
chmod u+x ./$NomGplot
102
echo "./$NomGplot      to see the path"