BaseWriter¶
- class mdcraft.io.base.BaseWriter(filename: str | Path)[source]¶
Bases:
objectBase class for topology and trajectory writers.
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.
Methods
Closes the topology or trajectory file and deletes the handle.
Opens the topology or trajectory file and stores a handle to it.