diff --git a/mdevaluate/reader.py b/mdevaluate/reader.py index 23d2085..598072d 100755 --- a/mdevaluate/reader.py +++ b/mdevaluate/reader.py @@ -39,7 +39,7 @@ class WrongTopologyError(Exception): def open_with_mdanalysis( topology, trajectory, cached=False, index_file=None, charges=None, masses=None ): - """Open a the topology and trajectory with mdanalysis.""" + """Open the topology and trajectory with mdanalysis.""" uni = mdanalysis.Universe(topology, trajectory, convert_units=False) if cached is not False: if cached is True: @@ -373,28 +373,3 @@ class CachedReader(BaseReader): def __getitem__(self, item): return self._get_item(item) - - -class DelayedReader(BaseReader): - @property - def filename(self): - if self.rd is not None: - return self.rd.filename - else: - return self._filename - - def __init__(self, filename, reindex=False, ignore_index_timestamps=False): - super().__init__(filename, reindex=False, ignore_index_timestamps=False) - self.natoms = len(self.rd[0].coordinates) - self.cache = self.rd.cache - self._filename = self.rd.filename - self.rd = None - - def __len__(self): - return len(self.cache) - - def _get_item(self, frame): - return read_xtcframe_delayed(self.filename, self.cache[frame], self.natoms) - - def __getitem__(self, frame): - return self._get_item(frame)