.. _VASPStringFormat:

vasp/string format
==================

Aliases
-------

``vasp/string``

Implementation: :class:`VASPStringFormat <dpdata.plugins.vasp.VASPStringFormat>`

Overview
--------


In-memory VASP POSCAR text representation.

`VASP <https://www.vasp.at/>`_ (Vienna Ab initio Simulation Package) is
a computer program for atomic scale materials modelling.

Unlike ``vasp/poscar``, this write-only helper returns the POSCAR content
as a string instead of writing it to a file.
















Quick examples
--------------

The examples use the preferred alias ``vasp/string``; any alias listed above is equivalent.

.. code-block:: python

   import dpdata
   
   # Load or construct the system to write
   system = dpdata.System("input_file")
   
   # Write geometry-only data
   converted = system.to("vasp/string")

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

.. _VASPStringFormat_to_system:

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

.. py:function:: dpdata.System.to(fmt: Literal['vasp/string'], frame_idx=0, **kwargs)
   :noindex:
.. py:function:: dpdata.System.to_vasp_string(frame_idx=0, **kwargs)
   :noindex:

   
Dump the system in vasp POSCAR format string.


:Parameters:

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

    **\*\*kwargs** : dict
        other parameters


















.. _VASPStringFormat_to_labeled_system:

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

.. py:function:: dpdata.LabeledSystem.to(fmt: Literal['vasp/string'], frame_idx=0, **kwargs)
   :noindex:
.. py:function:: dpdata.LabeledSystem.to_vasp_string(frame_idx=0, **kwargs)
   :noindex:

   
Dump the system in vasp POSCAR format string.


:Parameters:

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

    **\*\*kwargs** : dict
        other parameters
















