.. _DeePMDCompFormat:

deepmd/comp format
==================

deepmd/npy format
=================

Class: :class:`DeePMDCompFormat <dpdata.plugins.deepmd.DeePMDCompFormat>`

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

.. _DeePMDCompFormat_from_system:

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

.. py:function:: dpdata.System(file_name, type_map=None, fmt: Literal['deepmd/comp'] = None) -> dpdata.system.System
   :noindex:
.. py:function:: dpdata.System(file_name, type_map=None, fmt: Literal['deepmd/npy'] = None) -> dpdata.system.System
   :noindex:
.. py:function:: dpdata.System.from_deepmd_comp(file_name, type_map=None) -> dpdata.system.System
   :noindex:
.. py:function:: dpdata.System.from_deepmd_npy(file_name, type_map=None) -> dpdata.system.System
   :noindex:

   
Convert this format to :class:`System`.





:Returns:

    System
        converted system















.. _DeePMDCompFormat_to_system:

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

.. py:function:: dpdata.System.to(fmt: Literal['deepmd/comp'], file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:
.. py:function:: dpdata.System.to(fmt: Literal['deepmd/comp'], file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:
.. py:function:: dpdata.System.to_deepmd_comp(file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:
.. py:function:: dpdata.System.to_deepmd_npy(file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:

   
Dump the system in deepmd compressed format (numpy binary) to `folder`.

The frames are firstly split to sets, then dumped to seperated subfolders named as `folder/set.000`, `folder/set.001`, ....

Each set contains `set_size` frames.
The last set may have less frames than `set_size`.

:Parameters:

    **file_name** : str
        The output folder

    **set_size** : int
        The size of each set.

    **prec** : {numpy.float32, numpy.float64}
        The floating point precision of the compressed data


















.. _DeePMDCompFormat_to_labeled_system:

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

.. py:function:: dpdata.LabeledSystem.to(fmt: Literal['deepmd/comp'], file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:
.. py:function:: dpdata.LabeledSystem.to(fmt: Literal['deepmd/comp'], file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:
.. py:function:: dpdata.LabeledSystem.to_deepmd_comp(file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:
.. py:function:: dpdata.LabeledSystem.to_deepmd_npy(file_name, set_size=5000, prec=<class 'numpy.float64'>)
   :noindex:

   
Dump the system in deepmd compressed format (numpy binary) to `folder`.

The frames are firstly split to sets, then dumped to seperated subfolders named as `folder/set.000`, `folder/set.001`, ....

Each set contains `set_size` frames.
The last set may have less frames than `set_size`.

:Parameters:

    **file_name** : str
        The output folder

    **set_size** : int
        The size of each set.

    **prec** : {numpy.float32, numpy.float64}
        The floating point precision of the compressed data


















.. _DeePMDCompFormat_from_labeled_system:

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

.. py:function:: dpdata.LabeledSystem(file_name, type_map=None, fmt: Literal['deepmd/comp'] = None) -> dpdata.system.LabeledSystem
   :noindex:
.. py:function:: dpdata.LabeledSystem(file_name, type_map=None, fmt: Literal['deepmd/npy'] = None) -> dpdata.system.LabeledSystem
   :noindex:
.. py:function:: dpdata.LabeledSystem.from_deepmd_comp(file_name, type_map=None) -> dpdata.system.LabeledSystem
   :noindex:
.. py:function:: dpdata.LabeledSystem.from_deepmd_npy(file_name, type_map=None) -> dpdata.system.LabeledSystem
   :noindex:

   
Convert this format to :class:`LabeledSystem`.





:Returns:

    LabeledSystem
        converted system















.. _DeePMDCompFormat_from_multi_systems:

Convert from this format to MultiSystems
````````````````````````````````````````

.. py:function:: dpdata.MultiSystems.from_deepmd_comp(directory) -> dpdata.system.MultiSystems
   :noindex:
.. py:function:: dpdata.MultiSystems.from_deepmd_npy(directory) -> dpdata.system.MultiSystems
   :noindex:

   
Convert this format to :class:`MultiSystems`.


:Parameters:

    **directory** : str
        directory of systems



:Returns:

    MultiSystems
        converted system















.. _DeePMDCompFormat_to_multi_systems:

Convert from MultiSystems to this format
````````````````````````````````````````

.. py:function:: dpdata.MultiSystems.to(fmt: Literal['deepmd/comp'], directory) -> dpdata.system.MultiSystems
   :noindex:
.. py:function:: dpdata.MultiSystems.to(fmt: Literal['deepmd/comp'], directory) -> dpdata.system.MultiSystems
   :noindex:
.. py:function:: dpdata.MultiSystems.to_deepmd_comp(directory) -> dpdata.system.MultiSystems
   :noindex:
.. py:function:: dpdata.MultiSystems.to_deepmd_npy(directory) -> dpdata.system.MultiSystems
   :noindex:

   
Convert :class:`MultiSystems` to this format.


:Parameters:

    **directory** : str
        directory to save systems



:Returns:

    MultiSystems
        this system













