def test_write_incar(tmpdir, incar_dict): """Test writing and INCAR file from an IncarIo object.""" incar_io = IncarIo(incar_dict=incar_dict) tempfile = str(tmpdir.join('INCAR')) incar_io.write(tempfile) assert read_file(path=tempfile) == str(incar_io)
def write_incar(self, inputdict, dst): # pylint: disable=unused-argument """ Converts from parameters node (ParameterData) to INCAR format and writes to dst. Unless otherwise specified, the values specified in _DEFAULT_PARAMETERS are also written to the INCAR file. :param inputdict: required by baseclass :param dst: absolute path of the file to write to """ incar_dict = ChainMap(self.inp.parameters.get_dict(), self._DEFAULT_PARAMETERS) incar_io = IncarIo(incar_dict=incar_dict) incar_io.write(dst)