In [4]:
import matplotlib.pyplot as plt 
import numpy as np
from matplotlib.legend_handler import HandlerLine2D
import matplotlib.lines as mlines
from scipy.interpolate import interp1d
from scipy.interpolate import griddata

%matplotlib inline

In [8]:
# phi1 phi2

#This is the phi/psi data from the 2CV PBMetaD simulation, no correction 
##! FIELDS time phi1 psi1 phi2 psi2 phi3 psi3 metad.bias Ct_phi1 Ct_psi1 Ct_phi2 Ct_psi2 Ct_phi3 Ct_psi3
##           0    1   2     3   4    5   6    7              8     9       10      11       12     13
data=np.genfromtxt('wts',comments='#')
#make 2D histogram then replace all zeros with 1e-15

In [19]:
beta=1/8.314e-3/300
hist1, bins1 = np.histogram(np.log(data[:,0])/beta, bins=50,normed=True)
width = 0.7 * (bins1[1] - bins1[0])
center = (bins1[:-1] + bins1[1:]) / 2

fig = plt.figure(figsize=(6,4))


plt.bar(center, hist1, align='center', width=width)

plt.xlabel('$wt value$')


plt.show()



In [20]:
beta=1/8.314e-3/300
hist1, bins1 = np.histogram(np.log(data[:,1])/beta, bins=50,normed=True)
width = 0.7 * (bins1[1] - bins1[0])
center = (bins1[:-1] + bins1[1:]) / 2

fig = plt.figure(figsize=(6,4))



plt.bar(center, hist1, align='center', width=width)

plt.xlabel('$wt value$')


plt.show()



In [ ]: