Topology Parser¶
Parses a topology file to extract composition information.
- class kbkit.io.topology.TopologyFormat(*values)[source]¶
Bases:
EnumFormatting for various topology types.
- LAMMPS = 1¶
- GROMACS = 2¶
- TOP = 3¶
- class kbkit.io.topology.TopologyParser(path: str | Path)[source]¶
Bases:
objectParses topology files to get molecules present and their counts.
- Parameters:
path (str) – Path to the topology file.
- static extract_molecules_from_top(top_file: str | Path) dict[str, int][source]¶
Read the GROMACS topology file (.top) and returns a dictionary of molecule names and counts.
- property molecule_count: dict[str, int]¶
Dictionary of molecules present and their corresponding numbers.