Skip to content

Commit

Permalink
Update lookup table for binomial coefficients in TDMs.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
arnab82 committed Jan 27, 2024
1 parent 595a740 commit 0e9ecd6
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/FCI/TDMs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function compute_creation(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Ma
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E12
if binomial(j,i)>1E15
break

Check warning on line 51 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L50-L51

Added lines #L50 - L51 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
Expand Down Expand Up @@ -161,6 +161,9 @@ function compute_AA(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 165 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L164-L165

Added lines #L164 - L165 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down Expand Up @@ -267,6 +270,9 @@ function compute_Aa(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 274 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L274

Added line #L274 was not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down Expand Up @@ -372,6 +378,9 @@ function compute_Ab(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 382 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L381-L382

Added lines #L381 - L382 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down Expand Up @@ -486,6 +495,9 @@ function compute_AB(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 499 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L498-L499

Added lines #L498 - L499 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down Expand Up @@ -598,6 +610,9 @@ function compute_AAa(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 614 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L613-L614

Added lines #L613 - L614 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down Expand Up @@ -699,6 +714,9 @@ function compute_ABa(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 718 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L717-L718

Added lines #L717 - L718 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down Expand Up @@ -811,6 +829,9 @@ function compute_ABb(no::Integer, bra_na, bra_nb, ket_na, ket_nb, bra_v::Matrix,
_binomial = Array{Int,2}(undef,no+1,no+1)
for i in 0:no
for j in i:no
if binomial(j,i)>1E15
break

Check warning on line 833 in src/FCI/TDMs.jl

View check run for this annotation

Codecov / codecov/patch

src/FCI/TDMs.jl#L832-L833

Added lines #L832 - L833 were not covered by tests
end
_binomial[j+1,i+1] = binomial(j,i)
end
end
Expand Down

0 comments on commit 0e9ecd6

Please sign in to comment.