def phonon_individual_analysis(self): print("Peak analysis analysis") fitting.phonon_fitting_analysis(self.get_power_spectrum_phonon(), self.parameters.frequency_range, harmonic_frequencies=self.get_frequencies(), show_plots=not self.parameters.silent) return
def get_renormalized_constants(self): if self._renormalized_force_constants is None: com_points, dynmat2fc, phonon = pho_interface.get_commensurate_points_info(self.dynamic.structure) initial_reduced_q_point = self.get_reduced_q_vector() normalized_frequencies = [] for i, reduced_q_point in enumerate(com_points): print ("Qpoint: {0} / {1}".format(i,reduced_q_point)) self.set_reduced_q_vector(reduced_q_point) positions, widths = fitting.phonon_fitting_analysis(self.get_power_spectrum_phonon(), self.parameters.frequency_range, harmonic_frequencies=self.get_frequencies(), show_plots=False) if (reduced_q_point == [0, 0, 0]).all(): print('Fixing gamma point frequencies') positions[0] = 0 positions[1] = 0 positions[2] = 0 normalized_frequencies.append(positions) normalized_frequencies = np.array(normalized_frequencies) self._renormalized_force_constants = pho_interface.calculate_renormalized_force_constants(normalized_frequencies, dynmat2fc, phonon) self.set_reduced_q_vector(initial_reduced_q_point) return self._renormalized_force_constants