eigenstates.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:upho 作者: yuzie007 项目源码 文件源码
def _create_rotational_weights_for_elements(self, kpoint, transformation_matrix, vectors):
        """

        Parameters
        ----------
        kpoint : 1d array
            Reciprocal space point in fractional coordinates for PC.
        vectors : (..., natoms_p * ndims, nbands) array
            Vectors for SC after translational projection.
        """
        projected_vectors = self._rotational_projector.project_vectors(
            vectors, kpoint, transformation_matrix)

        nirreps, natoms_p, nelms, tmp, nbands = projected_vectors.shape

        shape = (nirreps, natoms_p, nelms, natoms_p, nelms, nbands)
        weights = np.zeros(shape, dtype=complex)
        for i in range(nirreps):
            for j in range(nbands):
                weights[i, ..., j] = np.inner(
                    np.conj(projected_vectors[i, ..., j]), projected_vectors[i, ..., j])

        return weights, projected_vectors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号