.. _GromacsGroFormat:

gromacs/gro format
==================

gro format
==========

Class: :class:`GromacsGroFormat <dpdata.plugins.gromacs.GromacsGroFormat>`

Conversions
-----------

.. _GromacsGroFormat_from_system:

Convert from this format to System
``````````````````````````````````

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

   
Load gromacs .gro file.


:Parameters:

    **file_name** : str
        The input file name

    **format_atom_name** : bool
        Whether to format the atom name



:Returns:

    System
        converted system















.. _GromacsGroFormat_to_system:

Convert from System to this format
``````````````````````````````````

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

   
Dump the system in gromacs .gro format.


:Parameters:

    **file_name** : str or None
        The output file name. If None, return the file content as a string

    **frame_idx** : int
        The index of the frame to dump


















.. _GromacsGroFormat_to_labeled_system:

Convert from LabeledSystem to this format
`````````````````````````````````````````

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

   
Dump the system in gromacs .gro format.


:Parameters:

    **file_name** : str or None
        The output file name. If None, return the file content as a string

    **frame_idx** : int
        The index of the frame to dump
















