Skip to main content

Crate upf

Crate upf 

Source
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 Format
  • PP: pseudopotential
  • PAW: projector augmented wave
  • GIPAW: gauge including projector augmented wave
  • WFC: wavefunction
  • AE: all-electron
  • PS: pseudo
  • NLCC: 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>.
AugmentationQij
Public UPF data model. A single Q_ij augmentation entry.
AugmentationQijl
Public UPF data model. A single Q_ij^l augmentation entry.
BetaProjector
Public UPF data model. A single non-local beta projector.
FullWavefunctionSet
Public UPF data model. Combined all-electron and pseudo-wavefunction reconstruction data from <PP_FULL_WFC>.
GipawCoreOrbital
Public UPF data model. A single GIPAW core orbital entry.
GipawLocalPotential
Public UPF data model. GIPAW local-potential reconstruction data.
GipawOrbital
Public UPF data model. A single GIPAW orbital reconstruction entry.
GipawReconstruction
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>.
NumericData
Public UPF data model. Numeric array data with the original text preserved.
OrbitalWavefunction
Public UPF data model. A labeled orbital wavefunction array.
PawData
Public UPF data model. Projector augmented-wave reconstruction data from <PP_PAW>.
PseudoWavefunction
Public UPF data model. A single pseudo-wavefunction.
PseudoWavefunctionSet
Public UPF data model. Pseudo-wavefunctions from <PP_PSWFC>.
RawNode
Public UPF data model. A lossless raw node used to preserve unsupported sections.
RelativisticBetaProjector
Public UPF data model. A relativistic beta projector entry.
RelativisticWavefunction
Public UPF data model. A relativistic wavefunction entry.
Semilocal
Public UPF data model. Semi-local channels from <PP_SEMILOCAL>.
SemilocalChannel
Public UPF data model. A single semi-local potential channel.
SpinOrbitData
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.