Esempio n. 1
0
#plot energy evolution during equilibration
zoom = 10**5
plt.figure(2)
x = np.linspace(0, zoom, zoom)
x *= 10**(-5)
plt.ylim(-6, 0)
plt.xlabel(r'number of steps x $10^5$')
plt.ylabel(r'$\frac{U}{N}$', fontsize=20)
plt.plot(x, energy[0:zoom] / NUMBER_PARTICLES, label="potential")
plt.savefig(
    '/home/sebastian/Dropbox/msc/FK7029/molDyn/tex/figures/energy_MC_108_zoom.png'
)

#now estimate sigma for potential energy
potentialEnergy = energy[10**5::] / NUMBER_PARTICLES
sigma = func.computeSigmaSquared(potentialEnergy)
y = sigma[:, 1] / sigma[:, 2]
yerror = np.sqrt(2 * (sigma[:, 1])**2 / (sigma[:, 2])**3)
#save for heat capacity calculation
varPotE = y
deltaVarPotE = yerror
x = np.linspace(0, len(y) - 1, len(y))
y = np.sqrt(y)
yerror = np.sqrt(yerror)
dummy = sigma

plt.figure(3)
plt.xlabel("M")
plt.xlim(0, len(x) + 1)
plt.ylabel(r'$\sigma$', fontsize=16)
plt.errorbar(x, y, yerr=yerror, fmt='s', label="potential")
Esempio n. 2
0
#plot energy evolution during equilibration
zoom = 5000
plt.figure(2)
x = np.linspace(0,zoom-1,zoom)
#time *= 10**(-5)
plt.xlabel(r'number of steps x $10^5$')
plt.ylabel(r'$\frac{U}{N}$', fontsize=20)
plt.plot(x,energy[0:zoom,0]/NUMBER_PARTICLES, label="kinetic")
plt.plot(x,energy[0:zoom,1]/NUMBER_PARTICLES, label="potential")
plt.plot(x,energy[0:zoom,2]/NUMBER_PARTICLES, label="total")
plt.legend(loc=5)
plt.savefig('/home/sebastian/Dropbox/msc/FK7029/molDyn/tex/figures/energy_MD_864_zoom.png')

#now estimate sigma for kinetic energy
eKin = energy[10**4::,0]/NUMBER_PARTICLES
sigma = func.computeSigmaSquared(eKin)
y = sigma[:,1]/sigma[:,2]
yerror = np.sqrt(2*(sigma[:,1])**2/(sigma[:,2])**3)
#save this for the heat capacity calculation below
varKinE = y
deltaVarKinE = yerror
x = np.linspace(0,len(y)-1,len(y))
y = np.sqrt(y)
yerror = np.sqrt(yerror)


plt.figure(3)
plt.xlabel("M")
plt.xlim(0,len(x) +1)
plt.ylabel(r'$\sigma$', fontsize=16)
plt.errorbar(x,y,yerr=yerror, fmt='s', label="kinetic")
Esempio n. 3
0
plt.savefig('/home/sebastian/Dropbox/msc/FK7029/molDyn/tex/figures/energy_MC_500.png')

#plot energy evolution during equilibration
zoom = 10**5
plt.figure(2)
x = np.linspace(0,zoom,zoom)
x *= 10**(-5)
plt.ylim(-8,0)
plt.xlabel(r'number of steps x $10^5$')
plt.ylabel(r'$\frac{U}{N}$', fontsize=20)
plt.plot(x,energy[0:zoom]/NUMBER_PARTICLES, label="potential")
plt.savefig('/home/sebastian/Dropbox/msc/FK7029/molDyn/tex/figures/energy_MC_500_zoom.png')

#now estimate sigma for potential energy
potentialEnergy = energy[10**5::]/NUMBER_PARTICLES
sigma = func.computeSigmaSquared(potentialEnergy)
y = sigma[:,1]/sigma[:,2]
yerror = np.sqrt(2*(sigma[:,1])**2/(sigma[:,2])**3)
#save for heat capacity calculation
varPotE = y
deltaVarPotE = yerror
x = np.linspace(0,len(y)-1,len(y))
y = np.sqrt(y)
yerror = np.sqrt(yerror)
dummy = sigma

plt.figure(3)
plt.xlabel("M")
plt.xlim(0,len(x) +1)
plt.ylabel(r'$\sigma$', fontsize=16)
plt.errorbar(x,y,yerr=yerror, fmt='s', label="potential")
Esempio n. 4
0
#plot energy evolution during equilibration
zoom = 5000
plt.figure(2)
x = np.linspace(0,zoom-1,zoom)
#time *= 10**(-5)
plt.xlabel('number of steps')
plt.ylabel(r'$\frac{U}{N}$', fontsize=20)
plt.plot(x,energy[0:zoom,0]/NUMBER_PARTICLES, label="kinetic")
plt.plot(x,energy[0:zoom,1]/NUMBER_PARTICLES, label="potential")
plt.plot(x,energy[0:zoom,2]/NUMBER_PARTICLES, label="total")
plt.legend(loc=5)
plt.savefig('/home/sebastian/Dropbox/msc/FK7029/molDyn/tex/figures/energy_MD_500_zoom.png')

#now estimate sigma for kinetic energy
eKin = energy[10**4::,0]/NUMBER_PARTICLES
sigma = func.computeSigmaSquared(eKin)
y = sigma[:,1]/sigma[:,2]
yerror = np.sqrt(2*(sigma[:,1])**2/(sigma[:,2])**3)
#save this for the heat capacity calculation below
varKinE = y
deltaVarKinE = yerror
x = np.linspace(0,len(y)-1,len(y))
y = np.sqrt(y)
yerror = np.sqrt(yerror)


plt.figure(3)
plt.xlabel("M")
plt.xlim(0,len(x) +1)
plt.ylabel(r'$\sigma$', fontsize=16)
plt.errorbar(x,y,yerr=yerror, fmt='s', label="kinetic")