BaseReader¶
- class mdcraft.io.base.BaseReader(filename: str | Path, /, *, n_workers: int | None)[source]¶
Bases:
objectBase class for topology and trajectory readers.
Subclasses must implement the
open()andclose()methods to handle the opening and closing of the file.- Parameters:
- filenamestr or pathlib.Path, positional-only
Filename or path to the topology or trajectory file.
- n_workersint, keyword-only
Number of threads to use when reading the file. If
None, the number of available logical threads is used.
Methods
Closes the topology or trajectory file and deletes the handle.
Opens the topology or trajectory file and stores a handle to it.