envs = self._get_qc_path()
with temporary_directory(parent=inputs["scratch_directory"], suffix="_qchem_scratch") as tmpdir:
envs["QCSCRATCH"] = os.path.join(tmpdir, "scratch").replace("//", "/")
exe_success, proc = execute(commands,
infiles=infiles,
outfiles=outfiles,
scratch_name=scratch_name,
After Change
if extra_infiles is not None:
infiles.update(extra_infiles)
binary_files = [os.path.join("savepath", x) for x in ["99.0", "131.0", "132.0"]]
// Collect all output files and extend with with extra_outfiles
outfiles = ["dispatch.out"]
if extra_outfiles is not None:
outfiles.extend(extra_outfiles)
// Replace commands with extra_commands if present
commands = inputs["commands"] + ["savepath"]
if extra_commands is not None:
commands = extra_commands
envs = self._get_qc_path()
with temporary_directory(parent=inputs["scratch_directory"], suffix="_qchem_scratch") as tmpdir:
envs["QCSCRATCH"] = tmpdir
bdict = {x: None for x in binary_files}
with disk_files({}, bdict, cwd=tmpdir, as_binary=binary_files):
exe_success, proc = execute(commands,
infiles=infiles,
outfiles=outfiles,
scratch_name=scratch_name,
scratch_directory=tmpdir,
scratch_messy=scratch_messy,
timeout=timeout,
environment=envs)
proc["outfiles"].update({os.path.split(k)[-1]: v for k, v in bdict.items()})
// QChem does not create an output file and only prints to stdout
return exe_success, proc