Skip to content

Commit

Permalink
Adapt to changes in GaussianBasis. Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavojra committed Jul 18, 2022
1 parent 06f2b3b commit 7f500f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
11 changes: 7 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ authors = ["gustavojra <gustavo.aroeira@gmail.com>"]
version = "0.4.0"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
GaussianBasis = "9bb1a3dc-0d1c-467e-84f5-0c4ef701360a"
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Molecules = "5de6a177-b489-40a9-b2f4-524242b9b679"
Expand All @@ -17,13 +19,14 @@ TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Molecules = "^0.2"
GaussianBasis = "^0.3"
Combinatorics = "^1"
Formatting = "^0.4.1"
GaussianBasis = "^0.4"
LoopVectorization = "0.12"
Molecules = "0.3"
Octavian = "0.3"
PrettyTables = "1"
Strided = "1"
Suppressor = "0.2"
TensorOperations = "^3.0.0"
julia = "^1.6"
LoopVectorization = "0.12"
Octavian = "0.3"
15 changes: 8 additions & 7 deletions src/Core/Integrals/AtomicIntegrals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ end

function compute_S!(I::IntegralHelper{T, E, AtomicOrbitals}) where {T<:AbstractFloat, E<:AbstractERI}
bs = I.orbitals.basisset
I.cache["S"] = overlap(bs, T)
I.cache["S"] = T.(overlap(bs))
end

function compute_T!(I::IntegralHelper{T, E, AtomicOrbitals}) where {T<:AbstractFloat, E<:AbstractERI}
bs = I.orbitals.basisset
I.cache["T"] = kinetic(bs, T)
I.cache["T"] = T.(kinetic(bs))
end

function compute_V!(I::IntegralHelper{T, E, AtomicOrbitals}) where {T<:AbstractFloat, E<:AbstractERI}
bs = I.orbitals.basisset
I.cache["V"] = nuclear(bs, T)
I.cache["V"] = T.(nuclear(bs))
end

function compute_ERI!(I::IntegralHelper{T, E, AtomicOrbitals}) where {T<:AbstractFloat, E<:AbstractDFERI}

bs = I.orbitals.basisset
auxbs = I.eri_type.basisset
J = ERI_2e2c(auxbs, T)
Pqp = ERI_2e3c(bs, auxbs, T)
J = T.(ERI_2e2c(auxbs))
Pqp = T.(ERI_2e3c(bs, auxbs))
Jh = similar(J)
Jh .= Array(real(J^(-1/2)))
@tensor b[Q,p,q] := Pqp[p,q,P]*Jh[P,Q]
Expand All @@ -42,10 +42,11 @@ end

function compute_ERI!(I::IntegralHelper{T, Chonky, AtomicOrbitals}) where T<:AbstractFloat
bs = I.orbitals.basisset
I.cache["ERI"] = ERI_2e4c(bs, T)
I.cache["ERI"] = T.(ERI_2e4c(bs))
end

function compute_ERI!(I::IntegralHelper{T, SparseERI, AtomicOrbitals}) where T<:AbstractFloat
bs = I.orbitals.basisset
I.cache["ERI"] = Fermi.FermiSparse(sparseERI_2e4c(bs, T)...)
### WONT WORK FOR SINGLE PRECISION
I.cache["ERI"] = Fermi.FermiSparse(sparseERI_2e4c(bs)...)
end

0 comments on commit 7f500f1

Please sign in to comment.