PseudoPotentialData
Enables programmatic access to standard pseudopotential libraries for solid-state calculations. In using this library the combination of a string identifier and the element symbol provides a unique and reproducible mapping to a pseudopotential file. Moreover in case the pseudopotential file happens to be missing on the computer Julia's artifact system takes care to automatically download it as needed.
Basic usage
For example, the following code automatically downloads the pseudopotential file of the stringent pseudodojo pseudopotential for LDA pseudopotentials (referred to by the identifier dojo.nc.sr.lda.v0_4_1.oncvpsp3.standard.upf
) and places the full path to the downloaded pseudopotential file into the filename
variable:
using PseudoPotentialData
identifier = "dojo.nc.sr.lda.v0_4_1.oncvpsp3.standard.upf"
family = PseudoFamily(identifier)
filename = pseudofile(family, :Si)
"/home/runner/.julia/artifacts/1ea71a84cf375286564538a9cab789991f4bf1f4/Si.upf"
As you see this will be a string such as /home/user/.julia/artifacts/56094b8162385233890d523c827ba06e07566079/Si.upf
, which luckily you don't usually have to know or remember. Note, further that this path may differ between computers, julia versions etc. It is therefore highly recommended to use the above mechanism based on identfier
and element symbol instead of hard-coding the expanded path in user scripts.
For multiple elements you can similarly use
pseudofile.(family, [:C, :Si])
2-element Vector{String}:
"/home/runner/.julia/artifacts/1ea71a84cf375286564538a9cab789991f4bf1f4/C.upf"
"/home/runner/.julia/artifacts/1ea71a84cf375286564538a9cab789991f4bf1f4/Si.upf"
A PseudoFamily
is furthermore an AbstractDict{Symbol,String}
for the mapping of element symbol to file path, e.g. one can perform index lookup
family[:Si]
"/home/runner/.julia/artifacts/1ea71a84cf375286564538a9cab789991f4bf1f4/Si.upf"
or iterate over pairs
for (k, v) in family
println(k, " => ", v)
break
end
._Ag => /home/runner/.julia/artifacts/1ea71a84cf375286564538a9cab789991f4bf1f4/._Ag.upf
Available keys and naming convention
A list of available pseudopotential identifiers is available as
PseudoPotentialData.family_identifiers()
10-element Vector{String}:
"dojo.paw.pbe.v1_1.jth.standard.xml"
"dojo.nc.fr.pbesol.v0_4.oncvpsp3.standard.upf"
"dojo.nc.sr.pbesol.v0_4_1.oncvpsp3.standard.upf"
"dojo.nc.sr.pbe.v0_4_1.oncvpsp3.standard.upf"
"dojo.nc.fr.pbe.v0_4.oncvpsp3.standard.upf"
"dojo.nc.sr.lda.v0_4_1.oncvpsp3.stringent.upf"
"dojo.nc.sr.lda.v0_4_1.oncvpsp3.standard.upf"
"dojo.nc.fr.pbe.v0_4.oncvpsp3.stringent.upf"
"dojo.nc.fr.pbesol.v0_4.oncvpsp3.stringent.upf"
"dojo.nc.sr.pbe.v0_4_1.oncvpsp3.stringent.upf"
The naming convention is as that each pseudo family name consists of a list of fields, which are concatenated using a .
(dot). These are:
- An identifier for the pseudo family (like
dojo
for the PseudoDojo family of potentials. - The type of pseudopotential (
nc
: norm-conserving,us
: ultrasoft,paw
: projected augmented wave) - Details on the level of relativistic effects employed when generating the pseudo (
fr
: Full relativistic,sr
: Scalar relativistic,nr
: No relativistic) - The functional for which the pseudopotential was prepared
- The version of the pseudopotential construction (with version points replaced by underscores)
- The program used to generate the pseudopotential
- Some additional comments specifying the pseudopotential. E.g. for PseudoDojo potentials there is usually a
stringent
version (requiring slightly larger cutoffs) and astandard
version being a bit softer. - The format of the pseudopotential files in this library.
More details on the meaning of these keys will be provided at a later stage. Some information is also available in the README of the PseudoLibrary repository.
Interface
PseudoPotentialData.families
— ConstantThe list of all known pseudopotential families.
PseudoPotentialData.PseudoFamily
— MethodConstruction of a PseudoFamily from a identifier
representing the pseudopotential family to use. For a list of valid identifier, see family_identifiers
. A PseudoFamily
is an `AbstractDict{Symbol,String} mapping from an element symbol to the full path of the pseudopotential file.
PseudoPotentialData.artifact_directory
— MethodReturn the directory containing the pseudo files. This downloads the artifact if necessary.
PseudoPotentialData.available_elements
— MethodReturn the list of all pseudopotential files in the artifact
PseudoPotentialData.family_identifiers
— MethodGet the list of available pseudopotential family identifiers.
PseudoPotentialData.pseudofile
— MethodGet the full path to the file containing the pseudopotential information for a particular element
(identified by an atomic symbol) and a particular pseudopotential family
.