vasp/string format#
Aliases#
vasp/string
Implementation: VASPStringFormat
Overview#
In-memory VASP POSCAR text representation.
VASP (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.
import dpdata
# Load or construct the system to write
system = dpdata.System("input_file")
# Write geometry-only data
converted = system.to("vasp/string")
Conversions#
Convert from System to this format#
- dpdata.System.to(fmt: Literal['vasp/string'], frame_idx=0, **kwargs)
- dpdata.System.to_vasp_string(frame_idx=0, **kwargs)
Dump the system in vasp POSCAR format string.
- Parameters:
- frame_idxint
The index of the frame to dump
- **kwargsdict
other parameters
Convert from LabeledSystem to this format#
- dpdata.LabeledSystem.to(fmt: Literal['vasp/string'], frame_idx=0, **kwargs)
- dpdata.LabeledSystem.to_vasp_string(frame_idx=0, **kwargs)
Dump the system in vasp POSCAR format string.
- Parameters:
- frame_idxint
The index of the frame to dump
- **kwargsdict
other parameters