dpdata.formats.xyz package#
Submodules#
dpdata.formats.xyz.quip_gap_xyz module#
- class dpdata.formats.xyz.quip_gap_xyz.QuipGapxyzSystems(file_name, **kwargs)[source]#
Bases:
objectParse an extended XYZ (QUIP/GAP) file frame by frame.
Methods
handle_single_xyz_frame(lines[, stress_sign])Parse a single extended XYZ frame.
get_block_generator
- static handle_single_xyz_frame(lines, stress_sign=-1, **kwargs)[source]#
Parse a single extended XYZ frame.
- Parameters:
- lineslist[str]
Raw lines for one frame (atom count + comment + atom lines).
- stress_signint, optional
Sign convention for stress→virial conversion.
-1(default) follows the ASE convention:virial = -V * stress.- **kwargsdict
Additional keyword arguments (reserved for future use).
dpdata.formats.xyz.xyz module#
- dpdata.formats.xyz.xyz.coord_to_xyz(coord: ndarray, types: list) str[source]#
Convert coordinates and types to xyz format.
- Parameters:
- coordnp.ndarray
coordinates, Nx3 array
- typeslist
list of types
- Returns:
- str
xyz format string
Examples
>>> coord_to_xyz(np.ones((1,3)), ["C"]) 1
C 1.000000 1.000000 1.000000