abacus/stru format#
Aliases#
abacus/stru, stru
Implementation: AbacusSTRUFormat
Overview#
ABACUS structure file.
ABACUS (Atomic-orbital Based Ab-initio Computation at UStc) is an open-source DFT package based on LCAO and plane-wave basis sets.
STRU stores the cell, species, coordinates, pseudopotential/orbital references, and optional movement or magnetic-moment fields for one ABACUS configuration. This format reads and writes unlabeled dpdata.System objects.
Quick examples#
The examples use the preferred alias abacus/stru; any alias listed above is equivalent.
import dpdata
# Geometry-only data
system = dpdata.System("input_file", fmt="abacus/stru")
# Write geometry-only data
system.to("abacus/stru", "output_path")
Conversions#
Convert from this format to System#
- dpdata.System(file_name, fmt: Literal['abacus/stru'] = None, **kwargs) dpdata.system.System
- dpdata.System(file_name, fmt: Literal['stru'] = None, **kwargs) dpdata.system.System
- dpdata.System.from_abacus_stru(file_name, **kwargs) dpdata.system.System
- dpdata.System.from_stru(file_name, **kwargs) dpdata.system.System
Load one ABACUS STRU file.
- Parameters:
- file_namestr or os.PathLike
Input
STRUfile.- **kwargsdict
Additional format arguments accepted for API compatibility.
- Returns:
- System
converted system
Convert from System to this format#
- dpdata.System.to(fmt: Literal['abacus/stru'], file_name: 'FileType', frame_idx=0, **kwargs)
- dpdata.System.to(fmt: Literal['stru'], file_name: 'FileType', frame_idx=0, **kwargs)
- dpdata.System.to_abacus_stru(file_name: 'FileType', frame_idx=0, **kwargs)
- dpdata.System.to_stru(file_name: 'FileType', frame_idx=0, **kwargs)
Dump the system into ABACUS STRU format file.
- Parameters:
- file_namestr
The output file name
- frame_idxint
The index of the frame to dump
- **kwargsdict
Additional STRU fields described below.
- Other Parameters:
- pp_filelist[str] or dict[str, str], optional
Pseudopotential file for each atom type.
- numerical_orbitallist[str] or dict[str, str], optional
Numerical orbital file for each atom type.
- numerical_descriptorstr, optional
Numerical descriptor file used by ABACUS.
- masslist[float], optional
Atomic mass for each atom type.
- movearray-like, optional
Per-frame, per-atom Cartesian movement flags.
- velocityarray-like, optional
Initial Cartesian velocity for each atom.
- magarray-like, optional
Scalar or vector magnetic moment for each atom.
- angle1, angle2array-like, optional
Polar and azimuthal magnetic-moment angles for noncollinear spins.
- scarray-like, optional
Spin-constraint flags.
- lambda_array-like, optional
Spin-constraint lambda values.
- link_filebool, default=False
Write basenames and create symbolic links for referenced files.
Convert from LabeledSystem to this format#
- dpdata.LabeledSystem.to(fmt: Literal['abacus/stru'], file_name: 'FileType', frame_idx=0, **kwargs)
- dpdata.LabeledSystem.to(fmt: Literal['stru'], file_name: 'FileType', frame_idx=0, **kwargs)
- dpdata.LabeledSystem.to_abacus_stru(file_name: 'FileType', frame_idx=0, **kwargs)
- dpdata.LabeledSystem.to_stru(file_name: 'FileType', frame_idx=0, **kwargs)
Dump the system into ABACUS STRU format file.
- Parameters:
- file_namestr
The output file name
- frame_idxint
The index of the frame to dump
- **kwargsdict
Additional STRU fields described below.
- Other Parameters:
- pp_filelist[str] or dict[str, str], optional
Pseudopotential file for each atom type.
- numerical_orbitallist[str] or dict[str, str], optional
Numerical orbital file for each atom type.
- numerical_descriptorstr, optional
Numerical descriptor file used by ABACUS.
- masslist[float], optional
Atomic mass for each atom type.
- movearray-like, optional
Per-frame, per-atom Cartesian movement flags.
- velocityarray-like, optional
Initial Cartesian velocity for each atom.
- magarray-like, optional
Scalar or vector magnetic moment for each atom.
- angle1, angle2array-like, optional
Polar and azimuthal magnetic-moment angles for noncollinear spins.
- scarray-like, optional
Spin-constraint flags.
- lambda_array-like, optional
Spin-constraint lambda values.
- link_filebool, default=False
Write basenames and create symbolic links for referenced files.