Expand description
upf reads Unified Pseudopotential Format (UPF) text files into
typed Rust structs.
The crate implements a small normalization pass for common UPF text quirks,
then parses the normalized document into UpfDocument.
§Abbreviations
UPF: Unified Pseudopotential FormatPP: pseudopotentialPAW: projector augmented waveGIPAW: gauge including projector augmented waveWFC: wavefunctionAE: all-electronPS: pseudoNLCC: non-linear core correction
§Example
use upf::from_file;
let upf_data = from_file("Si.upf")?;
println!("element = {}", upf_data.header.element);Structs§
- Augmentation
- Public UPF data model.
Augmentation charge data stored in
<PP_AUGMENTATION>. - Augmentation
Qij - Public UPF data model.
A single
Q_ijaugmentation entry. - Augmentation
Qijl - Public UPF data model.
A single
Q_ij^laugmentation entry. - Beta
Projector - Public UPF data model. A single non-local beta projector.
- Full
Wavefunction Set - Public UPF data model.
Combined all-electron and pseudo-wavefunction reconstruction data from
<PP_FULL_WFC>. - Gipaw
Core Orbital - Public UPF data model. A single GIPAW core orbital entry.
- Gipaw
Local Potential - Public UPF data model. GIPAW local-potential reconstruction data.
- Gipaw
Orbital - Public UPF data model. A single GIPAW orbital reconstruction entry.
- Gipaw
Reconstruction - Public UPF data model.
Gauge including projector augmented-wave reconstruction data from
<PP_GIPAW_RECONSTRUCTION>. - Nonlocal
- Public UPF data model.
Non-local projector data from
<PP_NONLOCAL>. - Numeric
Data - Public UPF data model. Numeric array data with the original text preserved.
- Orbital
Wavefunction - Public UPF data model. A labeled orbital wavefunction array.
- PawData
- Public UPF data model.
Projector augmented-wave reconstruction data from
<PP_PAW>. - Pseudo
Wavefunction - Public UPF data model. A single pseudo-wavefunction.
- Pseudo
Wavefunction Set - Public UPF data model.
Pseudo-wavefunctions from
<PP_PSWFC>. - RawNode
- Public UPF data model. A lossless raw node used to preserve unsupported sections.
- Relativistic
Beta Projector - Public UPF data model. A relativistic beta projector entry.
- Relativistic
Wavefunction - Public UPF data model. A relativistic wavefunction entry.
- Semilocal
- Public UPF data model.
Semi-local channels from
<PP_SEMILOCAL>. - Semilocal
Channel - Public UPF data model. A single semi-local potential channel.
- Spin
Orbit Data - Public UPF data model.
Spin-orbit data from
<PP_SPIN_ORB>. - UpfDocument
- Public UPF data model. A deserialized Unified Pseudopotential Format (UPF) document.
- UpfHeader
- Public UPF data model.
Metadata carried by the
<PP_HEADER>section. - UpfMesh
- Public UPF data model.
Radial mesh data from
<PP_MESH>.
Enums§
- UpfError
- Error type returned by UPF parsing and normalization operations. Errors returned while normalizing or parsing a Unified Pseudopotential Format (UPF) document.
Functions§
- from_
file - Parse a Unified Pseudopotential Format (UPF) document from a filesystem path. Parse a Unified Pseudopotential Format (UPF) document from a file.
- from_
reader - Parse a Unified Pseudopotential Format (UPF) document from a buffered reader. Parse a Unified Pseudopotential Format (UPF) document from a buffered reader.
- from_
str - Parse a Unified Pseudopotential Format (UPF) document from a UTF-8 string. Parse a Unified Pseudopotential Format (UPF) document from a UTF-8 string.