pycgtool.parsers

Package Contents

Classes

CFG

Class representing a CFG file using a format similar to a GROMACS .itp file.

ITP

Class representing an .itp file.

class pycgtool.parsers.CFG(filepath: Optional[PathLike] = None)[source]

Bases: collections.OrderedDict, contextlib.AbstractContextManager

Class representing a CFG file using a format similar to a GROMACS .itp file.

Contains a dictionary of Sections.

_read_line(self, line: str, filepath: pathlib.Path)str[source]
_read_file(self, filepath: pathlib.Path)None[source]
__exit__(self, exc_type, exc_value, traceback)[source]

Raise any exception triggered within the runtime context.

class pycgtool.parsers.ITP(filepath: Optional[PathLike] = None)[source]

Bases: pycgtool.parsers.cfg.CFG

Class representing an .itp file.

Contains a dictionary of sections for every molecule definition.

_read_file(self, filepath: pathlib.Path)None[source]