vasp.py 文件源码

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

项目:aiida-vasp 作者: DropD 项目源码 文件源码
def write_potcar(self, inputdict, dst):
        """
        Concatenates multiple paw files into a POTCAR

        :param inputdict: required by baseclass
        :param dst: absolute path of the file to write to
        """
        import subprocess32 as sp
        catcom = ['cat']
        # ~ structure = inputdict['structure']
        # ~ structure = self.inp.structure
        # order the symbols according to order given in structure
        if 'elements' not in self.attrs():
            self._prestore()
        for kind in self.elements:
            paw = inputdict[self._get_paw_linkname(kind)]
            catcom.append(paw.get_abs_path('POTCAR'))
        # cat the pawdata nodes into the file
        with open(dst, 'w') as potcar_f:
            sp.check_call(catcom, stdout=potcar_f)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号