Skip to content

Commit

Permalink
fixed print_configs for TPSCI
Browse files Browse the repository at this point in the history
  • Loading branch information
nmayhall-vt committed Feb 12, 2024
1 parent bff3292 commit 116987d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/type_TPSCIstate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,25 @@ function print_configs(s::TPSCIstate; thresh=1e-3, root=1)
for (fock,configs) in s.data
length(s.clusters) == length(fock) || throw(Exception)
length(s.data[fock]) > 0 || continue
print_fock = false
for (config, value) in s.data[fock]
if value[root]*value[root] > thresh
print_fock = true
break
end
end
print_fock || continue

@printf(" Dim %4i fock_space: ",length(s.data[fock]))
[@printf(" %-2i(%i:%i) ",fii,fi[1],fi[2]) for (fii,fi) in enumerate(fock)]
println()
for (config, value) in s.data[fock]
value[root]*value[root] > thresh || continue
@printf(" %5i",idx)
for c in config
@printf("%3i",c)
end
@printf(":%12.8f\n",value[1])
@printf(":%12.8f\n",value[root])
idx += 1
end
end
Expand Down

0 comments on commit 116987d

Please sign in to comment.