API reference

Index

Types

PseudoPotentialIO.PsPFileType
abstract type PsPFile

Abstract type representing a pseudopotential file.

The structure of the data should closely mirror the format of the file, and the values of quantities should be exactly those found in the file.

Required methods:

# A unique string, usually a hash or checksum.
function identifier(file::PsPFile)::AbstractString end
# A short string listing the file format (e.g. `"PSP8"`)
function format(file::PsPFile)::AbstractString end
# The symbol of the element for which the file contains a pseudopotential (e.g. `"Ag"`)
function elemental_symbol(file::PsPFile)::AbstractString end
# The maximum angular momentum channel contained in the file
function max_angular_momentum(file::PsPFile)::Integer end
# The number of non-local projectors for angular momentum `l` contained in the file
function n_projector_radials(file::PsPFile, l::Integer)::Integer end
# The number of chi functions for angular momentum `l` contained in the file
function n_chi_function_radials(file::PsPFile, l::Integer)::Integer end
# The pseudo-atomic valence charge
function valence_charge(file::PsPFile)::Real end
# Whether the file contains a norm-conserving pseudopotential
function is_norm_conserving(file::PsPFile)::Bool end
# Whether the file contains an ultrasoft pseudopotential
function is_ultrasoft(file::PsPFile)::Bool end
# Whether the file contains a projector-augmented wave pseudopotential
function is_paw(file::PsPFile)::Bool end
# Whether the file contains a pseudopotential supporting spin-orbit coupled calculations
function has_spin_orbit(file::PsPFile)::Bool end
# Whether the file contains a pseudopotential supporting non-linear core corrections
function has_core_density(file::PsPFile)::Bool end
source
PseudoPotentialIO.UpfFileType
struct UpfFile <: PsPFile

Universal Pseudopotential Format file contents.

  • checksum::Vector{UInt8}: SHA1 Checksum

  • version::String: UPF format version

  • info::Union{Nothing, String}: Optional general information about the pseudopotential, often generation input

  • header::PseudoPotentialIO.UpfHeader: Various pseudopotential metadata

  • mesh::PseudoPotentialIO.UpfMesh: Radial mesh, mesh integration factors, and other mesh information

  • nlcc::Union{Nothing, Vector{Float64}}: Pseudized core charge on the radial grid, (ignored if core_correction is false)

  • local_::Union{Nothing, Vector{Float64}}: Local part of the pseudopotential on the radial grid (ignored if is_coulomb)

  • nonlocal::PseudoPotentialIO.UpfNonlocal: Nonlocal part of the pseudopotential

  • pswfc::Union{Nothing, Vector{PseudoPotentialIO.UpfChi}}: Pseudo-atomic valence wavefunctions

  • full_wfc::Union{Nothing, PseudoPotentialIO.UpfFullWfc}: All-electron wavefunctions

  • rhoatom::Vector{Float64}: Pseudo-atomic valence charge density on the radial grid

  • spin_orb::Union{Nothing, PseudoPotentialIO.UpfSpinOrb}: Spin-orbit coupling data, (ignored if has_so is false)

  • paw::Union{Nothing, PseudoPotentialIO.UpfPaw}: PAW data, (ignored if is_paw is false)

  • gipaw::Union{Nothing, PseudoPotentialIO.UpfGipaw}: GIPAW data

source
PseudoPotentialIO.Psp8FileType
struct Psp8File <: PsPFile

ABINIT PSeudoPotential format 8 file contents. Information on the file format specification and the meaning of the quantities within the file can be found on the "psp8" page of the ABINIT documentation.

  • checksum::Vector{UInt8}: SHA1 Checksum

  • header::PseudoPotentialIO.Psp8Header: Various pseudopotential metadata

  • rgrid::Vector{Float64}: Uniform radial grid starting at r = 0.0

  • v_local::Vector{Float64}: Local part of the pseudopotential

  • projectors::Vector{Vector{Vector{Float64}}}: Radial part of the Kleinman-Bylander projectors for each angular momentum

  • ekb::Vector{Vector{Float64}}: Kleinman-Bylander energies for each angular momentum

  • projectors_so::Union{Nothing, Vector{Vector{Vector{Float64}}}}: Radial part of the spin-orbit Kleinman-Bylander projectors for each angular momentum

  • ekb_so::Union{Nothing, Vector{Vector{Float64}}}: Spin-orbit Kleinman-Bylander energies for each angular momentum

  • rhoc::Union{Nothing, Vector{Float64}}: Model core charge density

  • d_rhoc_dr::Union{Nothing, Vector{Float64}}: First derivative of the model core charge density

  • d2_rhoc_dr2::Union{Nothing, Vector{Float64}}: Second derivative of the model core charge density

  • d3_rhoc_dr3::Union{Nothing, Vector{Float64}}: Third derivative of the model core charge density

  • d4_rhoc_dr4::Union{Nothing, Vector{Float64}}: Fourth derivative of the model core charge density

source
PseudoPotentialIO.HghFileType
struct HghFile <: PsPFile

Hartwigsen-Goedecker-Hutter pseudopotential file contents.

  • checksum::Vector{UInt8}: SHA1 Checksum

  • title::String: Description

  • zion::Vector{Int64}: Pseudo-atomic (valence) charge

  • rloc::Float64: Cutoff radius for the local part of the pseudopotential

  • nloc::Int64: Number of coefficients defining the local part of the pseudopotential

  • cloc::Vector{Float64}: Coefficients of the local part of the pseudopotential

  • lmax::Int64: Maximum angular momentum

  • rp::Vector{Float64}: Non-local projector cutoff radius for each angular momentum

  • h::Vector{Matrix{Float64}}: Kleinman-Bylander energies

source
PseudoPotentialIO.AbstractPsPType
abstract type AbstractPsP

Abstract type representing a pseudopotential.

The structure of the data should facilitate efficient computations.

Required methods:

# A unique string, usually a hash or checksum.
function identifier(file::AbstractPsP)::AbstractString end
# The symbol of the element for which the pseudopotential is constructed (e.g. `"Ag"`)
function elemental_symbol(psp::AbstractPsP)::AbstractString end
# The maximum angular momentum channel
function max_angular_momentum(psp::AbstractPsP)::Integer end
# The number of non-local projector radial parts for angular momentum `l`
function n_projector_radials(psp::AbstractPsP, l::Integer)::Integer end
# The number of chi function radial parts for angular momentum `l`
function n_chi_function_radials(psp::AbstractPsP, l::Integer)::Integer end
# The pseudo-atomic valence charge
function valence_charge(psp::AbstractPsP)::Real end
# The charge of the atom which was pseudized (e.g. 8 for Oxygen)
function atomic_charge(psp::AbstractPsP)::Real end
# Whether the pseudopotential is a norm-conserving pseudopotential
function is_norm_conserving(psp::AbstractPsP)::Bool end
# Whether the pseudopotential is an ultrasoft pseudopotential
function is_ultrasoft(psp::AbstractPsP)::Bool end
# Whether the pseudopotential is a projector-augmented wave pseudopotential
function is_paw(psp::AbstractPsP)::Bool end
# Whether the pseudopotential supports spin-orbit coupled calculations
function has_spin_orbit(psp::AbstractPsP)::Bool end
# Whether the pseudopotential contains a core charge density (i.e. supports non-linear core
# correction)
function has_core_density(psp::AbstractPsP)::Bool end
# Whether the pseudopotential contains a valence charge density (i.e. has support for
# constructing a tailored guess charge density)
function has_valence_density(psp::AbstractPsP)::Bool end
# Whether pseudopotential contains chi functions for the valence electrons (i.e.
# has support for computing tailored orbital-projected quantitites)
function has_chi_functions(psp:AbstractPsP)::Bool end
# The projector coupling coefficients for angular momentum `l`
function projector_coupling(psp::AbstractPsP, l::Integer)::Matrix{Real} end
# Radial distance where the local potential decays to zero within a tolerance `tol`
function local_potential_cutoff_radius(psp::AbstractPsP; tol) end
# Radial distance where the `n`th non-local projector at angular momentum `l` decays to
# zero within a tolerance `tol`
function projector_cutoff_radius(psp::AbstractPsP, l, n; tol) end
# Radial distance where the `n`th chi function at angular momentum `l` decays to
# zero within a tolerance `tol`
function chi_function_cutoff_radius(psp::AbstractPsP, l, n; tol) end
# Radial distance where the valence charge density decays to zero within a tolerance `tol`
function valence_charge_density_cutoff_radius(psp::AbstractPsP; tol) end
# Radial distance where the core charge density decays to zero within a tolerance `tol`
function core_charge_density_cutoff_radius(psp::AbstractPsP; tol) end
# Returns a function which evaulates the local potential at a real-space radial coordinate
function local_potential_real(psp::AbstractPsP) end
# Returns a function which evaulates the `n`th non-local projector with angular momentum
# `l` at a real-space radial coordinate
function projector_real(psp::AbstractPsP, l, n) end
# Returns a function which evaulates the `n`th chi function with angular momentum
# `l` at a real-space radial coordinate
function chi_function_real(psp::AbstractPsP, l, n) end
# Returns a function which evaulates the valence charge density at a real-space
# radial coordinate
function valence_charge_density_real(psp::AbstractPsP) end
# Returns a function which evaulates the core charge density at a real-space
# radial coordinate
function core_charge_density_real(psp::AbstractPsP) end
# Returns a function which evaulates the local potential at a fourier-space radial
# coordinate
function local_potential_fourier(psp::AbstractPsP) end
# Returns a function which evaulates the `n`th non-local projector with angular momentum
# `l` at a fourier-space radial coordinate
function projector_fourier(psp::AbstractPsP, l, n) end
# Returns a function which evaulates the `n`th chi function with angular momentum
# `l` at a fourier-space radial coordinate
function chi_function_fourier(psp::AbstractPsP, l, n) end
# Returns a function which evaulates the valence charge density at a fourier-space
# radial coordinate
function valence_charge_density_fourier(psp::AbstractPsP) end
# Returns a function which evaulates the core charge density at a fourier-space
# radial coordinate
function core_charge_density_fourier(psp::AbstractPsP) end
# The pseudo-potential energy correction
function pseudo_energy_correction(psp::AbstractPsP) end
source
PseudoPotentialIO.NumericPsPType
abstract type NumericPsP{T} <: AbstractPsP

Abstract type representing numeric pseudopotentials.

All quantities must be in Hartree atomic units.

  • Lengths in Bohr radii (a₀)
  • Energies in Hartree (Ha / Eₕ)
  • Electric charge in electron charges (e = 1)
  • Mass in electron masses (mₑ)
  • Action in reduced Plank constants (ħ = 1)

Vectors indexed by angular momentum should be OffsetVectors with indices starting at zero so that angular momentum l, which naturally starts at 0, can be used for both computation and indexing.

Required fields:

# Checksum
checksum::Vector{UInt8}
# Atomic total charge in units of electron charge
Zatom::Number
# Pseudo-atomic valence charge in units of electron charge
Zval::Number
# Maximum angular momentum
lmax::Integer
# Radial mesh in units of Bohr
r::AbstractVector{Real}
# Radial mesh spacing in units of Bohr
dr::Union{Real, AbstractVector{Real}}
# Local potential on the radial mesh in units of Hartree (without r² prefactor)
Vloc::AbstractVector{Real}
## The units of `D` and `β` should be such that `⟨ βˡₙ | Dˡₙₙ | βˡₙ ⟩` gives Hartree
# Nonlocal projector coupling constants D[l][n,n']
D::OffsetVector{AbstractMatrix{Real}}
# Nonlocal projectors on the radial mesh, multiplied by the mesh squared: r²β[l][n]
β::OffsetVector{AbstractVector{AbstractVector{Real}}}

## "Optional" fields (must still exist, but could be Union{Nothing})
# Model core charge density (non-linear core correction) on the radial mesh, multiplied by
# the mesh squared: r²ρcore
ρcore::Union{Nothing,AbstractVector{Real}}
# Pseudo-atomic valence charge density on the radial mesh, multiplied by the mesh squared:
# r²ρval
ρval::Union{Nothing,AbstractVector{Real}}
# Pseudo-atomic orbitals on the radial mesh, multiplied by the mesh squared: r²χ[l][n]
χ::Union{Nothing,OffsetVector{AbstractVector{AbstractVector{Real}}}}
source
PseudoPotentialIO.NormConservingPsPType
struct NormConservingPsP{T} <: NumericPsP{T}

Type representing a numeric norm-conserving pseudopotential.

  • checksum::Vector{UInt8}: SHA1 Checksum

  • Zatom::Any: Total charge.

  • Zval::Any: Valence charge.

  • lmax::Int64: Maximum angular momentum.

  • r::Union{Vector{T}, StepRangeLen{T}} where T: Radial mesh.

  • dr::Union{Vector{T}, T} where T: Radial mesh spacing.

  • Vloc::Vector: Local part of the potential on the radial mesh (without an r² prefactor).

  • β::OffsetArrays.OffsetArray{Array{Vector{T}, 1}, 1, Array{Array{Vector{T}, 1}, 1}} where T: Nonlocal projectors β[l][n] on the radial mesh (with an r² prefactor).

  • D::OffsetArrays.OffsetArray{Matrix{T}, 1, Array{Matrix{T}, 1}} where T: Projector coupling coefficients D[l][n,m].

  • χ::Union{Nothing, OffsetArrays.OffsetArray{Array{Vector{T}, 1}, 1, Array{Array{Vector{T}, 1}, 1}}} where T: Pseudo-atomic wavefunctions χ[l][n] on the radial mesh (with an r² prefactor).

  • ρcore::Union{Nothing, Vector{T}} where T: Model core charge density on the radial mesh (with an r² prefactor).

  • ρval::Union{Nothing, Vector{T}} where T: Valence charge density on the radial mesh (with an r² prefactor).

source
PseudoPotentialIO.UltrasoftPsPType
struct UltrasoftPsP{T} <: NumericPsP{T}

Type representing a numeric ultrasoft pseudopotential.

  • Zatom::Any: Total charge

  • Zval::Any: Valence charge

  • lmax::Int64: Maximum angular momentum

  • r::Vector: Radial mesh

  • dr::Union{Vector{T}, T} where T: Radial mesh spacing

  • Vloc::Vector: Local part of the potential on the radial mesh

  • β::OffsetArrays.OffsetArray{Array{Vector{T}, 1}, 1, Array{Array{Vector{T}, 1}, 1}} where T: Nonlocal projectors β[l][n] on the radial mesh

  • D::OffsetArrays.OffsetArray{Matrix{T}, 1, Array{Matrix{T}, 1}} where T: Projector coupling coefficients D[l][n,m]

  • χ::OffsetArrays.OffsetArray{Array{Vector{T}, 1}, 1, Array{Array{Vector{T}, 1}, 1}} where T: Pseudo-atomic wavefunctions χ[l][n] on the radial mesh.

  • Q::OffsetArrays.OffsetArray{Array{Vector{T}, 2}, 1, Array{Array{Vector{T}, 2}, 1}} where T: Augmentation charge density functions Q[l][n,m] on the radial mesh

  • q::OffsetArrays.OffsetArray{Matrix{T}, 1, Array{Matrix{T}, 1}} where T: Augmentation charges q[l][n,m]

  • ρcore::Union{Nothing, Vector{T}} where T: Model core charge density for non-linear core correction on the radial mesh

  • ρval::Union{Nothing, Vector{T}} where T: Valence charge density for charge density initialization on the radial mesh

source
PseudoPotentialIO.HghPsPType
struct HghPsP{T} <: AnalyticalPsP

Analytical Hartwigsen-Goedecker-Hutter pseudopotential.

C. Hartwigsen, S. Goedecker, and J. Hutter. Pys. Rev. B 58, 3641 (1998)

  • checksum::Vector{UInt8}: SHA1 Checksum

  • Zatom::Union{Nothing, T} where T: Atomic charge

  • Zval::Any: Valence charge

  • lmax::Int64: Maximum angular momentum

  • rloc::Any: Radial cutoff for the local part of the pseudopotential

  • cloc::Vector: Polynomial coefficience of the local part of the pseudopotential

  • rnl::OffsetArrays.OffsetArray{T, 1, Vector{T}} where T: Radial cutoffs for the nonlocal projectors rnl[l]

  • D::OffsetArrays.OffsetArray{Matrix{T}, 1, Array{Matrix{T}, 1}} where T: Nonlocal projector coupling coefficients D[l][n,m]

source

Functions

PseudoPotentialIO.identifierFunction
source
identifier(psp::AbstractPsP) -> String

Identifying data (preferably unique).

identifier(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:43.

identifier(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:52.

identifier(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:93.

source
PseudoPotentialIO.formatFunction
source
PseudoPotentialIO.max_angular_momentumFunction
max_angular_momentum(file::PsPFile) -> Int64

Maximum angular momentum channel in the local part of the pseudopotential.

max_angular_momentum(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:57.

max_angular_momentum(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/hgh.jl:108.

max_angular_momentum(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/psp8.jl:291.

max_angular_momentum(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/upf.jl:358.

source
max_angular_momentum(psp::AbstractPsP) -> Int64

Maximum angular momentum channel of the pseudopotential.

max_angular_momentum(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:55.

max_angular_momentum(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:56.

max_angular_momentum(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:103.

source
PseudoPotentialIO.relativistic_treatmentFunction
relativistic_treatment(file::PsPFile) -> Symbol

Type of relativistic treatment (fully relativistic or scalar-relativistic).

relativistic_treatment(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:114.

source
relativistic_treatment(psp::AbstractPsP) -> Symbol

Type of relativistic treatment (fully relativistic or scalar-relativistic).

relativistic_treatment(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:281.

source
PseudoPotentialIO.formalismFunction
formalism(
    file::PsPFile
) -> Union{Type{NormConservingPsP}, Type{ProjectorAugmentedWavePsP}, Type{UltrasoftPsP}}

Formalism of the pseudopotential.

formalism(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:105.

source
formalism(
    psp::AbstractPsP
) -> Union{Type{NormConservingPsP}, Type{ProjectorAugmentedWavePsP}, Type{UltrasoftPsP}}

Formalism of the pseudopotential (norm-conserving, ultrasoft, projector-augmented wave, or Coulomb).

formalism(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:287.

source
PseudoPotentialIO.valence_chargeFunction
source
valence_charge(psp::AbstractPsP) -> Any

Pseudo-atomic valence charge.

valence_charge(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:53.

valence_charge(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:60.

valence_charge(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:119.

source
PseudoPotentialIO.n_projector_radialsFunction
n_projector_radials(file::PsPFile, l) -> Int64

Number of radial parts of the Kleinman-Bylander projectors Rl(r) at a given angular momentum.

n_projector_radials(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:63.

n_projector_radials(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/hgh.jl:109.

n_projector_radials(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/psp8.jl:292.

n_projector_radials(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/upf.jl:359.

source
n_projector_radials(file::PsPFile) -> Any

Number of radial parts of the Kleinman-Bylander nonlocal projectors at all angular momenta up to the maximum angular momentum channel.

n_projector_radials(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:120.

source
n_projector_radials(psp::AbstractPsP, l) -> Int64

Number of radial parts Rₗₙ(|r|) of the Kleinman-Bylander projectors Rₗₙ(|r|)Yₗₘ(r̂) at a given angular momentum l.

n_projector_radials(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:56.

n_projector_radials(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:57.

n_projector_radials(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:109.

source
n_projector_radials(psp::AbstractPsP) -> Any

Number of radial parts of the Kleinman-Bylander projectors at all angular momenta up to the maximum angular momentum channel.

n_projector_radials(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:302.

source
PseudoPotentialIO.n_projector_angularsFunction
n_projector_angulars(file::PsPFile, l) -> Any

Number of angular parts Yₗₘ(r̂) of the Kleinman-Bylander projectors Rₗₙ(|r|)Yₗₘ(r̂) at a given angular momentum l.

n_projector_angulars(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:128.

source
n_projector_angulars(file::PsPFile) -> Any

Number of angular parts of the Kleinman-Bylander projectors at all angular momenta up to the maximum angular momentum channel.

n_projector_angulars(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:137.

source
n_projector_angulars(psp::AbstractPsP, l) -> Any

Number of angular parts Yₗₘ(r̂) of the Kleinman-Bylander projectors Rₗₙ(|r|)Yₗₘ(r̂) at a given angular momentum l.

n_projector_angulars(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:310.

source
n_projector_angulars(psp::AbstractPsP) -> Any

Number of angular parts of the Kleinman-Bylander projectors at all angular momenta up to the maximum angular momentum channel.

n_projector_angulars(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:319.

source
PseudoPotentialIO.n_chi_function_radialsFunction
n_chi_function_radials(file::PsPFile, l) -> Int64

Number of radial parts of the chi-functions with angular momentum l.

n_chi_function_radials(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:68.

n_chi_function_radials(_, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/hgh.jl:110.

n_chi_function_radials(_, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/psp8.jl:293.

n_chi_function_radials(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/upf.jl:362.

source
n_chi_function_radials(file::PsPFile) -> Any

Number chi-functions at all angular momenta up to the maximum angular momentum channel.

n_chi_function_radials(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:145.

source
n_chi_function_radials(psp::AbstractPsP, l) -> Int64

Number of radial parts of the chi-functions with angular momentum l.

n_chi_function_radials(_, _)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:57.

n_chi_function_radials(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:58.

n_chi_function_radials(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:114.

source
n_chi_function_radials(psp::AbstractPsP) -> Any

Number chi-functions Rₗₙ(|r|) * Yₗₘ(r̂) at angular momenta l up to the maximum angular momentum channel.

n_chi_function_radials(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:332.

source
PseudoPotentialIO.n_chi_function_angularsFunction
n_chi_function_angulars(file::PsPFile, l) -> Any

Number of angular parts of the chi-functions with angular momentum l.

n_chi_function_angulars(file, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:152.

source
n_chi_function_angulars(file::PsPFile) -> Any

Number of angular parts of the chi-functions at all angular momenta up to the maximum angular momentum channel.

n_chi_function_angulars(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:161.

source
n_chi_function_angulars(psp::AbstractPsP, l) -> Any

Number of angular parts of the chi-functions with angular momentum l.

n_chi_function_angulars(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:339.

source
n_chi_function_angulars(psp::AbstractPsP) -> Any

Number of angular parts of the chi-functions at all angular momenta up to the maximum angular momentum channel.

n_chi_function_angulars(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:348.

source
PseudoPotentialIO.is_norm_conservingFunction
is_norm_conserving(file::PsPFile) -> Bool

Whether the pseudopotential is of the norm-conserving kind.

is_norm_conserving(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:78.

is_norm_conserving(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/hgh.jl:104.

is_norm_conserving(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/psp8.jl:287.

is_norm_conserving(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/upf.jl:352.

source
is_norm_conserving(psp::AbstractPsP) -> Bool

Whether the pseudopotential is of the norm-conserving kind.

is_norm_conserving(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:50.

is_norm_conserving(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/norm_conserving.jl:164.

is_norm_conserving(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:129.

is_norm_conserving(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/ultrasoft.jl:130.

source
PseudoPotentialIO.is_ultrasoftFunction
source
source
PseudoPotentialIO.is_pawFunction
source
source
PseudoPotentialIO.has_spin_orbitFunction
has_spin_orbit(file::PsPFile) -> Bool

Whether the pseudopotential contains relativistic spin-orbit coupling data.

has_spin_orbit(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:93.

has_spin_orbit(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/hgh.jl:102.

has_spin_orbit(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/psp8.jl:285.

has_spin_orbit(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/upf.jl:355.

source
has_spin_orbit(psp::AbstractPsP) -> Bool

Whether the pseudopotential contains relativistic spin-orbit coupling data.

has_spin_orbit(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:46.

has_spin_orbit(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:62.

has_spin_orbit(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:144.

source
PseudoPotentialIO.has_core_densityFunction
has_core_density(file::PsPFile) -> Bool

Whether the pseudopotential contains non-linear core correction data (model core charge density).

has_core_density(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/file.jl:99.

has_core_density(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/hgh.jl:103.

has_core_density(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/psp8.jl:286.

has_core_density(file)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/file/upf.jl:356.

source
has_core_density(psp::AbstractPsP) -> Bool

Whether the pseudopotential contains non-linear core correction data (model core charge density).

has_core_density(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:47.

has_core_density(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:63.

has_core_density(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:150.

source
PseudoPotentialIO.has_valence_densityFunction
has_valence_density(psp::AbstractPsP) -> Bool

Whether the pseudopotential contains valence charge density data.

has_valence_density(_)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:48.

has_valence_density(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:64.

has_valence_density(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:155.

source
PseudoPotentialIO.local_potential_cutoff_radiusFunction
local_potential_cutoff_radius(psp::AbstractPsP; tol) -> Any

Cutoff radius of the local potential in real-space.

local_potential_cutoff_radius(; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:59.

local_potential_cutoff_radius(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:67.

local_potential_cutoff_radius(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:170.

source
PseudoPotentialIO.projector_cutoff_radiusFunction
projector_cutoff_radius(
    psp::AbstractPsP,
    l::Int64,
    n::Int64;
    tol
) -> Any

Cutoff radius of the nth Kleinman-Bylander non-local projector at angular momentum l in real-space.

projector_cutoff_radius(, , ; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:60.

projector_cutoff_radius(psp, l, n; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:72.

projector_cutoff_radius(psp, l, n; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:176.

source
PseudoPotentialIO.chi_function_cutoff_radiusFunction
chi_function_cutoff_radius(
    psp::AbstractPsP,
    l::Int64,
    n::Int64;
    tol
) -> Any

Cutoff radius of the nth chi function at angular momentum l in real-space.

chi_function_cutoff_radius(, , ; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:61.

chi_function_cutoff_radius(psp, l, n; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:77.

chi_function_cutoff_radius(psp, l, n; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:181.

source
PseudoPotentialIO.valence_charge_density_cutoff_radiusFunction
valence_charge_density_cutoff_radius(
    psp::AbstractPsP;
    tol
) -> Any

Cutoff radius of the valence charge density in real-space.

valence_charge_density_cutoff_radius(; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:62.

valence_charge_density_cutoff_radius(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:83.

valence_charge_density_cutoff_radius(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:186.

source
PseudoPotentialIO.core_charge_density_cutoff_radiusFunction
core_charge_density_cutoff_radius(
    psp::AbstractPsP;
    tol
) -> Any

Cutoff radius of the core charge density in real-space.

core_charge_density_cutoff_radius(; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:63.

core_charge_density_cutoff_radius(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:89.

core_charge_density_cutoff_radius(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:191.

source
PseudoPotentialIO.projector_couplingFunction
projector_coupling(psp::AbstractPsP, l) -> Matrix

Projector coupling matrix at angular momentum l.

projector_coupling(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:65.

projector_coupling(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:95.

projector_coupling(psp, l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:165.

source
projector_coupling(
    psp::AbstractPsP,
    l::Int64,
    n::Int64,
    m::Int64
) -> Any

Projector coupling constant between the nth and mth projector with angular momentum l.

projector_coupling(psp, l, n, m)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:402.

source
projector_coupling(
    psp::AbstractPsP,
    l::Int64,
    n::Int64
) -> Any

Projector coupling constant between the nth projector with angular momentum l itself.

projector_coupling(psp, l, n)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:409.

source
PseudoPotentialIO.pseudo_energy_correctionFunction
pseudo_energy_correction(T::Type, psp::AbstractPsP) -> Any

Pseudopotential energy correction (the DC component of the Fourier transform of the local part of the pseudopotential).

pseudo_energy_correction(T, psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:165.

pseudo_energy_correction(T, psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:158.

pseudo_energy_correction(T, psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:270.

source
PseudoPotentialIO.local_potential_realFunction
local_potential_real(psp::AbstractPsP) -> Any

Local part of the pseudopotential evaluated at real-space point r.

local_potential_real(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:98.

local_potential_real(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:99.

local_potential_real(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:196.

source
PseudoPotentialIO.local_potential_fourierFunction
local_potential_fourier(psp::AbstractPsP) -> Any

Local part of the pseudopotential evaluated at reciprocal-space point q.

local_potential_fourier(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:88.

local_potential_fourier(psp; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:122.

local_potential_fourier(psp)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:232.

source
PseudoPotentialIO.projector_realFunction
projector_real(
    psp::AbstractPsP,
    l::Integer,
    n::Integer
) -> Any

The nth nonlocal Kleinman-Bylander projector at angular momentum l evaluated at real-space point r.

projector_real(psp, l, n)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:154.

projector_real(psp, l, n)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:103.

projector_real(psp, l, n)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:204.

source
PseudoPotentialIO.projector_fourierFunction
projector_fourier(
    psp::AbstractPsP,
    l::Integer,
    n::Integer
) -> Any

The nth nonlocal Kleinman-Bylander projector at angular momentum l evaluated at reciprocal-space point q.

projector_fourier(psp, l, n)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/hgh.jl:144.

projector_fourier(psp, l, n; tol)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/numeric.jl:137.

projector_fourier(psp, l, n)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/psp/psp.jl:240.

source
PseudoPotentialIO.hankel_transformFunction

Hankel / Bessel-Fourier transform of order l of a function f on a radial mesh r. The function f should be rapidly decaying to zero within the bounds of the mesh.

The radial transform is defined as:

\[4\pi \int_0^{\infty} f(r) j_l(q r) r^2 dr \approx 4\pi \int_{r_1}^{r_N} f(r) j_l(q r) r^2 dr\]

where $j_l(x)$ is the spherical Bessel function of the first kind at order $l$.

source
PseudoPotentialIO.build_interpolator_realFunction

Build an interpolator for the function f on the radial grid r in real space and return a function with two methods for evaluating it at radial points and arbitrary 3D vectors.

If the radial grid is linear, the function will be interpolated using cubic splines. Otherwise, simple linear interpolation is the only method currently supported by the interpoaltion backend.

source
PseudoPotentialIO.simpsonFunction

Simpson's rule integration for a function f(x) on a grid with grid spacing dx. Performs better than the trapezoidal rule on logarithmic grids.

For a uniform grid with an odd number of grid points:

\[\int_a^b f(x) dx \approx \frac{\Delta x}{3} \left[ f(x_1) + 4 \left( \sum_{i=2, i_\mathrm{even}}^{N-1} f(x_i) \right) + 2 \left( \sum_{i=3, i_\mathrm{odd}}^{N-2} f(x_i) + f(x_N) \right) \right]\]

source
PseudoPotentialIO.fast_sphericalbesseljFunction
fast_sphericalbesselj(l::Integer) -> Any

Spherical Bessel function of the first kind jₗ(x).

Consistent with https://en.wikipedia.org/wiki/Besselfunction#SphericalBessel_functions and with SpecialFunctions.sphericalbesselj and Bessels.sphericalbesselj.

Specialized for integer $l$ in the range $0 \leq l \leq 5$:

\[\begin{aligned} j_0(x) &= \frac{\sin(x)}{x} \\ j_1(x) &= \frac{\sin(x) - x\cos(x)}{x^2} \\ j_2(x) &= \frac{(3 - x^2)\sin(x) - 3x\cos(x)}{x^3} \\ j_3(x) &= \frac{(15 - 6x^2)\sin(x) + (x^3 - 15x)\cos(x)}{x^4} \\ j_4(x) &= \frac{(105 - 45x^2 + x^4)\sin(x) + (10x^3 - 105x)\cos(x)}{x^5} \\ \end{aligned}\]

fast_sphericalbesselj(l)

defined at /home/runner/work/PseudoPotentialIO.jl/PseudoPotentialIO.jl/src/common/spherical_bessel.jl:19.

source