def get_renormalized_phonon_dispersion_spectra(self): if self._bands is None: self._bands = pho_interface.obtain_phonon_dispersion_spectra(self.dynamic.structure, self.parameters.band_ranges, NAC=self.parameters.use_NAC) if self._renormalized_bands is None: self._renormalized_bands = pho_interface.obtain_renormalized_phonon_dispersion_spectra(self.dynamic.structure, self.parameters.band_ranges, self.get_renormalized_constants(), NAC=self.parameters.use_NAC) for i,freq in enumerate(self._renormalized_bands[1]): plt.plot(self._bands[1][i],self._bands[2][i],color ='b', label='Harmonic (0K)') plt.plot(self._renormalized_bands[1][i],self._renormalized_bands[2][i],color ='r', label='Renormalized') # plt.axes().get_xaxis().set_visible(False) plt.axes().get_xaxis().set_ticks([]) plt.ylabel('Frequency (THz)') plt.xlabel('Wave vector') plt.xlim([0, self._bands[1][-1][-1]]) plt.suptitle('Renormalized phonon dispersion') handles, labels = plt.gca().get_legend_handles_labels() plt.legend([handles[0], handles[-1]], ['Harmonic','Renormalized']) plt.show()
def print_phonon_dispersion_bands(self): if self._bands is None: self._bands = pho_interface.obtain_phonon_dispersion_spectra(self.dynamic.structure, self.parameters.band_ranges, NAC=self.parameters.use_NAC) np.set_printoptions(linewidth=200) for i,freq in enumerate(self._bands[1]): print(str(np.hstack([self._bands[1][i][None].T,self._bands[2][i]])).replace('[','').replace(']',''))
def get_phonon_dispersion_spectra(self): if self._bands is None: self._bands = pho_interface.obtain_phonon_dispersion_spectra(self.dynamic.structure, self.parameters.band_ranges, NAC=self.parameters.use_NAC) for i,freq in enumerate(self._bands[1]): plt.plot(self._bands[1][i],self._bands[2][i],color ='r') # plt.axes().get_xaxis().set_visible(False) plt.axes().get_xaxis().set_ticks([]) plt.ylabel('Frequency (THz)') plt.xlabel('Wave vector') plt.xlim([0, self._bands[1][-1][-1]]) plt.suptitle('Phonon dispersion') plt.show()