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)
评论列表
文章目录