Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
esoteric-ephemera committed Jan 7, 2025
1 parent 49eb43f commit 2d68ed2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions emmet-core/emmet/core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ def from_vasp_calc_doc(
OutputDoc
The calculation output summary.
"""
if calc_doc.output.ionic_steps is not None:
if calc_doc.output.ionic_steps:
forces = calc_doc.output.ionic_steps[-1].forces
stress = calc_doc.output.ionic_steps[-1].stress
elif trajectory is not None:
elif trajectory:
ionic_steps = trajectory.frame_properties
forces = ionic_steps[-1]["forces"]
stress = ionic_steps[-1]["stress"]
Expand Down Expand Up @@ -983,7 +983,7 @@ def _get_max_force(calc_doc: Calculation) -> Optional[float]:
"""Get max force acting on atoms from a calculation document."""
if calc_doc.output.ionic_steps:
forces: Optional[Union[np.ndarray, List]] = None
if calc_doc.output.ionic_steps is not None:
if calc_doc.output.ionic_steps:
forces = calc_doc.output.ionic_steps[-1].forces

structure = calc_doc.output.structure
Expand Down

0 comments on commit 2d68ed2

Please sign in to comment.