.. _ASETrajFormat:

ase/traj format
===============

Class: :class:`ASETrajFormat <dpdata.plugins.ase.ASETrajFormat>`


Format for the ASE's trajectory format <https://wiki.fysik.dtu.dk/ase/ase/io/trajectory.html#module-ase.io.trajectory>`_ (ase).'
a `traj' contains a sequence of frames, each of which is an `Atoms' object.

















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

.. _ASETrajFormat_from_system:

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

.. py:function:: dpdata.System(file_name: 'str', begin: 'int | None' = 0, end: 'int | None' = None, step: 'int | None' = 1, fmt: Literal['ase/traj'] = None) -> dpdata.system.System
   :noindex:
.. py:function:: dpdata.System.from_ase_traj(file_name: 'str', begin: 'int | None' = 0, end: 'int | None' = None, step: 'int | None' = 1) -> dpdata.system.System
   :noindex:

   
Read ASE's trajectory file to `System` of multiple frames.


:Parameters:

    **file_name** : str
        ASE's trajectory file

    **begin** : int, optional
        begin frame index

    **end** : int, optional
        end frame index

    **step** : int, optional
        frame index step



:Returns:

    System
        converted system















.. _ASETrajFormat_to_system:

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

.. py:function:: dpdata.System.to(fmt: Literal['ase/traj'], file_name: 'str' = 'confs.traj') -> 'None'
   :noindex:
.. py:function:: dpdata.System.to_ase_traj(file_name: 'str' = 'confs.traj') -> 'None'
   :noindex:

   
Convert System to ASE Atoms object.




















.. _ASETrajFormat_to_labeled_system:

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

.. py:function:: dpdata.LabeledSystem.to(fmt: Literal['ase/traj'], file_name: 'str' = 'labeled_confs.traj') -> 'None'
   :noindex:
.. py:function:: dpdata.LabeledSystem.to_ase_traj(file_name: 'str' = 'labeled_confs.traj') -> 'None'
   :noindex:

   
Convert System to ASE Atoms object.




















.. _ASETrajFormat_from_labeled_system:

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

.. py:function:: dpdata.LabeledSystem(file_name: 'str', begin: 'int | None' = 0, end: 'int | None' = None, step: 'int | None' = 1, fmt: Literal['ase/traj'] = None) -> dpdata.system.LabeledSystem
   :noindex:
.. py:function:: dpdata.LabeledSystem.from_ase_traj(file_name: 'str', begin: 'int | None' = 0, end: 'int | None' = None, step: 'int | None' = 1) -> dpdata.system.LabeledSystem
   :noindex:

   
Read ASE's trajectory file to `System` of multiple frames.


:Parameters:

    **file_name** : str
        ASE's trajectory file

    **begin** : int, optional
        begin frame index

    **end** : int, optional
        end frame index

    **step** : int, optional
        frame index step



:Returns:

    LabeledSystem
        converted system













