Skip to content

Commit

Permalink
add cached property
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Zuegner committed Jan 16, 2025
1 parent d82192a commit 199c6d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mattergen/evaluation/reference/presets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path
from functools import cached_property

from mattergen.evaluation.reference.reference_dataset import ReferenceDataset
from mattergen.evaluation.reference.reference_dataset_serializer import LMDBGZSerializer
Expand All @@ -20,3 +21,8 @@ def from_preset(cls) -> "ReferenceMP2020Correction":
return LMDBGZSerializer().deserialize(
f"{current_dir}/../../../data-release/alex-mp/reference_MP2020correction.gz"
)

@cached_property
def is_ordered(self) -> bool:
"""Returns True if all structures are ordered."""
return True # Setting it manually to avoid computation at runtime.

0 comments on commit 199c6d2

Please sign in to comment.