In [1]:
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
from scipy.interpolate import griddata
In [7]:
%matplotlib inline
# CHECK OUT README.TXT
# THIS CAME FROM
#/gscratch/pfaendtner/kfleming/IL_project/Lipase/CPMD/uncatalyzed/MetaD_Rates/butanol/water/scratch/trial1/HILLS
fesdata = np.genfromtxt('fes.dat',comments='#');
dim1=100
dim2=100
fesdata = fesdata[:,0:3]
enertokcal=1/627.5095
#some post-processing to be compatible with contourf
X=np.reshape(fesdata[:,0],[dim1,dim2],order="F") #order F was 20% faster than A/C
Y=np.reshape(fesdata[:,1],[dim1,dim2],order="F")
Z=np.reshape((fesdata[:,2]-np.min(fesdata[:,2]))/enertokcal,[dim1,dim2],order="F") #convert to kcal/mol
#what spacing do you want?
spacer=3
lines=100 #this goes to 80 kcal/mol (2*40)
levels=np.linspace(0,lines*spacer,num=(lines+1),endpoint=True)
fig=plt.figure(figsize=(10,8))
axes = fig.add_subplot(111)
plt.contourf(X, Y, Z, levels, cmap=plt.cm.bone,)
plt.colorbar()
plt.xlabel('$d1$')
plt.ylabel('$d2$')
#axes.set_ylim([.1,.5])
#axes.set_xlim([0.1,0.5])
plt.rcParams.update({'font.size': 12})
plt.show()
In [5]:
data=np.genfromtxt('HILLS')
# you can see the system ends around the 300th hill
%matplotlib inline
fig = plt.figure(figsize=(6,6))
fig.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=None, hspace=0.2)
axes = fig.add_subplot(111)
rangel=np.arange(0,np.size(data[:,1]))
axes.plot(rangel,data[:,1])
axes.set_xlim([0,1000])
plt.show()
In [6]:
#I ran sum hills on the 1st 300 hills
fesdata = np.genfromtxt('fes.1st900.dat',comments='#');
min=np.min(fesdata[:,2])
max=np.max(fesdata[:,2])
apparentbarrier=(max-min)/enertokcal
print apparentbarrier
In [ ]: