From 0c3fb156ae615459f20c26e0ef589413f7f99d77 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Sun, 9 Apr 2023 20:08:00 -0400 Subject: [PATCH 01/18] 3-body resonance calculation --- calculations.ipynb | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 calculations.ipynb diff --git a/calculations.ipynb b/calculations.ipynb new file mode 100644 index 0000000..4d4fe45 --- /dev/null +++ b/calculations.ipynb @@ -0,0 +1,69 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# 10.1007/s00601-020-01550-8\n", + "# Fig. 7\n", + "# E_R = 4.18(8)\n", + "\n", + "#./En.run -d 3 -n 3 -N 16 -c pot=v_shifted_gauss,v0=2.0,r=1.5,a=3.0 -c n_eig=20 -c which=li -c tol=1e-6 -L 16 -c phi=0.3 -v\n", + "\n", + "include(\"Hamiltonian.jl\")\n", + "mode = gpu_cutensor\n", + "T = Float32 # single-precision mode\n", + "\n", + "using Plots\n", + "\n", + "V_gauss(r2) =\n", + " 2 * exp(-((sqrt(r2) - 3) / 1.5) ^ 2)\n", + "\n", + "d = 3\n", + "n = 3\n", + "N = 14\n", + "L::T = 16\n", + "μ::T = 0.5\n", + "n_imag = 0\n", + "\n", + "for ϕ::T in 0.2:0.05:0.4\n", + " CUDA.reclaim()\n", + " GC.gc(true)\n", + " H = Hamiltonian{T}(V_gauss, d, n, N, L, ϕ, μ, n_imag, mode)\n", + " @time evals, _, info = eig(H, 20)\n", + " H = nothing\n", + " CUDA.reclaim()\n", + " GC.gc(true)\n", + " \n", + " print(info.numops, \" operations\")\n", + " display(evals)\n", + "\n", + " scatter(real.(evals), imag.(evals); legend=false)\n", + " xlabel!(\"Re E\")\n", + " ylabel!(\"Im E\")\n", + " xlims!(0, 6)\n", + " ylims!(-0.6, 0)\n", + " savefig(\"temp/phi$(Int(round(ϕ * 100))).png\")\n", + "end" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Julia 1.8.5", + "language": "julia", + "name": "julia-1.8" + }, + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.8.5" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 77eea9319ca389e503c6e0e7864ee5cd24a5a6f2 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Thu, 20 Apr 2023 16:28:08 -0400 Subject: [PATCH 02/18] Not worrying about memory leak --- calculations.ipynb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/calculations.ipynb b/calculations.ipynb index 4d4fe45..3416f7a 100644 --- a/calculations.ipynb +++ b/calculations.ipynb @@ -29,13 +29,8 @@ "n_imag = 0\n", "\n", "for ϕ::T in 0.2:0.05:0.4\n", - " CUDA.reclaim()\n", - " GC.gc(true)\n", " H = Hamiltonian{T}(V_gauss, d, n, N, L, ϕ, μ, n_imag, mode)\n", " @time evals, _, info = eig(H, 20)\n", - " H = nothing\n", - " CUDA.reclaim()\n", - " GC.gc(true)\n", " \n", " print(info.numops, \" operations\")\n", " display(evals)\n", From d3726c725ba80d3c254c96b391d505755b37ccc8 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Tue, 23 May 2023 19:08:09 +0000 Subject: [PATCH 03/18] Adopt to new interface --- calculations.ipynb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/calculations.ipynb b/calculations.ipynb index 3416f7a..e94cc84 100644 --- a/calculations.ipynb +++ b/calculations.ipynb @@ -24,12 +24,13 @@ "d = 3\n", "n = 3\n", "N = 14\n", - "L::T = 16\n", - "μ::T = 0.5\n", + "L = 16\n", + "μ = 0.5\n", "n_imag = 0\n", "\n", "for ϕ::T in 0.2:0.05:0.4\n", - " H = Hamiltonian{T}(V_gauss, d, n, N, L, ϕ, μ, n_imag, mode)\n", + " s = system{T}(d, n, N, L)\n", + " H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode)\n", " @time evals, _, info = eig(H, 20)\n", " \n", " print(info.numops, \" operations\")\n", From 700d2b430879112d2b39b0a1abcda366f6dde0a6 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Tue, 23 May 2023 19:11:36 +0000 Subject: [PATCH 04/18] Seperate .jl files instead of notebook --- 3b_res_from_paper.jl | 37 +++++++++++++++++++++++++ calculations.ipynb | 65 -------------------------------------------- 2 files changed, 37 insertions(+), 65 deletions(-) create mode 100644 3b_res_from_paper.jl delete mode 100644 calculations.ipynb diff --git a/3b_res_from_paper.jl b/3b_res_from_paper.jl new file mode 100644 index 0000000..eaa1b42 --- /dev/null +++ b/3b_res_from_paper.jl @@ -0,0 +1,37 @@ +# 10.1007/s00601-020-01550-8 +# Fig. 7 +# E_R = 4.18(8) + +#./En.run -d 3 -n 3 -N 16 -c pot=v_shifted_gauss,v0=2.0,r=1.5,a=3.0 -c n_eig=20 -c which=li -c tol=1e-6 -L 16 -c phi=0.3 -v + +include("Hamiltonian.jl") +mode = gpu_cutensor +T = Float32 # single-precision mode + +using Plots + +V_gauss(r2) = + 2 * exp(-((sqrt(r2) - 3) / 1.5) ^ 2) + +d = 3 +n = 3 +N = 14 +L = 16 +μ = 0.5 +n_imag = 0 + +for ϕ::T in 0.2:0.05:0.4 + s = system{T}(d, n, N, L) + H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode) + @time evals, _, info = eig(H, 20) + + print(info.numops, " operations") + display(evals) + + scatter(real.(evals), imag.(evals); legend=false) + xlabel!("Re E") + ylabel!("Im E") + xlims!(0, 6) + ylims!(-0.6, 0) + savefig("temp/phi$(Int(round(ϕ * 100))).png") +end \ No newline at end of file diff --git a/calculations.ipynb b/calculations.ipynb deleted file mode 100644 index e94cc84..0000000 --- a/calculations.ipynb +++ /dev/null @@ -1,65 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# 10.1007/s00601-020-01550-8\n", - "# Fig. 7\n", - "# E_R = 4.18(8)\n", - "\n", - "#./En.run -d 3 -n 3 -N 16 -c pot=v_shifted_gauss,v0=2.0,r=1.5,a=3.0 -c n_eig=20 -c which=li -c tol=1e-6 -L 16 -c phi=0.3 -v\n", - "\n", - "include(\"Hamiltonian.jl\")\n", - "mode = gpu_cutensor\n", - "T = Float32 # single-precision mode\n", - "\n", - "using Plots\n", - "\n", - "V_gauss(r2) =\n", - " 2 * exp(-((sqrt(r2) - 3) / 1.5) ^ 2)\n", - "\n", - "d = 3\n", - "n = 3\n", - "N = 14\n", - "L = 16\n", - "μ = 0.5\n", - "n_imag = 0\n", - "\n", - "for ϕ::T in 0.2:0.05:0.4\n", - " s = system{T}(d, n, N, L)\n", - " H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode)\n", - " @time evals, _, info = eig(H, 20)\n", - " \n", - " print(info.numops, \" operations\")\n", - " display(evals)\n", - "\n", - " scatter(real.(evals), imag.(evals); legend=false)\n", - " xlabel!(\"Re E\")\n", - " ylabel!(\"Im E\")\n", - " xlims!(0, 6)\n", - " ylims!(-0.6, 0)\n", - " savefig(\"temp/phi$(Int(round(ϕ * 100))).png\")\n", - "end" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Julia 1.8.5", - "language": "julia", - "name": "julia-1.8" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.8.5" - }, - "orig_nbformat": 4 - }, - "nbformat": 4, - "nbformat_minor": 2 -} From 8ce0f749b79fbf900537328d23f04b29be3a5564 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Tue, 23 May 2023 19:13:58 +0000 Subject: [PATCH 05/18] Use CPU --- 3b_res_from_paper.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3b_res_from_paper.jl b/3b_res_from_paper.jl index eaa1b42..fd22f04 100644 --- a/3b_res_from_paper.jl +++ b/3b_res_from_paper.jl @@ -5,7 +5,7 @@ #./En.run -d 3 -n 3 -N 16 -c pot=v_shifted_gauss,v0=2.0,r=1.5,a=3.0 -c n_eig=20 -c which=li -c tol=1e-6 -L 16 -c phi=0.3 -v include("Hamiltonian.jl") -mode = gpu_cutensor +mode = cpu_tensor T = Float32 # single-precision mode using Plots @@ -15,7 +15,7 @@ V_gauss(r2) = d = 3 n = 3 -N = 14 +N = 16 L = 16 μ = 0.5 n_imag = 0 From 911143a9caa4d6d65114f7bb63e91bed093dfd21 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Wed, 24 May 2023 00:46:21 -0400 Subject: [PATCH 06/18] Minor fix --- 3b_res_from_paper.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/3b_res_from_paper.jl b/3b_res_from_paper.jl index fd22f04..24241d8 100644 --- a/3b_res_from_paper.jl +++ b/3b_res_from_paper.jl @@ -17,7 +17,6 @@ d = 3 n = 3 N = 16 L = 16 -μ = 0.5 n_imag = 0 for ϕ::T in 0.2:0.05:0.4 From cbd046060016ab6e14073f93a5c6f0cf4be2cd05 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Mon, 7 Aug 2023 19:46:19 +0000 Subject: [PATCH 07/18] Chose potential for new paper --- ComplexScaling-FV.jl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ComplexScaling-FV.jl diff --git a/ComplexScaling-FV.jl b/ComplexScaling-FV.jl new file mode 100644 index 0000000..032b5a9 --- /dev/null +++ b/ComplexScaling-FV.jl @@ -0,0 +1,28 @@ +include("Hamiltonian.jl") +mode = cpu_tensor +T = Float32 # single-precision mode + +using Plots + +V_gauss(r2) = + -10 * exp(-(sqrt(r2)) ^ 2) + +d = 3 +n = 2 +N = 32 +L = 16 +ϕ = pi/5 + +s = system{T}(d, n, N, L) +H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) +@time evals, _, info = eig(H, 20) + +print(info.numops, " operations") +display(evals) + +scatter(real.(evals), imag.(evals); legend=false) +xlabel!("Re E") +ylabel!("Im E") +xlims!(0, 0.5) +ylims!(-0.5, 0) +savefig("temp/ComplexScaling-FV.png") \ No newline at end of file From e6f32295f57682d44b1a31fbaed595b2a9011965 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Wed, 9 Aug 2023 18:19:55 +0000 Subject: [PATCH 08/18] Export .dat file --- ComplexScaling-FV.jl | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/ComplexScaling-FV.jl b/ComplexScaling-FV.jl index 032b5a9..6d7d0d2 100644 --- a/ComplexScaling-FV.jl +++ b/ComplexScaling-FV.jl @@ -2,27 +2,22 @@ include("Hamiltonian.jl") mode = cpu_tensor T = Float32 # single-precision mode -using Plots - V_gauss(r2) = -10 * exp(-(sqrt(r2)) ^ 2) d = 3 n = 2 -N = 32 -L = 16 -ϕ = pi/5 +N = 16 +ϕ = pi/6 -s = system{T}(d, n, N, L) -H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) -@time evals, _, info = eig(H, 20) +open("ComplexScaling-FV.dat", "w") do f + for L = range(16, 32, length=33) + println("Calculating L=", L) + s = system{T}(d, n, N, L) + H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) + @time evals, _, info = eig(H, 40) -print(info.numops, " operations") -display(evals) - -scatter(real.(evals), imag.(evals); legend=false) -xlabel!("Re E") -ylabel!("Im E") -xlims!(0, 0.5) -ylims!(-0.5, 0) -savefig("temp/ComplexScaling-FV.png") \ No newline at end of file + dataline = vcat([L], hcat(real.(evals), imag.(evals))'[:]) + println(f, join(dataline, '\t')) + end +end From 490e94262bd2797b1db457614973423a8259304b Mon Sep 17 00:00:00 2001 From: ysyapa Date: Wed, 9 Aug 2023 18:22:05 +0000 Subject: [PATCH 09/18] Increase N --- ComplexScaling-FV.dat | 0 ComplexScaling-FV.jl | 2 +- Hamiltonian.jl | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 ComplexScaling-FV.dat diff --git a/ComplexScaling-FV.dat b/ComplexScaling-FV.dat new file mode 100644 index 0000000..e69de29 diff --git a/ComplexScaling-FV.jl b/ComplexScaling-FV.jl index 6d7d0d2..4017bdb 100644 --- a/ComplexScaling-FV.jl +++ b/ComplexScaling-FV.jl @@ -7,7 +7,7 @@ V_gauss(r2) = d = 3 n = 2 -N = 16 +N = 64 ϕ = pi/6 open("ComplexScaling-FV.dat", "w") do f diff --git a/Hamiltonian.jl b/Hamiltonian.jl index 321c343..f368cf6 100644 --- a/Hamiltonian.jl +++ b/Hamiltonian.jl @@ -134,7 +134,7 @@ function eig(H::Hamiltonian{T}, levels::Int; resonances = !H.hermitian)::Tuple{V x₀ = CUDA.rand(Complex{T}, vectorDims(H)...) synchronize() end - evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance) + evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance, krylovdim = levels * 2) resonances || info.converged < levels && throw(error("Not enough convergence")) # don't check convergence for resonances if H.hermitian evals = real.(evals) end if H.mode == gpu_cutensor # to avoid possible GPU memory leak From 3b6a57c5127cab14295a7fb83720a3502e07c84b Mon Sep 17 00:00:00 2001 From: ysyapa Date: Thu, 10 Aug 2023 09:09:56 +0000 Subject: [PATCH 10/18] New parameters --- ComplexScaling-FV.dat | 0 ComplexScaling-FV.jl | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 ComplexScaling-FV.dat diff --git a/ComplexScaling-FV.dat b/ComplexScaling-FV.dat deleted file mode 100644 index e69de29..0000000 diff --git a/ComplexScaling-FV.jl b/ComplexScaling-FV.jl index 4017bdb..61f4acb 100644 --- a/ComplexScaling-FV.jl +++ b/ComplexScaling-FV.jl @@ -7,11 +7,11 @@ V_gauss(r2) = d = 3 n = 2 -N = 64 +N = 96 ϕ = pi/6 open("ComplexScaling-FV.dat", "w") do f - for L = range(16, 32, length=33) + for L = range(20, 35, length=16) println("Calculating L=", L) s = system{T}(d, n, N, L) H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) From 0bcb7b3d1613c54740bc82aec744c9359eb08cb0 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Mon, 14 Aug 2023 10:46:22 -0400 Subject: [PATCH 11/18] Ignore calculation outputs --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index e4f443c..1fbef14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +# Calculation outputs +*.dat +*.csv +*.hdf5 +*.out + # Temporary and scratch files temp/ scratch/ From 3d29c323d0700b0c3e3a1fc4575c2dcd9e1d22ab Mon Sep 17 00:00:00 2001 From: ysyapa Date: Fri, 25 Aug 2023 21:03:25 +0000 Subject: [PATCH 12/18] New calculation for paper --- ComplexScaling-FV-bound.jl | 23 +++++++++++++++++++ ...xScaling-FV.jl => ComplexScaling-FV-res.jl | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ComplexScaling-FV-bound.jl rename ComplexScaling-FV.jl => ComplexScaling-FV-res.jl (91%) diff --git a/ComplexScaling-FV-bound.jl b/ComplexScaling-FV-bound.jl new file mode 100644 index 0000000..f9b6891 --- /dev/null +++ b/ComplexScaling-FV-bound.jl @@ -0,0 +1,23 @@ +include("Hamiltonian.jl") +mode = cpu_tensor +T = Float32 # single-precision mode + +V_gauss(r2) = + -10 * exp(-(sqrt(r2)) ^ 2) + +d = 3 +n = 2 +N = 32 +L = 16 + +open("ComplexScaling-FV-bound.dat", "w") do f + for ϕ = range(0.0, 0.5, length=11) + println("Calculating ϕ=", ϕ) + s = system{T}(d, n, N, L) + H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) + @time evals, _, info = eig(H, 5, resonances = false) + + dataline = vcat([ϕ], hcat(real.(evals), imag.(evals))'[:]) + println(f, join(dataline, '\t')) + end +end diff --git a/ComplexScaling-FV.jl b/ComplexScaling-FV-res.jl similarity index 91% rename from ComplexScaling-FV.jl rename to ComplexScaling-FV-res.jl index 61f4acb..e3b1cfe 100644 --- a/ComplexScaling-FV.jl +++ b/ComplexScaling-FV-res.jl @@ -10,7 +10,7 @@ n = 2 N = 96 ϕ = pi/6 -open("ComplexScaling-FV.dat", "w") do f +open("ComplexScaling-FV-res.dat", "w") do f for L = range(20, 35, length=16) println("Calculating L=", L) s = system{T}(d, n, N, L) From 547be9fa985f1f7c7758b6e11b9fe0cbae91b6c0 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Fri, 25 Aug 2023 22:09:41 +0000 Subject: [PATCH 13/18] Changed parameters --- ComplexScaling-FV-bound.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComplexScaling-FV-bound.jl b/ComplexScaling-FV-bound.jl index f9b6891..2208c61 100644 --- a/ComplexScaling-FV-bound.jl +++ b/ComplexScaling-FV-bound.jl @@ -7,15 +7,15 @@ V_gauss(r2) = d = 3 n = 2 -N = 32 -L = 16 +N = 30 +L = 6 open("ComplexScaling-FV-bound.dat", "w") do f for ϕ = range(0.0, 0.5, length=11) println("Calculating ϕ=", ϕ) s = system{T}(d, n, N, L) H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) - @time evals, _, info = eig(H, 5, resonances = false) + @time evals, _, info = eig(H, 10, resonances = false) dataline = vcat([ϕ], hcat(real.(evals), imag.(evals))'[:]) println(f, join(dataline, '\t')) From 922807eca10ed642b8adefc68db635d77647dfd6 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Tue, 5 Sep 2023 16:18:19 +0000 Subject: [PATCH 14/18] n_imag=1 --- ComplexScaling-FV-bound.jl | 3 ++- ComplexScaling-FV-res.jl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ComplexScaling-FV-bound.jl b/ComplexScaling-FV-bound.jl index 2208c61..f852c44 100644 --- a/ComplexScaling-FV-bound.jl +++ b/ComplexScaling-FV-bound.jl @@ -9,12 +9,13 @@ d = 3 n = 2 N = 30 L = 6 +n_imag = 1 open("ComplexScaling-FV-bound.dat", "w") do f for ϕ = range(0.0, 0.5, length=11) println("Calculating ϕ=", ϕ) s = system{T}(d, n, N, L) - H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) + H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode) @time evals, _, info = eig(H, 10, resonances = false) dataline = vcat([ϕ], hcat(real.(evals), imag.(evals))'[:]) diff --git a/ComplexScaling-FV-res.jl b/ComplexScaling-FV-res.jl index e3b1cfe..2d7f869 100644 --- a/ComplexScaling-FV-res.jl +++ b/ComplexScaling-FV-res.jl @@ -9,12 +9,13 @@ d = 3 n = 2 N = 96 ϕ = pi/6 +n_imag = 1 open("ComplexScaling-FV-res.dat", "w") do f for L = range(20, 35, length=16) println("Calculating L=", L) s = system{T}(d, n, N, L) - H = Hamiltonian{T}(s, V_gauss, ϕ, 0, mode) + H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode) @time evals, _, info = eig(H, 40) dataline = vcat([L], hcat(real.(evals), imag.(evals))'[:]) From d3a25b2ccf442602bf237e8019cd5035c284d9d7 Mon Sep 17 00:00:00 2001 From: ysyapa Date: Sat, 21 Oct 2023 14:57:45 -0400 Subject: [PATCH 15/18] New ComplexScaling-FV calculation --- ...ng-FV-res.jl => ComplexScaling-FV-P-res.jl | 2 +- ...und.jl => ComplexScaling-FV-S-bound-phi.jl | 2 +- ComplexScaling-FV-S-res-phi.jl | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) rename ComplexScaling-FV-res.jl => ComplexScaling-FV-P-res.jl (91%) rename ComplexScaling-FV-bound.jl => ComplexScaling-FV-S-bound-phi.jl (90%) create mode 100644 ComplexScaling-FV-S-res-phi.jl diff --git a/ComplexScaling-FV-res.jl b/ComplexScaling-FV-P-res.jl similarity index 91% rename from ComplexScaling-FV-res.jl rename to ComplexScaling-FV-P-res.jl index 2d7f869..f8ddfb8 100644 --- a/ComplexScaling-FV-res.jl +++ b/ComplexScaling-FV-P-res.jl @@ -11,7 +11,7 @@ N = 96 ϕ = pi/6 n_imag = 1 -open("ComplexScaling-FV-res.dat", "w") do f +open("ComplexScaling-FV-P-res.dat", "w") do f for L = range(20, 35, length=16) println("Calculating L=", L) s = system{T}(d, n, N, L) diff --git a/ComplexScaling-FV-bound.jl b/ComplexScaling-FV-S-bound-phi.jl similarity index 90% rename from ComplexScaling-FV-bound.jl rename to ComplexScaling-FV-S-bound-phi.jl index f852c44..fdba365 100644 --- a/ComplexScaling-FV-bound.jl +++ b/ComplexScaling-FV-S-bound-phi.jl @@ -11,7 +11,7 @@ N = 30 L = 6 n_imag = 1 -open("ComplexScaling-FV-bound.dat", "w") do f +open("ComplexScaling-FV-S-bound-phi.dat", "w") do f for ϕ = range(0.0, 0.5, length=11) println("Calculating ϕ=", ϕ) s = system{T}(d, n, N, L) diff --git a/ComplexScaling-FV-S-res-phi.jl b/ComplexScaling-FV-S-res-phi.jl new file mode 100644 index 0000000..afe1f32 --- /dev/null +++ b/ComplexScaling-FV-S-res-phi.jl @@ -0,0 +1,24 @@ +include("Hamiltonian.jl") +mode = cpu_tensor +T = Float32 # single-precision mode + +V_gauss(r2) = + 2 * exp(- ((sqrt(r2)-3)/1.5) ^ 2) + +d = 3 +n = 2 +N = 96 +L = 30 +n_imag = 1 + +open("ComplexScaling-FV-S-res-phi.dat", "w") do f + for ϕ = range(0.1, 0.6, length=26) + println("Calculating ϕ=", ϕ) + s = system{T}(d, n, N, L) + H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode) + @time evals, _, info = eig(H, 40, resonances = true) + + dataline = vcat([ϕ], hcat(real.(evals), imag.(evals))'[:]) + println(f, join(dataline, '\t')) + end +end From 8ee4057f7ed6d31d9ac256b2b32795ed93e5081b Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Mon, 26 Feb 2024 10:26:48 -0500 Subject: [PATCH 16/18] .gitignore HPC stuff --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 1fbef14..90354d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# HPC scripts and logs +hpc/ + # Calculation outputs *.dat *.csv From 1f4a648d52ffb2f99b4ab6778dbc2a22d0d36b01 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Tue, 9 Apr 2024 18:07:17 -0400 Subject: [PATCH 17/18] Simple 3-body bound system --- 3b_bound.jl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 3b_bound.jl diff --git a/3b_bound.jl b/3b_bound.jl new file mode 100644 index 0000000..8e40647 --- /dev/null +++ b/3b_bound.jl @@ -0,0 +1,19 @@ +include("Hamiltonian.jl") +mode = cpu_tensor +T = Float32 + +V_gauss(r2) = -2 * exp(-r2 / 4) + +d = 3 +n = 3 +N = 20 +L = 15 +n_imag = 1 +ϕ = 0 + +s = system{T}(d, n, N, L) +H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode) +@time evals, _, info = eig(H, 5) + +print(info.numops, " operations") +display(evals) From df0b5820ea9d90fd606ede197e43a778fc79bd6b Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Fri, 12 Jul 2024 14:48:43 -0400 Subject: [PATCH 18/18] Move calculations into folder --- 3b_bound.jl => calculations/3b_bound.jl | 2 +- 3b_res_from_paper.jl => calculations/3b_res_from_paper.jl | 2 +- .../ComplexScaling-FV-P-res.jl | 2 +- .../ComplexScaling-FV-S-bound-phi.jl | 2 +- .../ComplexScaling-FV-S-res-phi.jl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename 3b_bound.jl => calculations/3b_bound.jl (90%) rename 3b_res_from_paper.jl => calculations/3b_res_from_paper.jl (96%) rename ComplexScaling-FV-P-res.jl => calculations/ComplexScaling-FV-P-res.jl (94%) rename ComplexScaling-FV-S-bound-phi.jl => calculations/ComplexScaling-FV-S-bound-phi.jl (94%) rename ComplexScaling-FV-S-res-phi.jl => calculations/ComplexScaling-FV-S-res-phi.jl (94%) diff --git a/3b_bound.jl b/calculations/3b_bound.jl similarity index 90% rename from 3b_bound.jl rename to calculations/3b_bound.jl index 8e40647..d968bc5 100644 --- a/3b_bound.jl +++ b/calculations/3b_bound.jl @@ -1,4 +1,4 @@ -include("Hamiltonian.jl") +include("../Hamiltonian.jl") mode = cpu_tensor T = Float32 diff --git a/3b_res_from_paper.jl b/calculations/3b_res_from_paper.jl similarity index 96% rename from 3b_res_from_paper.jl rename to calculations/3b_res_from_paper.jl index 24241d8..db2036a 100644 --- a/3b_res_from_paper.jl +++ b/calculations/3b_res_from_paper.jl @@ -4,7 +4,7 @@ #./En.run -d 3 -n 3 -N 16 -c pot=v_shifted_gauss,v0=2.0,r=1.5,a=3.0 -c n_eig=20 -c which=li -c tol=1e-6 -L 16 -c phi=0.3 -v -include("Hamiltonian.jl") +include("../Hamiltonian.jl") mode = cpu_tensor T = Float32 # single-precision mode diff --git a/ComplexScaling-FV-P-res.jl b/calculations/ComplexScaling-FV-P-res.jl similarity index 94% rename from ComplexScaling-FV-P-res.jl rename to calculations/ComplexScaling-FV-P-res.jl index f8ddfb8..d5f8893 100644 --- a/ComplexScaling-FV-P-res.jl +++ b/calculations/ComplexScaling-FV-P-res.jl @@ -1,4 +1,4 @@ -include("Hamiltonian.jl") +include("../Hamiltonian.jl") mode = cpu_tensor T = Float32 # single-precision mode diff --git a/ComplexScaling-FV-S-bound-phi.jl b/calculations/ComplexScaling-FV-S-bound-phi.jl similarity index 94% rename from ComplexScaling-FV-S-bound-phi.jl rename to calculations/ComplexScaling-FV-S-bound-phi.jl index fdba365..1e57012 100644 --- a/ComplexScaling-FV-S-bound-phi.jl +++ b/calculations/ComplexScaling-FV-S-bound-phi.jl @@ -1,4 +1,4 @@ -include("Hamiltonian.jl") +include("../Hamiltonian.jl") mode = cpu_tensor T = Float32 # single-precision mode diff --git a/ComplexScaling-FV-S-res-phi.jl b/calculations/ComplexScaling-FV-S-res-phi.jl similarity index 94% rename from ComplexScaling-FV-S-res-phi.jl rename to calculations/ComplexScaling-FV-S-res-phi.jl index afe1f32..9e16ec9 100644 --- a/ComplexScaling-FV-S-res-phi.jl +++ b/calculations/ComplexScaling-FV-S-res-phi.jl @@ -1,4 +1,4 @@ -include("Hamiltonian.jl") +include("../Hamiltonian.jl") mode = cpu_tensor T = Float32 # single-precision mode