Skip to content

Commit

Permalink
another version of pt2 correction added where we loop over tuckerconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
arnab82 committed May 31, 2024
1 parent d9da4da commit c95c82c
Show file tree
Hide file tree
Showing 3 changed files with 250 additions and 75 deletions.
3 changes: 2 additions & 1 deletion examples/pt2_test/h8.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ using FermiCG
using Printf
using Test
using JLD2
ref_fock = FockConfig(init_fspace)


@load "_testdata_cmf_h8.jld2"
ref_fock = FockConfig(init_fspace)
# Do TPS
M=20
cluster_bases = FermiCG.compute_cluster_eigenbasis_spin(ints, clusters, d1, [3,3], ref_fock, max_roots=M, verbose=1);
Expand Down
6 changes: 3 additions & 3 deletions examples/pt2_test/h9.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ci_vector = FermiCG.add_spin_focksectors(ci_vector)
display(ci_vector)
etpsci, vtpsci = FermiCG.tps_ci_direct(ci_vector, cluster_ops, clustered_ham);

ept1 = FermiCG.compute_pt2_energy(vtpsci, cluster_ops, clustered_ham, thresh_foi=1e-12)
@time ept1 = FermiCG.compute_pt2_energy(vtpsci, cluster_ops, clustered_ham, thresh_foi=1e-12)



Expand Down Expand Up @@ -57,8 +57,8 @@ FermiCG.fill_p_space!(ci_vector, na, nb)
FermiCG.eye!(ci_vector)
ebst, vbst = FermiCG.ci_solve(ci_vector, cluster_ops, clustered_ham)

ept2 = FermiCG.compute_pt2_energy(vbst, cluster_ops, clustered_ham, thresh_foi=1e-64)

@time ept2 = FermiCG.compute_pt2_energy(vbst, cluster_ops, clustered_ham, thresh_foi=1e-64,prescreen = true,compress_twice = true)
@time ept2 = FermiCG.compute_pt2_energy2(vbst, cluster_ops, clustered_ham, thresh_foi=1e-64,prescreen = true,compress_twice = true)
println(" PT2 - tpsci")
display(ept1)
println(" PT2 - bst")
Expand Down
Loading

0 comments on commit c95c82c

Please sign in to comment.