Skip to content

Commit

Permalink
Drop ChainRulesCore dependency (#1051)
Browse files Browse the repository at this point in the history
* Drop ChainRulesCore dependency

* Remove ChainRulesCore from Project.toml
  • Loading branch information
niklasschmitz authored Jan 29, 2025
1 parent 94e10dd commit dc62a84
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
AtomsBase = "a963bdd2-2df7-4f54-a1ee-49d51e6be12a"
AtomsCalculators = "a3e0e189-c65a-42c1-833c-339540406eb1"
Brillouin = "23470ee3-d0df-4052-8b1a-8cbd6363e7f0"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DftFunctionals = "6bd331d2-b28d-4fd3-880e-1a1c7f37947f"
DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
Expand Down Expand Up @@ -84,7 +83,6 @@ AtomsIO = "0.3"
AtomsIOPython = "0.1"
Brillouin = "0.5.14"
CUDA = "5"
ChainRulesCore = "1.15"
ComponentArrays = "0.15"
Dates = "1"
DftFunctionals = "0.3"
Expand Down
1 change: 0 additions & 1 deletion src/DFTK.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ using ForwardDiff
using AbstractFFTs
using GPUArraysCore
using Random
using ChainRulesCore
using PrecompileTools

@template (FUNCTIONS, METHODS, MACROS) =
Expand Down
5 changes: 1 addition & 4 deletions src/terms/xc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,7 @@ function add_kernel_gradient_correction!(δV, terms, density, perturbation, cros
end

function mergesum(nt1::NamedTuple{An}, nt2::NamedTuple{Bn}) where {An, Bn}
all_keys = nothing
ChainRulesCore.@ignore_derivatives begin
all_keys = (union(An, Bn)..., )
end
all_keys = (union(An, Bn)..., )
values = map(all_keys) do key
if haskey(nt1, key)
nt1[key] .+ get(nt2, key, false)
Expand Down

0 comments on commit dc62a84

Please sign in to comment.