6 import matplotlib.pyplot as plt
7 import matplotlib.cm as cm
11 with open('remd_all.stat','r') as f:
13 ncolumns=len(line.split())
16 x,y,s,r,ek,rms= np.loadtxt('remd_all.stat',usecols=(11,3,0,13,2,5),unpack=True)
18 x,y,s,r= np.loadtxt('remd_all.stat',usecols=(7,3,0,9),unpack=True)
20 hall,binall=np.histogram(y,bins=40,density=False)
22 plt.xlim(min(binall), max(binall[hall>4]))
23 plt.ylim(0,max(hall)/4)
24 plt.ylabel('number of samples')
25 plt.xlabel('potential energy [kcal/mol]')
27 #Tremd=[240, 260, 280, 300, 320, 340, 360, 390]
29 Tremd=map(float,sys.argv[1].split())
32 colors = cm.rainbow(np.linspace(0, 1, len(Tremd)))
33 for T,c in zip(Tremd,colors):
35 h,bin=np.histogram(yt,bins=40,density=False)
36 center = (bin[:-1] + bin[1:]) / 2
37 plt.plot(center,h,'-',color=c)
38 # plt.bar(bin[:-1], h, width = bin[2]-bin[1],color=c)
40 plt.savefig('remd_ene_hist.png')
44 plt.xlabel('bath temperature [K]')
45 plt.ylabel('potential energy [kcal/mol]')
47 plt.ylim(min(binall), max(binall[hall>4]))
48 plt.xlim(Tremd[0]-10, Tremd[-1]+10)
49 #Tremd=[240, 260, 280, 300, 320, 340, 360, 390]
50 colors = cm.rainbow(np.linspace(0, 1, len(Tremd)))
51 for T,c in zip(Tremd,colors):
54 plt.plot(xt,yt,'.',color=c)
56 plt.savefig('remd_Tene.png')
59 plt.ylabel('bath temperature [K]')
60 plt.xlabel('step*replica')
62 replica=range(int(sys.argv[2]))
63 colors = cm.rainbow(np.linspace(0, 1, len(replica)))
64 for i,c in zip(replica,colors):
67 plt.plot(xt,yt,'-',color=c)
69 plt.savefig('remd_ex.png')
75 plt.ylabel('potential energy')
77 for T,c in zip(Tremd,colors):
80 plt.plot(xt,yt,'.',color=c,ms=4)
83 plt.savefig('remd_ene_rms.png')
87 x,y,rms= np.loadtxt('file_wham.thermal',usecols=(0,6,4),unpack=True)
90 plt.xlabel('bath temperature [K]')
91 plt.ylabel('heat capacity')
92 plt.xlim(Tremd[1]-10, Tremd[-1]+10)
93 plt.plot(x,y,'-',color=c)
94 plt.savefig('remd_cv.png')
98 plt.xlabel('bath temperature [K]')
99 plt.ylabel('average RMSD')
100 plt.xlim(Tremd[1]-10, Tremd[-1]+10)
102 plt.savefig('remd_rmsd.png')