-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_bmn_obs
More file actions
216 lines (153 loc) · 6.26 KB
/
run_bmn_obs
File metadata and controls
216 lines (153 loc) · 6.26 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#!/bin/bash
#Used to extract observables from output files generated using https://github.com/daschaich/susy/tree/master/1d_Q16
#This script needs some improvement (specifically in action and acceptance rate)
#T is temperature, mu is mass used in BMN, N is number of colors and Nt is number of lattice sites across temporal direction
#(Nt=Nx as symmetric lattices are used)
T=$1
mu=$2
N=$3
Nt=$4
#I have arranged folders with different temperatures which contain an 'Out' folder with all out files.
#Extarcted observables are then moved from 'Out' to 'Results' folder.
cd t$1
echo ==== Deleting previous data in Results ====
cd Results
rm -f *.txt
rm -f *.png
cd ..
echo ==== Extracting observables ====
cd Out
acc_in=0
#Extracting observables for 3500 MDTU's
for ((c=0 ;c<3500; c+=10))
do
#echo ==Extracting Delta==
grep "delta" out.$c-* | awk '{print $5}' >> del.txt #delta S
#echo ==Extracting Forces==
grep "FORCE_GAUGE" out.$c-* | awk '{print $2}' >>force_g.txt #FORCES
#echo ==Extracting exp[-delta S]==
grep "delta" out.$c-* | awk '{print exp(-$5)}' >> exp_del.txt #exp(-delta S)
#echo ==Extracting mod[delta S]==
grep "delta" out.$c-* | awk '{print $5<0?$5*-1:$5}' >> mod_del.txt # |delta S|
#echo ==Extracting Acceptance rate==
grep "ACCEPT" ./out.$c-* | wc -l >> acc.txt
acc_in=`grep "" ./acc.txt | awk -v acc_in="$acc_in" '{print $1+acc_in}'`
rate=`grep "" ./acc.txt | awk -v acc_in="$acc_in", -v c="$c" '{print acc_in/(c+10)}'`
for ((d=1;d<=10;d++))
do
echo $rate >> rate.txt
#echo ==Extracting nstep==
grep "nstep " out.$c-* | awk '{print $2}' >> nstep.txt #nstep
#echo ==Extracting nstep_gauge==
grep "nstep_" out.$c-* | awk '{print $2}' >> nstep_g.txt #nstep_gauge
#echo ==Extracting Traj length==
grep "traj_l" out.$c-* | awk '{print $2}' >> traj.txt #Trajec Length
done
rm acc.txt
#echo ==Extracting Re and Im Polyakov Loop==
grep "GMES" out.$c-* | awk -v N="$N" '{print $2/N,$3/N}' >> poly.txt #Polyakov loop
#echo ==Extracting Mod Polyakov Loop==
grep "GMES" out.$c-* | awk -v N="$N" '{print sqrt($2*$2+$3*$3)/(N)}' >> poly_mod.txt #Mod Polyakov loop
grep "GMES" out.$c-* | awk -v N="$N" '{print ($2*$2+$3*$3)/(N*N)}' >> poly_sq.txt #Poly Square
#echo ==Extracting Internal energy==
grep "action" ./out.$c-* | awk -v N="$N", -v T="$T" '{print ($7*3.0+2.0*$3+2.0*$5+2.5*$9)*T/(N*N)}' >> energy1.txt #Internal Energy
#echo ==Extracting Internal energy Prime==
grep "action" ./out.$c-* | awk -v T="$T" '{print ($7*3.0/0.5+2.0*$3+2.0*$5+2.5*$9*1.5)*T*T}' >> energy_prime1.txt #Internal Energy Prime
#echo ==Extracting Myers==
grep "action" ./out.$c-* | awk -v T="$T", -v mu="$mu", -v N="$N" '{print ($9)*(T/mu)*(1.0/(N*N))}' >> myers1.txt #Myers Term
#echo ==Extracting Extent of space==
grep "action" ./out.$c-* | awk -v T="$T", -v mu="$mu", -v N="$N" '{print ($3*2.0*9.0+$5*2.0*36.0)*(T/(mu*mu))/(N*N)}' >> extent1.txt #Extent of space
#echo ==Extracting Action==
grep "delta" ./out.$c-* | awk '{print $9}' >> action.txt #Action
#echo ==Extracting SO(3)==
grep "action" ./out.$c-* | awk -v T="$T", -v mu="$mu", -v N="$N" '{print ($3*2.0*9.0)*(T/(mu*mu))/(N*N)}' >> so31.txt #SO3
#echo ==Extracting SO(6)
grep "action" ./out.$c-* | awk -v T="$T", -v mu="$mu", -v N="$N" '{print ($5*2.0*36.0)*(T/(mu*mu))/(N*N)}' >> so61.txt #SO6
done
cd ..
cd Results
scp ../Out/*.txt ./
#All observables files contains initial and final values of observables extracted from Out files
#Extracting observable values after metropolis test
awk '{if(NR%2!=0)print}' energy1.txt >> energy.txt
awk '{if(NR%2!=0)print}' extent1.txt >> extent.txt
awk '{if(NR%2!=0)print}' myers1.txt >> myers.txt
awk '{if(NR%2!=0)print}' energy_prime1.txt >> energy_prime.txt
awk '{if(NR%2!=0)print}' so31.txt >> so3.txt
awk '{if(NR%2!=0)print}' so61.txt >> so6.txt
echo ==Plotting graphs==
#gnuplot poly.p
#gnuplot poly_mod.p
#gnuplot nstep.p
#gnuplot forces.p
#gnuplot mod_del.p
#gnuplot exp_del.p
#gnuplot del.p
#gnuplot traj.p
#gnuplot energy.p
#gnuplot extent.p
#gnuplot myers.p
#gnuplot action.p
#gnuplot rate.p
#gnuplot so.p
#errors is compiled file to calculate average and error for all data files with thermalisation cut 500
#
./errors -c1 -s500 energy.txt
avg=`grep "" ./Result.txt | awk -v N="$N" '{print $1*(N*N)}'`
grep "" ./energy.txt | awk -v avg="$avg", -v N="$N" '{print (($1*(N*N)-avg)*($1*(N*N)-avg))}' >> energy_avg.txt
paste energy_avg.txt energy_prime.txt >> temp.txt
grep "" ./temp.txt | awk '{print $1-$2}' >> spec_heat.txt
rm temp.txt
echo energy >> Result.txt
echo action >> Result.txt
./errors -c1 -s500 action.txt
echo extent >> Result.txt
./errors -c1 -s500 extent.txt
echo so3 >> Result.txt
./errors -c1 -s500 so3.txt
echo so6 >> Result.txt
./errors -c1 -s500 so6.txt
echo polyakov loop >> Result.txt
./errors -c1 -s500 poly_mod.txt
echo polyakov square avg >> Result.txt
./errors -c1 -s500 poly_sq.txt
echo specific heat without factors >> Result.txt
./errors -c1 -s500 spec_heat.txt
s_h=`awk 'NR==16{print;}' Result.txt`
echo specific heat final >> Result.txt
echo $s_h | awk -v N="$N", -v T="$T" '{print ($1)*(1.0/T)*(1.0/T)*(1.0/(N*N)),($2)*(1.0/T)*(1.0/T)*(1.0/(N*N))}' >> Result.txt
echo poly avg square >> Result.txt
poly=`awk 'NR==12{print;}' Result.txt`
echo $poly | awk '{print ($1)*($1),2*($2)*($1)}' >> Result.txt
poly_sq=`awk 'NR==14{print;}' Result.txt`
echo $poly | awk -v poly_sq="$poly_sq" '{print ($1)*($1),2*($2)*($1),poly_sq}' >> Result_temp.txt
#echo $poly | awk '{print ($1)*($1),2*($2)*($1)}' >> Result_temp.txt
echo susceptibility >> Result.txt
grep "" ./Result_temp.txt | awk '{print $3-$1,$2+$4}' >> Result.txt
rm Result_temp.txt
echo myers >> Result.txt
./errors -c1 -s500 myers.txt
#gnuplot spec_heat.p
energy=`awk 'NR==1{print;}' Result.txt`
echo $1 $energy >> ../../energy.txt
action=`awk 'NR==4{print;}' Result.txt`
echo $1 $action >> ../../action.txt
extent=`awk 'NR==6{print;}' Result.txt`
echo $1 $extent >> ../../extent.txt
so3=`awk 'NR==8{print;}' Result.txt`
so6=`awk 'NR==10{print;}' Result.txt`
echo $1 $so3 $so6 >> ../../so.txt
polyakov=`awk 'NR==12{print;}' Result.txt`
echo $1 $polyakov >> ../../poly.txt
spec_heat=`awk 'NR==18{print;}' Result.txt`
echo $1 $spec_heat >> ../../spec.txt
suscept=`awk 'NR==22{print;}' Result.txt`
echo $1 $suscept >> ../../susc.txt
myers=`awk 'NR==24{print;}' Result.txt`
echo $1 $myers >> ../../myers.txt
cd ..
cd Out
rm *.txt
cd ..
wait
echo Done