Skip to content

Commit a0c1f1d

Browse files
committed
Update public fields
1 parent 642434a commit a0c1f1d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PseudoPotentialData"
22
uuid = "5751a51d-ac76-4487-a056-413ecf6fbe19"
33
authors = ["Michael F. Herbst <[email protected]> and contributors"]
4-
version = "0.2.1"
4+
version = "0.2.2"
55

66
[deps]
77
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

src/PseudoPotentialData.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ export pseudofile, pseudometa, recommended_cutoff
1919
include("pseudofamily.jl")
2020

2121
"""Get the list of available pseudopotential family identifiers."""
22-
function family_identifiers()
22+
family_identifiers() = sort(collect(keys(families)))
23+
24+
"""
25+
Dictionary from pseudopotential identifiers to respective `PseudoLibrary` instances.
26+
Note, that in the REPL typing `PseudoPotentialData.families["dojo. <Tab>` allows
27+
to find the pseudofamily identifier by Tab completion.
28+
"""
29+
const families = let
2330
artifact_file = find_artifacts_toml(@__FILE__)
2431
@assert !isnothing(artifact_file)
25-
sort(collect(keys(TOML.parsefile(artifact_file))))
32+
Dict(id => PseudoFamily(id)
33+
for id in keys(TOML.parsefile(artifact_file)))
2634
end
2735

28-
"""The list of all known pseudopotential families."""
29-
const families = map(PseudoFamily, family_identifiers())
30-
3136
end

0 commit comments

Comments
 (0)