Skip to content

Commit

Permalink
Remove mentions of bundled pseudopotentials from docs and tests (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst authored Jan 10, 2025
1 parent 2860fa6 commit a843649
Show file tree
Hide file tree
Showing 52 changed files with 518 additions and 219 deletions.
21 changes: 17 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,43 @@ DFTKWriteVTKExt = "WriteVTK"

[compat]
AbstractFFTs = "1"
Aqua = "0.8.5"
Artifacts = "1"
ASEconvert = "0.1"
AtomsBase = "0.5"
AtomsBuilder = "0.2"
AtomsCalculators = "0.2.3"
AtomsIO = "0.3"
AtomsIOPython = "0.1"
Brillouin = "0.5.14"
CUDA = "5"
ChainRulesCore = "1.15"
ComponentArrays = "0.15"
CUDA = "5"
Dates = "1"
DftFunctionals = "0.3"
DiffResults = "1.1"
DocStringExtensions = "0.9"
DoubleFloats = "1"
FFTW = "1.5"
FiniteDiff = "2"
FiniteDifferences = "0.12"
ForwardDiff = "0.10"
GPUArraysCore = "0.1"
GenericLinearAlgebra = "0.3"
GeometryOptimization = "0.1"
GPUArraysCore = "0.1"
Interpolations = "0.14, 0.15"
IntervalArithmetic = "0.20"
IterTools = "1"
JLD2 = "0.4, 0.5"
JSON3 = "1"
KrylovKit = "0.8.3"
Libxc = "0.3.17"
LineSearches = "7"
LinearAlgebra = "1"
LinearMaps = "3"
MPI = "0.20.22"
LineSearches = "7"
Logging = "1"
Markdown = "1"
MPI = "0.20.22"
Optim = "1"
PeriodicTable = "1"
PkgVersion = "0.3"
Expand All @@ -113,13 +122,17 @@ Primes = "0.5"
Printf = "1"
PseudoPotentialData = "0.2.2"
PseudoPotentialIO = "0.1"
PythonCall = "0.9"
QuadGK = "2"
Random = "1"
Roots = "2"
SparseArrays = "1"
SpecialFunctions = "2"
Spglib = "0.9.4"
StaticArrays = "1"
Statistics = "1"
Test = "1"
TestItemRunner = "1"
TimerOutputs = "0.5.12"
Unitful = "1"
UnitfulAtomic = "1"
Expand Down
7 changes: 7 additions & 0 deletions README.release_notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@JuliaRegistrator register

Release notes:

Note that this release increases the minor version and contains a number of breaking changes:

- The pseudopotential repository shipped with DFTK is now deprecated and slated for removal in a future version of DFTK. Please rely on the [PseudoPotentialData](https://github.com/JuliaMolSim/PseudoPotentialData.jl/) package for selecting pseudopotentials. Concretely this means that `list_psp` will be removed and `load_psp` will only be working with full paths to pseduopotential data files or e.g. combinations of `PseudoPotentialData.PseudoFamily` objects and an element symbol.
3 changes: 3 additions & 0 deletions docs/logo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DFTK.png
DFTK_100x50.png
DFTK_150x50.png
Binary file added docs/logo/DFTK_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
144 changes: 144 additions & 0 deletions docs/logo/DFTK_48.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/src/developer/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
```@setup data_structures
using DFTK
using AtomsBuilder
model = model_DFT(bulk(:Si); functionals=LDA(),
pseudopotentials=Dict(:Si => "hgh/lda/si-q4"))
using PseudoPotentialData
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
model = model_DFT(bulk(:Si); functionals=LDA(), pseudopotentials)
basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4])
scfres = self_consistent_field(basis; tol=1e-4);
```
Expand Down
4 changes: 3 additions & 1 deletion docs/src/developer/symmetries.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ reducible points, determines the weight of each irreducible ``k`` point.
## Example
```@setup symmetries
using DFTK
using PseudoPotentialData
a = 10.26
lattice = a / 2 * [[0 1 1.];
[1 0 1.];
[1 1 0.]]
Si = ElementPsp(:Si, load_psp("hgh/lda/Si-q4"))
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
Si = ElementPsp(:Si, pseudopotentials)
atoms = [Si, Si]
positions = [ones(3)/8, -ones(3)/8]
```
Expand Down
17 changes: 7 additions & 10 deletions docs/src/ecosystem/atomsbase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@ system = bulk(:Si)
using PseudoPotentialData # defines PseudoFamily

pd_lda_family = PseudoFamily("dojo.nc.sr.lda.v0_4_1.standard.upf")
model = model_DFT(system;
functionals=LDA(),
temperature=1e-3,
model = model_DFT(system; functionals=LDA(), temperature=1e-3,
pseudopotentials=pd_lda_family)

# Alternatively the `pseudopotentials` object also accepts a `Dict{Symbol,String}`,
# which provides for each element symbol the filename or identifier
# of the pseudopotential to be employed, e.g.

model = model_DFT(system;
functionals=LDA(),
temperature=1e-3,
pseudopotentials=Dict(:Si => "hgh/lda/si-q4"))
path_to_pspfile = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")[:Si]
model = model_DFT(system; functionals=LDA(), temperature=1e-3,
pseudopotentials=Dict(:Si => path_to_pspfile))

# We can then discretise such a model and solve:
basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4])
Expand All @@ -59,7 +56,7 @@ using AtomsIO
system = load_system("Si.extxyz");

# Run the LDA calculation:
pseudopotentials = Dict(:Si => "hgh/lda/si-q4")
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
model = model_DFT(system; pseudopotentials, functionals=LDA(), temperature=1e-3)
basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4])
scfres = self_consistent_field(basis, tol=1e-8);
Expand All @@ -83,7 +80,7 @@ atoms = [:Si => ones(3)/8, :Si => -ones(3)/8]
system = periodic_system(atoms, lattice; fractional=true)

## Now run the LDA calculation:
pseudopotentials = Dict(:Si => "hgh/lda/si-q4")
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
model = model_DFT(system; pseudopotentials, functionals=LDA(), temperature=1e-3)
basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4])
scfres = self_consistent_field(basis, tol=1e-4);
Expand All @@ -100,7 +97,7 @@ second_system = atomic_system(model)
lattice = 5.431u"Å" / 2 * [[0 1 1.];
[1 0 1.];
[1 1 0.]];
Si = ElementPsp(:Si, load_psp("hgh/lda/Si-q4"))
Si = ElementPsp(:Si, pseudopotentials)
atoms = [Si, Si]
positions = [ones(3)/8, -ones(3)/8]

Expand Down
3 changes: 2 additions & 1 deletion docs/src/ecosystem/wannier.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ using DFTK
using Plots
using Unitful
using UnitfulAtomic
using PseudoPotentialData

d = 10u"Å"
a = 2.641u"Å" # Graphene Lattice constant
lattice = [a -a/2 0;
0 3*a/2 0;
0 0 d]

C = ElementPsp(:C, load_psp("hgh/pbe/c-q4"))
C = ElementPsp(:C, PseudoFamily("cp2k.nc.sr.pbe.v0_1.semicore.gth"))
atoms = [C, C]
positions = [[0.0, 0.0, 0.0], [1//3, 2//3, 0.0]]
model = model_DFT(lattice, atoms, positions; functionals=PBE())
Expand Down
5 changes: 3 additions & 2 deletions docs/src/tricks/achieving_convergence.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ of inspiration for what you can try. Your mileage may vary.
```@setup convergence
using DFTK
using AtomsBuilder
model = model_DFT(bulk(:Si); functionals=LDA(),
pseudopotentials=Dict(:Si => "hgh/lda/si-q4"))
using PseudoPotentialData
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
model = model_DFT(bulk(:Si); functionals=LDA(), pseudopotentials)
basis = PlaneWaveBasis(model; Ecut=15, kgrid=(3, 3, 3))
```

Expand Down
4 changes: 3 additions & 1 deletion docs/src/tricks/parallelization.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ to monitor and influence performance of the code.

```@setup parallelization
using DFTK
using PseudoPotentialData
a = 10.26 # Silicon lattice constant in Bohr
lattice = a / 2 * [[0 1 1.];
[1 0 1.];
[1 1 0.]]
Si = ElementPsp(:Si, load_psp("hgh/lda/Si-q4"))
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
Si = ElementPsp(:Si, pseudopotentials)
atoms = [Si, Si]
positions = [ones(3)/8, -ones(3)/8]
Expand Down
4 changes: 3 additions & 1 deletion docs/src/tricks/scf_checkpoints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
using DFTK
using LinearAlgebra
using JLD2
using PseudoPotentialData

d = 2.079 # oxygen-oxygen bondlength
a = 9.0 # size of the simulation box
lattice = a * I(3)
O = ElementPsp(:O, load_psp("hgh/pbe/O-q6.hgh"))
pseudopotentials = PseudoFamily("cp2k.nc.sr.pbe.v0_1.semicore.gth")
O = ElementPsp(:O, pseudopotentials)
atoms = [O, O]
positions = d / 2a * [[0, 0, 1], [0, 0, -1]]
magnetic_moments = [1., 1.]
Expand Down
14 changes: 5 additions & 9 deletions examples/arbitrary_floattype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@
# [ArXiv 2004.13549](https://arxiv.org/abs/2004.13549)

using DFTK
using PseudoPotentialData
using AtomsBuilder

## Setup silicon lattice
a = 10.263141334305942 # lattice constant in Bohr
lattice = a / 2 .* [[0 1 1.]; [1 0 1.]; [1 1 0.]]
Si = ElementPsp(:Si, load_psp("hgh/lda/Si-q4"))
atoms = [Si, Si]
positions = [ones(3)/8, -ones(3)/8]

## Cast to Float32, setup model and basis
model = model_DFT(lattice, atoms, positions; functionals=LDA())
## Use AtomsBuilder to setup silicon lattice and cast model to Float32
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.largecore.gth")
model = model_DFT(bulk(:Si); functionals=LDA(), pseudopotentials)
basis = PlaneWaveBasis(convert(Model{Float32}, model), Ecut=7, kgrid=[4, 4, 4])

## Run the SCF
Expand Down
Loading

0 comments on commit a843649

Please sign in to comment.