def band_plot(self, kdiv='default', klabel='default', Ebound='default', lw=2, fontsize=18): print('band_plot start ...') band = np.load(self.wkdir + 'band.npz') dftpp.band_plot(self,band['spin'],band['Ek'],\ 0,self._kdiv_qe(kdiv),klabel,Ebound,lw,fontsize,self.wkdir)
def fatband_plot(self,state_grp,kdiv='default',klabel='default',\ Ebound='default',ini_fig_num=1,marker_size=30,colorcode='b',fontsize=18): print('fatband_plot start ...') fatband = np.load(self.wkdir + 'fatband.npz') # plot band stucture dftpp.band_plot(self,1,fatband['Ek'],\ 0,self._kdiv_qe(kdiv),klabel,Ebound,2,fontsize) # plot fatband structure dftpp.fatband_plot(self,fatband['Ek'],fatband['Ek_weight'],0,\ fatband['state_info'],self.state_grp_trans(fatband['state_info'],state_grp),\ self._kdiv_qe(kdiv),klabel,Ebound,ini_fig_num,marker_size,colorcode,fontsize,\ self.wkdir)
def band_plot(self,dataset,kdiv='default',klabel='default',Ebound='default',lw=2,fontsize=18): print('band_plot start ...') band=np.load(self.wkdir+'band-DS'+str(dataset)+'.npz') # abinit kdiv has a bug in band calculation (not in fatband). # the last segment has one more k-point if kdiv!='default': kdiv[-1]=kdiv[-1]+1 dftpp.band_plot(self,band['spin'].tolist(),band['Ek'],\ 0,self._kdiv_conv(kdiv),klabel,Ebound,lw,fontsize,self.wkdir) shutil.move(self.wkdir+'band.png',self.wkdir+'band-DS'+str(dataset)+'.png') print(' => band plot saved to band-DS'+str(dataset)+'.png')
def fatband_plot(self,dataset,state_grp,kdiv='default',klabel='default',\ Ebound='default',ini_fig_num=1,marker_size=30,colorcode='b',fontsize=18): print('fatband_plot start ...') fatband = np.load(self.wkdir + 'fatband-DS' + str(dataset) + '.npz') # plot band stucture dftpp.band_plot(self,1,fatband['Ek'],\ 0,self._kdiv_conv(kdiv),klabel,Ebound,2,fontsize) # plot fatband dftpp.fatband_plot(self,fatband['Ek'],fatband['Ek_weight'],0,\ fatband['state_info'],self.state_grp_trans(fatband['state_info'],state_grp),\ self._kdiv_conv(kdiv),klabel,Ebound,ini_fig_num,marker_size,colorcode,fontsize\ ,self.wkdir) # rename to output png file to abinit filename for n in range(0, len(state_grp)): shutil.move(self.wkdir+'fatband-'+str(n)+'.png',\ self.wkdir+'fatband-DS'+str(dataset)+'-'+str(n)+'.png') print(' => fatband plot saved to fatband-DS' + str(dataset) + '-x.png')
def band_plot(self, klabel, Ebound, lw=2, fontsize=18): print('band_plot start ...') band = np.load(self.wkdir + 'band.npz') dftpp.band_plot(self,1,band['Ek'],\ 0,band['kdiv'],klabel,Ebound,lw,fontsize,self.wkdir)