remd ex plot from 0 step
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 24 Aug 2017 23:12:23 +0000 (01:12 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Sat, 26 Aug 2017 11:21:16 +0000 (13:21 +0200)
Conflicts:

files/pbs8.csh

files/matplotlib_hist.py
files/pbs8.csh

index 7bbf4e9..9521e26 100755 (executable)
@@ -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')
index 32055ca..ae80fd0 100755 (executable)
@@ -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