From 0e959d9b94551351dd8213beba19888d6dda54b3 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 22 Apr 2021 15:55:47 -0400 Subject: [PATCH] Update plaquette analysis --- scripts/hmc.sh | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/scripts/hmc.sh b/scripts/hmc.sh index c2cd6593..4d7191ff 100755 --- a/scripts/hmc.sh +++ b/scripts/hmc.sh @@ -1,19 +1,27 @@ #!/bin/bash LOG=$1 -SWEEPS=`grep dH $LOG | wc -l` -SWEEPS=`expr $SWEEPS - 80` +SWEEPS=`grep dH.= $LOG | wc -l` +SWEEPS=`expr $SWEEPS - 100` echo echo $SWEEPS thermalised sweeps echo -plaq=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$10} END { print S/NR} ' ` -plaqe=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$10 ; SS=SS+$10*$10 } END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } ' ` +plaq=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$12} END { print S/NR} ' ` +plaqe=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$12 ; SS=SS+$12*$12 } END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } ' ` echo "Plaquette: $plaq (${plaqe})" echo -dHv=`grep dH $LOG | tail -n $SWEEPS | awk '{ S=S+$10 ; SS=SS+$10*$10 } END { print sqrt(SS/NR) } ' ` -edH=`grep dH $LOG | tail -n $SWEEPS | awk '{ S=S+exp(-$10)} END { print S/NR} '` -echo ": $edH" +grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$12/20; if(NR%20==0){ print NR/20, " ", S; S=0;} } ' > plaq.binned + +plaq=`cat plaq.binned | awk '{ S=S+$2} END { print S/NR} ' ` +plaqe=`cat plaq.binned | awk '{ S=S+$2 ; SS=SS+$2*$2 } END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } ' ` +echo "Binned Plaquette: $plaq (${plaqe})" +echo + +dHv=`grep dH.= $LOG | tail -n $SWEEPS | awk '{ S=S+$16 ; SS=SS+$16*$16 } END { print sqrt(SS/NR) } ' ` +edH=`grep dH.= $LOG | tail -n $SWEEPS | awk '{ S=S+exp(-$16)} END { print S/NR} '` +dedH=`grep dH.= $LOG | tail -n $SWEEPS | awk '{ S=S+exp(-$16); SS=SS+exp(-$16)*exp(-$16)} END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } '` +echo ": $edH (${dedH})" echo ": $dHv" TRAJ=`grep Acc $LOG | wc -l` @@ -22,12 +30,13 @@ PACC=`expr 100 \* ${ACC} / ${TRAJ} ` echo echo "Acceptance $PACC % $ACC / $TRAJ " -grep Plaq $LOG | awk '{ print $10 }' | uniq > plaq.dat -grep dH $LOG | awk '{ print $10 }' > dH.dat -echo set yrange [-0.2:1.0] > plot.gnu +grep Plaq $LOG | awk '{ print $12 }' | uniq > plaq.dat +grep dH.= $LOG | awk '{ print $16 }' > dH.dat +echo set yrange [0.58:0.60] > plot.gnu echo set terminal 'pdf' >> plot.gnu +echo "f(x) =0.588" >> plot.gnu echo "set output 'plaq.${LOG}.pdf'" >> plot.gnu -echo "plot 'plaq.dat' w l, 'dH.dat' w l " >> plot.gnu +echo "plot 'plaq.dat' w l, f(x) " >> plot.gnu echo gnuplot plot.gnu >& gnu.errs open plaq.${LOG}.pdf