BergEC-jl/ho_basis_2body.jl

30 lines
685 B
Julia

using Arpack, SparseArrays
include("ho_basis.jl")
E_max = 30
μω_gen = 0.2
Λ = 0
m = 1.0
Va = -2
Ra = 2
μ1 = m * 1/2
println("No of threads = ", Threads.nthreads())
Es, n1s, l1s = get_sp_basis(E_max)
println("Basis size = ", length(Es))
println("Constructing KE matrices")
@time "T1" T1 = sp_T_matrix(n1s, l1s; μω_gen=μω_gen, μ=μ1)
println("Constructing PE matrices")
V1_elem(l, n1, n2) = Va * V_Gaussian(Ra, l, n1, n2; μω_gen=μω_gen)
@time "V1" V1 = sp_V_matrix(V1_elem, n1s, l1s)
println("Calculating spectrum")
@time "H" H = T1 + V1
@time "Eigenvalues" evals, _ = eigs(H, nev=3, ncv=30, which=:SR, maxiter=5000, tol=1e-5, ritzvec=false, check=1)
display(evals)