In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [20]:
import MagicTools
pl = MagicTools.GetPotsFromFile_pot('Low.pot',mcmfile='M1.mcm')
pi = MagicTools.GetPotsFromFile_pot('Int.pot',mcmfile='M1.mcm')
ph = MagicTools.GetPotsFromFile_pot('High.pot',mcmfile='M1.mcm')

In [31]:
plt.figure(figsize=(18,5), dpi=300)

plt.subplot(1,3,1)
plt.xlabel(r'$r,\  (\AA)$',fontsize=20)
plt.axis([3, 20, -4,5])
plt.text(.5,.9,'N-N',
        horizontalalignment='center',
        transform=plt.subplot(1,3,1).transAxes, fontsize=20)
plt.ylabel(r'$\mathcal{U}(r),\ (\frac{kJ}{mol})$',fontsize=20)
plt.plot([3, 20], [0, 0], color = '0.75', linestyle='--')
plt.plot(pl[0].g[:,0],pl[0].g[:,1],color = 'r', linestyle='-',label='Low')
plt.plot(pi[0].g[:,0],pi[0].g[:,1],color = 'b', linestyle='-',label='Intermediate')
plt.plot(ph[0].g[:,0],ph[0].g[:,1],color = 'g', linestyle='-',label='High')
plt.legend(loc='lower right')
plt.subplot(1,3,2)
plt.xlabel(r'$r,\  (\AA)$',fontsize=20)
plt.axis([3, 20, -5,5])
plt.text(.5,.9,'N-C',
        horizontalalignment='center',
        transform=plt.subplot(1,3,2).transAxes, fontsize=20)
plt.plot([3, 20], [0, 0], color = '0.75', linestyle='--')
plt.ylabel(r'$\mathcal{U}(r),\ (\frac{kJ}{mol})$',fontsize=20)
plt.plot(pl[1].g[:,0],pl[1].g[:,1],color = 'r', linestyle='-',label='Low')
plt.plot(pi[1].g[:,0],pi[1].g[:,1],color = 'b', linestyle='-',label='Intermediate')
plt.plot(ph[1].g[:,0],ph[1].g[:,1],color = 'g', linestyle='-',label='High')
plt.legend(loc='lower right')
plt.subplot(1,3,3)
plt.xlabel(r'$r,\  (\AA)$',fontsize=20)
plt.axis([3, 20, -12,5])
plt.text(.5,.9,'C-C',
        horizontalalignment='center',
        transform=plt.subplot(1,3,3).transAxes, fontsize=20)
plt.plot([3, 20], [0, 0], color = '0.75', linestyle='--')
plt.ylabel(r'$\mathcal{U}(r),\ (\frac{kJ}{mol})$',fontsize=20)
plt.plot(pl[2].g[:,0],pl[2].g[:,1],color = 'r', linestyle='-',label='Low')
plt.plot(pi[2].g[:,0],pi[2].g[:,1],color = 'b', linestyle='-',label='Intermediate')
plt.plot(ph[2].g[:,0],ph[2].g[:,1],color = 'g', linestyle='-',label='High')
plt.legend(loc='lower right')
savefig("PotCompInter.png",bbox_inches='tight', dpi=300)
plt.show()



In [35]:
plt.figure(figsize=(18,5), dpi=300)

plt.subplot(1,3,1)
plt.xlabel(r'$r,\  (\AA)$',fontsize=20)
#plt.axis([3, 20, -4,5])
plt.text(.5,.9,'Bond N-N',
        horizontalalignment='center',
        transform=plt.subplot(1,3,1).transAxes, fontsize=20)
plt.ylabel(r'$\mathcal{U}(r),\ (\frac{kJ}{mol})$',fontsize=20)
plt.plot(pl[3].g[:,0],pl[3].g[:,1],color = 'r', linestyle='-',label='Low')
plt.plot(pi[3].g[:,0],pi[3].g[:,1],color = 'b', linestyle='-',label='Intermediate')
plt.plot(ph[3].g[:,0],ph[3].g[:,1],color = 'g', linestyle='-',label='High')
plt.legend(loc='lower left')
plt.subplot(1,3,2)
plt.xlabel(r'$r,\  (\AA)$',fontsize=20)
#plt.axis([3, 20, -5,5])
plt.text(.5,.9,'Bond N-C',
        horizontalalignment='center',
        transform=plt.subplot(1,3,2).transAxes, fontsize=20)
plt.ylabel(r'$\mathcal{U}(r),\ (\frac{kJ}{mol})$',fontsize=20)
plt.plot(pl[4].g[:,0],pl[4].g[:,1],color = 'r', linestyle='-',label='Low')
plt.plot(pi[4].g[:,0],pi[4].g[:,1],color = 'b', linestyle='-',label='Intermediate')
plt.plot(ph[4].g[:,0],ph[4].g[:,1],color = 'g', linestyle='-',label='High')
plt.legend(loc='lower left')
plt.subplot(1,3,3)
plt.xlabel(r'$r,\  (\AA)$',fontsize=20)
#plt.axis([3, 20, -12,5])
plt.text(.5,.9,'Angle N-C-C',
        horizontalalignment='center',
        transform=plt.subplot(1,3,3).transAxes, fontsize=20)
plt.ylabel(r'$\mathcal{U}(r),\ (\frac{kJ}{mol})$',fontsize=20)
plt.plot(pl[5].g[:,0],pl[5].g[:,1],color = 'r', linestyle='-',label='Low')
plt.plot(pi[5].g[:,0],pi[5].g[:,1],color = 'b', linestyle='-',label='Intermediate')
plt.plot(ph[5].g[:,0],ph[5].g[:,1],color = 'g', linestyle='-',label='High')
plt.legend(loc='lower left')
savefig("PotCompIntra.png",bbox_inches='tight', dpi=300)
plt.show()



In [ ]: