def _run_c_with_band_indices_with_g(self): import anharmonic._phono3py as phono3c phono3c.imag_self_energy_with_g(self._imag_self_energy, self._pp_strength, self._triplets_at_q, self._weights_at_q, self._frequencies, self._temperature, self._g, self._unit_conversion, self._cutoff_frequency)
def _run_c_with_frequency_points_with_g(self): import anharmonic._phono3py as phono3c g = np.zeros((2,) + self._pp_strength.shape, dtype='double') ise_at_f = np.zeros(self._imag_self_energy.shape[1], dtype='double') for i in range(len(self._frequency_points)): for j in range(g.shape[2]): g[:, :, j, :, :] = self._g[:, :, i, :, :] phono3c.imag_self_energy_with_g(ise_at_f, self._pp_strength, self._triplets_at_q, self._weights_at_q, self._frequencies, self._temperature, g, self._unit_conversion, self._cutoff_frequency) self._imag_self_energy[i] = ise_at_f
def _run_c_with_band_indices_with_g(self): import anharmonic._phono3py as phono3c if self._g_zero is None: _g_zero = np.zeros(self._pp_strength.shape, dtype='byte', order='C') else: _g_zero = self._g_zero phono3c.imag_self_energy_with_g(self._imag_self_energy, self._pp_strength, self._triplets_at_q, self._weights_at_q, self._frequencies, self._temperature, self._g, _g_zero, self._unit_conversion, self._cutoff_frequency)
def _run_c_with_frequency_points_with_g(self): import anharmonic._phono3py as phono3c num_band0 = self._pp_strength.shape[1] g_shape = list(self._g.shape) g_shape[2] = num_band0 g = np.zeros(tuple(g_shape), dtype='double', order='C') ise_at_f = np.zeros(num_band0, dtype='double') _g_zero = np.zeros(g_shape, dtype='byte', order='C') for i in range(len(self._frequency_points)): for j in range(num_band0): g[:, :, j, :, :] = self._g[:, :, i, :, :] phono3c.imag_self_energy_with_g(ise_at_f, self._pp_strength, self._triplets_at_q, self._weights_at_q, self._frequencies, self._temperature, g, _g_zero, # don't use g_zero self._unit_conversion, self._cutoff_frequency) self._imag_self_energy[i] = ise_at_f