Provides functionality to read and write GRO96 files., exclude=('SOL',), ignh=False)[source]

Parse a gro file to create a molecule.

  • filename (str) – The file to read.

  • exclude ([str]) – Atoms that have one of these residue names will not be included.

  • ignh (bool) – Whether hydrogen atoms should be ignored.


The parsed molecules. Will not contain edges.

Return type:

vermouth.molecule.Molecule, file_name, precision=7, title='Martinized!', box=(0, 0, 0), defer_writing=True)[source]

Write system to file_name, which will be a GRO96 file.

  • system (vermouth.system.System) – The system to write.

  • file_name (str) – The file to write to.

  • precision (int) – The desired precision for coordinates and (optionally) velocities.

  • title (str) – Title for the gro file.

  • box (tuple[float]) – Box length and optionally angles.

  • defer_writing (bool) – Whether to use write() for writing data