def _get_c_dipole_dipole(self, K_list, q, q_dir_cart): import phonopy._phonopy as phonoc pos = self._pcell.get_positions() num_atom = self._pcell.get_number_of_atoms() volume = self._pcell.get_volume() C = np.zeros((num_atom, 3, num_atom, 3), dtype=self._dtype_complex, order='C') phonoc.dipole_dipole(C.view(dtype='double'), np.array(K_list, dtype='double', order='C'), q, q_dir_cart, self._born, self._dielectric, np.array(pos, dtype='double', order='C'), self._unit_conversion * 4.0 * np.pi / volume, self._symprec) return C
def _get_c_dipole_dipole(self, q_cart, q_dir_cart): import phonopy._phonopy as phonoc pos = self._pcell.get_positions() num_atom = len(pos) volume = self._pcell.get_volume() dd = np.zeros((num_atom, 3, num_atom, 3), dtype=self._dtype_complex, order='C') phonoc.dipole_dipole(dd.view(dtype='double'), self._dd_q0.view(dtype='double'), self._G_list, q_cart, q_dir_cart, self._born, self._dielectric, np.array(pos, dtype='double', order='C'), self._unit_conversion * 4.0 * np.pi / volume, self._Lambda, self._symprec) return dd
def _get_c_dipole_dipole(self, q_cart, q_dir_cart): import phonopy._phonopy as phonoc pos = self._pcell.get_positions() num_atom = len(pos) volume = self._pcell.get_volume() dd = np.zeros((num_atom, 3, num_atom, 3), dtype=self._dtype_complex, order='C') phonoc.dipole_dipole(dd.view(dtype='double'), self._dd_q0.view(dtype='double'), self._G_list, q_cart, q_dir_cart, self._born, self._dielectric, np.array(pos, dtype='double', order='C'), self._unit_conversion * 4.0 * np.pi / volume, self._Lambda, self._symprec) return dd