Skip to content

Commit

Permalink
multiroot cepa in spt and spt pt2 version and qdpt pt2 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
arnab82 committed Aug 16, 2024
1 parent f50fab4 commit 2e42103
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 146 deletions.
Binary file removed examples/pt2_test/_testdata_cmf_h8.jld2
Binary file not shown.
Binary file removed examples/pt2_test/_testdata_cmf_h9.jld2
Binary file not shown.
65 changes: 0 additions & 65 deletions examples/pt2_test/h8.jl

This file was deleted.

65 changes: 0 additions & 65 deletions examples/pt2_test/h9.jl

This file was deleted.

17 changes: 2 additions & 15 deletions examples/tetracene_dimer/spt_direct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,9 @@ FermiCG.add_double_excitons!(ci_vector,FermiCG.FockConfig(init_fspace),nroots)
fspace_0 = FermiCG.FockConfig(init_fspace)
# FermiCG.add_1electron_transfers!(ci_vector, fspace_0, 1)
FermiCG.add_spin_flip_states!(ci_vector, fspace_0,1)
# # Spin-flip states
# ## ba
# tmp_fspace = FermiCG.replace(fspace_0, (1,2), ([4,2],[2,4]))
# FermiCG.add_fockconfig!(ci_vector, tmp_fspace)
# ci_vector[tmp_fspace][FermiCG.TuckerConfig((1:1,1:1))]=FermiCG.Tucker(tuple([zeros(Float64, 1, 1) for _ in 1:nroots]...))
# ## ab
# tmp_fspace = FermiCG.replace(fspace_0, (1,2), ([2,4],[4,2]))
# FermiCG.add_fockconfig!(ci_vector, tmp_fspace)
# ci_vector[tmp_fspace][FermiCG.TuckerConfig((1:1,1:1))]=FermiCG.Tucker(tuple([zeros(Float64, 1, 1) for _ in 1:nroots]...))
display(ci_vector.data)
FermiCG.eye!(ci_vector)
display(ci_vector)
# σ = FermiCG.build_compressed_1st_order_state(ci_vector, cluster_ops, clustered_ham,
# nbody=4,
# thresh=1e-3)
# σ = FermiCG.compress(σ, thresh=1e-5)
# v2 = BSTstate(σ,R=10)
# FermiCG.eye!(v2)
e_ci, v2 = FermiCG.ci_solve(ci_vector, cluster_ops, clustered_ham);
e_var, v_var = FermiCG.block_sparse_tucker(v2, cluster_ops, clustered_ham,
max_iter = 200,
Expand All @@ -70,6 +55,8 @@ e_var, v_var = FermiCG.block_sparse_tucker(v2, cluster_ops, clustered_ham,
resolve_ss = false,
tol_tucker = 1e-4,
solver = "davidson")
@time ept2 = FermiCG.compute_pt2_energy(v_var, cluster_ops, clustered_ham, thresh_foi=1e-6,prescreen = true,compress_twice = true)
@time ept2 = FermiCG.compute_pt2_energy2(v_var, cluster_ops, clustered_ham, thresh_foi=1e-6,prescreen = true,compress_twice = true)
e_var, v_var = FermiCG.block_sparse_tucker(v_var, cluster_ops, clustered_ham,
max_iter = 200,
nbody = 4,
Expand Down
2 changes: 1 addition & 1 deletion src/tpsci_pt2_energy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ end
threaded = true,
verbose=1) where {T,N,R}
this function computes the second-order energy correction using the Quasidegenerate perturbation theory
Approximation: Taking ∂S=0 in denominator of the perturbation theory expression
Approximation: Taking ∂E_S=0 in denominator of the perturbation theory expression
args::
TPSCIstate{T,N,R} : TPSCIstate object
cluster_ops::Dict{Int64,Dict{String,Any}} : cluster operators
Expand Down

0 comments on commit 2e42103

Please sign in to comment.