40 lines
1.4 KiB
Julia
40 lines
1.4 KiB
Julia
using Arpack, SparseArrays
|
|
include("ho_basis.jl")
|
|
|
|
Λ = 0
|
|
m = 1.0
|
|
Va = -2
|
|
Ra = 2
|
|
|
|
E_max = 40
|
|
μω_global = 0.3
|
|
|
|
# due to simple relative coordinates
|
|
μω = μω_global * 2
|
|
μ = m/2
|
|
|
|
println("No of threads = ", Threads.nthreads())
|
|
|
|
@time "Basis" basis = ho_basis_2B(E_max, Λ)
|
|
|
|
println("Basis size = ", basis.dim)
|
|
|
|
println("Constructing KE matrices")
|
|
@time "T1" T1 = get_sp_T_matrix(basis.n1s, basis.l1s, [basis.n2s, basis.l2s]; μω_gen=μω, μ=μ)
|
|
@time "T2" T2 = get_sp_T_matrix(basis.n2s, basis.l2s, [basis.n1s, basis.l1s]; μω_gen=μω, μ=μ)
|
|
@time "T_cross" T_cross = get_2p_p1p2_matrix(basis, μω, μω) ./ (2*μ)
|
|
|
|
println("Constructing PE matrices")
|
|
V_elem(l, n1, n2) = Va * V_Gaussian(Ra, l, n1, n2; μω_gen=μω)
|
|
V_relative_elem(l, n1, n2) = Va * V_Gaussian(Ra, l, n1, n2; μω_gen=μω_global)
|
|
@time "V1" V1 = get_sp_V_matrix(V_elem, basis.n1s, basis.l1s, [basis.n2s, basis.l2s]; E_max=E_max)
|
|
@time "V2" V2 = get_sp_V_matrix(V_elem, basis.n2s, basis.l2s, [basis.n1s, basis.l1s]; E_max=E_max)
|
|
@time "V relative" V_relative = get_sp_V_matrix(V_relative_elem, basis.n1s, basis.l1s, [basis.n2s, basis.l2s]; E_max=E_max)
|
|
@time "Moshinsky brackets" U = Moshinsky_transform(basis)
|
|
@time "V12" V12 = U' * V_relative * U
|
|
|
|
println("Calculating spectrum")
|
|
@time "H" H = T1 + T2 + T_cross + V1 + V2 + V12
|
|
@time "Eigenvalues" evals, _ = eigs(H, nev=3, ncv=30, which=:SR, maxiter=5000, tol=1e-5, ritzvec=false, check=1)
|
|
|
|
display(evals) |