Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mbuild/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ def _run_packmol(input_text, filled_xyz, temp_file, packmol_file):
"Packmol finished with imperfect packing. Using the .xyz_FORCED "
"file instead. This may not be a sufficient packing result."
)
os.system(f"cp {filled_xyz.name}_FORCED {filled_xyz.name}")
shutil.copyfile(f"{filled_xyz.name}_FORCED", filled_xyz.name)

if "ERROR" in out or proc.returncode != 0:
_packmol_error(out, err)
Expand All @@ -1220,7 +1220,7 @@ def _run_packmol(input_text, filled_xyz, temp_file, packmol_file):
os.remove(packmol_inp.name)

if temp_file is not None:
os.system("cp {0} {1}".format(filled_xyz.name, os.path.join(temp_file)))
shutil.copyfile(filled_xyz.name, temp_file)


def _check_packmol(PACKMOL): # pragma: no cover
Expand Down
Loading