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,1,13,2,5),unpack=True)
17 x0,s0,r0,rms0= np.loadtxt('remd_all0.stat',usecols=(11,1,13,5),unpack=True)
19 x,y,s,r= np.loadtxt('remd_all.stat',usecols=(7,3,1,9),unpack=True)
20 x0,s0,r0= np.loadtxt('remd_all0.stat',usecols=(7,1,9),unpack=True)
24 hall,binall=np.histogram(y,bins=40,density=False)
26 plt.xlim(min(binall), max(binall[hall>4]))
27 #plt.ylim(0,max(hall)/4)
28 plt.ylabel('number of samples')
29 plt.xlabel('potential energy [kcal/mol]')
31 #Tremd=[240, 260, 280, 300, 320, 340, 360, 390]
33 Tremd=map(float,sys.argv[1].split())
36 colors = cm.rainbow(np.linspace(0, 1, len(Tremd)))
37 for T,c in zip(Tremd,colors):
39 h,bin=np.histogram(yt,bins=40,range=(min(binall),max(binall[hall>4])),density=False)
40 center = (bin[:-1] + bin[1:]) / 2
41 plt.plot(center,h,'-',color=c)
42 # plt.bar(bin[:-1], h, width = bin[2]-bin[1],color=c)
44 plt.savefig('remd_ene_hist.png')
48 plt.xlabel('bath temperature [K]')
49 plt.ylabel('potential energy [kcal/mol]')
51 plt.ylim(min(binall), max(binall[hall>4]))
52 plt.xlim(Tremd[0]-10, Tremd[-1]+10)
53 #Tremd=[240, 260, 280, 300, 320, 340, 360, 390]
54 colors = cm.rainbow(np.linspace(0, 1, len(Tremd)))
55 for T,c in zip(Tremd,colors):
58 plt.plot(xt,yt,'.',color=c)
60 plt.savefig('remd_Tene.png')
63 plt.ylabel('bath temperature [K]')
64 plt.xlabel('time*replica')
66 replica=range(int(sys.argv[2]))
67 #colors = cm.rainbow(np.linspace(0, 1, len(replica)))
68 cmap = plt.get_cmap('hot')
69 colors = cmap(np.linspace(0, 1, len(replica)*1.4))
70 for i,c in zip(replica,colors):
72 xt=(s0+r0*max(s0))[r0==i]
73 plt.plot(xt,yt,'-',color=c)
75 plt.savefig('remd_ex.png')
77 colors = cm.rainbow(np.linspace(0, 1, len(Tremd)))
82 plt.ylabel('potential energy')
84 for T,c in zip(Tremd,colors):
87 plt.plot(xt,yt,'.',color=c,ms=4)
90 plt.savefig('remd_ene_rms.png')
93 plt.xlabel('time*replica')
97 xt=(s0+r0*max(s0))[r0==i]
99 plt.scatter(xt,yt,c=tt,edgecolors='face',s=0.1,cmap=cm.rainbow,vmin=Tremd[0],vmax=Tremd[-1])
100 plt.xlim(0,max(s)+max(s)*max(r))
102 plt.savefig('remd_step_rms.png')
105 x,y,rms= np.loadtxt('file_wham.thermal',usecols=(0,6,4),unpack=True)
108 plt.xlabel('bath temperature [K]')
109 plt.ylabel('heat capacity')
110 plt.xlim(Tremd[0]-10, Tremd[-1]+10)
111 plt.plot(x,y,'-',color=c)
112 plt.savefig('remd_cv.png')
116 plt.xlabel('bath temperature [K]')
117 plt.ylabel('average RMSD')
118 plt.xlim(Tremd[0]-10, Tremd[-1]+10)
120 plt.savefig('remd_rmsd.png')