gromacs/gro format

gro format

Class: GromacsGroFormat

Conversions

Convert from this format to System

dpdata.System(file_name, format_atom_name=True, fmt: Literal['gromacs/gro'] = None) dpdata.system.System
dpdata.System(file_name, format_atom_name=True, fmt: Literal['gro'] = None) dpdata.system.System
dpdata.System.from_gromacs_gro(file_name, format_atom_name=True) dpdata.system.System
dpdata.System.from_gro(file_name, format_atom_name=True) dpdata.system.System

Load gromacs .gro file.

Parameters:
file_namestr

The input file name

format_atom_namebool

Whether to format the atom name

Returns:
System

converted system

Convert from System to this format

dpdata.System.to(fmt: Literal['gromacs/gro'], file_name: 'FileType | None' = None, frame_idx=-1)
dpdata.System.to(fmt: Literal['gromacs/gro'], file_name: 'FileType | None' = None, frame_idx=-1)
dpdata.System.to_gromacs_gro(file_name: 'FileType | None' = None, frame_idx=-1)
dpdata.System.to_gro(file_name: 'FileType | None' = None, frame_idx=-1)

Dump the system in gromacs .gro format.

Parameters:
file_namestr or None

The output file name. If None, return the file content as a string

frame_idxint

The index of the frame to dump

Convert from LabeledSystem to this format

dpdata.LabeledSystem.to(fmt: Literal['gromacs/gro'], file_name: 'FileType | None' = None, frame_idx=-1)
dpdata.LabeledSystem.to(fmt: Literal['gromacs/gro'], file_name: 'FileType | None' = None, frame_idx=-1)
dpdata.LabeledSystem.to_gromacs_gro(file_name: 'FileType | None' = None, frame_idx=-1)
dpdata.LabeledSystem.to_gro(file_name: 'FileType | None' = None, frame_idx=-1)

Dump the system in gromacs .gro format.

Parameters:
file_namestr or None

The output file name. If None, return the file content as a string

frame_idxint

The index of the frame to dump