Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save input configuration #463

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ElliottKasoar
Copy link
Member

@ElliottKasoar ElliottKasoar commented Mar 5, 2025

This saves the input parameters to CLI commands in the summary.

As described in #128, I think it makes most sense to save the config before any defaults are applied.

This is partly because where defaults are set varies between the CLI and Python modules for each command, accessing the "final" value of each parameter would not be trivial.

It also ensures consistency if this is used for a new config file, since in some cases, whether the parameter is using a default or has been explicitly set change behaviours, which would no longer be distinguishable if we stored the default.

In combination with #454. hopefully this won't be a problem in addressing the original #128 issue.

E.g.:

janus geomopt --struct tests/data/NaCl.cif --arch mace_mp --model-path small --opt-cell-lengths --write-traj --minimize-kwargs "{'opt_kwargs':{'trajectory':'test.traj'}}"

produces

command: janus geomopt
config:
  arch: mace_mp
  calc_kwargs: {}
  device: cpu
  file_prefix: null
  filter_func: null
  fmax: 0.1
  log: null
  minimize_kwargs:
    opt_kwargs:
      trajectory: test.traj
  model_path: small
  opt_cell_fully: false
  opt_cell_lengths: true
  optimizer: LBFGS
  out: null
  pressure: 0.0
  read_kwargs: {}
  steps: 1000
  struct: tests/data/NaCl.cif
  summary: null
  symmetrize: false
  symmetry_tolerance: 0.001
  tracker: true
  write_kwargs: {}
  write_traj: true
info:
  struct:
    formula: Cl4Na4
    n_atoms: 8
    struct_path: tests/data/NaCl.cif
start_time: 05/03/2025, 19:44:02
emissions: 4.319631282771114e-07
end_time: 05/03/2025, 19:44:14

@ElliottKasoar ElliottKasoar added the enhancement New/improved feature or request label Mar 5, 2025
@alinelena
Copy link
Member

this looks good... I wonder, unless @oerc0122 has any objections shall go in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New/improved feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants