In [1]:
import matplotlib.pyplot as plt
%matplotlib inline
from pymatgen.util.plotting_utils import get_publication_quality_plot
In [2]:
import numpy as np
import pandas as pd
In [3]:
ls
In [4]:
datafile = pd.read_csv('results.csv')
In [5]:
datafile.head(0)
Out[5]:
In [6]:
datafile.ix[datafile['energy'].idxmin()]
Out[6]:
In [7]:
datafile_mod = datafile[(datafile['alat']>9.5) & (datafile['alat']<11.5)]
In [56]:
datafile_mod.head()
Out[56]:
In [8]:
x = datafile_mod['alat'].tolist()
x
Out[8]:
In [9]:
y_energy = datafile_mod['energy'].tolist()
# y_conver = datafile['Force Difference (meV/Angstrom)'].tolist()
In [11]:
fig, ax0=plt.subplots(nrows=1)
fig.set_size_inches(10,10)
ax0.scatter(x, y_energy,marker='o',alpha=0.75,s=60,c='r')
ax0.plot(x,y_energy,c='black')
ax0.set_title('Energy VS Lattice Constant',fontsize=30,y=1.05)
ax0.set_xlabel('Lattice Parameter (a.u)',fontsize=24)
ax0.set_ylabel(r'Total Energy (Ry)',fontsize=20)
# ax0.set_ylim(-93.456,-93.44)
ax0.tick_params(labelsize = 18)
ax0.annotate('Lowest Energy: 10.33 a.u.', xy=(10.33, -93.45421), xycoords='data',
xytext=(-50, -30), textcoords='offset points',
arrowprops=dict(arrowstyle="->",
connectionstyle="angle3,angleA=0,angleB=-90"),fontsize=15
)
# ax1.scatter(x,y_conver,marker='o',alpha=0.75, s=60,c='b')
# ax1.plot(x,y_conver,c='black')
# ax1.set_title('Force Convergence Vs K-points',fontsize=24,y=1.05)
# ax1.set_xlabel('# of K-points',fontsize=24)
# ax1.set_ylabel(r'Force Converge $meV/\AA$',fontsize=18)
# # ax1.set_yscale('log')
# ax1.set_ylim(-1,40)
# ax1.annotate(r'Convergence < 5 $meV/\AA$ # Kpoints: 205', xy=(207, 5), xycoords='data',
# xytext=(0.95, 0.95), textcoords='axes fraction',
# arrowprops=dict(facecolor='black', shrink=0.05),
# horizontalalignment='right', verticalalignment='top',fontsize=16
# )
# ax1.tick_params(labelsize = 18)
plt.subplots_adjust(hspace=0.5)
plt.show()
In [17]:
Out[17]:
In [18]:
plt.show()