From 2fca6b6df0ebd2df200cddb1e51049afa13399dd Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Fri, 25 Aug 2017 01:12:23 +0200 Subject: [PATCH] remd ex plot from 0 step Conflicts: files/pbs8.csh --- files/matplotlib_hist.py | 6 ++++-- files/pbs8.csh | 13 ++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/files/matplotlib_hist.py b/files/matplotlib_hist.py index 7bbf4e9..9521e26 100755 --- a/files/matplotlib_hist.py +++ b/files/matplotlib_hist.py @@ -14,8 +14,10 @@ with open('remd_all.stat','r') as f: if ncolumns==14: x,y,s,r,ek,rms= np.loadtxt('remd_all.stat',usecols=(11,3,0,13,2,5),unpack=True) + x0,s0,r0= np.loadtxt('remd_all0.stat',usecols=(11,0,13),unpack=True) else: x,y,s,r= np.loadtxt('remd_all.stat',usecols=(7,3,0,9),unpack=True) + x0,s0,r0= np.loadtxt('remd_all0.stat',usecols=(7,0,9),unpack=True) hall,binall=np.histogram(y,bins=40,density=False) @@ -62,8 +64,8 @@ plt.xlabel('step*replica') replica=range(int(sys.argv[2])) colors = cm.rainbow(np.linspace(0, 1, len(replica))) for i,c in zip(replica,colors): - yt=x[r==i] - xt=(s+r*max(s))[r==i] + yt=x0[r0==i] + xt=(s0+r0*max(s0))[r0==i] plt.plot(xt,yt,'-',color=c) plt.savefig('remd_ex.png') diff --git a/files/pbs8.csh b/files/pbs8.csh index 32055ca..ae80fd0 100755 --- a/files/pbs8.csh +++ b/files/pbs8.csh @@ -45,9 +45,16 @@ $MPIRUN -machinefile $PBS_NODEFILE -np 2 $WHAM_BIN #test images setenv line `awk '{}END{print int(NR*0.2)}' file_GB000.stat` -tail -q -n +$line file_GB*.stat >remd_all.stat -../files/matplotlib_hist.py $temperatures -rm remd_all.stat + +if ( `grep -c pdbref file.inp` ) then + tail -q -n +$line file_GB*.stat | awk '{if ( NF == 14 ) print}' >remd_all.stat + cat file_GB*.stat | awk '{if ( NF == 14 ) print}' > remd_all0.stat +else + tail -q -n +$line file_GB*.stat | awk '{if ( NF == 10 ) print}' >remd_all.stat + cat file_GB*.stat |awk '{if ( NF == 10 ) print}' > remd_all0.stat +endif +../../files/matplotlib_hist.py $temperatures +rm remd_all.stat remd_all0.stat #CLUSTER WHAM setenv INPUT file_cluster -- 1.7.9.5