Change Trajectory.segment_collector from cached_property to property.
@@ -8,7 +8,7 @@ try:
except ImportError:
mdtraj = None
-from functools import cached_property, partial, reduce
+from functools import partial, reduce
from tqdm import tqdm
from westpa.analysis.core import Walker, Trace
@@ -171,6 +171,8 @@ class Trajectory:
self.concatenator = concatenator
self.cache_segments = cache_segments
+ self._segment_collector = SegmentCollector(self)
+
# Attach self to Walker and Trace classes.
for cls in Walker, Trace:
if hasattr(cls, name):
@@ -187,10 +189,10 @@ class Trajectory:
"""
return '_' + self.name
- @cached_property
+ @property
def segment_collector(self):
"""SegmentCollector: Segment retrieval manager."""
- return SegmentCollector(self)
+ return self._segment_collector
@property
def fget(self):
