Skip to content

Commit

Permalink
remove nans for real now (#183)
Browse files Browse the repository at this point in the history
* remove nans for real now

* Update single_point.py
  • Loading branch information
alinelena authored Jun 5, 2024
1 parent 2b43729 commit f097fb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions janus_core/calculations/single_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,14 @@ def _remove_invalid_props(
)
if prop in results:
del struct.info[f"{self.architecture}_{prop}"]
del struct.calc.results[prop]
del results[prop]

def _clean_results(
self,
results: CalcResults = None,
properties: Collection[str] = (),
invalidate_calc: bool = False,
invalidate_calc: bool = True,
) -> None:
"""
Remove NaN and inf values from results and calc.results dictionaries.
Expand All @@ -321,7 +322,7 @@ def _clean_results(
invalidate_calc : bool
Remove calculator results if True. When True Atoms object loses
its property methods and true values are in info and arrays.
Default is False.
Default is True.
"""
results = results if results else {}

Expand Down

0 comments on commit f097fb1

Please sign in to comment.