In [5]:
f2 = open('refrdfM2.dat', 'r');
lines = f2.readlines();
f2.close();
g3 = []
for line in lines:
p = line.split()
if len(p) > 1:
g3.append([float(p[0]),float(p[1])])
f2 = open('rdfM2.dat', 'r');
lines = f2.readlines();
f2.close();
g2 = []
for line in lines:
p = line.split()
if len(p) > 1:
g2.append([float(p[0]),float(p[1])])
f2 = open('rdfAALow.dat', 'r');
lines = f2.readlines();
f2.close();
g1 = []
for line in lines:
p = line.split()
if len(p) > 1:
g1.append([float(p[0]),float(p[1])])
f2 = open('rdfRefLow.dat', 'r');
lines = f2.readlines();
f2.close();
g4 = []
for line in lines:
p = line.split()
if len(p) > 1:
g4.append([float(p[0]),float(p[1])])
f2 = open('rdfCGLow.dat', 'r');
lines = f2.readlines();
f2.close();
g5 = []
for line in lines:
p = line.split()
if len(p) > 1:
g5.append([float(p[0]),float(p[1])])
In [6]:
%pylab inline
gn1 = np.array(g1)
gn2 = np.array(g2)
gn3 = np.array(g3)
gn4 = np.array(g4)
gn5 = np.array(g5)
In [8]:
plt.figure(figsize=(16,6), dpi=300)
plt.subplot2grid((1,2), (0,0))
plt.axis([0, 17, 0,8])
plt.xlabel(r'$r,\ (\AA)$',fontsize=20)
plt.ylabel(r'$g(r),\ RDF$',fontsize=20)
plt.plot(10*gn1[:,0],gn1[:,1],'g-.', label="All-Atom")
plt.plot(10*gn5[:,0],gn5[:,1],'m-', label="Reproduction Test M1")
plt.plot(10*gn4[:,0],gn4[:,1],'k--', label="Reference CG M1")
plt.legend(loc='upper right')
plt.subplot2grid((1,2), (0,1))
plt.axis([0, 17, 0,8])
plt.xlabel(r'$r,\ (\AA)$',fontsize=20)
plt.ylabel(r'$g(r),\ RDF$',fontsize=20)
plt.plot(10*gn1[:,0],gn1[:,1],'g-.', label="All-Atom")
plt.plot(10*gn2[:,0],gn2[:,1],'r-', label="Reproduction Test M2")
plt.plot(gn3[:,0],gn3[:,1],'b--', label="Reference CG M2")
plt.legend(loc='upper right')
savefig("rdfM1M2.pdf",bbox_inches='tight', dpi=300)
In [ ]:
10