Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Wilkins <[email protected]>
  • Loading branch information
ElliottKasoar and oerc0122 committed Nov 19, 2024
1 parent 14b6066 commit 89ad18c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions aiida_mlip/calculations/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def define(cls, spec: CalcJobProcessSpec) -> None:
Parameters
----------
spec : `aiida.engine.CalcJobProcessSpec`
spec : aiida.engine.CalcJobProcessSpec
The calculation job process spec to define.
"""
super().define(spec)
Expand Down Expand Up @@ -88,13 +88,11 @@ def prepare_for_submission(
# descriptors is overwriting the placeholder "calculation" from the base.py file
codeinfo.cmdline_params[0] = "descriptors"

cmdline_options = {}
if "invariants_only" in self.inputs:
cmdline_options["invariants-only"] = self.inputs.invariants_only.value
if "calc_per_element" in self.inputs:
cmdline_options["calc-per-element"] = self.inputs.calc_per_element.value
if "calc_per_atom" in self.inputs:
cmdline_options["calc-per-atom"] = self.inputs.calc_per_atom.value
cmdline_options = {
key.replace("_", "-"): getattr(self.inputs, key).value
for key in ("invariants_only", "calc_per_element", "calc_per_atom")
if key in self.inputs
}

for flag, value in cmdline_options.items():
if isinstance(value, bool):
Expand Down

0 comments on commit 89ad18c

Please sign in to comment.