GROMACS Topology (.top) Parser¶
Parses a GROMACS .top file to extract molecule names and their counts from the [ molecules ] section.
- class kbkit.io.top.TopParser(path: str | Path)[source]¶
Bases:
objectParses GROMACS topology file to get molecules present and their counts.
- Parameters:
top_path (str) – Path to the topology (.top) file.
- parse() None[source]¶
Read the topology file and returns a dictionary of molecule names and counts.
- Returns:
Dictionary containing molecules present and their number.
- Return type:
- report_skipped() None[source]¶
Print a summary of lines that were skipped during parsing, including the line content and the reason for skipping.