Skip to content

Commit c226b56

Browse files
authored
Add files via upload
1 parent 2e0b822 commit c226b56

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

multioptpy/Wrapper/mapper.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,22 @@ def _run_autots(self, task: ExplorationTask, run_dir: str) -> list[str]:
22152215
config["step1_settings"]["manual_AFIR"] = task.afir_params
22162216
config["run_step4"] = True
22172217

2218+
# ── Persist the exact config passed to AutoTS ────────────────────
2219+
# Written before the workflow starts so the file survives a crash.
2220+
# This is the fully-resolved copy (deepcopy of base_config with
2221+
# initial_mol_file, work_dir, manual_AFIR, and run_step4 applied),
2222+
# so it reflects precisely what AutoTS will receive.
2223+
config_used_path = os.path.join(run_dir, "config_used.json")
2224+
try:
2225+
with open(config_used_path, "w", encoding="utf-8") as _fh:
2226+
json.dump(config, _fh, indent=2, default=str)
2227+
logger.debug("_run_autots: wrote config_used.json -> %s", config_used_path)
2228+
except Exception as _exc:
2229+
logger.warning(
2230+
"_run_autots: could not write config_used.json (%s): %s",
2231+
config_used_path, _exc,
2232+
)
2233+
22182234
original_cwd = os.getcwd()
22192235
try:
22202236
os.chdir(run_dir)

0 commit comments

Comments
 (0)