diff --git a/ramannoodle/structure/reference.py b/ramannoodle/structure/reference.py index f56e3b7..290b85b 100644 --- a/ramannoodle/structure/reference.py +++ b/ramannoodle/structure/reference.py @@ -156,7 +156,8 @@ def positions(self) -> NDArray[np.float64]: """ return self._positions.copy() - def get_num_nonequivalent_atoms(self) -> int: + @property + def num_nonequivalent_atoms(self) -> int: """Get number of nonequivalent atoms.""" assert self._symmetry_dict is not None return len(set(self._symmetry_dict["equivalent_atoms"])) diff --git a/test/tests/test_structure.py b/test/tests/test_structure.py index 78eb8f6..e27e745 100644 --- a/test/tests/test_structure.py +++ b/test/tests/test_structure.py @@ -147,7 +147,7 @@ def test_ref_structure( """Test StructuralSymmetry (normal).""" # Equivalent atoms test ref_structure = outcar_ref_structure_fixture - assert ref_structure.get_num_nonequivalent_atoms() == known_nonequivalent_atoms + assert ref_structure.num_nonequivalent_atoms == known_nonequivalent_atoms # Equivalent displacement test displacement = ref_structure.positions * 0 # pylint: disable=protected-access