vaspwfc.py 文件源码

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

项目:VaspBandUnfolding 作者: QijingZheng 项目源码 文件源码
def readBandCoeff(self, ispin=1, ikpt=1, iband=1, norm=False):
        '''
        Read the planewave coefficients of specified KS states.
        '''

        self.checkIndex(ispin, ikpt, iband)

        rec = self.whereRec(ispin, ikpt, iband)
        self._wfc.seek(rec * self._recl)

        nplw = self._nplws[ikpt - 1]
        dump = np.fromfile(self._wfc, dtype=self._WFPrec, count=nplw)

        cg = np.asarray(dump, dtype=np.complex128)
        if norm:
            cg /= np.linalg.norm(cg)
        return cg
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号