Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeometryOptimization: minimize_energy! doesn't return the relaxed result of a lattice relaxation #1066

Open
thomsen59 opened this issue Feb 23, 2025 · 2 comments

Comments

@thomsen59
Copy link

I loaded a particular lattice structure generated with ASE in extxyz format for GeO_2 (rutile). Then I tried to relax w/ GeometryOptimization. minimize_energy! ran a few loop-steps and the quit with
ERROR: ArgumentError: invalid index: nothing of type Nothing
perhaps it's got to do with 'miniter=2' when the structure is already relaxed?

versioninfo()
Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin24.0.0)
CPU: 8 × Apple M2
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
Threads: 2 default, 0 interactive, 1 GC (on 4 virtual cores)
Environment:
LD_LIBRARY_PATH = /opt/homebrew/Cellar/libxc/7.0.0/lib
JULIA_EDITOR = code
JULIA_NUM_THREADS = 2

Program:
cd("/Users/thomsen/Documents/ct/_nach_P/julia/QM/rutile")
using Pkg; Pkg.gc
Pkg.activate(@DIR)
Pkg.instantiate(); Pkg.precompile()

using AtomsIO # Use Julia-only IO parsers
system = load_system("geo2.extxyz")

using DFTK
using PseudoPotentialData
pseudopotentials = PseudoFamily("dojo.nc.sr.pbe.v0_4_1.standard.upf")
calc = DFTKCalculator(;
model_kwargs = (; functionals=PBE(), pseudopotentials), # model_DFT keyword arguments
basis_kwargs = (; kgrid=[2, 2, 3], Ecut=30) # PlaneWaveBasis keyword arguments
)
model = model_DFT(system;

system:
6
Lattice="4.48609 0.0 0.0 0.0 4.48609 0.0 0.0 0.0 2.91186" Properties=species:S:1:pos:R:3:spacegroup_kinds:I:1 spacegroup="P 42/m n m" unit_cell=conventional pbc="T T T"
Ge 0.00000000 0.00000000 0.00000000 0
Ge 2.24304500 2.24304500 1.45593000 0
O 1.39068790 1.39068790 0.00000000 1
O 3.09540210 3.09540210 0.00000000 1
O 0.85235710 3.63373290 1.45593000 1
O 3.63373290 0.85235710 1.45593000 1

Output:
Activating project at ~/Documents/ct/_nach_P/julia/QM/rutile
┌ Warning: Negative ρcore detected: -3.3604553205713266e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.4576296213 -0.28 0.80 6.3 10.0s
2 -244.3423400565 + -0.94 -0.18 0.80 3.7 5.74s
3 -244.7613250451 -0.38 -1.26 0.80 4.3 3.78s
4 -244.7617630308 -3.36 -1.98 0.80 1.2 1.64s
5 -244.7619099002 -3.83 -2.54 0.80 2.5 1.61s
6 -244.7619176983 -5.11 -2.71 0.80 2.2 1.60s
7 -244.7619198134 -5.67 -3.25 0.80 1.0 1.05s
8 -244.7619199842 -6.77 -3.32 0.80 2.3 1.70s
9 -244.7619201390 -6.81 -3.90 0.80 1.0 976ms
10 -244.7619201677 -7.54 -4.23 0.80 2.0 1.70s
11 -244.7619201698 -8.69 -4.62 0.80 1.0 1.02s
12 -244.7619201706 -9.09 -5.30 0.80 2.0 1.29s
13 -244.7619201706 -10.26 -5.35 0.80 2.0 1.48s
14 -244.7619201707 -10.86 -5.93 0.80 1.0 1.25s
15 -244.7619201707 -11.61 -6.47 0.80 3.0 1.38s
16 -244.7619201707 + -13.07 -6.79 0.80 2.0 1.56s
17 -244.7619201707 -12.59 -7.02 0.80 1.3 1.32s
18 -244.7619201707 + -13.25 -6.95 0.80 1.0 999ms
19 -244.7619201707 + -12.94 -7.14 0.80 1.0 987ms
20 -244.7619201707 -12.85 -8.49 0.80 1.0 1.25s
┌ Warning: Negative ρcore detected: -3.3604553205713266e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7619201707 -8.63 0.80 1.0 2.03s
2 -244.7619201707 + -12.59 -8.75 0.80 1.0 1.07s

Geometry optimisation convergence (in atomic units)
┌─────┬─────────────────┬───────────┬────────────┬────────┐
│ n │ Energy │ log10(ΔE) │ max(Force) │ Δtime │
├─────┼─────────────────┼───────────┼────────────┼────────┤
│ 0 │ -244.7619201707 │ │ 0.222255 │ 63.4s │
└─────┴─────────────────┴───────────┴────────────┴────────┘

┌ Warning: Negative ρcore detected: -3.315597813538548e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.5373423838 -0.75 0.80 4.2 2.59s
2 -244.5500588879 -1.90 -1.47 0.80 1.0 2.12s
3 -244.5523112907 -2.65 -1.72 0.80 2.7 3.09s
4 -244.5518414556 + -3.33 -2.09 0.80 1.2 1.57s
5 -244.5519064618 -4.19 -2.61 0.80 1.0 1.37s
6 -244.5516643299 + -3.62 -2.81 0.80 2.0 2.35s
7 -244.5516729617 -5.06 -3.81 0.80 1.0 1.21s
8 -244.5516581321 + -4.83 -3.31 0.80 3.2 2.11s
9 -244.5516508194 + -5.14 -3.91 0.80 2.0 1.45s
10 -244.5516492958 + -5.82 -4.39 0.80 1.7 1.40s
11 -244.5516502289 -6.03 -4.79 0.80 1.2 1.01s
12 -244.5516505020 -6.56 -5.09 0.80 1.8 1.11s
13 -244.5516505000 + -8.69 -5.39 0.80 1.5 1.08s
14 -244.5516505757 -7.12 -5.86 0.80 2.0 1.56s
15 -244.5516505324 + -7.36 -6.16 0.80 1.8 1.16s
16 -244.5516505075 + -7.60 -6.88 0.80 1.7 1.05s
17 -244.5516505052 + -8.64 -7.12 0.80 2.2 1.46s
18 -244.5516505035 + -8.78 -7.64 0.80 1.2 1.32s
19 -244.5516505040 -9.31 -8.22 0.80 2.2 1.14s
20 -244.5516505041 -10.06 -8.57 0.80 2.5 1.39s
┌ Warning: Negative ρcore detected: -3.357364227037798e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7466544874 -0.80 0.80 4.2 1.91s
2 -244.7579236597 -1.95 -1.51 0.80 1.0 986ms
3 -244.7597712273 -2.73 -1.79 0.80 2.3 1.31s
4 -244.7598933906 -3.91 -2.25 0.80 1.2 1.32s
5 -244.7599318113 -4.42 -2.70 0.80 2.2 1.85s
6 -244.7599519933 -4.70 -3.07 0.80 2.0 1.47s
7 -244.7599534891 -5.83 -3.55 0.80 1.7 1.36s
8 -244.7599536499 -6.79 -3.90 0.80 1.2 1.31s
9 -244.7599537712 -6.92 -4.98 0.80 2.0 1.25s
10 -244.7599538664 -7.02 -4.78 0.80 3.2 1.79s
11 -244.7599538663 + -10.24 -5.88 0.80 1.8 1.23s
12 -244.7599538692 -8.54 -6.27 0.80 3.0 1.89s
13 -244.7599538698 -9.22 -6.92 0.80 1.8 1.46s
14 -244.7599538699 -9.94 -7.07 0.80 1.8 1.28s
15 -244.7599538699 + -11.14 -8.10 0.80 1.0 1.03s
16 -244.7599538699 -11.27 -7.67 0.80 3.2 2.12s
17 -244.7599538699 -11.48 -8.00 0.80 1.7 1.43s
18 -244.7599538699 -11.99 -8.99 0.80 1.8 1.75s
┌ Warning: Negative ρcore detected: -3.359458083895236e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7613841321 -2.05 0.80 1.0 1.80s
2 -244.7616248420 -3.62 -2.88 0.80 1.0 1.46s
3 -244.7617301400 -3.98 -2.95 0.80 3.5 2.80s
4 -244.7617302213 -7.09 -3.22 0.80 1.0 1.46s
5 -244.7617302936 -7.14 -3.94 0.80 1.0 1.85s
6 -244.7617305072 -6.67 -4.16 0.80 2.0 2.12s
7 -244.7617305346 -7.56 -4.80 0.80 1.0 1.35s
8 -244.7617305616 -7.57 -4.89 0.80 2.2 1.86s
9 -244.7617305629 -8.89 -5.30 0.80 1.0 1.15s
10 -244.7617305637 -9.11 -5.74 0.80 2.0 2.15s
11 -244.7617305641 -9.39 -6.11 0.80 1.2 1.92s
12 -244.7617305644 -9.56 -6.46 0.80 1.7 1.16s
13 -244.7617305645 -10.10 -7.42 0.80 1.8 1.23s
14 -244.7617305645 -10.23 -7.88 0.80 2.8 1.89s
15 -244.7617305645 -11.40 -7.87 0.80 1.7 1.18s
16 -244.7617305645 -12.94 -8.15 0.80 1.0 1.06s
17 -244.7617305645 -12.08 -8.31 0.80 2.0 2.03s
18 -244.7617305645 -12.25 -8.77 0.80 1.0 1.45s
┌ Warning: Negative ρcore detected: -3.360026398991296e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7618612451 -2.60 0.80 1.0 1.41s
2 -244.7618833816 -4.65 -3.43 0.80 1.0 1.77s
3 -244.7618948160 -4.94 -3.50 0.80 3.5 4.10s
4 -244.7618948139 + -8.68 -3.77 0.80 1.0 1.46s
5 -244.7618948220 -8.09 -4.50 0.80 1.0 1.44s
6 -244.7618948483 -7.58 -4.71 0.80 2.0 2.15s
7 -244.7618948514 -8.50 -5.43 0.80 1.0 1.69s
8 -244.7618948547 -8.49 -5.44 0.80 2.3 2.02s
9 -244.7618948548 -9.92 -5.84 0.80 1.0 1.39s
10 -244.7618948548 -10.17 -6.28 0.80 2.0 1.61s
11 -244.7618948549 -10.38 -6.62 0.80 1.0 1.50s
12 -244.7618948549 -10.55 -7.04 0.80 1.7 1.30s
13 -244.7618948549 -10.97 -7.79 0.80 1.8 1.30s
14 -244.7618948549 -11.29 -7.84 0.80 2.2 1.41s
15 -244.7618948549 -12.40 -8.62 0.80 1.2 1.34s
┌ Warning: Negative ρcore detected: -3.3602512794195806e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7619131870 -2.99 0.80 1.0 799ms
2 -244.7619170666 -5.41 -3.82 0.80 1.0 926ms
3 -244.7619191977 -5.67 -3.89 0.80 3.8 2.30s
4 -244.7619191975 + -9.69 -4.16 0.80 1.0 1.05s
5 -244.7619191992 -8.77 -4.86 0.80 1.0 1.01s
6 -244.7619192043 -8.29 -5.10 0.80 2.0 1.42s
7 -244.7619192049 -9.28 -5.94 0.80 1.0 1.36s
8 -244.7619192054 -9.23 -5.84 0.80 2.7 1.62s
9 -244.7619192055 -10.99 -6.20 0.80 1.0 1.08s
10 -244.7619192055 -11.50 -6.63 0.80 2.0 1.24s
11 -244.7619192055 -11.50 -6.99 0.80 1.0 2.98s
12 -244.7619192055 -11.40 -7.71 0.80 2.0 1.95s
13 -244.7619192055 -11.86 -7.94 0.80 2.8 2.35s
14 -244.7619192055 -12.37 -7.95 0.80 2.0 2.01s
15 -244.7619192055 -12.70 -8.35 0.80 1.0 1.80s
16 -244.7619192055 -12.77 -8.70 0.80 1.7 1.58s
┌ Warning: Negative ρcore detected: -3.360353977627203e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7619209182 -3.33 0.80 1.0 1.14s
2 -244.7619217712 -6.07 -4.15 0.80 1.0 1.75s
3 -244.7619222529 -6.32 -4.22 0.80 3.8 3.82s
4 -244.7619222529 + -10.36 -4.50 0.80 1.0 1.38s
5 -244.7619222532 -9.43 -5.20 0.80 1.0 1.37s
6 -244.7619222544 -8.94 -5.44 0.80 2.0 1.88s
7 -244.7619222545 -9.92 -6.25 0.80 1.0 1.08s
8 -244.7619222547 -9.85 -6.17 0.80 2.5 1.52s
9 -244.7619222547 -11.71 -6.55 0.80 1.0 982ms
10 -244.7619222547 -11.98 -6.98 0.80 2.0 1.46s
11 -244.7619222547 -12.04 -7.31 0.80 1.0 1.02s
12 -244.7619222547 -12.13 -7.96 0.80 2.0 1.12s
13 -244.7619222547 -12.94 -8.43 0.80 2.7 1.31s
14 -244.7619222547 -12.47 -8.18 0.80 2.0 1.67s
15 -244.7619222547 + -Inf -8.95 0.80 2.0 1.25s
┌ Warning: Negative ρcore detected: -3.360353977627203e-5
└ @ DFTK ~/.julia/packages/DFTK/fpkCG/src/terms/xc.jl:39
n Energy log10(ΔE) log10(Δρ) α Diag Δtime


1 -244.7619222547 -9.54 0.80 1.0 778ms
2 -244.7619222547 -13.55 -10.18 0.80 1.0 1.15s
ERROR: ArgumentError: invalid index: nothing of type Nothing
Stacktrace:
[1] to_index(i::Nothing)
@ Base ./indices.jl:315
[2] to_index(A::Vector{Int64}, i::Nothing)
@ Base ./indices.jl:292
[3] to_indices
@ ./indices.jl:368 [inlined]
[4] to_indices
@ ./indices.jl:360 [inlined]
[5] getindex
@ ./abstractarray.jl:1312 [inlined]
[6] symmetrize_forces(model::Model{…}, forces::Vector{…}; symmetries::Vector{…})
@ DFTK ~/.julia/packages/DFTK/fpkCG/src/symmetry.jl:367
[7] symmetrize_forces
@ ~/.julia/packages/DFTK/fpkCG/src/symmetry.jl:355 [inlined]
[8] symmetrize_forces
@ ~/.julia/packages/DFTK/fpkCG/src/symmetry.jl:373 [inlined]
[9] compute_forces(::DFTK.TermAtomicNonlocal, basis::PlaneWaveBasis{…}, ψ::Vector{…}, occupation::Vector{…}; kwargs::@kwargs{…})
@ DFTK ./none:0
[10] compute_forces
@ ./none:0 [inlined]
[11] (::DFTK.var"#1026#1027"{@kwargs{…}, PlaneWaveBasis{…}, Vector{…}, Vector{…}})(term::DFTK.TermAtomicNonlocal)
@ DFTK ./none:0
[12] iterate
@ ./generator.jl:48 [inlined]
[13] collect_to!(dest::Vector{Union{…}}, itr::Base.Generator{Vector{…}, DFTK.var"#1026#1027"{…}}, offs::Int64, st::Int64)
@ Base ./array.jl:849
[14] collect_to!(dest::Vector{Nothing}, itr::Base.Generator{Vector{…}, DFTK.var"#1026#1027"{…}}, offs::Int64, st::Int64)
@ Base ./array.jl:857
[15] collect_to_with_first!(dest::Vector{…}, v1::Nothing, itr::Base.Generator{…}, st::Int64)
@ Base ./array.jl:827
[16] collect(itr::Base.Generator{Vector{Any}, DFTK.var"#1026#1027"{@kwargs{…}, PlaneWaveBasis{…}, Vector{…}, Vector{…}}})
@ Base ./array.jl:801
[17] compute_forces(basis::PlaneWaveBasis{…}, ψ::Vector{…}, occupation::Vector{…}; kwargs::@kwargs{…})
@ DFTK ./none:0
[18] compute_forces
@ ./none:0 [inlined]
[19] compute_forces_cart(basis::PlaneWaveBasis{…}, ψ::Vector{…}, occupation::Vector{…}; kwargs::@kwargs{…})
@ DFTK ~/.julia/packages/DFTK/fpkCG/src/postprocess/forces.jl:23
[20] compute_forces_cart
@ ~/.julia/packages/DFTK/fpkCG/src/postprocess/forces.jl:22 [inlined]
[21] compute_forces_cart(scfres::@NamedTuple{…})
@ DFTK ~/.julia/packages/DFTK/fpkCG/src/postprocess/forces.jl:31
[22] calculate(::AtomsCalculators.Forces, system::FlexibleSystem{…}, calc::DFTKCalculator{…}, ps::@NamedTuple{}, st::@NamedTuple{…}; kwargs::@kwargs{})
@ DFTK ~/.julia/packages/DFTK/fpkCG/src/external/DFTKCalculator.jl:141
[23] calculate(::AtomsCalculators.Forces, system::FlexibleSystem{…}, calc::DFTKCalculator{…}, ps::@NamedTuple{}, st::@NamedTuple{…})
@ DFTK ~/.julia/packages/DFTK/fpkCG/src/external/DFTKCalculator.jl:138
[24] (::GeometryOptimization.var"#13#16"{…})(G::Vector{…}, x::Vector{…}, ps::@NamedTuple{})
@ GeometryOptimization ~/.julia/packages/GeometryOptimization/A4i1q/src/optimization.jl:61
[25] (::OptimizationBase.var"#63#70"{…})(::Vector{…}, ::Vector{…})
@ OptimizationBase ~/.julia/packages/OptimizationBase/KIIy3/src/function.jl:142
[26] (::OptimizationOptimJL.var"#10#16"{OptimizationBase.OptimizationCache{…}})(G::Vector{Float64}, θ::Vector{Float64})
@ OptimizationOptimJL ~/.julia/packages/OptimizationOptimJL/hDX5k/src/OptimizationOptimJL.jl:193
[27] gradient!!(obj::NLSolversBase.TwiceDifferentiable{Float64, Vector{…}, Matrix{…}, Vector{…}}, x::Vector{Float64})
@ NLSolversBase ~/.julia/packages/NLSolversBase/kavn7/src/interface.jl:63
[28] value_gradient!(obj::NLSolversBase.TwiceDifferentiable{Float64, Vector{…}, Matrix{…}, Vector{…}}, x::Vector{Float64})
@ NLSolversBase ~/.julia/packages/NLSolversBase/kavn7/src/interface.jl:73
[29] update_g!(d::NLSolversBase.TwiceDifferentiable{…}, state::Optim.LBFGSState{…}, method::Optim.LBFGS{…})
@ Optim ~/.julia/packages/Optim/HvjCd/src/multivariate/optimize/optimize.jl:4
[30] optimize(d::NLSolversBase.TwiceDifferentiable{…}, initial_x::Vector{…}, method::Optim.LBFGS{…}, options::Optim.Options{…}, state::Optim.LBFGSState{…})
@ Optim ~/.julia/packages/Optim/HvjCd/src/multivariate/optimize/optimize.jl:59
[31] optimize(d::NLSolversBase.TwiceDifferentiable{…}, initial_x::Vector{…}, method::Optim.LBFGS{…}, options::Optim.Options{…})
@ Optim ~/.julia/packages/Optim/HvjCd/src/multivariate/optimize/optimize.jl:36
[32] __solve(cache::OptimizationBase.OptimizationCache{…})
@ OptimizationOptimJL ~/.julia/packages/OptimizationOptimJL/hDX5k/src/OptimizationOptimJL.jl:224
[33] solve!
@ ~/.julia/packages/SciMLBase/YTOjh/src/solve.jl:187 [inlined]
[34] #solve#725
@ ~/.julia/packages/SciMLBase/YTOjh/src/solve.jl:95 [inlined]
[35] _minimize_energy!(system::ExtXYZ.Atoms{…}, calculator::DFTKCalculator{…}, solver::GeometryOptimization.Autoselect; maxiters::Int64, maxtime::Int64, tol_energy::Unitful.Quantity{…}, tol_forces::Float64, tol_virial::Unitful.Quantity{…}, maxstep::Unitful.Quantity{…}, verbosity::Int64, callback::DFTKGeometryOptimizationExt.var"#4#6"{…}, kwargs::@kwargs{})
@ GeometryOptimization ~/.julia/packages/GeometryOptimization/A4i1q/src/optimization.jl:156
[36] minimize_energy!(system::ExtXYZ.Atoms{…}, calc::DFTKCalculator{…}, solver::GeometryOptimization.Autoselect; autoadjust_calculator::Bool, tol_energy::Unitful.Quantity{…}, tol_forces::Float64, tol_virial::Unitful.Quantity{…}, verbosity::Int64, callback::GeoOptDefaultCallback, kwargs::@kwargs{})
@ DFTKGeometryOptimizationExt ~/.julia/packages/DFTK/fpkCG/ext/DFTKGeometryOptimizationExt.jl:56
[37] top-level scope
@ ~/Documents/ct/_nach_P/julia/QM/rutile/geo2_relaxation _sent.jl:25
Some type information was truncated. Use show(err) to see complete types.

@mfherbst
Copy link
Member

mfherbst commented Feb 23, 2025

Hi @thomsen59 thanks for reporting

perhaps it's got to do with 'miniter=2' when the structure is already relaxed?

I don't think that's the root cause here. It looks the error is from symmetrising the forces it computes. This looks very much like a bug.

I see you extxyz file geo2.extxyz is

6
Lattice="4.48609 0.0 0.0 0.0 4.48609 0.0 0.0 0.0 2.91186" Properties=species:S:1:pos:R:3:spacegroup_kinds:I:1 spacegroup="P 42/m n m" unit_cell=conventional pbc="T T T"
Ge 0.00000000 0.00000000 0.00000000 0
Ge 2.24304500 2.24304500 1.45593000 0
O 1.39068790 1.39068790 0.00000000 1
O 3.09540210 3.09540210 0.00000000 1
O 0.85235710 3.63373290 1.45593000 1
O 3.63373290 0.85235710 1.45593000 1

and you setup the calculator as:

using AtomsIO # Use Julia-only IO parsers
system = load_system("geo2.extxyz")

using DFTK
using PseudoPotentialData
pseudopotentials = PseudoFamily("dojo.nc.sr.pbe.v0_4_1.standard.upf")
calc = DFTKCalculator(;
model_kwargs = (; functionals=PBE(), pseudopotentials),
basis_kwargs = (; kgrid=[2, 2, 3], Ecut=30),
)

But I cannot see your geometry optimisation invocation. Can you post that, too, for reference ?

@thomsen59
Copy link
Author

using DFTK
using PseudoPotentialData
pseudopotentials = PseudoFamily("dojo.nc.sr.pbe.v0_4_1.standard.upf")
calc = DFTKCalculator(;
model_kwargs = (; functionals=PBE(), pseudopotentials), # model_DFT keyword arguments
basis_kwargs = (; kgrid=[2, 2, 3], Ecut=30) # PlaneWaveBasis keyword arguments
)
model = model_DFT(system;
functionals=PBE(),
temperature=0.01,
pseudopotentials=PseudoFamily("dojo.nc.sr.pbe.v0_4_1.standard.upf")
)

using GeometryOptimization
results = minimize_energy!(system, calc; tol_forces=1e-6, verbosity=2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants