list format#
Aliases#
list
Implementation: ListFormat
Overview#
In-memory list of one-frame System objects.
This write-only convenience format splits a multi-frame System or LabeledSystem into independent one-frame objects; it does not create an on-disk file.
Quick examples#
The examples use the preferred alias list; 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("list")
Conversions#
Convert from System to this format#
- dpdata.System.to(fmt: Literal['list'], **kwargs)
- dpdata.System.to_list(**kwargs)
Split system data into a list of one-frame systems.
- Parameters:
- **kwargsdict
Additional format arguments accepted for API compatibility.
- Returns:
- list[System] or list[LabeledSystem]
Empty for zero frames; otherwise one object per frame.
Convert from LabeledSystem to this format#
- dpdata.LabeledSystem.to(fmt: Literal['list'], **kwargs)
- dpdata.LabeledSystem.to_list(**kwargs)
Split system data into a list of one-frame systems.
- Parameters:
- **kwargsdict
Additional format arguments accepted for API compatibility.
- Returns:
- list[System] or list[LabeledSystem]
Empty for zero frames; otherwise one object per frame.