def _prepare(self): pos = self._dynmat.supercell.get_scaled_positions() N = len(self._comm_points) qpoints_ii = get_qpoints_in_Brillouin_zone( self._rec_lat, self._comm_points[self._ii] / float(N), only_unique=True) for q in qpoints_ii: self._dynmat.set_dynamical_matrix(q) dm = self._dynmat.dynamical_matrix eigvals, eigvecs = np.linalg.eigh(dm.real) self._eigvals_ii.append(eigvals) self._eigvecs_ii.append(eigvecs) self._phase_ii.append( np.cos(2 * np.pi * np.dot(pos, q)).reshape(-1, 1)) qpoints_ij = get_qpoints_in_Brillouin_zone( self._rec_lat, self._comm_points[self._ij] / float(N), only_unique=True) for q in qpoints_ij: self._dynmat.set_dynamical_matrix(q) dm = self._dynmat.dynamical_matrix eigvals, eigvecs = np.linalg.eigh(dm) self._eigvals_ij.append(eigvals) self._eigvecs_ij.append(eigvecs) self._phase_ij.append( np.exp(2j * np.pi * np.dot(pos, q)).reshape(-1, 1))
def _prepare(self): pos = self._dynmat.supercell.get_scaled_positions() N = len(self._comm_points) qpoints_ii = get_qpoints_in_Brillouin_zone( self._rec_lat, self._comm_points[self._ii] / float(N), only_unique=True) for q in qpoints_ii: self._dynmat.set_dynamical_matrix(q) dm = self._dynmat.dynamical_matrix eigvals, eigvecs = np.linalg.eigh(dm.real) self._eigvals_ii.append(eigvals) self._eigvecs_ii.append(eigvecs) self._phase_ii.append( np.cos(2 * np.pi * np.dot(pos, q)).reshape(-1, 1)) qpoints_ij = get_qpoints_in_Brillouin_zone( self._rec_lat, self._comm_points[self._ij] / float(N), only_unique=True) for q in qpoints_ij: self._dynmat.set_dynamical_matrix(q) dm = self._dynmat.dynamical_matrix eigvals, eigvecs = np.linalg.eigh(dm) self._eigvals_ij.append(eigvals) self._eigvecs_ij.append(eigvecs) self._phase_ij.append( np.exp(2j * np.pi * np.dot(pos, q)).reshape(-1, 1))
def _fit_qpoints_in_BZ(self): # reciprocal_lattice: column vectors qpoint_set_in_BZ = get_qpoints_in_Brillouin_zone(self._rec_lat, self._ir_qpoints) qpoints_in_BZ = np.array([q_set[0] for q_set in qpoint_set_in_BZ], dtype='double') self._ir_qpoints = qpoints_in_BZ
def _fit_qpoints_in_BZ(self): # reciprocal_lattice: column vectors qpoint_set_in_BZ = get_qpoints_in_Brillouin_zone( self._rec_lat, self._ir_qpoints) qpoints_in_BZ = np.array([q_set[0] for q_set in qpoint_set_in_BZ], dtype='double') self._ir_qpoints = qpoints_in_BZ
def _fit_qpoints_in_BZ(self): qpoint_set_in_BZ = get_qpoints_in_Brillouin_zone( self._rec_lat, self._ir_qpoints) qpoints_in_BZ = np.array([q_set[0] for q_set in qpoint_set_in_BZ], dtype="double", order="C") self._ir_qpoints = qpoints_in_BZ
def _set_qpoints(self): qpoints = get_qpoints_in_Brillouin_zone(self._rec_lat, self._Qpoints) self.qpoints = np.array([q[0] for q in qpoints], dtype="double", order="C") self._Gpoints = self._Qpoints - self.qpoints
def _set_qpoints(self): qpoints = get_qpoints_in_Brillouin_zone(self._rec_lat, self._Qpoints) self.qpoints = np.array([q[0] for q in qpoints], dtype='double', order='C') self._Gpoints = self._Qpoints - self.qpoints
def _fit_qpoints_in_BZ(self): qpoint_set_in_BZ = get_qpoints_in_Brillouin_zone(self._rec_lat, self._ir_qpoints) qpoints_in_BZ = np.array([q_set[0] for q_set in qpoint_set_in_BZ], dtype='double', order='C') self._ir_qpoints = qpoints_in_BZ