analytical_band_from_BZT.py 文件源码

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

项目:amset 作者: hackingmaterials 项目源码 文件源码
def stern(self,g,nsym,symop):
        ''' Compute star function for a specific g vector 

            Input:
                g: G vector in real space
                nsym: number of symmetries
                symop: matrixes of the symmetry operations

            Output:
                nst: number of vectors in the star function calculated for the G vector
                stg: star vectors

        '''

        trial = symop[:nsym].dot(g)
        stg = np.unique(trial.view(np.dtype((np.void, trial.dtype.itemsize*trial.shape[1])))).view(trial.dtype).reshape(-1, trial.shape[1])
        nst = len(stg)
        stg = np.concatenate((stg,np.zeros((nsym-nst,3))))
        return nst, stg
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号