From efec991b3ef75a5afe432e90cc3d0894c50d5807 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 13:50:10 +0900 Subject: [PATCH 01/14] update to v0.4.1 --- Project.toml | 8 +- src/IMSRG.jl/emulator_imsrg.jl | 10 +- src/IMSRG.jl/imsrg_util.jl | 37 ++- src/NuclearToolkit.jl | 2 +- src/ShellModel/betadecay.jl | 2 +- src/ShellModel/eigenvector_continuation.jl | 228 ++----------- src/ShellModel/lanczos_methods.jl | 303 ++++++++++++++---- src/ShellModel/shellmodel_main.jl | 55 +--- src/ShellModel/trans_snt_msnt.jl | 68 ++-- src/ShellModel/transit.jl | 2 +- src/ShellModel/variational_ansatz.jl | 3 - src/chiEFTint/main_chiEFTint.jl | 11 +- src/chiEFTint/read_me3j.jl | 9 +- src/chiEFTint/struct_const_io.jl | 8 +- src/chiEFTint/threebodyforce.jl | 7 +- src/hartreefock.jl/def_struct.jl | 6 +- src/hartreefock.jl/main.jl | 23 +- src/hartreefock.jl/operator.jl | 2 + test/HFMBPT_IMSRG_test.jl | 76 +++++ test/ShellModel_test.jl | 68 ++++ test/caliblation_test.jl | 6 + test/chiEFTint_test.jl | 6 + test/dev_test.jl | 139 ++++++++ .../small_3BME_N3LOlnl_4_8_4.me3j.gz | Bin test/{ => parameters}/optional_parameters.jl | 1 + test/parameters/optional_parameters_forDMD.jl | 16 + .../parameters/optional_parameters_nnlosat.jl | 17 + .../optional_parameters_snt.jl | 1 + ...optional_parameters_srg_emn500n4lo_2n3n.jl | 17 + test/read_3BME_test.jl | 11 + test/runtests.jl | 225 ++++++++----- test/threebody_test.jl | 3 + 32 files changed, 908 insertions(+), 462 deletions(-) create mode 100644 test/HFMBPT_IMSRG_test.jl create mode 100644 test/ShellModel_test.jl create mode 100644 test/caliblation_test.jl create mode 100644 test/chiEFTint_test.jl create mode 100644 test/dev_test.jl rename test/{ => interaction_file}/small_3BME_N3LOlnl_4_8_4.me3j.gz (100%) rename test/{ => parameters}/optional_parameters.jl (94%) create mode 100644 test/parameters/optional_parameters_forDMD.jl create mode 100644 test/parameters/optional_parameters_nnlosat.jl rename test/{ => parameters}/optional_parameters_snt.jl (94%) create mode 100644 test/parameters/optional_parameters_srg_emn500n4lo_2n3n.jl create mode 100644 test/read_3BME_test.jl create mode 100644 test/threebody_test.jl diff --git a/Project.toml b/Project.toml index abb8d20c..bb3dd5bb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NuclearToolkit" uuid = "89bb3bae-bcec-43ae-87b7-9dd181dc6334" authors = ["SotaYoshida and contributors"] -version = "0.4.0" +version = "0.4.1" [deps] Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" @@ -32,9 +32,9 @@ WignerSymbols = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" [compat] Arpack = "0.5" AssociatedLegendrePolynomials = "1" -CodecZlib="0.7" +CodecZlib = "0.7" Combinatorics = "1" -DocStringExtensions="0.9" +DocStringExtensions = "0.9" FLoops = "0.2" Glob = "1" HDF5 = "0.16, 0.17" @@ -44,8 +44,8 @@ LatinHypercubeSampling = "1.8" MKL = "0.6" MPI = "0.19, 0.20" Measures = "0.3" -Plots = "1" Parsers = "2.8" +Plots = "1" SpecialFunctions = "2" Statistics = "1" StatsBase = "0.33, 0.34" diff --git a/src/IMSRG.jl/emulator_imsrg.jl b/src/IMSRG.jl/emulator_imsrg.jl index ac305447..64d8a18d 100644 --- a/src/IMSRG.jl/emulator_imsrg.jl +++ b/src/IMSRG.jl/emulator_imsrg.jl @@ -341,13 +341,13 @@ function check_stationarity(z, z_k, z_pred, Atilde, itnum=1000) end """ -function extrapolate_DMD(x_start, U_r, Atilde, s_pred, fn_exact, s_end, ds, nuc, inttype, emax, oupdir) +function extrapolate_DMD(x_start, U_r, Atilde, s_pred, fn_exact, s_end, ds, nuc, inttype, emax, oupdir; verbose=false) Function to perform the DMD extrapolation. The time evolution (IMSRG flow) of original data `x` is approximated by the time evolution of `z` in the latent space, and then the approximated data `x'` is written to a HDF5 file. """ -function extrapolate_DMD(x_start, U_r, Atilde, s_pred, fn_exact, s_end, ds, nuc, inttype, emax, oupdir) +function extrapolate_DMD(x_start, U_r, Atilde, s_pred, fn_exact, s_end, ds, nuc, inttype, emax, oupdir; verbose=false) @assert length(s_pred) == length(fn_exact) "s_pred and fn_exact must have the same length" if length(s_pred) > 0 r = size(U_r)[2] @@ -377,7 +377,9 @@ function extrapolate_DMD(x_start, U_r, Atilde, s_pred, fn_exact, s_end, ds, nuc, end write_dmdvec_hdf5(x_pred,s,E_imsrg,nuc,inttype,emax,oupdir) end - check_stationarity(z1_r, z_k, z_new, Atilde) + if verbose + check_stationarity(z1_r, z_k, z_new, Atilde) + end end return nothing end @@ -387,7 +389,7 @@ function write_dmdvec_hdf5(vec_in,s,E_imsrg,nuc,inttype,emax,oupdir) vec[1] = s vec[2] = E_imsrg vec[3:end] .= vec_in - fname = oupdir*"omega_dmdvec_$(inttype)_e$(emax)_$(nuc)_s"*strip(@sprintf("%6.2f",s))*".h5" + fname = oupdir*"omega_dmdvec"*ifelse(inttype=="","","_"*inttype)*"_e$(emax)_$(nuc)_s"*strip(@sprintf("%6.2f",s))*".h5" io = h5open(fname,"w") write(io,"vec",vec) close(io) diff --git a/src/IMSRG.jl/imsrg_util.jl b/src/IMSRG.jl/imsrg_util.jl index 03db33f6..0b3c225d 100644 --- a/src/IMSRG.jl/imsrg_util.jl +++ b/src/IMSRG.jl/imsrg_util.jl @@ -21,7 +21,7 @@ - `restart_from_files`: files to be read for restart 1st one is for IMSRG and 2nd one is for VSIMSRG """ function imsrg_main(binfo::basedat,Chan1b::chan1b,Chan2bD::chan2bD,HFobj::HamiltonianNormalOrdered,dictsnt,dWS,valencespace,Operators,MatOp,to; - delete_Ops=false,core_generator_type="atan",valence_generator_type="shell-model-atan",fn_params="optional_parameters.jl",debugmode=0,Hsample=false,restart_from_files=String[]) + delete_Ops=false,core_generator_type="atan",valence_generator_type="shell-model-atan",fn_params="optional_parameters.jl",debugmode=0,Hsample=0,restart_from_files=String[]) if binfo.nuc.corenuc == "" && vsIMSRG; println("core (hole) for VS-IMSRG is not specified."); return nothing;end dictMono = deepcopy(dictsnt.dictMonopole) vsIMSRG = ifelse(valencespace!=[]&&valencespace!="",true,false) @@ -36,6 +36,8 @@ function imsrg_main(binfo::basedat,Chan1b::chan1b,Chan2bD::chan2bD,HFobj::Hamilt if length(restart_from_files) >= 1; IMSRGobj.smax = IMSRGobj.dsmax;end d6j_defbyrun = Dict{UInt64,Float64}() IMSRGflow(binfo,HFobj,IMSRGobj,PandyaObj,Chan1b,Chan2bD,dictMono,d6j_defbyrun,core_generator_type,valence_generator_type,to;debugmode=debugmode,Hsample=Hsample,restart_from_files=restart_from_files) + IMSRGobj.ExpectationValues["E0"] = IMSRGobj.H.zerobody[1] + if vsIMSRG && length(restart_from_files) == 0 IMSRGflow(binfo,HFobj,IMSRGobj,PandyaObj,Chan1b,Chan2bD,dictMono,d6j_defbyrun,core_generator_type,valence_generator_type,to;valenceflow=true,Hsample=Hsample) effOps = flow_Operators(binfo,HFobj,IMSRGobj,PandyaObj,Chan1b,Chan2bD,dWS,d6j_defbyrun,dictMono,Operators,MatOp,restart_from_files,to) @@ -54,7 +56,7 @@ function imsrg_main(binfo::basedat,Chan1b::chan1b,Chan2bD::chan2bD,HFobj::Hamilt else flow_Operators(binfo,HFobj,IMSRGobj,PandyaObj,Chan1b,Chan2bD,dWS,d6j_defbyrun,dictMono,Operators,MatOp,restart_from_files,to) end - + if length(restart_from_files) >= 1 if binfo.nuc.cZ != binfo.nuc.Z || binfo.nuc.cN != binfo.nuc.N println("normal ordering...") @@ -72,7 +74,7 @@ function imsrg_main(binfo::basedat,Chan1b::chan1b,Chan2bD::chan2bD,HFobj::Hamilt end #write_vs_snt(binfo,HFobj,IMSRGobj,Operators,Chan1b,Chan2bD,valencespace) end - if !delete_Ops + if delete_Ops pid = getpid() for f in glob("flowOmega/Omega_$(pid)*.bin") rm(f) @@ -650,7 +652,7 @@ function sort_d6j_lj(d6j) end function IMSRGflow(binfo::basedat,HFobj::HamiltonianNormalOrdered,IMSRGobj::IMSRGobject,PandyaObj::PandyaObject,Chan1b::chan1b,Chan2bD,dictMono,d6j_lj, - core_generator,valence_generator,to;valenceflow=false,debugmode=0,maxstep=2000,Hsample=false,num_Hsample=50,modsample=4, + core_generator,valence_generator,to;valenceflow=false,debugmode=0,maxstep=2000,Hsample=0, restart_from_files=String[]) Chan2b = Chan2bD.Chan2b ncomm = IMSRGobj.Ncomm @@ -730,10 +732,13 @@ function IMSRGflow(binfo::basedat,HFobj::HamiltonianNormalOrdered,IMSRGobj::IMSR func_Eta(HFobj,IMSRGobj,Chan2b,dictMono,norms) # remnant for IMSRG-Net sampling - #if Hsample && ( ( 15.0 <= s <= 20.00 || s == 30.0 || s == 50.0 ) || valenceflow) #(istep <=10 && valenceflow) - if Hsample && ( ( s <= 20.00 || s == 30.0 || s == 50.0 ) || valenceflow) #(istep <=10 && valenceflow) - Nested = deepcopy(IMSRGobj.Omega) - gather_omega_sofar_write(Hsample,istep, s, fvec, Omega, nOmega, tmpOp, binfo, Chan1b, Chan2bD, HFobj, IMSRGobj, dictMono, d6j_lj, PandyaObj,to,dict_idx_op_to_flatvec, dict_idx_flatvec_to_op,dict_if_idx_for_hdf5) + if Hsample > 0 + cond_1 = Hsample == 1 && ( (s <= 20.00 || s == 30.0 || s == 50.0 ) || valenceflow) # for DMD + cond_2 = Hsample == 2 && ( (15.0 <= s <= 20.00 || s == 30.0 || s == 50.0 ) || valenceflow) # for IMSRG-Net + if cond_1 || cond_2 + Nested = deepcopy(IMSRGobj.Omega) + gather_omega_sofar_write(Hsample,istep, s, fvec, Omega, nOmega, tmpOp, binfo, Chan1b, Chan2bD, HFobj, IMSRGobj, dictMono, d6j_lj, PandyaObj,to,dict_idx_op_to_flatvec, dict_idx_flatvec_to_op,dict_if_idx_for_hdf5) + end end print_flowstatus(istep,s,ncomm,norms,IMSRGobj,Chan2b) @@ -797,12 +802,11 @@ function normHs(Hs::Operator) return sqrt(norm(Hs.onebody[1],2)^2 + norm(Hs.onebody[2],2)^2 + norm2b^2) end -function gather_omega_sofar_write(Hsample::Bool, istep, s, fvec, oOmega, nOmega, tmpOp, binfo, Chan1b, Chan2bD, +function gather_omega_sofar_write(Hsample, istep, s, fvec, oOmega, nOmega, tmpOp, binfo, Chan1b, Chan2bD, HFobj, IMSRGobj, dictMono, d6j_lj, PandyaObj,to, dict_idx_op_to_flatvec, dict_idx_flatvec_to_op,dict_if_idx_for_hdf5;debug_mode=true) - if !Hsample; return nothing;end + if Hsample==0; return nothing;end magnusmethod = IMSRGobj.magnusmethod - #splitting = ifelse((magnusmethod!="" && magnusmethod!="split"),true,false) splitting = ifelse((magnusmethod!="" && magnusmethod!="split"),false,true) fvec .*= 0.0 ncom = zeros(Int64,3) @@ -828,8 +832,10 @@ function gather_omega_sofar_write(Hsample::Bool, istep, s, fvec, oOmega, nOmega, end get_fvec_from_Op!(s, fvec, tildeO, dict_idx_op_to_flatvec, dict_idx_flatvec_to_op) write_fvec_hdf5(binfo,fvec,dict_if_idx_for_hdf5,s,IMSRGobj.H.zerobody[1];label="omega") - get_fvec_from_Op!(s, fvec, IMSRGobj.eta, dict_idx_op_to_flatvec, dict_idx_flatvec_to_op) - write_fvec_hdf5(binfo,fvec,dict_if_idx_for_hdf5,s,IMSRGobj.H.zerobody[1];label="eta") + if Hsample == 2 + get_fvec_from_Op!(s, fvec, IMSRGobj.eta, dict_idx_op_to_flatvec, dict_idx_flatvec_to_op) + write_fvec_hdf5(binfo,fvec,dict_if_idx_for_hdf5,s,IMSRGobj.H.zerobody[1];label="eta") + end return nothing end @@ -1049,7 +1055,7 @@ Constructor for IMSRGobject - `n_written_omega::Int` # of written Omega by splitting to solve IMSRGflow - `Ncomm::Vector{Int}` # of commutator evaluated during IMSRG flow """ -function init_IMSRGobject(HFobj,filename;smax=500.0,dsmax=1.0,maxnormOmega=0.25,eta_criterion=1.e-6,denominatorDelta=0.0) +function init_IMSRGobject(HFobj,filename;smax=500.0,dsmax=0.5,maxnormOmega=0.25,eta_criterion=1.e-6,denominatorDelta=0.0) tf = isfile(filename) ds = min(dsmax,1.0) s = [0.0,ds] @@ -1064,7 +1070,8 @@ function init_IMSRGobject(HFobj,filename;smax=500.0,dsmax=1.0,maxnormOmega=0.25, n_written_omega = [0] Ncomm =[0] magnusmethod = "" - IMSRGobj = IMSRGobject(H0,Hs,s,smax,dsmax,maxnormOmega,magnusmethod,eta,Omega,eta_criterion,denominatorDelta,n_written_omega,Ncomm) + ExpectationValues = Dict{String,Float64}() + IMSRGobj = IMSRGobject(H0,Hs,s,smax,dsmax,maxnormOmega,magnusmethod,eta,Omega,eta_criterion,denominatorDelta,n_written_omega,Ncomm,ExpectationValues) if !tf println("Since $filename is not found, the default parameters will be used.") return IMSRGobj diff --git a/src/NuclearToolkit.jl b/src/NuclearToolkit.jl index 1cd0e6c0..56055cc3 100644 --- a/src/NuclearToolkit.jl +++ b/src/NuclearToolkit.jl @@ -46,7 +46,7 @@ include("chiEFTint/nn_sampling.jl") include("chiEFTint/read_me3j.jl") export make_chiEFTint export nn_IMSRG_sampling -export test_me3j +export test3NF ### NuclData.jl include("NuclData.jl/amedata.jl") diff --git a/src/ShellModel/betadecay.jl b/src/ShellModel/betadecay.jl index 70686375..e325287a 100644 --- a/src/ShellModel/betadecay.jl +++ b/src/ShellModel/betadecay.jl @@ -402,7 +402,7 @@ function eval_bFF_files(fns,qfactors::quenching_factors,parent,daughter,Qvals;ve fFF = f_0 + f_1 + f_2 thalf = K/fFF logft = log10(fis[2]*thalf) - if false #verbose + if verbose println("Energy $tkey Ex.",@sprintf("%8.3f",tkey-daughter.Egs)," J2",@sprintf("%4i",J2),ffobj.prty) println("M0s,M0t,M0s'", @sprintf("%12.4e", ffobj.M0rs),@sprintf("%12.4e", ffobj.M0sp),@sprintf("%12.4e", ffobj.M0rsd)) println("x, u, xi'y ", @sprintf("%12.4e", x),@sprintf("%12.4e", u),@sprintf("%12.4e", xidy)) diff --git a/src/ShellModel/eigenvector_continuation.jl b/src/ShellModel/eigenvector_continuation.jl index 90e0c920..61469ffc 100644 --- a/src/ShellModel/eigenvector_continuation.jl +++ b/src/ShellModel/eigenvector_continuation.jl @@ -66,8 +66,7 @@ function read_wf_from_info(wfinfos,mdim,vs,wpath) inpf,nth,TDidx = tmp if wpath != "./" && wpath != "" tn = split(inpf,"/") - ln =length(tn) - inpf = wpath*tn[ln-1]*"/"*tn[ln] + inpf = wpath* ifelse(wpath[end]=="/","","/") * tn[end] end io = open(inpf,"r") num_ev = read(io,Int32) @@ -75,7 +74,6 @@ function read_wf_from_info(wfinfos,mdim,vs,wpath) vals = [read(io,Float64) for i = 1:num_ev] ojs = [read(io,Int32) for i=1:num_ev] Css = [ [read(io,Float64) for i=1:mdim] for j=1:num_ev] - #println("TDidx $TDidx nth $nth") vs[TDidx] .= Css[nth] close(io) end @@ -106,7 +104,7 @@ function prepEC(Hs,target_nuc,num_ev,num_ECsample,tJ,mode; path_to_samplewav="",calc_moment=true, save_wav = false,tdmatdir="./tdmat/", gfactors = [1.0,0.0,5.586,-3.826], - effcharge=[1.5,0.5]) + effcharge=[1.5,0.5],debugmode=false,doublelanczos=true) to = TimerOutput() sntf = Hs[1] Anum = parse(Int64, match(reg,target_nuc).match) @@ -157,13 +155,14 @@ function prepEC(Hs,target_nuc,num_ev,num_ECsample,tJ,mode; vks = [ zeros(Float64,mdim) for i=1:lm] uks = [ zeros(Float64,mdim) for i=1:ls] initialize_wf(vks[1],"rand",tJ,mdim) + @timeit to "Lanczos" elit = TRL(vks,uks,Tmat,itmin, pbits,nbits,jocc_p,jocc_n,SPEs, pp_2bjump,nn_2bjump,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Mps,delMs,Vpn, eval_jj,oPP,oNN,oPNu,oPNd,Jidxs, tdims,num_ev,num_history,lm,ls,en, - tol,to,true) + tol,to;doubleLanczos=doublelanczos,debugmode=debugmode) Rvecs = @views uks[1:num_ev] vals,vecs = eigen(@views Tmat[1:elit*q,1:elit*q]) @inbounds for (nth,Rvec) in enumerate(Rvecs) @@ -363,11 +362,12 @@ function solveEC(Hs,target_nuc,tJNs; sumV=[] wfinfos=[] lTD = 0 + for (jidx,tmp) in enumerate(tJNs) tJ,num_ev_target = tmp + vals = zeros(Float64,num_ev_target) Mtot = tJ - pbits,nbits,jocc_p,jocc_n,Mps,Mns,tdims = occ(p_sps,msps_p,mz_p,vp, - n_sps,msps_n,mz_n,vn,Mtot) + pbits,nbits,jocc_p,jocc_n,Mps,Mns,tdims = occ(p_sps,msps_p,mz_p,vp,n_sps,msps_n,mz_n,vn,Mtot) mdim = tdims[end] @timeit to "read TDmat" begin inpf = tdmatpath*target_nuc*"_J"*string(tJ)*".dat" @@ -411,8 +411,8 @@ function solveEC(Hs,target_nuc,tJNs; @timeit to "Gen. Eigen" begin mul!(tMat,Linv,Hmat) mul!(tildH,Linv',tMat) - #vals,vecs = real.(Arpack.eigs(tildH,nev=num_ev_target,which=:SR,tol=1.e-8, maxiter=300)) - vals = real.(eigsolve(tildH,num_ev_target,:SR;tol=1.e-8, maxiter=300)[1])[1:num_ev_target] + vals,vecs = Arpack.eigs(tildH,nev=num_ev_target,which=:SR,tol=1.e-8, maxiter=300) + vals = real.(vals) println("vals $vals ln $(length(vals)) num_ev_target $num_ev_target") if verbose print_vec("$target_nuc 2J=$tJ En(EC)",vals) @@ -420,31 +420,30 @@ function solveEC(Hs,target_nuc,tJNs; end push!(sumV,[sntf,tJ,vals]) end - end - - ## write out approx. wav. - if write_appwav - wfinfos = read_wfinfos("./tdmat/wfinfos_"*target_nuc*"_J"*string(tJ)*".dat") - @timeit to "read sample wavs." begin - vs = [zeros(Float64,mdim) for i=1:Dim] - read_wf_from_info(wfinfos,mdim,vs,wpath) - end - @timeit to "make .appwav" begin - Rvecs = [ zeros(Float64,mdim) for i=1:length(vals)] - for nth = 1:length(vals) - for k = 1:length(vs) - @. Rvecs[nth] += vecs[k,nth] * vs[k] + ## write out approx. wav. for only the first Hamiltonian + if write_appwav && sntidx == 1 + wfinfos = read_wfinfos("./tdmat/wfinfos_"*target_nuc*"_J"*string(tJ)*".dat") + @timeit to "read sample wavs." begin + vs = [zeros(Float64,mdim) for i=1:Dim] + read_wf_from_info(wfinfos,mdim,vs,wpath) + end + @timeit to "make .appwav" begin + Rvecs = [ zeros(Float64,mdim) for i=1:length(vals)] + for nth = 1:length(vals) + for k = 1:length(vs) + @. Rvecs[nth] += vecs[k,nth] * vs[k] + end + Rvecs[nth] ./= sqrt(sum(Rvecs[nth].^2)) end - Rvecs[nth] ./= sqrt(sum(Rvecs[nth].^2)) + end + @timeit to "write .appwav" begin + csnt = split(split(sntf, "/")[end],".")[1] + wavname = "./appwavs/"*target_nuc*"_"*csnt*"_j"*string(tJ)*".appwav" + Jlist = [tJ for i=1:length(vals)] + writeRitzvecs(mdim,Mtot,vals,Jlist,Rvecs,wavname) end - end - @timeit to "write .appwav" begin - csnt = split(split(sntf, "/")[end],".")[1] - wavname = "./appwavs/"*target_nuc*"_"*csnt*"_j"*string(tJ)*".appwav" - Jlist = [tJ for i=1:length(vals)] - writeRitzvecs(mdim,Mtot,vals,Jlist,Rvecs,wavname) - end - end + end + end end if length(Hs) > 1 && exact_logf != "" @timeit to "scatter plot" plot_EC_scatter(target_nuc,Hs,sumV,tJNs,Dims,exlines) @@ -584,7 +583,6 @@ function solveEC_UQ(Hs,target_nuc,tJNs,Erefs,errors; # "std: ", @sprintf("%10.4f ", std([iThetas[i][n] for i =1:Ns]))) #end println(tx) - #plot_MCMC_PT(iThetas,Ts,llhs,tJNs,Ens,Erefs) write_history(iThetas,Ts,llhs,tJNs,Ens) show_TimerOutput_results(to) println("") @@ -630,58 +628,6 @@ function write_history(iThetas,Ts,llhs,tJNs,Ens) close(io) end -function plot_from_history(Hs,target_nuc,tJNs,Erefs,Eexact,intf;path="./history/") - sntf = Hs[1] - Anum = parse(Int64, match(reg,target_nuc).match) - tmp = readsnt(sntf,Anum) - p_sps = tmp[8]; n_sps = tmp[9] - label_T1,label_T0 = make_int(p_sps,n_sps) - SPEs,V1s,V0s = readVint(intf,label_T1,label_T0) - ln_int = length(SPEs) +length(V1s)+length(V0s) - Vint = zeros(Float64,ln_int) - evalVint!(Vint,SPEs,V1s,V0s) - - num_states = sum([tmp[2] for tmp in tJNs]) - inpf= path*"PTlog_Theta_lowestT.dat" - io = open(inpf,"r") - nr = read(io,Int64) - Ns = read(io,Int64) - Np = read(io,Int64) - Thetas = Vector{Float64}[ ] - for i=1:Ns - push!(Thetas,[read(io,Float64) for i=1:Np]) - end - close(io) - inpf= path*"PTlog_llhs.dat" - io=open(inpf,"r") - nr = read(io,Int64) - Ns = read(io,Int64) - Ts = [read(io,Float64) for i=1:nr] - llhs = Vector{Float64}[ ] - for i=1:nr - push!(llhs,[read(io,Float64) for i=1:Ns]) - end - close(io) - - AllEns = [] - paths = ["./history_run1/","./history_run2/","./history_run3/"] - for path in paths - inpf= path*"PTlog_Ens.dat" - io = open(inpf,"r") - nr = read(io,Int64) - Ns = read(io,Int64) - Ens = Vector{Float64}[ ] - for i=1:num_states - push!(Ens,[read(io,Float64) for i = 1:Ns]) - end - close(io) - push!(AllEns,copy(Ens)) - end - #Thetas,llhs,Ens - #println("nr $nr Ns $Ns Np $Np Numstates $num_states Ts $Ts") - plot_MCMC_PT(Thetas,Ts,llhs,tJNs,AllEns,Erefs,Eexact,Vint) -end - function intMCMC(itnum_MCMC,burnin,var_M,iThetas,Theta,c_Theta,Vint,Vopt, nSPEs,nV1s,nV0s,SPEs,V1s,V0s, idx_s_from_i,facs, @@ -1049,118 +995,6 @@ function ngauss(x,mu,varV) return 1.0/(sqrt(2*pi*varV)) * exp( - 0.5* (x-mu)^2 / varV ) end -function plot_MCMC_PT(iThetas,Ts,llhs,tJNs,AllEns,Erefs,Eexact,Vint) - plt=pyimport("matplotlib.pyplot") - cm=pyimport("matplotlib.cm") - patches=pyimport("matplotlib.patches") - ## loglikelihood - nr = length(Ts) - fig = plt.figure(figsize=(10,6)) - ax = fig.add_subplot(111) - ax.set_xlabel("MC step") - ax.set_ylabel("loglikelihood") - #ax.set_ylim(-50,0) - for i = 1:nr - ax.plot(llhs[i].*Ts[i],alpha=0.6,lw=0.5, - label="T="*string(Ts[i]),rasterized=true,zorder=-i) - end - #ax.legend() - plt.savefig("./pic/PT_MCMC_llhs.pdf",bbox_iinches="tight",pad_inches=0.0) - plt.close() - - ## theta plot - fig = plt.figure(figsize=(10,4)) - ax = fig.add_subplot(111) - ax.set_xlabel("MC step") - ax.set_ylabel("SPEs&TBMEs (MeV, .int fmt.)") - Ns = length(iThetas) - for i = 1:length(iThetas[1]) - ax.plot([ iThetas[n][i] for n=1:Ns],alpha=0.5,lw=0.1,rasterized=true) - end - plt.savefig("./pic/PT_MCMC_thetas.pdf",bbox_iinches="tight",pad_inches=0.0) - plt.close() - fig = plt.figure(figsize=(14,6)) - axs = [ fig.add_subplot(6,11,i) for i =1:66] - Ns = length(iThetas) - tbin = 20 - varV= 1.0/10.0 - for i = 1:length(iThetas[1]) - mu = Vint[i]; sigma = sqrt(varV) - tbin = round(mu-5*sigma):0.1:round(mu+5*sigma) - axs[i].hist([iThetas[n][i] for n=1:Ns],bins=tbin,density=true,color="darkgreen",alpha=0.8) - xr = Vint[i]-5*sqrt(varV):0.01:Vint[i]+5*sqrt(varV) - yr = ngauss.(xr,Vint[i],varV) - axs[i].plot(xr,yr,linestyle="dashed",color="k") - axs[i].tick_params(labelleft=false,left=false) - axs[i].scatter(Vint[i],0,marker="o",color="k",zorder=300) - axs[i].text(0.03, 0.77,latexstring("n=")*@sprintf("%2i",i), - transform=axs[i].transAxes) - end - - fig.subplots_adjust(wspace=0.0,hspace=0.5) - plt.savefig("./pic/PT_MCMC_thetas_hist.pdf",bbox_iinches="tight",pad_inches=0.0) - plt.close() - - ### Energy dist. (histgram) - ln = sum([tmp[2] for tmp in tJNs]) - fig = plt.figure(figsize=(14,6)) - axs = [ fig.add_subplot(3,4,i) for i =1:ln] - mu = 0.0; sigma=0.0 - cols=["red","blue","green"] - for i = 1:ln - for n = 1:length(AllEns) - if n==1 - mu = mean(AllEns[n][i]);sigma = std(AllEns[n][i]) - axs[i].set_xlim(mu-5*sigma, mu+5*sigma) - axs[i].tick_params(labelleft=false,left=false) - #println("axs[i].get_xscale ",axs[i].get_xscale) - tbin = round(mu-5*sigma):0.5:round(mu+5*sigma) - end - #println("para mu: ",mean(AllEns[n][i]), - # " std: ", std(AllEns[n][i])," size:" , length(AllEns[n][i])) - axs[i].hist(AllEns[n][i],bins=tbin,density=true,edgecolor=cols[n],facecolor="None", - alpha=0.6,zorder=300+10*n) - end - is, ie = axs[i].get_ylim() - xstep = 3.0 - axs[i].xaxis.set_ticks(tbin[1]+xstep:xstep:tbin[end]-xstep) - end - count = 0 - for (jidx,tmp) in enumerate(tJNs) - for i=1:tmp[2] - count += 1 - cJ = tJNs[jidx][1] - if cJ % 2 == 0 - cJ = latexstring( string(div(cJ,2))*"_{"*string(i)*"}") - else - cJ = latexstring( string(cJ)*"/2_{"*string(i)*"}") - end - tl="";if count==1; tl = "Exp.";end - tlO="";if count==2; tlO = "USDB";end - axs[count].scatter(Erefs[jidx][i],0.0,marker="o",color="k",label=tl,zorder=500) - axs[count].scatter(Eexact[jidx][i],0.0,marker="x",color="r",label=tlO,zorder=600) - axs[count].text(0.1, 0.8,latexstring("J=")*cJ, - transform=axs[count].transAxes) - end - end - axs[1].legend(loc="upper right") - axs[2].legend(loc="upper right") - fig.subplots_adjust(wspace=0.0) - plt.savefig("./pic/PT_MCMC_hist.pdf",bbox_iinches="tight",pad_inches=0.0) - plt.close() - # count = 0 - # for (jidx,tmp) in enumerate(tJNs) - # for i=1:tmp[2] - # count += 1 - # tx = "E(EC,MCMC) mean: " * @sprintf("%10.4f ", mean(Ens[1][count])) - # tx *= " std: "*@sprintf("%10.4f ", std(Ens[count])) - # tx *= " Eexp. "*@sprintf("%10.4f ",Erefs[jidx][i]) - # println(tx) - # end - # end - return nothing -end - struct Tridx i::Int j::Int diff --git a/src/ShellModel/lanczos_methods.jl b/src/ShellModel/lanczos_methods.jl index b770b692..31b855a7 100644 --- a/src/ShellModel/lanczos_methods.jl +++ b/src/ShellModel/lanczos_methods.jl @@ -1,9 +1,8 @@ -function TRL(vks,uks,Tmat,k, - pbits,nbits,jocc_p,jocc_n, +function TRL(vks,uks,Tmat,k,pbits,nbits,jocc_p,jocc_n, SPEs,pp_2bjump,nn_2bjump,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Mps,delMs,Vpn, eval_jj,oPP,oNN,oPNu,oPNd,Jidxs, - tdims,num_ev,num_history,lm,ls,en,tol,to,doubleLanczos=false,checkorth=false) + tdims,num_ev,num_history,lm,ls,en,tol,to;doubleLanczos=false,checkorth=true,debugmode=true) mdim = tdims[end] TF=[false] @@ -13,52 +12,77 @@ function TRL(vks,uks,Tmat,k, Jvret = [zeros(Float64,mdim)] Jmat = zeros(Float64,lnJ,lnJ) Jvs[1] .= vks[1] - Jtol = 1.e-6 + Jtol = 1.e-7 JTF = [false];beta_J = 1.0 + + ### + num_restart = 0 + Jvlog_before = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + Jvlog_after = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + Hvs = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + HvRs = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + ### + if doubleLanczos - Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret,pbits,nbits,tdims,eval_jj, - Jidxs,oPP,oNN,oPNu,oPNd,beta_J,to) + Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret,pbits,nbits,tdims,eval_jj,Jidxs,oPP,oNN,oPNu,oPNd,beta_J,to) vks[1] .= Jvs[1] - for i=1:lnJ;Jvs[i] .=0.0;end + vks[1] .*= 1.0 / sqrt(dot(vks[1],vks[1])) end + elit = 1 while TF[1]==false for it = k:lm-1 vk =vks[it]; vkp1 =vks[it+1] @timeit to "operate H" begin - operate_H!(vks[it],vks[it+1], - pbits,nbits, - jocc_p,jocc_n,SPEs, - pp_2bjump,nn_2bjump, - tdims,bis,bfs,block_tasks, + operate_H!(vk, vkp1, pbits,nbits,jocc_p,jocc_n,SPEs, + pp_2bjump,nn_2bjump,tdims,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Vpn,Mps,delMs,to) end - talpha = dot(vk,vkp1) + if debugmode + Hvs[it] .= vkp1 + end + talpha = dot(vk,vkp1) Tmat[it,it] = talpha - diagonalize_T!(it,num_ev,Tmat,en,num_history,TF,tol) + diagonalize_T!(it,num_ev,Tmat,en,num_history,TF,tol) if it == mdim; TF[1]=true;end if TF[1];elit=it;break;end svks = @views vks[1:it] @timeit to "ReORTH" ReORTH(it,vkp1,svks) + if debugmode + HvRs[it] .= vkp1 + end tbeta = sqrt(dot(vkp1,vkp1)) vkp1 .*= 1.0/tbeta - if checkorth; Check_Orthogonality(it,vks,en); end + #if checkorth; Check_Orthogonality(it,vks,en); end + if debugmode + print_vec("En TRL $it ",en[1]) + println(" beta $tbeta") + end Tmat[it+1,it] = tbeta; Tmat[it,it+1] = tbeta + if doubleLanczos if tbeta < Jtol;TF[1]=true;elit=it;break;end @timeit to "JJ lanczos" begin for i = 2:length(Jvs);Jvs[i] .=0.0;end Jmat .= 0.0;JTF[1] = false Jvs[1] .= vkp1 + if debugmode; Jvlog_before[it] .= vkp1; end ## Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret,pbits,nbits,tdims,eval_jj,Jidxs,oPP,oNN,oPNu,oPNd,beta_J,to) vkp1 .= Jvs[1] + if debugmode; Jvlog_after[it] .= vkp1; end ## if TF[1];elit=it;break;end - end + end + #println(" beta $tbeta beta_inJ $beta_in_J") + sv = @view vks[1:it] + ReORTH(it,vkp1,sv) + vkp1 .*= 1.0 / sqrt(dot(vkp1,vkp1)) end end if TF[1] == false @timeit to "Restart" begin - ThickRestart(vks,uks,Tmat,lm,ls) + num_restart += 1 + if debugmode; write_wf_hdf5(vks, Hvs, HvRs,Tmat,Jvlog_before, Jvlog_after, "JJ_TR_res$(num_restart).h5", false); end + ThickRestart(vks,uks,Tmat,lm,ls,debugmode) end end k = ls+1 @@ -66,28 +90,52 @@ function TRL(vks,uks,Tmat,k, return elit end -function Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret, - pbits,nbits,tdims,eval_jj, +function write_wf_hdf5(vks,Hvs,HvRs,Tmat,Jv_bef, Jv_aft, fname::String, is_block) + # for debug + io = h5open(fname, "w") + mdim = length(vks[1]) + write(io,"len", length(vks)) + write(io,"mdim", mdim) + for i = 1:length(vks) + write(io, "Hvs_$i", Hvs[i][:]) + write(io,"HvRs_$i", HvRs[i][:]) + end + write(io, "Tmat",Tmat) + for i = 1:length(Jv_bef) + write(io, "Jv_bef_$i", Jv_bef[i]) + end + for i = 1:length(Jv_aft) + write(io, "Jv_aft_$i", Jv_aft[i]) + end + close(io) + return nothing +end + +function Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret,pbits,nbits,tdims,eval_jj, Jidxs,oPP,oNN,oPNu,oPNd,beta_J,to) mdim = tdims[end] lnJ = length(Jvs) eljit=1; k = 1; inow=k + beta = 0.0 while JTF[1] == false for it = k:lnJ-1 inow = it vk = Jvs[it]; vkp1 = Jvs[it+1] - operate_J!(vk,vkp1,pbits,nbits,tdims, - Jidxs,oPP,oNN,oPNu,oPNd,beta_J) + operate_J!(vk,vkp1,pbits,nbits,tdims,Jidxs,oPP,oNN,oPNu,oPNd,beta_J) axpy!(eval_jj,vk,vkp1)## vkp1 .+= eval_jj .* vk Jmat[it,it] = dot(vk,vkp1) teval = eigvals(@views Jmat[1:it,1:it])[1] + #println("JJ it ", @sprintf("%3i",it), " eval ", @sprintf("%12.8f",teval)) if abs(teval-eval_jj) < Jtol eljit=it;JTF[1] = true;break end - if JTF[1];eljit=it;break;end - ReORTH(it,vkp1,Jvs) + + svs = @views Jvs[1:it] + ReORTH(it,vkp1,svs) + beta = sqrt(dot(vkp1,vkp1)) - if beta < 1.e-4;eljit=it;TF[1]=true;JTF[1]=true;break;end + println(" betaJ $beta") + #if beta < 1.e-4;eljit=it;TF[1]=true;JTF[1]=true;break;end vkp1 .*= 1.0/beta Jmat[it+1,it] = beta; Jmat[it,it+1] = beta eljit = it @@ -103,10 +151,6 @@ function Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret, return nothing end -function get_mscheme_idx()::Int64 - -end - function operate_H!(wf,twf,pbits,nbits,jocc_p,jocc_n,SPEs,pp_2bjump,nn_2bjump,tdims,bis,bfs,block_tasks,p_NiNfs,n_NiNfs,Vpn,Mps,delMs,to=nothing) @inbounds @threads for bi in block_tasks if bi==0; continue;end #empty job @@ -214,14 +258,69 @@ function diagonalize_T!(k::Int64,num_ev::Int64,Tmat,en::Array{Array{Float64,1}}, return nothing end +function ThickRestart(vks,uks,Tmat,lm,ls,debugmode=false,make_sure=true) + vals,vecs = eigen(@views Tmat[1:lm-1,1:lm-1]) + Tmat_before = ifelse(debugmode,copy(Tmat),[0.0]) + beta = Tmat[lm-1,lm] + Tmat .= 0.0 + @inbounds for k = 1:ls + Tmat[k,k] = vals[k] + end + @inbounds for (k,uk) in enumerate(uks) + tmp = beta .* vecs[lm-1,k] + Tmat[ls+1,k] = tmp; Tmat[k,ls+1] = tmp + uk .= 0.0 + for j=1:lm-1 + axpy!(vecs[j,k],vks[j],uk) + end + end + @inbounds for (k,uk) in enumerate(uks) + if make_sure && k > 1 + svs = @view uks[1:k-1] + ReORTH(k-1,uk,svs) + end + vks[k] .= uk .* (1.0 /sqrt(dot(uk,uk))) + end + vks[ls+1] .= vks[lm] + if make_sure + svs = @view vks[1:ls] + ReORTH(ls,vks[ls+1],svs) + end + for k = ls+2:lm + vks[k] .= 0.0 + end + # if debugmode + # io = h5open("restart.hdf5", "w") + # write(io,"lm", lm) + # write(io,"ls", ls) + # write(io, "beta", beta) + # write(io,"vals", vals) + # write(io,"vecs", vecs) + # for i = 1:ls + # write(io, "uks_$i", uks[i]) + # end + # write(io, "Tmat_before", Tmat_before) + # write(io, "Tmat", Tmat) + # close(io) + # end + return nothing +end + +""" +Thick-Restart Block Lanczos method +""" function TRBL(q,vks,uks,Tmat,Beta_H,pbits,nbits,jocc_p,jocc_n,SPEs, pp_2bjump,nn_2bjump,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Mps,delMs,Vpn,tdims, eval_jj,oPP,oNN,oPNu,oPNd,Jidxs, - num_ev,num_history,lm,ls_sub,en,tol,to, - doubleLanczos=false) + num_ev,num_history,lm,ls_sub,en,tol,to; + doubleLanczos=false,verbose=false,debugmode=false) ls = q*ls_sub mdim = tdims[end] + if doubleLanczos && mdim < 100 + @warn "Block Lanczos with J projection is not stable for small systems.\nUse TRL (is_block=false) instead." + end + TF=[false] elit = 1 inow = 1; itmin = 1; itmax = div(lm,q)-1 @@ -230,13 +329,20 @@ function TRBL(q,vks,uks,Tmat,Beta_H,pbits,nbits,jocc_p,jocc_n,SPEs, R = zeros(Float64,q,q) Beta_J = zeros(Float64,q,q) - lnJ = 20 # maximum([q*4,10]) + lnJ = 20 Jvs = [zeros(Float64,q,mdim) for i=1:lnJ] Jvret = [zeros(Float64,q,mdim) ] Jmat = zeros(Float64,lnJ*q,lnJ*q) - JTF = [false];Jtol=1.e-6 + JTF = [false] + Jtol = 1.e-7 U = zeros(Float64,mdim,lnJ*q) Mat = zeros(Float64,mdim,q) + + Jvlog_before = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + Jvlog_after = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + Hvs = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + HvRs = [ zeros(Float64,mdim) for i = 1:ifelse(debugmode,length(vks),1)] + if doubleLanczos @timeit to "JJ lanczos" begin Jvs[1] .= vks[1] @@ -246,6 +352,7 @@ function TRBL(q,vks,uks,Tmat,Beta_H,pbits,nbits,jocc_p,jocc_n,SPEs, V = vks[1] end end + num_restart = 0 while TF[1]==false for it = itmin:itmax inow = it @@ -256,39 +363,57 @@ function TRBL(q,vks,uks,Tmat,Beta_H,pbits,nbits,jocc_p,jocc_n,SPEs, jocc_p,jocc_n,SPEs,pp_2bjump,nn_2bjump, tdims,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Vpn,Mps,delMs,to) - end - BLAS.gemm!('N','T',1.0,V,HV,0.0,R) ##mul!(R,V,HV') + end + if debugmode + Hvs[it] .= HV[1,:] + end + BLAS.gemm!('N','T',1.0,V,HV,0.0,R) if issymmetric(R) == false @inbounds for i=1:q;for j=i:q R[i,j] = R[j,i] end;end end + @views Tmat[q*it-q+1:q*it,q*it-q+1:q*it] .= R diagonalize_T!(it*q,num_ev,Tmat,en,num_history,TF,tol) - #print_vec("En TR(d)BL $it ",en[1]) + if debugmode + print_vec("En TRBL $it ",en[1]) + end BLAS.gemm!('N','N',-1.0,R,V,1.0,HV)#mul!(HV,R,V,-1.0,1.0) s_vks = @views vks[1:it-1] - @timeit to "ReORTH" bl_ReORTH(q,it,mdim,s_vks,HV,Vt,R) + @timeit to "ReORTH" bl_ReORTH(q,it,mdim,s_vks,HV,Vt,R) + if debugmode + HvRs[it] .= HV[1,:] + end bl_QR!(HV',Beta_H,mdim,q)#myQR!(HV',Beta_H,mdim,q) + if doubleLanczos tnorm = norm(Diagonal(Beta_H),Inf) if tnorm < Jtol - println("Hbn norm $tnorm");TF[1]=true;elit=it;break + if verbose; println("Hbn norm $tnorm");end + TF[1]=true;elit=it;break end @timeit to "JJ lanczos" begin for i=2:lnJ; Jvs[i] .= 0.0; end JTF[1] = false; Jmat .= 0.0;Jvs[1] .= HV Vt .= 0.0; R .= 0.0 + if debugmode; Jvlog_before[it] .= Jvs[1][1,:]; end bl_JJ_Lanczos(q,Jvs,Jmat,Vt,R,Beta_J,JTF,Jtol,Jvret,pbits,nbits,tdims,eval_jj,Jidxs,oPP,oNN,oPNu,oPNd,to,Beta_H,U,Mat) HV .= Jvs[1]; Beta_J .=0.0 + if debugmode; Jvlog_after[it] .= Jvs[1][1,:]; end end end + if debugmode + println(" R $R betaH $Beta_H diff $(R-Beta_H)") + end add_bl_T!(q,it,Tmat,Beta_H) if TF[1];elit = it;break;end end if TF[1] == false @timeit to "bl_Restart" begin - bl_ThickRestart(q,vks,uks,Beta_H,Tmat,inow,ls_sub,mdim,Vt) + num_restart += 1 + if debugmode; write_wf_hdf5(vks,Hvs,HvRs,Tmat,Jvlog_before, Jvlog_after,"JJ_TRBL_res$(num_restart).h5",debugmode); end + bl_ThickRestart(q,vks,uks,Beta_H,Tmat,inow,ls_sub,mdim,Vt,debugmode) end itmin = ls_sub + 1 end @@ -420,7 +545,6 @@ function bl_operate_H!(q,wf,twf,pbits,nbits,jocc_p,jocc_n, end end #end - #@timeit to "1b" begin ### one-body operator @inbounds for pidx = 1:l_Np tMi = offset + pidx*l_Nn @@ -433,10 +557,8 @@ function bl_operate_H!(q,wf,twf,pbits,nbits,jocc_p,jocc_n, @inbounds for b=1:q w_f[b] += coeff * w_i[b] end - end end - #end end return nothing end @@ -454,11 +576,7 @@ function Jcompress(q,vks,Tmat,inow,ls_sub,mdim,R,bnout,U,Mat,Beta_J;use_LAPACK=f M = @views Tmat[1:lm,1:lm] vals,vecs = eigen(M) # eigen(Symmetric(M,:L)) end - # x = maximum([ 1.0-sum(vecs[1:lm,i].^2) for i=1:ls]) - # if x > 1.e-6 - # println("WARNING: JJ block norm diff. in jj_refine ", x) - # end - + tv = @views vecs[1:ls,1:ls] BLAS.gemm!('T','N',1.0,tv,bnout,0.0,R)# mul!(R,tv,bnout) bnout .= R @@ -476,21 +594,73 @@ function Jcompress(q,vks,Tmat,inow,ls_sub,mdim,R,bnout,U,Mat,Beta_J;use_LAPACK=f tv = @views vecs[1:lm,1:ls] BLAS.gemm!('T','T',1.0,tv,tU,0.0,vks[1]) Beta_J .= @views vecs[1:ls,1:ls] - - #println("V1 compressed ",vks[1][1,:]) - #println("V2 compressed ",vks[1][2,:]) + return nothing end -function bl_ThickRestart(q,vks,uks,R,Tmat,inow,ls_sub,mdim,Vt) +function like_bl_ThickRestart(vks,uks,Tmat,lm,ls,debugmode) + q = 1 + ls_sub = div(ls,q) + mdim = size(vks[1]) + R = beta = Tmat[lm-1,lm] + vals,vecs = eigen(@views Tmat[1:lm-1,1:lm-1]) + Tmat .= 0.0 + + for k = 1:ls; Tmat[k,k] = vals[k]; end + tv = @views vecs[lm-1,1:ls] + r = R .* tv + + Tmat[ls+1,1:ls] .= r + Tmat[1:ls,ls+1] .= r + + for k = 1:ls + uk = uks[k] #.= 0.0 + uk .= 0.0 + for j=1:lm-1 + vk = vks[j] + fac = vecs[j,k] + uk .+= fac .* vk + end + end + for i = 1:ls + vks[i] .= uks[i] + println("norm vks[$i] $(norm(vks[i]))") + end + vks[ls+1] .= vks[lm] + for i= ls_sub+2:length(vks) + vks[i] .= 0.0 + end + for i=2:ls+1 + v = vks[i] + for j = i-1:-1:1 + fac = dot(vks[j],v) + v .-= fac .* vks[j] + end + w = sqrt(dot(v,v)) + v .*= 1.0/w + println(" => norm vks[$i] $(norm(vks[i]))") + end + return nothing +end + +function bl_ThickRestart(q,vks,uks,R,Tmat,inow,ls_sub,mdim,Vt,debug_mode) lm = q*inow ls = q*ls_sub r = zeros(Float64,q,ls) vals,vecs = eigen(@views Tmat[1:lm,1:lm]) + Tmat_before = copy(Tmat) + + println("βm1 ",Tmat[lm-1,lm], " ", Tmat[lm-2,lm-1]) + Tmat .= 0.0 for k = 1:ls; Tmat[k,k] = vals[k]; end tv = @views vecs[lm-q+1:lm,1:ls] mul!(r,R,tv) #BLAS.gemm!('N','N',1.0,R,tv,0.0,r) + + println("R = beta? $R") + println("r in blockRestart $r") + println("tv $tv") + Tmat[ls+1:ls+q,1:ls] .= r Tmat[1:ls,ls+1:ls+q] .= r' for bi = 1:ls_sub @@ -504,9 +674,8 @@ function bl_ThickRestart(q,vks,uks,R,Tmat,inow,ls_sub,mdim,Vt) v = @views vk[bj,:] idx = q*(j-1) +bj fac = vecs[idx,k] - @inbounds for m=1:mdim - uk[b,m] += fac * v[m] - end + @views u_vv = @views uk[b,:] + axpy!(fac, v, u_vv) end end end @@ -529,6 +698,19 @@ function bl_ThickRestart(q,vks,uks,R,Tmat,inow,ls_sub,mdim,Vt) bl_QR!(V',R,mdim,q) end end + # if debug_mode + # io = h5open("restart_blocck.hdf5", "w") + # write(io,"lm", lm) + # write(io,"ls", ls) + # write(io,"vals", vals) + # write(io,"vecs", vecs) + # for i = 1:ls + # write(io, "uks_$i", uks[i][1,:]) + # end + # write(io, "Tmat_before", Tmat_before) + # write(io, "Tmat", Tmat) + # close(io) + # end return nothing end @@ -542,18 +724,17 @@ function bl_JJ_Lanczos(q,Jvs,Jmat,Vt,R,Beta_J,JTF,Jtol,Jvret,pbits,nbits,tdims,e for it = itmin:itmax inow = it V = Jvs[it]; JV = Jvs[it+1] - bl_operate_J!(q,V,JV,pbits,nbits,tdims, - Jidxs,oPP,oNN,oPNu,oPNd) + bl_operate_J!(q,V,JV,pbits,nbits,tdims,Jidxs,oPP,oNN,oPNu,oPNd) axpy!(eval_jj,V,JV)##JV .+= eval_jj .* V BLAS.gemm!('N','T',1.0,V,JV,0.0,R) @inbounds for j=1:q;for i=1:j - R[j,i] = R[i,j] + R[j,i] = R[i,j] end;end @views Jmat[q*it-q+1:q*it,q*it-q+1:q*it] .= R tJmat = @views Jmat[1:it*q,1:it*q] jeval = eigvals(tJmat)[1:q] - if verbose; print_vec("$it jeval=> ",jeval);end + if verbose; print_vec("$it jeval=> ",jeval;long=true);end if jeval[1] - eval_jj < -Jtol if verbose;println("neg JJ @$it jeval");end JTF[1] = true;break @@ -563,12 +744,12 @@ function bl_JJ_Lanczos(q,Jvs,Jmat,Vt,R,Beta_J,JTF,Jtol,Jvret,pbits,nbits,tdims,e JTF[1] = true;break end BLAS.gemm!('N','N',-1.0,R,V,1.0,JV) #mul!(JV,R,V,-1.0,1.0) - s_vs = @views Jvs[1:it-1] + s_vs = @views Jvs[1:it-1] bl_ReORTH(q,it,mdim,s_vs,JV,Vt,R) bl_QR!(JV',Beta_J,mdim,q) tnorm = norm(Diagonal(Beta_J),Inf) - add_bl_T!(q,it,Jmat,Beta_J) + add_bl_T!(q,it,Jmat,Beta_J) if tnorm < Jtol println("Jbn norm $tnorm") JTF[1]=true;break @@ -577,13 +758,11 @@ function bl_JJ_Lanczos(q,Jvs,Jmat,Vt,R,Beta_J,JTF,Jtol,Jvret,pbits,nbits,tdims,e if rescount == 20;println("JJ not converged");return nothing;end if JTF[1]==false tJmat = @views Jmat[1:inow*q,1:inow*q] - bl_ThickRestart(q,Jvs,Jvret,Beta_J,Jmat, - inow,1,mdim,Vt) + bl_ThickRestart(q,Jvs,Jvret,Beta_J,Jmat,inow,1,mdim,Vt,false) itmin = 2;rescount += 1 end end if inow > itmin - #@timeit to "Restart" Jcompress(q,Jvs,Jmat,inow,1,mdim,R,bnout,U,Mat,Beta_J) end return nothing diff --git a/src/ShellModel/shellmodel_main.jl b/src/ShellModel/shellmodel_main.jl index 055cc5fe..201edee4 100644 --- a/src/ShellModel/shellmodel_main.jl +++ b/src/ShellModel/shellmodel_main.jl @@ -46,7 +46,7 @@ end """ main_sm(sntf,target_nuc,num_ev,target_J; - save_wav=false,q=1,is_block=false,is_show=false,num_history=3,lm=100,ls=20,tol=1.e-8, + save_wav=false,q=1,is_block=false,is_show=false,num_history=3,lm=300,ls=20,tol=1.e-8, in_wf="",mdimmode=false,calc_moment=false, visualize_occ=false, gfactors=[1.0,0.0,5.586,-3.826],effcharge=[1.5,0.5]) Digonalize the model-space Hamiltonian @@ -77,9 +77,10 @@ Digonalize the model-space Hamiltonian - `truncation_scheme==""` option to specify a truncation scheme, "jocc" and "pn-pair" is supported and you can use multiple schemes by separating them with camma like "jocc,pn-pair". - `truncated_jocc=Dict{String,Vector{Int64}}()` option to specify the truncation scheme for each orbit, e.g. Dict("p0p1"=>[1],"n0p3"=>[2,3]) means that the occupation number for proton 0p1 is truncated upto 1, and for neutron 0p3 min=2 and max=3" """ -function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=false,is_show=false,num_history=3,lm=100,ls=20,tol=1.e-8, +function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=false,is_show=false,num_history=3,lm=300,ls=20,tol=1.e-8, in_wf="",mdimmode=false, print_evec=false, calc_moment = false, calc_entropy = false, visualize_occ = false, - gfactors = [1.0,0.0,5.586,-3.826], effcharge=[1.5,0.5], truncation_scheme="",truncated_jocc=Dict{String,Vector{Int64}}()) + gfactors = [1.0,0.0,5.586,-3.826], effcharge=[1.5,0.5], truncation_scheme="",truncated_jocc=Dict{String,Vector{Int64}}(), + debugmode=false) to = TimerOutput() Anum = parse(Int64, match(reg,target_nuc).match) @@ -107,7 +108,7 @@ function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=fal pbits,nbits,jocc_p,jocc_n,Mps,Mns,tdims = occ(p_sps,msps_p,mz_p,vp,n_sps,msps_n,mz_n,vn,Mtot;truncation_scheme=truncation_scheme,truncated_jocc=truncated_jocc) lblock=length(pbits) - mdim = tdims[end]; if mdim==0;exit();end + mdim = tdims[end]; if mdim==0; println("Aborted due to the mdim=0");return true;end num_ev = min(num_ev,mdim) mdim_print(target_nuc,Z,N,cp,cn,vp,vn,mdim,tJ) if mdimmode; return nothing;end @@ -125,7 +126,6 @@ function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=fal ## storing one-body jumps for pn 2b interaction bis,bfs,p_NiNfs,n_NiNfs,num_task = prep_pn(lblock,pbits,nbits,Mps,delMs,bVpn,Vpn) bVpn=nothing - #Hamil_util = HamilUtil(bis,bfs,pp_2bjump,nn_2bjump,p_NiNfs,n_NiNfs) ## distribute task block_tasks = make_distribute(num_task) end @@ -171,7 +171,7 @@ function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=fal pp_2bjump,nn_2bjump,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Mps,delMs,Vpn,tdims, eval_jj,oPP,oNN,oPNu,oPNd,Jidxs, - num_ev,num_history,lm,ls_sub,en,tol,to,doubleLanczos) + num_ev,num_history,lm,ls_sub,en,tol,to;doubleLanczos=doubleLanczos,debugmode=debugmode) else #Thick Restart (double) Lanczos: TRL vks = [ zeros(Float64,mdim) for i=1:lm] uks = [ zeros(Float64,mdim) for i=1:ls] @@ -185,7 +185,7 @@ function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=fal pp_2bjump,nn_2bjump,bis,bfs,block_tasks, p_NiNfs,n_NiNfs,Mps,delMs,Vpn, eval_jj,oPP,oNN,oPNu,oPNd,Jidxs, - tdims,num_ev,num_history,lm,ls,en,tol,to,doubleLanczos) + tdims,num_ev,num_history,lm,ls,en,tol,to;doubleLanczos=doubleLanczos,debugmode=debugmode) end end @@ -216,9 +216,6 @@ function main_sm(sntf,target_nuc,num_ev,target_J;save_wav=false,q=1,is_block=fal if print_evec print("\n") - # for (nth,Rv) in enumerate(Rvecs) - # print_vec("nth = "*@sprintf("%4i",nth),Rv;long=true) - # end if target_nuc == "Li6" svd_li6(Rvecs) end @@ -897,30 +894,6 @@ function getZNA(target_el,Anum,cp,cn) vp = Z - cp; vn = N - cn return Z,N,vp,vn end -function ThickRestart(vks,uks,Tmat,lm,ls) - vals,vecs = eigen(@views Tmat[1:lm-1,1:lm-1]) - beta = Tmat[lm-1,lm] - Tmat .= 0.0 - @inbounds for k = 1:ls - Tmat[k,k] = vals[k] - end - @inbounds for (k,uk) in enumerate(uks) - tmp = beta .* vecs[lm-1,k] - Tmat[ls+1,k] = tmp; Tmat[k,ls+1] = tmp - uk .= 0.0 - for j=1:lm-1 - axpy!(vecs[j,k],vks[j],uk) - end - end - @inbounds for (k,uk) in enumerate(uks) - vks[k] .= uk .* (1.0 /sqrt(dot(uk,uk))) - end - vks[ls+1] .= vks[lm] - for k = ls+2:lm - vks[k] .= 0.0 - end - return nothing -end function ThickRestart_J(vks,uks,Tmat,lm,ls,eval_jj,Jtol) vals,vecs = eigen(@views Tmat[1:lm-1,1:lm-1]) @@ -929,7 +902,7 @@ function ThickRestart_J(vks,uks,Tmat,lm,ls,eval_jj,Jtol) Tmat .= 0.0 Tmat[1,1] = vals[k] uk=uks[1] - tmp = beta .* vecs[lm-1,k] + tmp = beta * vecs[lm-1,k] Tmat[ls+1,k] = tmp; Tmat[k,ls+1] = tmp uk .= 0.0 @inbounds for j=1:lm-1 @@ -937,14 +910,14 @@ function ThickRestart_J(vks,uks,Tmat,lm,ls,eval_jj,Jtol) end vks[1] .= uk .* (1.0/sqrt(dot(uk,uk))) vks[2] .= vks[lm] - @inbounds for k = ls+2:length(vks) + for k = ls+2:length(vks) vks[k] .= 0.0 end return nothing end function initialize_wf(v1,method,tJ,mdim) - #Random.seed!(123) + Random.seed!(1234) if method=="rand" || tJ == -1 v1 .= randn(mdim,) v1 ./= sqrt(dot(v1,v1)) @@ -955,7 +928,7 @@ function initialize_wf(v1,method,tJ,mdim) end function initialize_bl_wav(mdim,q,vks) - Random.seed!(123) + Random.seed!(1234) for i=1:q v = @views vks[i,:] v .= randn(mdim,) @@ -1010,7 +983,7 @@ function read_appwav(inpf,mdim,V,q,verbose=false,is_block=false) end function ReORTH(it,vtarget,vks) - @inbounds for l = it:-1:1 + for l = it:-1:1 v = vks[l] alpha = dot(v,vtarget) axpy!(-alpha,v,vtarget) @@ -1019,7 +992,6 @@ function ReORTH(it,vtarget,vks) end function Check_Orthogonality(it::Int,vks,en) - print_vec("it = $it",en[1]) svks = @views vks[1:it+1] for i = 1:it+1 for j = i:it+1 @@ -1323,9 +1295,8 @@ end function mdim_print(target_nuc,Z,N,cp,cn,vp,vn,mdim,tJ=-1) s0 = @sprintf "%6s %14s %10s %10s" target_nuc "Z,N=($Z,$N)" "c($cp,$cn)" "v($vp,$vn)" - if tJ != -1; s0 * " 2J=$tJ ";end + if tJ != -1; s0 * " 2J = " * @sprintf("%3i", tJ);end s1 = @sprintf "%s %12i %s %5.2f %s " " mdim:" mdim "(" log10(mdim) ")" - #println(s0,s1) print(s0,s1) end diff --git a/src/ShellModel/trans_snt_msnt.jl b/src/ShellModel/trans_snt_msnt.jl index e8fe60af..4f58bdc7 100644 --- a/src/ShellModel/trans_snt_msnt.jl +++ b/src/ShellModel/trans_snt_msnt.jl @@ -176,37 +176,37 @@ function main_trans_msnt(fn,target_nuc,target_Js=[];similar_to_prevwork=false) trans_snt_msnt(fn,Anum,Mtot,p_sps,n_sps,m_p_sps,msps_n,SPEs,olabels,oTBMEs,similar_to_prevwork) end -function svd_li6(Rvecs) - println("svd_li6 function is called. This is only used for Li6 on the p-shell space.") - dict_sps = Dict(1=>[3,3],2=>[1,1],3=>[1,4],4=>[4,1],5=>[4,4], - 6=>[2,2],7=>[2,5],8=>[5,2],9=>[5,5],10=>[6,6]) - nsps = 6 - Mat = zeros(Float64,nsps,nsps) - for n = 1:length(Rvecs) - Rvec = Rvecs[n] - println("n $n") - for i = 1:length(Rvec) - idxs = dict_sps[i] - Mat[idxs[1],idxs[2]] = Rvec[i] - end - for j = 1:nsps - print_vec("",Mat[j,:];long=true) - end - SVD = LinearAlgebra.svd(Mat) - U = SVD.U; Sig = Diagonal(SVD.S); Vt = SVD.Vt; V = Vt' - println("U") - for j = 1:nsps - print_vec("",U[j,:];long=true) - end - println("Sig") - for j = 1:nsps - print_vec("",Sig[j,:];long=true) - end - println("V") - for j = 1:nsps - print_vec("",V[j,:];long=true) - end - println("") - Mat .= 0.0 - end -end \ No newline at end of file +# function svd_li6(Rvecs) +# println("svd_li6 function is called. This is only used for Li6 on the p-shell space.") +# dict_sps = Dict(1=>[3,3],2=>[1,1],3=>[1,4],4=>[4,1],5=>[4,4], +# 6=>[2,2],7=>[2,5],8=>[5,2],9=>[5,5],10=>[6,6]) +# nsps = 6 +# Mat = zeros(Float64,nsps,nsps) +# for n = 1:length(Rvecs) +# Rvec = Rvecs[n] +# println("n $n") +# for i = 1:length(Rvec) +# idxs = dict_sps[i] +# Mat[idxs[1],idxs[2]] = Rvec[i] +# end +# for j = 1:nsps +# print_vec("",Mat[j,:];long=true) +# end +# SVD = LinearAlgebra.svd(Mat) +# U = SVD.U; Sig = Diagonal(SVD.S); Vt = SVD.Vt; V = Vt' +# println("U") +# for j = 1:nsps +# print_vec("",U[j,:];long=true) +# end +# println("Sig") +# for j = 1:nsps +# print_vec("",Sig[j,:];long=true) +# end +# println("V") +# for j = 1:nsps +# print_vec("",V[j,:];long=true) +# end +# println("") +# Mat .= 0.0 +# end +# end \ No newline at end of file diff --git a/src/ShellModel/transit.jl b/src/ShellModel/transit.jl index 316173bf..84d09378 100644 --- a/src/ShellModel/transit.jl +++ b/src/ShellModel/transit.jl @@ -563,7 +563,7 @@ function transit_main(sntf,target_nuc,jl2,jr2,in_wfs;num_ev_l=100,num_ev_r=100,q to = TimerOutput() Anum = parse(Int64, match(reg,target_nuc).match) - lp,ln,cp,cn,massop,Aref,pow,p_sps,n_sps,SPEs,olabels,oTBMEs,labels,TBMEs = readsnt(sntf,Anum) + lp,ln,cp,cn,massop,Aref,pow,p_sps,n_sps,SPEs,olabels,oTBMEs,labels,TBMEs = readsmsnt(sntf,Anum) hw, bpar = init_ho_by_mass(Anum,1) # mass formula if 16 <= Anum <= 40 hw, bpar = init_ho_by_mass(Anum,2) # 2: mass formula for sd-shell diff --git a/src/ShellModel/variational_ansatz.jl b/src/ShellModel/variational_ansatz.jl index f1fcd2cb..a2f33dcd 100644 --- a/src/ShellModel/variational_ansatz.jl +++ b/src/ShellModel/variational_ansatz.jl @@ -124,12 +124,9 @@ function main_vmc(psi_exact,eigenvals,tdims,msps_p,msps_n, print_vec("",psi_svd[i,:]) end - - # SVD of Hflat #M0idxs = get_M0idxs(pbits,nbits,msps_p,msps_n) #svd_mat(Hflat,M0idxs) - # Check the energies by direct diagonalization of Hflat num_ev = length(eigenvals) diff --git a/src/chiEFTint/main_chiEFTint.jl b/src/chiEFTint/main_chiEFTint.jl index 621dd3d2..2a75aacd 100644 --- a/src/chiEFTint/main_chiEFTint.jl +++ b/src/chiEFTint/main_chiEFTint.jl @@ -16,7 +16,9 @@ The function is exported and can be simply called make_chiEFTint() in your scrip - `fn_params::String` path to file specifying the optional parameters - `write_vmom::Bool` to write out in vmom partial wave channels """ -function make_chiEFTint(;is_show=false,itnum=1,writesnt=true,nucs=[],optimizer="",MPIcomm=false,corenuc="",ref="nucl",Operators=[],fn_params="optional_parameters.jl",write_vmom=false,do_svd=false,do2n3ncalib=false) +function make_chiEFTint(;is_show=false,itnum=1,writesnt=true,nucs=[],optimizer="",MPIcomm=false, + corenuc="",ref="nucl",Operators=[],fn_params="optional_parameters.jl", + write_vmom=false,do_svd=false,do2n3ncalib=false,deuteron_check=false) to = TimerOutput() if (optimizer!="" && nucs != []) || MPIcomm; do2n3ncalib=true; writesnt=false; end io = select_io(MPIcomm,optimizer,nucs) @@ -31,15 +33,16 @@ function make_chiEFTint(;is_show=false,itnum=1,writesnt=true,nucs=[],optimizer=" else println("E(2H): bare = ",@sprintf("%9.6f", BE_d_bare)) end - HFdata = prepHFdata(nucs,ref,["E"],corenuc) + if deuteron_check; return (BE_d_bare + 2.224)^2 < 1.e-6; end + HFdata = prepHFdata(nucs,ref,["E"],corenuc) if do_svd; target_LSJ = [[0,0,0,0],[0,2,1,1],[1,1,1,0],[2,2,0,2]]; svd_vmom(chiEFTobj,target_LSJ); end if write_vmom target_LSJ = [[0,0,1,1],[1,1,1,0],[1,1,0,1],[1,1,1,1],[0,0,0,0],[0,2,1,1],[3,3,1,3]] write_onshell_vmom(chiEFTobj,2,target_LSJ;label="pn"); write_onshell_vmom(chiEFTobj,3,target_LSJ;label="nn") - #momplot(chiEFTobj,2,target_LSJ; fnlabel=ifelse(chiEFTobj.params.srg,"srg","bare")) - #momplot(chiEFTobj,3,target_LSJ; fnlabel=ifelse(chiEFTobj.params.srg,"srg","bare")) + momplot(chiEFTobj,2,target_LSJ; fnlabel=ifelse(chiEFTobj.params.srg,"srg","bare")) + momplot(chiEFTobj,3,target_LSJ; fnlabel=ifelse(chiEFTobj.params.srg,"srg","bare")) end if do2n3ncalib #calibrate 2n3n LECs by HFMBPT diff --git a/src/chiEFTint/read_me3j.jl b/src/chiEFTint/read_me3j.jl index f81449b8..a4c49cba 100644 --- a/src/chiEFTint/read_me3j.jl +++ b/src/chiEFTint/read_me3j.jl @@ -40,7 +40,7 @@ function main_read_me3j(fn_3nf, e1max, e1max_file, e2max_file, e3max, e3max_file @timeit to "count_nreads_File" dict_idxThBME = count_nreads(sps_3b,"File",to) @timeit to "count_me3jgz" count_ME_file = count_me3jgz(sps_3b) println("count_ME (File) $count_ME_file") - @timeit to "read_me3jgz" ThBME = read_me3jgz(fn_3nf, count_ME_file) + @timeit to "read_me3jgz" ThBME = read_me3jgz(fn_3nf, count_ME_file, to) end @timeit to "alloc/store" begin @@ -67,13 +67,13 @@ $(SIGNATURES) Function to read me3j.gz using GZip. The values are stored in a vector ThBME. The ordering of `ThBME` is not considered here. """ -function read_me3jgz(fn,count_ME_file; verbose=false) +function read_me3jgz(fn,count_ME_file, to; verbose=false) isfile(fn) || error("File not found: $fn") size_ME = count_ME_file*8/1024^3 @assert size_ME < 0.9 * (Sys.total_memory() / 2^20 /1024) "# of ThBME=$(size_ME) is beyond available memory" ThBME = zeros(Float64,count_ME_file) stream = GzipDecompressorStream(open(fn)) - for (idx,line) in enumerate(eachline(stream)) + @inbounds for (idx,line) in enumerate(eachline(stream)) idx_i = 1 + (idx-2)*10 idx_f = idx_i + 9 subsize = 10 @@ -85,7 +85,8 @@ function read_me3jgz(fn,count_ME_file; verbose=false) subsize = count_ME_file - idx_i + 1 end for i = 1:subsize - ThBME[idx_i+i-1] = Parsers.parse(Float64, line[16*(i-1)+1:16*i]) + tl = @view line[16*(i-1)+1:16*i] + ThBME[idx_i+i-1] = Parsers.parse(Float64, tl) end end close(stream) diff --git a/src/chiEFTint/struct_const_io.jl b/src/chiEFTint/struct_const_io.jl index dd93d08f..9c7c3f99 100644 --- a/src/chiEFTint/struct_const_io.jl +++ b/src/chiEFTint/struct_const_io.jl @@ -216,7 +216,7 @@ constructor of chiEFTparams, see `chiEFTparams` mutable struct for more details. function init_chiEFTparams(;fn_params="optional_parameters.jl",use_hw_formula = 0,Anum = -1,io=stdout) n_mesh = 50 pmax_fm = 5.0 - emax = 4 + emax = 2 Nnmax= 20 chi_order = 3 calc_NN = true @@ -247,6 +247,7 @@ function init_chiEFTparams(;fn_params="optional_parameters.jl",use_hw_formula = println("Since $fn_params is not found, the default parameters will be used.") println("You can specify the parameters with optional argument, fn_params like make_chiEFTint(;fn_params=\"PATH_TO_YOUR_FILE\").") else + println("option in $fn_params will be used.") read_chiEFT_parameter!(fn_params,params;io=io) end return params @@ -795,15 +796,14 @@ function momplot_from_file(pnrank,tx) heatmap!(fig[2], x_b, x_b, V_b, xlabel=latexstring("p \\ \\mathrm{fm}^{-1}"), ylabel=latexstring("p' \\ \\mathrm{fm}^{-1}"), - c = :jet, grid=:true, clims=(cmin,cmax)) + c = :viridis, grid=:true, clims=(cmin,cmax)) heatmap!(fig[3], x_s, x_s, V_s, xlabel=latexstring("p \\ \\mathrm{fm}^{-1}"), ylabel=latexstring("p' \\ \\mathrm{fm}^{-1}"), - c = :jet, grid=:true, clims=(cmin,cmax)) + c = :viridis, grid=:true, clims=(cmin,cmax)) pntext = cpnrank*":" annotate!(fig[2], 3.5, 4.5, pntext*latex_pw(tx), halign = :left, valign = :bottom, c=:white) - #savefig(fig, "vmom_bare_vs_SRG_chiEFT_"*tx*"_"*cpnrank*".pdf") savefig(fig, "vmom_bare_vs_SRG_chiEFT_"*tx*"_"*cpnrank*".png") return nothing end diff --git a/src/chiEFTint/threebodyforce.jl b/src/chiEFTint/threebodyforce.jl index afabb426..d15d83bd 100644 --- a/src/chiEFTint/threebodyforce.jl +++ b/src/chiEFTint/threebodyforce.jl @@ -108,7 +108,8 @@ function get_ket_JacobiHO(n,l,s,j,t,N,L,J,dJ3,dT3) return ket_JacobiHO(n,l,s,j,t,N,L,J,dJ3,dT3,e1,e2,Eket) end -function test3NF(;param_str="dev",target_LECs=["c1_NNLO","c3_NNLO","c4_NNLO","cD","cE"],fn_params="optional_parameters.jl") +function test3NF(;param_str="dev",target_LECs=["c1_NNLO","c3_NNLO","c4_NNLO","cD","cE"],fn_params="optional_parameters.jl", + is_show=false) to = TimerOutput() io = select_io(false,"",[]) paramsNN = init_chiEFTparams(;io=io,fn_params=fn_params) @@ -121,7 +122,9 @@ function test3NF(;param_str="dev",target_LECs=["c1_NNLO","c3_NNLO","c4_NNLO","cD else @error "main_basis=$main_basis is not supported" end - show(to, allocations = true,compact = false);println("") + if is_show + show(to, allocations = true,compact = false);println("") + end end function make_3b_mesh_mats(pmax3,Np,Nq,Nangle) diff --git a/src/hartreefock.jl/def_struct.jl b/src/hartreefock.jl/def_struct.jl index c300f91f..eb9ca090 100644 --- a/src/hartreefock.jl/def_struct.jl +++ b/src/hartreefock.jl/def_struct.jl @@ -265,7 +265,7 @@ struct Operator end """ -struct `HamiltonianNormalOrdered` +struct `HamiltonianNormalOrdered` mainly called `HFobj` in the code. # Fields - `H::Operator` Hamiltonian operator - `E0::Float64` NO0B of H @@ -287,6 +287,7 @@ struct HamiltonianNormalOrdered e1b_p::Vector{Float64} e1b_n::Vector{Float64} modelspace::ModelSpace + ExpectationValues::Dict{String,Float64} end """ @@ -309,7 +310,7 @@ mutable struct `IMSRGobject` mutable struct IMSRGobject H0::Operator H::Operator - s::Vector{Float64} # [s,ds] + s::Vector{Float64} smax::Float64 dsmax::Float64 maxnormOmega::Float64 @@ -320,6 +321,7 @@ mutable struct IMSRGobject denominatorDelta::Float64 n_written_omega::Vector{Int64} Ncomm::Vector{Int64} + ExpectationValues::Dict{String,Float64} end """ diff --git a/src/hartreefock.jl/main.jl b/src/hartreefock.jl/main.jl index f4abdc66..f54b0c96 100644 --- a/src/hartreefock.jl/main.jl +++ b/src/hartreefock.jl/main.jl @@ -39,7 +39,8 @@ function hf_main(nucs,sntf,hw,emax_calc;verbose=false,Operators=String[],is_show chiEFTparams = init_chiEFTparams(;io=nothing) HFdata = prepHFdata(nucs,ref,["E"],corenuc) @timeit to "prep dWS2n" begin - no_need_9j_HOB = ifelse("Rp2" in Operators, false, true) + need = "Rp2" in Operators || chiEFTparams.BetaCM != 0.0 + no_need_9j_HOB = !need dWS = prep_dWS2n(chiEFTparams,to;emax_calc=max(emax_calc,e1max_file),no_need_9j_HOB=no_need_9j_HOB) end @timeit to "read NNint" begin @@ -511,14 +512,17 @@ function calc_Gamma!(Gamma,sps,Cp,Cn,V2,Chan2b,maxnpq,Object_3NF,rho,dWS) use3NF = Object_3NF.use3BME dim_v3 = ifelse(use3NF, maxnpq, 1) V3NOs = [ zeros(Float64,dim_v3,dim_v3) for i =1:nthreads()] + @threads for ch = 1:nchan tid = threadid() tmp = Chan2b[ch] Tz = tmp.Tz; J=tmp.J; kets = tmp.kets npq = length(kets) - D = @view Ds[tid][1:npq,1:npq]; # D .= 0.0 + D = @view Ds[tid][1:npq,1:npq] dim_v3 = ifelse(use3NF, npq, 1) - V3NO = @view V3NOs[tid][1:dim_v3,1:dim_v3]; V3NO .= 0.0 + v3mat = V3NOs[tid] + V3NO = @view v3mat[1:dim_v3,1:dim_v3] + V3NO .= 0.0 v = V2[ch] for ib = 1:npq i,j = kets[ib] @@ -564,11 +568,10 @@ function calc_Gamma!(Gamma,sps,Cp,Cn,V2,Chan2b,maxnpq,Object_3NF,rho,dWS) if ea + e2bra > E3max; continue; end for b = 1:l_sps ob = sps[b] - jb2 = ob.j eb = 2 * ob.n + ob.l - - if oa.l != ob.l || ja2 != jb2 || oa.tz != ob.tz ; continue; end - if e2ket + eb > E3max; continue; end + if e2ket + eb > E3max; continue; end + if rho[a,b] == 0.0; continue; end + #if oa.l != ob.l || ja2 != jb2 || oa.tz != ob.tz ; continue; end # equiv to rhoab =0 J3min = abs(2*J - ja2) J3max = 2*J + ja2 @@ -588,7 +591,8 @@ function calc_Gamma!(Gamma,sps,Cp,Cn,V2,Chan2b,maxnpq,Object_3NF,rho,dWS) Gam = Gamma[ch] tM = @views M[threadid()][1:npq,1:npq] if use3NF - BLAS.gemm!('N','N',1.0,v+V3NO,D,0.0,tM) + axpy!(1.0,v,V3NO) + BLAS.gemm!('N','N',1.0,V3NO,D,0.0,tM) BLAS.gemm!('T','N',1.0,D,tM,0.0,Gam) else BLAS.gemm!('N','N',1.0,v,D,0.0,tM) @@ -701,7 +705,8 @@ function getHNO(binfo,tHFdata,E0,p_sps,n_sps,occ_p,occ_n,h_p,h_n,rho, E = tmp[1] E[1] = E0+EMP2+EMP3; E[2] = Eexp H0 = Operator([E0],[fp,fn],Gamma,[true],[false]) - return HamiltonianNormalOrdered(H0,E0,EMP2,EMP3,Cp,Cn,e1b_p,e1b_n,modelspace) + ExpectationValues = Dict{String,Float64}( "E_HF" => E0, "EMP2" => EMP2, "EMP3" => EMP3) + return HamiltonianNormalOrdered(H0,E0,EMP2,EMP3,Cp,Cn,e1b_p,e1b_n,modelspace,ExpectationValues) end function get_rho!(rho, rho_p,rho_n) diff --git a/src/hartreefock.jl/operator.jl b/src/hartreefock.jl/operator.jl index f4d5d9ec..91ece709 100644 --- a/src/hartreefock.jl/operator.jl +++ b/src/hartreefock.jl/operator.jl @@ -814,6 +814,8 @@ function eval_rch_imsrg(binfo,Chan1b,Chan2bD,HFobj,IMSRGobj,PandyaObj,dWS,d6j_de Rch2 = Rpp + Rp2 + N/Z *Rn2 + DF Rch = sqrt(Rch2) println("IMSRG point proton radius ",@sprintf("%12.6f", sqrt(Rpp))," charge radius ",@sprintf("%12.6f", Rch)) + IMSRGobj.ExpectationValues["Rp2"] = Rpp + IMSRGobj.ExpectationValues["Rch"] = Rch end return tmpOp end diff --git a/test/HFMBPT_IMSRG_test.jl b/test/HFMBPT_IMSRG_test.jl new file mode 100644 index 00000000..304e6dbf --- /dev/null +++ b/test/HFMBPT_IMSRG_test.jl @@ -0,0 +1,76 @@ +@testset "HFMBPT & VS-IMSRG calculations" begin + hw = 20; emax=2 + nuc = "He4"; core = "He4"; vspace="p-shell" + nucs = ["He4"] + sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" + ## HF-MBPT from snt/snt.bin + @testset "HFMBPT results under bare EM500,hw20,e2,nmesh50" begin + Eref = [1.493, -5.805, 0.395] + HFobj1 = hf_main(nucs,sntf,hw,emax;return_obj=true,verbose=true) + Es1 = [HFobj1.E0, HFobj1.EMP2, HFobj1.EMP3] + println("Eref $Eref") + println("Es1 $Es1") + @testset "HF" begin + @test (Es1[1] - Eref[1])^2 < 1.e-4 + end + @testset "EMP2" begin + @test (Es1[2] - Eref[2])^2 < 1.e-4 + end + @testset "EMP3" begin + @test (Es1[3] - Eref[3])^2 < 1.e-4 + end + @testset "snt & snt.bin must give identical results" begin + tsntf = replace(sntf,".snt.bin" => ".snt") + HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true) + Es2 = [HFobj2.E0, HFobj2.EMP2, HFobj2.EMP3] + @test ((HFobj1.E0-HFobj2.E0)^2 + (HFobj1.EMP2-HFobj2.EMP2)^2 + (HFobj1.EMP3-HFobj2.EMP3)^2) < 1.e-6 + end + end + Eref = -4.05225276 + @testset "IMSRG results under bare EM500,hw20,e2,nmesh50" begin + IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true) + Es = IMSRGobj.H.zerobody[1] + @test abs(Eref-Es[1]) < 1.e-6 + end + @testset "VSIMSRG results under bare EM500,hw20,e2,nmesh50" begin + IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true) + Es = IMSRGobj.H.zerobody[1] + @test abs(Eref - Es[1]) < 1.e-6 + end + + @testset "testing HFMBPT/IMSRG for Rp2 with BetaCM=1.0" begin + nucs = ["He4"] + sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin" + hw = 20 + emax = 2 + IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,Operators=["Rp2"],return_obj=true) + Rp2_ref = 1.559825^2 + @test abs(IMSRGobj.ExpectationValues["Rp2"] - Rp2_ref)^2 < 1.e-6 + end + + @testset "testing DMD" begin + nuc = "He4"; emax = 2; hw = 20 + s_pred = [30.0, 50.0] + ds = 0.25; smin = 15.0 + # generating Omega + sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin" + pid = getpid() + hf_main([nuc],sntf,hw,emax;doIMSRG=true,Hsample=1,fn_params="parameters/optional_parameters_forDMD.jl") + fn_exact = [ "flowOmega/omega_vec_$(pid)$(nuc)_s$(strip(@sprintf("%6.2f",s))).h5" for s in s_pred] + fns = [ "flowOmega/omega_vec_$(pid)$(nuc)_s$(strip(@sprintf("%6.2f",s))).h5" for s = 15.0:ds:20.0] + # generating DMD vectors + trank = 10 + dmd_main(emax, nuc, fns, trank, smin, ds; s_pred=s_pred, fn_exact=fn_exact) + # restart from DMD + for s in s_pred + s_str = strip(@sprintf("%6.2f",s)) + println("s = $s") + println("DMD:") + fns_conv = ["flowOmega/omega_dmdvec_e$(emax)_$(nuc)_s$(s_str).h5"] + hf_main([nuc],sntf,hw,emax;doIMSRG=true, + restart_from_files=[fns_conv,[]], + fn_params="parameters/optional_parameters_forDMD.jl") + end + end + +end \ No newline at end of file diff --git a/test/ShellModel_test.jl b/test/ShellModel_test.jl new file mode 100644 index 00000000..1aedaf0f --- /dev/null +++ b/test/ShellModel_test.jl @@ -0,0 +1,68 @@ +@testset "shell model calculation" begin + @testset "shell model results with VS-IMSRG interaction" begin + Eref = [ -10.720, -8.410] + vs_sntf = "vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt"; n_eigen=2;targetJ=[] + Ens = main_sm(vs_sntf,"Be8",n_eigen,targetJ) + @test ((Eref[1]-Ens[1])^2 + (Eref[2] - Ens[2])^2) < 1.e-6 + end + @testset "shell model results with CKpot" begin + vs_sntf = "interaction_file/ckpot.snt" + Eref = [-31.119,-27.300, -19.162, -18.249, -16.722, -14.925, -14.517, -14.017, -13.951, -13.478] + Ens = main_sm(vs_sntf,"Be8",10,[];q=2,is_block=true) + for i = 1:10 + @test (Eref[i] - Ens[i])^2 < 1.e-6 + end + end + @testset "specifying truncation for occupation numbers" begin + tdict = Dict("n1s1" => [0,1], "n0d5" => [1]) + main_sm("interaction_file/usdb.snt","O18", 1, [0];truncation_scheme="jocc", truncated_jocc=tdict) + end + @testset "pnsystem with pn-pair ansatz" begin + vs_sntf = "interaction_file/ckpot.snt" + main_sm("interaction_file/ckpot.snt","Be8", 1, [0];truncation_scheme="pn-pair") + end + + @testset "transition check" begin + vs_sntf = "interaction_file/ckpot.snt" + main_sm(vs_sntf,"Li6",1,[0]; calc_entropy = true, visualize_occ = true) + main_sm(vs_sntf,"He6",1,[0];save_wav=true) + main_sm(vs_sntf,"He6",1,[4];calc_moment=true, save_wav=true) + jl2 = 0; jr2 = 4 + in_wfs = ["He6_ckpot_j0.wav","He6_ckpot_j4.wav"] + transit_main(vs_sntf,"He6",jl2,jr2,in_wfs; calc_EM=true) + end + @testset "making msnt file for Quantum Calculations" begin + vs_sntf = "interaction_file/ckpot.snt" + @test main_trans_msnt(vs_sntf,"Li6") == nothing + end +end + +@testset "Testing EC on shell model" begin + target_nuc = "O18" + num_ev = 3 + targetJ = 0 + sntpath = "interaction_file/random_snts/" + spath = "wavsamples/" + if !isdir("wavsamples") + mkdir("wavsamples") + end + if !isdir("appwavs") + mkdir("appwavs") + end + + println("sampling...") + mode = "sample" + num_ECsample = 1 + Hs = [ sntpath*"tmp_$i"*".snt" for i = 0:4 ] + @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath,save_wav=true) == nothing + + println("make TDmat...") + num_ECsamples = length(Hs) + mode = "TD" + @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath) == nothing + + println("solving EC") + write_appwav = true + @test solveEC(["interaction_file/usdb.snt"],target_nuc,[[targetJ,num_ev]];write_appwav=true,wpath="./wavsamples",tdmatpath="./tdmat/") == nothing + +end diff --git a/test/caliblation_test.jl b/test/caliblation_test.jl new file mode 100644 index 00000000..b2ff5c62 --- /dev/null +++ b/test/caliblation_test.jl @@ -0,0 +1,6 @@ +@testset "2n3n calibration runnable?" begin + @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="MCMC") + @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="LHS") + @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="BayesOpt") + #@test make_chiEFTint(;nucs=["He4"],itnum=6,optimizer="MCMC",MPIcomm=true) +end diff --git a/test/chiEFTint_test.jl b/test/chiEFTint_test.jl new file mode 100644 index 00000000..873459c5 --- /dev/null +++ b/test/chiEFTint_test.jl @@ -0,0 +1,6 @@ +@testset "generate NN potential" begin + @test make_chiEFTint(;fn_params="parameters/optional_parameters_srg_emn500n4lo_2n3n.jl") + @test make_chiEFTint(;fn_params="parameters/optional_parameters_nnlosat.jl",deuteron_check=true) + @test make_chiEFTint(;fn_params="parameters/optional_parameters.jl") + @test make_chiEFTint(;fn_params="parameters/optional_parameters_snt.jl") +end \ No newline at end of file diff --git a/test/dev_test.jl b/test/dev_test.jl new file mode 100644 index 00000000..c4211659 --- /dev/null +++ b/test/dev_test.jl @@ -0,0 +1,139 @@ +#using LocalCoverage; generate_coverage("NuclearToolkit"; run_test=true) +using NuclearToolkit +using Test +using Printf + +@testset "devDMD" begin + +end + +# @testset "NuclearToolkit.jl" begin +# @testset "generate NN potential" begin +# @test make_chiEFTint(;fn_params="optional_parameters_srg_emn500n4lo_2n3n.jl") +# @test make_chiEFTint(;fn_params="optional_parameters_nnlosat.jl",deuteron_check=true) +# @test make_chiEFTint(;fn_params="optional_parameters.jl") +# @test make_chiEFTint(;fn_params="optional_parameters_snt.jl") +# end + +# @testset "HFMBPT & VS-IMSRG calculations" begin +# hw = 20; emax=2 +# nuc = "He4"; core = "He4"; vspace="p-shell" +# nucs = ["He4"] +# sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" +# ## HF-MBPT from snt/snt.bin +# @testset "HFMBPT results under bare EM500,hw20,e2,nmesh50" begin +# Eref = [1.493, -5.805, 0.395] +# HFobj1 = hf_main(nucs,sntf,hw,emax;return_obj=true,verbose=true) +# Es1 = [HFobj1.E0, HFobj1.EMP2, HFobj1.EMP3] +# println("Eref $Eref") +# println("Es1 $Es1") +# @testset "HF" begin +# @test (Es1[1] - Eref[1])^2 < 1.e-4 +# end +# @testset "EMP2" begin +# @test (Es1[2] - Eref[2])^2 < 1.e-4 +# end +# @testset "EMP3" begin +# @test (Es1[3] - Eref[3])^2 < 1.e-4 +# end +# @testset "snt & snt.bin must give identical results" begin +# tsntf = replace(sntf,".snt.bin" => ".snt") +# HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true) +# Es2 = [HFobj2.E0, HFobj2.EMP2, HFobj2.EMP3] +# @test ((HFobj1.E0-HFobj2.E0)^2 + (HFobj1.EMP2-HFobj2.EMP2)^2 + (HFobj1.EMP3-HFobj2.EMP3)^2) < 1.e-6 +# end +# end +# Eref = -4.05225276 +# @testset "IMSRG results under bare EM500,hw20,e2,nmesh50" begin +# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true) +# Es = IMSRGobj.H.zerobody[1] +# @test abs(Eref-Es[1]) < 1.e-6 +# end +# @testset "VSIMSRG results under bare EM500,hw20,e2,nmesh50" begin +# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true) +# Es = IMSRGobj.H.zerobody[1] +# @test abs(Eref - Es[1]) < 1.e-6 +# end +# end + +# include("./ShellModel_test.jl") + +# @testset "Testing EC on shell model" begin +# target_nuc = "O18" +# num_ev = 3 +# targetJ = 0 +# sntpath = "random_snts/" +# spath = "wavsamples/" +# if !isdir("wavsamples") +# mkdir("wavsamples") +# end +# if !isdir("appwavs") +# mkdir("appwavs") +# end + +# println("sampling...") +# mode = "sample" +# num_ECsample = 1 +# Hs = [ sntpath*"tmp_$i"*".snt" for i = 0:4 ] +# @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath,save_wav=true) == nothing + +# println("make TDmat...") +# num_ECsamples = length(Hs) +# mode = "TD" +# @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath) == nothing + +# println("solving EC") +# write_appwav = true +# @test solveEC(["usdb.snt"],target_nuc,[[targetJ,num_ev]];write_appwav=true,wpath="./wavsamples",tdmatpath="./tdmat/") == nothing + +# end + +# @testset "making msnt file for Quantum Calculations" begin +# @test main_trans_msnt("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt","Li6") == nothing +# end + +# @testset "testing HFMBPT/IMSRG for Rp2 with BetaCM=1.0" begin +# nucs = ["He4"] +# sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin" +# hw = 20 +# emax = 2 +# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,Operators=["Rp2"],return_obj=true) +# #checking Rp2 value from IMSRG calculation +# Rp2_ref = 1.559825^2 +# @test abs(IMSRGobj.ExpectationValues["Rp2"] - Rp2_ref)^2 < 1.e-6 +# end + +# @testset "genuine3NF" begin +# test3NF() +# end +# @testset "2n3n calibration runnable?" begin +# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="MCMC") +# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="LHS") +# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="BayesOpt") +# #@test make_chiEFTint(;nucs=["He4"],itnum=6,optimizer="MCMC",MPIcomm=true) +# end + +# @testset "Reading 3BME file from NuHamil code (by T. Miyagi)" begin +# sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" +# fn_3nf = "small_3BME_N3LOlnl_4_8_4.me3j.gz" +# hw = 16 +# emax = 2; e3max = 4; e1max_file=4; e2max_file=8; e3max_file=4 +# HFobj = hf_main(["He6"],sntf,hw,emax;return_obj=true, +# e1max_file=e1max_file,e2max_file=e2max_file,e3max_file=e3max_file,e3max=e3max,fn_3nf=fn_3nf) +# Es = [HFobj.E0, HFobj.EMP2, HFobj.EMP3] +# Eref = [ 8.160870, -9.58767, -0.82059] +# @test (Es[1] - Eref[1])^2 + (Es[2] - Eref[2])^2 + (Es[3] - Eref[3])^2 < 1.e-7 +# end +# rm("tbme_em500n3lo_barehw20emax2.snt") +# rm("tbme_em500n3lo_barehw20emax2.snt.bin") +# rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt") +# rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.msnt") +# rm("He6_ckpot_j0.wav") +# rm("He6_ckpot_j4.wav") +# rm("flowOmega",recursive=true) +# rm("A3files",recursive=true) +# rm("tdmat",recursive=true) +# rm("wavsamples",recursive=true) +# rm("appwavs",recursive=true) +# end + diff --git a/test/small_3BME_N3LOlnl_4_8_4.me3j.gz b/test/interaction_file/small_3BME_N3LOlnl_4_8_4.me3j.gz similarity index 100% rename from test/small_3BME_N3LOlnl_4_8_4.me3j.gz rename to test/interaction_file/small_3BME_N3LOlnl_4_8_4.me3j.gz diff --git a/test/optional_parameters.jl b/test/parameters/optional_parameters.jl similarity index 94% rename from test/optional_parameters.jl rename to test/parameters/optional_parameters.jl index 74013ff0..29c12a1d 100644 --- a/test/optional_parameters.jl +++ b/test/parameters/optional_parameters.jl @@ -12,3 +12,4 @@ chi_order = 3; pottype="em500n3lo" smax = 500.0 dsmax = 0.5 denominatorDelta=0.0 +BetaCM = 0.0 diff --git a/test/parameters/optional_parameters_forDMD.jl b/test/parameters/optional_parameters_forDMD.jl new file mode 100644 index 00000000..96b108ac --- /dev/null +++ b/test/parameters/optional_parameters_forDMD.jl @@ -0,0 +1,16 @@ +###--- ChiralEFT --- +n_mesh = 50 +emax = 2 +calc_NN = true +calc_3N = false +hw = 20.0 +srg = false +tbme_fmt = "snt.bin" +chi_order = 3; pottype="em500n3lo" + +### --- IMSRG --- +smax = 500.0 +dsmax = 0.25 +denominatorDelta=0.0 +BetaCM = 0.0 +magnusmethod="NS" \ No newline at end of file diff --git a/test/parameters/optional_parameters_nnlosat.jl b/test/parameters/optional_parameters_nnlosat.jl new file mode 100644 index 00000000..745f2df4 --- /dev/null +++ b/test/parameters/optional_parameters_nnlosat.jl @@ -0,0 +1,17 @@ +###--- ChiralEFT --- +n_mesh = 50 +emax = 2 +calc_NN = true +calc_3N = false +hw = 20.0 +srg = false +srg_lambda = 10.0 + +tbme_fmt = "snt.bin" +chi_order = 2; pottype="nnlosat" + +### --- IMSRG --- +smax = 500.0 +dsmax = 0.5 +denominatorDelta=10.0 +BetaCM = 0.0 diff --git a/test/optional_parameters_snt.jl b/test/parameters/optional_parameters_snt.jl similarity index 94% rename from test/optional_parameters_snt.jl rename to test/parameters/optional_parameters_snt.jl index 6252f617..fb5b072b 100644 --- a/test/optional_parameters_snt.jl +++ b/test/parameters/optional_parameters_snt.jl @@ -12,3 +12,4 @@ chi_order = 3; pottype="em500n3lo" smax = 500.0 dsmax = 0.5 denominatorDelta=0.0 +BetaCM = 0.0 \ No newline at end of file diff --git a/test/parameters/optional_parameters_srg_emn500n4lo_2n3n.jl b/test/parameters/optional_parameters_srg_emn500n4lo_2n3n.jl new file mode 100644 index 00000000..0239059e --- /dev/null +++ b/test/parameters/optional_parameters_srg_emn500n4lo_2n3n.jl @@ -0,0 +1,17 @@ +###--- ChiralEFT --- +n_mesh = 50 +emax = 2 +calc_NN = true +calc_3N = true +hw = 20.0 +srg = true +srg_lambda = 10.0 + +tbme_fmt = "snt.bin" +chi_order = 4; pottype="emn500n4lo" + +### --- IMSRG --- +smax = 500.0 +dsmax = 0.5 +denominatorDelta=10.0 +BetaCM = 1.0 diff --git a/test/read_3BME_test.jl b/test/read_3BME_test.jl new file mode 100644 index 00000000..7770b9f7 --- /dev/null +++ b/test/read_3BME_test.jl @@ -0,0 +1,11 @@ +@testset "Reading 3BME file from NuHamil code (by T. Miyagi)" begin + sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" + fn_3nf = "interaction_file/small_3BME_N3LOlnl_4_8_4.me3j.gz" + hw = 16 + emax = 2; e3max = 4; e1max_file=4; e2max_file=8; e3max_file=4 + HFobj = hf_main(["He6"],sntf,hw,emax;return_obj=true, + e1max_file=e1max_file,e2max_file=e2max_file,e3max_file=e3max_file,e3max=e3max,fn_3nf=fn_3nf) + Es = [HFobj.E0, HFobj.EMP2, HFobj.EMP3] + Eref = [ 8.160870, -9.58767, -0.82059] + @test (Es[1] - Eref[1])^2 + (Es[2] - Eref[2])^2 + (Es[3] - Eref[3])^2 < 1.e-7 +end diff --git a/test/runtests.jl b/test/runtests.jl index e9054979..66cb525c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,82 +1,161 @@ +#using LocalCoverage; generate_coverage("NuclearToolkit"; run_test=true) using NuclearToolkit using Test +using Printf -@testset "NuclearToolkit.jl" begin - @testset "generate NN potential" begin - @test make_chiEFTint(;fn_params="optional_parameters.jl") - @test make_chiEFTint(;fn_params="optional_parameters_snt.jl") - end +@testset "NuclearToolkit.jl" begin + include("chiEFTint_test.jl") + include("HFMBPT_IMSRG_test.jl") + include("ShellModel_test.jl") + rm("tdmat",recursive=true) + rm("wavsamples",recursive=true) + rm("appwavs",recursive=true) + rm("He6_ckpot_j0.wav") + rm("He6_ckpot_j4.wav") + rm("interaction_file/ckpot.msnt") - @testset "HFMBPT & VS-IMSRG calculations" begin - hw = 20; emax=2 - nuc = "He4"; core = "He4"; vspace="p-shell" - nucs = ["He4"] - sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" - ## HF-MBPT from snt/snt.bin - @testset "HFMBPT results under bare EM500,hw20,e2,nmesh50" begin - Eref = [1.493, -5.805, 0.395] - HFobj1 = hf_main(nucs,sntf,hw,emax;return_obj=true,verbose=true) - Es1 = [HFobj1.E0, HFobj1.EMP2, HFobj1.EMP3] - println("Eref $Eref") - println("Es1 $Es1") - @testset "HF" begin - @test (Es1[1] - Eref[1])^2 < 1.e-4 - end - @testset "EMP2" begin - @test (Es1[2] - Eref[2])^2 < 1.e-4 - end - @testset "EMP3" begin - @test (Es1[3] - Eref[3])^2 < 1.e-4 - end - @testset "snt & snt.bin must give identical results" begin - tsntf = replace(sntf,".snt.bin" => ".snt") - HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true) - Es2 = [HFobj2.E0, HFobj2.EMP2, HFobj2.EMP3] - @test ((HFobj1.E0-HFobj2.E0)^2 + (HFobj1.EMP2-HFobj2.EMP2)^2 + (HFobj1.EMP3-HFobj2.EMP3)^2) < 1.e-6 - end - end - Eref = -4.05225276 - @testset "IMSRG results under bare EM500,hw20,e2,nmesh50" begin - IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true) - Es = IMSRGobj.H.zerobody[1] - @test abs(Eref-Es[1]) < 1.e-6 - end - @testset "VSIMSRG results under bare EM500,hw20,e2,nmesh50" begin - IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true) - Es = IMSRGobj.H.zerobody[1] - @test abs(Eref - Es[1]) < 1.e-6 - end - @testset "shell model calculation" begin - Eref = [ -10.720, -8.410] - vs_sntf = "vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt"; n_eigen=2;targetJ=[] - Ens = main_sm(vs_sntf,"Be8",n_eigen,targetJ) - @test ((Eref[1]-Ens[1])^2 + (Eref[2] - Ens[2])^2) < 1.e-6 - end - end - @testset "making msnt file for Quantum Calculations" begin - @test main_trans_msnt("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt","Li6") == nothing - end - # @testset "2n3n calibration runnable?" begin - # @test make_chiEFTint(;nucs=["He4"],itnum=5,optimizer="MCMC") - # @test make_chiEFTint(;nucs=["He4"],itnum=5,optimizer="LHS") - # @test make_chiEFTint(;nucs=["He4"],itnum=5,optimizer="BayesOpt") - # @test make_chiEFTint(;nucs=["He4"],itnum=6,optimizer="MCMC",MPIcomm=true) - # end - - @testset "Reading 3BME file from NuHamil code (by T. Miyagi)" begin - sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" - fn_3nf = "small_3BME_N3LOlnl_4_8_4.me3j.gz" - hw = 16 - emax = 2; e3max = 4; e1max_file=4; e2max_file=8; e3max_file=4 - HFobj = hf_main(["He6"],sntf,hw,emax;return_obj=true, - e1max_file=e1max_file,e2max_file=e2max_file,e3max_file=e3max_file,e3max=e3max,fn_3nf=fn_3nf) - Es = [HFobj.E0, HFobj.EMP2, HFobj.EMP3] - Eref = [ 8.160870, -9.58767, -0.82059] - @test (Es[1] - Eref[1])^2 + (Es[2] - Eref[2])^2 + (Es[3] - Eref[3])^2 < 1.e-7 - end + include("read_3BME_test.jl") + + include("threebody_test.jl") + rm("A3files",recursive=true) + + include("caliblation_test.jl") + + rm("tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin") rm("tbme_em500n3lo_barehw20emax2.snt") rm("tbme_em500n3lo_barehw20emax2.snt.bin") rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt") - rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.msnt") rm("flowOmega",recursive=true) + end + +# @testset "NuclearToolkit.jl" begin +# @testset "generate NN potential" begin +# @test make_chiEFTint(;fn_params="optional_parameters_srg_emn500n4lo_2n3n.jl") +# @test make_chiEFTint(;fn_params="optional_parameters_nnlosat.jl",deuteron_check=true) +# @test make_chiEFTint(;fn_params="optional_parameters.jl") +# @test make_chiEFTint(;fn_params="optional_parameters_snt.jl") +# end + +# @testset "HFMBPT & VS-IMSRG calculations" begin +# hw = 20; emax=2 +# nuc = "He4"; core = "He4"; vspace="p-shell" +# nucs = ["He4"] +# sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" +# ## HF-MBPT from snt/snt.bin +# @testset "HFMBPT results under bare EM500,hw20,e2,nmesh50" begin +# Eref = [1.493, -5.805, 0.395] +# HFobj1 = hf_main(nucs,sntf,hw,emax;return_obj=true,verbose=true) +# Es1 = [HFobj1.E0, HFobj1.EMP2, HFobj1.EMP3] +# println("Eref $Eref") +# println("Es1 $Es1") +# @testset "HF" begin +# @test (Es1[1] - Eref[1])^2 < 1.e-4 +# end +# @testset "EMP2" begin +# @test (Es1[2] - Eref[2])^2 < 1.e-4 +# end +# @testset "EMP3" begin +# @test (Es1[3] - Eref[3])^2 < 1.e-4 +# end +# @testset "snt & snt.bin must give identical results" begin +# tsntf = replace(sntf,".snt.bin" => ".snt") +# HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true) +# Es2 = [HFobj2.E0, HFobj2.EMP2, HFobj2.EMP3] +# @test ((HFobj1.E0-HFobj2.E0)^2 + (HFobj1.EMP2-HFobj2.EMP2)^2 + (HFobj1.EMP3-HFobj2.EMP3)^2) < 1.e-6 +# end +# end +# Eref = -4.05225276 +# @testset "IMSRG results under bare EM500,hw20,e2,nmesh50" begin +# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true) +# Es = IMSRGobj.H.zerobody[1] +# @test abs(Eref-Es[1]) < 1.e-6 +# end +# @testset "VSIMSRG results under bare EM500,hw20,e2,nmesh50" begin +# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true) +# Es = IMSRGobj.H.zerobody[1] +# @test abs(Eref - Es[1]) < 1.e-6 +# end +# end + +# include("./ShellModel_test.jl") + +# @testset "Testing EC on shell model" begin +# target_nuc = "O18" +# num_ev = 3 +# targetJ = 0 +# sntpath = "random_snts/" +# spath = "wavsamples/" +# if !isdir("wavsamples") +# mkdir("wavsamples") +# end +# if !isdir("appwavs") +# mkdir("appwavs") +# end + +# println("sampling...") +# mode = "sample" +# num_ECsample = 1 +# Hs = [ sntpath*"tmp_$i"*".snt" for i = 0:4 ] +# @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath,save_wav=true) == nothing + +# println("make TDmat...") +# num_ECsamples = length(Hs) +# mode = "TD" +# @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath) == nothing + +# println("solving EC") +# write_appwav = true +# @test solveEC(["usdb.snt"],target_nuc,[[targetJ,num_ev]];write_appwav=true,wpath="./wavsamples",tdmatpath="./tdmat/") == nothing + +# end + +# @testset "making msnt file for Quantum Calculations" begin +# @test main_trans_msnt("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt","Li6") == nothing +# end + +# @testset "testing HFMBPT/IMSRG for Rp2 with BetaCM=1.0" begin +# nucs = ["He4"] +# sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin" +# hw = 20 +# emax = 2 +# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,Operators=["Rp2"],return_obj=true) +# #checking Rp2 value from IMSRG calculation +# Rp2_ref = 1.559825^2 +# @test abs(IMSRGobj.ExpectationValues["Rp2"] - Rp2_ref)^2 < 1.e-6 +# end + +# @testset "genuine3NF" begin +# test3NF() +# end +# @testset "2n3n calibration runnable?" begin +# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="MCMC") +# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="LHS") +# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="BayesOpt") +# #@test make_chiEFTint(;nucs=["He4"],itnum=6,optimizer="MCMC",MPIcomm=true) +# end + +# @testset "Reading 3BME file from NuHamil code (by T. Miyagi)" begin +# sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" +# fn_3nf = "small_3BME_N3LOlnl_4_8_4.me3j.gz" +# hw = 16 +# emax = 2; e3max = 4; e1max_file=4; e2max_file=8; e3max_file=4 +# HFobj = hf_main(["He6"],sntf,hw,emax;return_obj=true, +# e1max_file=e1max_file,e2max_file=e2max_file,e3max_file=e3max_file,e3max=e3max,fn_3nf=fn_3nf) +# Es = [HFobj.E0, HFobj.EMP2, HFobj.EMP3] +# Eref = [ 8.160870, -9.58767, -0.82059] +# @test (Es[1] - Eref[1])^2 + (Es[2] - Eref[2])^2 + (Es[3] - Eref[3])^2 < 1.e-7 +# end +# rm("tbme_em500n3lo_barehw20emax2.snt") +# rm("tbme_em500n3lo_barehw20emax2.snt.bin") +# rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt") +# rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.msnt") +# rm("He6_ckpot_j0.wav") +# rm("He6_ckpot_j4.wav") +# rm("flowOmega",recursive=true) +# rm("A3files",recursive=true) +# rm("tdmat",recursive=true) +# rm("wavsamples",recursive=true) +# rm("appwavs",recursive=true) +# end + diff --git a/test/threebody_test.jl b/test/threebody_test.jl new file mode 100644 index 00000000..7a7df504 --- /dev/null +++ b/test/threebody_test.jl @@ -0,0 +1,3 @@ +@testset "genuine3NF" begin + test3NF() +end \ No newline at end of file From 79553fd1f3f7327b2dcef8970b7455446e9d2d4d Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 14:30:43 +0900 Subject: [PATCH 02/14] CI*.yml updated --- .github/workflows/CI.yml | 3 ++- .github/workflows/CI_pullrequest.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d38d14f3..0152639c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,7 +29,8 @@ jobs: arch: x64 - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + - name: "Run tests" + run: julia --project -e 'import Pkg; Pkg.test()' env: JULIA_NUM_THREADS: 2 if: ${{ matrix.payload == 'serial' }} diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index 34d7c897..a87de987 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -30,7 +30,9 @@ jobs: arch: x64 - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + #- uses: julia-actions/julia-runtest@v1 + - name: "Run tests" + run: julia --project -e 'import Pkg; Pkg.test()' env: JULIA_NUM_THREADS: 2 if: ${{ matrix.payload == 'serial' }} From f548bee17895901cf494e609fd20eb0cb3e1c0fc Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 14:32:39 +0900 Subject: [PATCH 03/14] CI*.yml updated --- .github/workflows/CI.yml | 8 ++++---- .github/workflows/CI_pullrequest.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0152639c..8937f4ab 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,10 +31,10 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" run: julia --project -e 'import Pkg; Pkg.test()' - env: - JULIA_NUM_THREADS: 2 - if: ${{ matrix.payload == 'serial' }} - continue-on-error: ${{ matrix.version == 'nightly' }} + # env: + # JULIA_NUM_THREADS: 2 + # if: ${{ matrix.payload == 'serial' }} + # continue-on-error: ${{ matrix.version == 'nightly' }} build: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index a87de987..191eaf72 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -33,10 +33,10 @@ jobs: #- uses: julia-actions/julia-runtest@v1 - name: "Run tests" run: julia --project -e 'import Pkg; Pkg.test()' - env: - JULIA_NUM_THREADS: 2 - if: ${{ matrix.payload == 'serial' }} - continue-on-error: ${{ matrix.version == 'nightly' }} + # env: + # JULIA_NUM_THREADS: 2 + # if: ${{ matrix.payload == 'serial' }} + # continue-on-error: ${{ matrix.version == 'nightly' }} build: runs-on: ubuntu-latest strategy: From c6f0e3db83825a880b1009f00e861f9c5c11b41f Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 14:34:19 +0900 Subject: [PATCH 04/14] CI*.yml updated --- .github/workflows/CI.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8937f4ab..aeb36d48 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,12 +29,8 @@ jobs: arch: x64 - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - - name: "Run tests" + - name: "Run tests" run: julia --project -e 'import Pkg; Pkg.test()' - # env: - # JULIA_NUM_THREADS: 2 - # if: ${{ matrix.payload == 'serial' }} - # continue-on-error: ${{ matrix.version == 'nightly' }} build: runs-on: ubuntu-latest strategy: From 39d50b2d6e3d56e1ee57a473724355c374a12747 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 14:41:33 +0900 Subject: [PATCH 05/14] CI*.yml updated --- .github/workflows/CI_pullrequest.yml | 29 ---------------------------- 1 file changed, 29 deletions(-) diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index 191eaf72..5e3fd96f 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -65,35 +65,6 @@ jobs: export PATH=$PATH:/home/runner/.julia/bin mpiexecjl -n 4 julia --depwarn=yes --project=@. ./test/mpirun_test.jl - # build2: - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # include: - # - {version: '1.8', os: ubuntu-latest} - # name: Run sample_script.jl - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - uses: julia-actions/setup-julia@v1 - # with: - # version: ${{ matrix.version }} - # arch: x64 - # - uses: julia-actions/cache@v1 - # - uses: julia-actions/julia-buildpkg@v1 - # - run: | - # git_hash=$(git rev-parse --short "$GITHUB_SHA") - # echo git_hash $git_hash - # echo running on branch ${GITHUB_REF##*/} - # echo git_hash:[$git_hash] > ./example/log_sample_script.txt - # julia --project="@." -t 4 ./example/sample_script.jl >> ./example/log_sample_script.txt - # git add example/log_sample_script.txt - # - name: commit changed logfile - # uses: stefanzweifel/git-auto-commit-action@v4.2.0 - # with: - # commit_message: Update log_sample_script.txt docs: name: Documentation runs-on: ubuntu-latest From ad7a99639a40d855eb15c16a433c039453323ae5 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 14:41:45 +0900 Subject: [PATCH 06/14] CI*.yml updated --- test/mpirun_test.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mpirun_test.jl b/test/mpirun_test.jl index a5f6553e..abffea3c 100644 --- a/test/mpirun_test.jl +++ b/test/mpirun_test.jl @@ -3,6 +3,6 @@ using Test @testset "NuclearToolkit.jl" begin @testset "mpirun" begin - @test make_chiEFTint(;nucs=["He4"],itnum=10,optimizer="MCMC",MPIcomm=true) + @test make_chiEFTint(;nucs=["He4"],itnum=10,optimizer="MCMC",MPIcomm=true,fn_params="parameters/optional_parameters.jl") end end From 5dbfb2a26e97c74e4ac1f71f0598a44fe6478f09 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:04:48 +0900 Subject: [PATCH 07/14] CI*.yml updated --- .github/workflows/CI.yml | 4 +++- .github/workflows/CI_pullrequest.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index aeb36d48..f9a29871 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,7 +30,9 @@ jobs: - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" - run: julia --project -e 'import Pkg; Pkg.test()' + run: | + cp -r test/* . + julia --project -e 'import Pkg; Pkg.test()' build: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index 5e3fd96f..ee63cb4e 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -32,7 +32,9 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 #- uses: julia-actions/julia-runtest@v1 - name: "Run tests" - run: julia --project -e 'import Pkg; Pkg.test()' + run: | + cp -r test/* . + julia --project -e 'import Pkg; Pkg.test()' # env: # JULIA_NUM_THREADS: 2 # if: ${{ matrix.payload == 'serial' }} From 1a564b0feb1d19a4f040e3b522f429f604cec496 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:09:02 +0900 Subject: [PATCH 08/14] CI*.yml updated --- .github/workflows/CI_pullrequest.yml | 2 - test/runtests.jl | 133 +-------------------------- 2 files changed, 3 insertions(+), 132 deletions(-) diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index ee63cb4e..8a34c756 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -30,10 +30,8 @@ jobs: arch: x64 - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - #- uses: julia-actions/julia-runtest@v1 - name: "Run tests" run: | - cp -r test/* . julia --project -e 'import Pkg; Pkg.test()' # env: # JULIA_NUM_THREADS: 2 diff --git a/test/runtests.jl b/test/runtests.jl index 66cb525c..d61762df 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,6 +4,9 @@ using Test using Printf @testset "NuclearToolkit.jl" begin + pwd() + run(`ls test`) + include("chiEFTint_test.jl") include("HFMBPT_IMSRG_test.jl") include("ShellModel_test.jl") @@ -29,133 +32,3 @@ using Printf end -# @testset "NuclearToolkit.jl" begin -# @testset "generate NN potential" begin -# @test make_chiEFTint(;fn_params="optional_parameters_srg_emn500n4lo_2n3n.jl") -# @test make_chiEFTint(;fn_params="optional_parameters_nnlosat.jl",deuteron_check=true) -# @test make_chiEFTint(;fn_params="optional_parameters.jl") -# @test make_chiEFTint(;fn_params="optional_parameters_snt.jl") -# end - -# @testset "HFMBPT & VS-IMSRG calculations" begin -# hw = 20; emax=2 -# nuc = "He4"; core = "He4"; vspace="p-shell" -# nucs = ["He4"] -# sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" -# ## HF-MBPT from snt/snt.bin -# @testset "HFMBPT results under bare EM500,hw20,e2,nmesh50" begin -# Eref = [1.493, -5.805, 0.395] -# HFobj1 = hf_main(nucs,sntf,hw,emax;return_obj=true,verbose=true) -# Es1 = [HFobj1.E0, HFobj1.EMP2, HFobj1.EMP3] -# println("Eref $Eref") -# println("Es1 $Es1") -# @testset "HF" begin -# @test (Es1[1] - Eref[1])^2 < 1.e-4 -# end -# @testset "EMP2" begin -# @test (Es1[2] - Eref[2])^2 < 1.e-4 -# end -# @testset "EMP3" begin -# @test (Es1[3] - Eref[3])^2 < 1.e-4 -# end -# @testset "snt & snt.bin must give identical results" begin -# tsntf = replace(sntf,".snt.bin" => ".snt") -# HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true) -# Es2 = [HFobj2.E0, HFobj2.EMP2, HFobj2.EMP3] -# @test ((HFobj1.E0-HFobj2.E0)^2 + (HFobj1.EMP2-HFobj2.EMP2)^2 + (HFobj1.EMP3-HFobj2.EMP3)^2) < 1.e-6 -# end -# end -# Eref = -4.05225276 -# @testset "IMSRG results under bare EM500,hw20,e2,nmesh50" begin -# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true) -# Es = IMSRGobj.H.zerobody[1] -# @test abs(Eref-Es[1]) < 1.e-6 -# end -# @testset "VSIMSRG results under bare EM500,hw20,e2,nmesh50" begin -# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true) -# Es = IMSRGobj.H.zerobody[1] -# @test abs(Eref - Es[1]) < 1.e-6 -# end -# end - -# include("./ShellModel_test.jl") - -# @testset "Testing EC on shell model" begin -# target_nuc = "O18" -# num_ev = 3 -# targetJ = 0 -# sntpath = "random_snts/" -# spath = "wavsamples/" -# if !isdir("wavsamples") -# mkdir("wavsamples") -# end -# if !isdir("appwavs") -# mkdir("appwavs") -# end - -# println("sampling...") -# mode = "sample" -# num_ECsample = 1 -# Hs = [ sntpath*"tmp_$i"*".snt" for i = 0:4 ] -# @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath,save_wav=true) == nothing - -# println("make TDmat...") -# num_ECsamples = length(Hs) -# mode = "TD" -# @test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath) == nothing - -# println("solving EC") -# write_appwav = true -# @test solveEC(["usdb.snt"],target_nuc,[[targetJ,num_ev]];write_appwav=true,wpath="./wavsamples",tdmatpath="./tdmat/") == nothing - -# end - -# @testset "making msnt file for Quantum Calculations" begin -# @test main_trans_msnt("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt","Li6") == nothing -# end - -# @testset "testing HFMBPT/IMSRG for Rp2 with BetaCM=1.0" begin -# nucs = ["He4"] -# sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin" -# hw = 20 -# emax = 2 -# IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,Operators=["Rp2"],return_obj=true) -# #checking Rp2 value from IMSRG calculation -# Rp2_ref = 1.559825^2 -# @test abs(IMSRGobj.ExpectationValues["Rp2"] - Rp2_ref)^2 < 1.e-6 -# end - -# @testset "genuine3NF" begin -# test3NF() -# end -# @testset "2n3n calibration runnable?" begin -# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="MCMC") -# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="LHS") -# @test make_chiEFTint(;nucs=["He4"],itnum=3,optimizer="BayesOpt") -# #@test make_chiEFTint(;nucs=["He4"],itnum=6,optimizer="MCMC",MPIcomm=true) -# end - -# @testset "Reading 3BME file from NuHamil code (by T. Miyagi)" begin -# sntf = "tbme_em500n3lo_barehw20emax2.snt.bin" -# fn_3nf = "small_3BME_N3LOlnl_4_8_4.me3j.gz" -# hw = 16 -# emax = 2; e3max = 4; e1max_file=4; e2max_file=8; e3max_file=4 -# HFobj = hf_main(["He6"],sntf,hw,emax;return_obj=true, -# e1max_file=e1max_file,e2max_file=e2max_file,e3max_file=e3max_file,e3max=e3max,fn_3nf=fn_3nf) -# Es = [HFobj.E0, HFobj.EMP2, HFobj.EMP3] -# Eref = [ 8.160870, -9.58767, -0.82059] -# @test (Es[1] - Eref[1])^2 + (Es[2] - Eref[2])^2 + (Es[3] - Eref[3])^2 < 1.e-7 -# end -# rm("tbme_em500n3lo_barehw20emax2.snt") -# rm("tbme_em500n3lo_barehw20emax2.snt.bin") -# rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.snt") -# rm("vsimsrg_p-shell_coreHe4refHe4_He4_hw20e2_Delta0.0.msnt") -# rm("He6_ckpot_j0.wav") -# rm("He6_ckpot_j4.wav") -# rm("flowOmega",recursive=true) -# rm("A3files",recursive=true) -# rm("tdmat",recursive=true) -# rm("wavsamples",recursive=true) -# rm("appwavs",recursive=true) -# end - From bbf0fdd8997cb67d863d50a62a25dc74f5791a45 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:12:22 +0900 Subject: [PATCH 09/14] CI*.yml updated --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f9a29871..1c37b7ce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,7 +31,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" run: | - cp -r test/* . julia --project -e 'import Pkg; Pkg.test()' build: runs-on: ubuntu-latest From cb7536141b6dbcd00a5c2630b985dcb72ad708ee Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:18:05 +0900 Subject: [PATCH 10/14] CI*.yml updated --- test/runtests.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index d61762df..f5824e0c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,9 +4,9 @@ using Test using Printf @testset "NuclearToolkit.jl" begin - pwd() - run(`ls test`) - + println("pwd: ", pwd()) + run(`ls *`) + include("chiEFTint_test.jl") include("HFMBPT_IMSRG_test.jl") include("ShellModel_test.jl") From 8546b08031d110eefb8efe296f738e9da1ec3976 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:24:46 +0900 Subject: [PATCH 11/14] CI*.yml updated --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index f5824e0c..699a3925 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ using Printf @testset "NuclearToolkit.jl" begin println("pwd: ", pwd()) - run(`ls *`) + println("readdir() ",readdir()) include("chiEFTint_test.jl") include("HFMBPT_IMSRG_test.jl") From a7f839d43b8dbd4190f401b6cf661a22904b3e07 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:40:27 +0900 Subject: [PATCH 12/14] CI*.yml updated --- .github/workflows/CI.yml | 1 + .github/workflows/CI_pullrequest.yml | 1 + test/HFMBPT_IMSRG_test.jl | 8 ++++---- test/runtests.jl | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1c37b7ce..01884f49 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,6 +31,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" run: | + export JULIA_PROJECT=@. julia --project -e 'import Pkg; Pkg.test()' build: runs-on: ubuntu-latest diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index 8a34c756..b725c814 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -32,6 +32,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" run: | + export JULIA_PROJECT=@. julia --project -e 'import Pkg; Pkg.test()' # env: # JULIA_NUM_THREADS: 2 diff --git a/test/HFMBPT_IMSRG_test.jl b/test/HFMBPT_IMSRG_test.jl index 304e6dbf..49381ea8 100644 --- a/test/HFMBPT_IMSRG_test.jl +++ b/test/HFMBPT_IMSRG_test.jl @@ -21,19 +21,19 @@ end @testset "snt & snt.bin must give identical results" begin tsntf = replace(sntf,".snt.bin" => ".snt") - HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true) + HFobj2 = hf_main(nucs,tsntf,hw,emax;return_obj=true,fn_params="parameters/optional_parameters.jl") Es2 = [HFobj2.E0, HFobj2.EMP2, HFobj2.EMP3] @test ((HFobj1.E0-HFobj2.E0)^2 + (HFobj1.EMP2-HFobj2.EMP2)^2 + (HFobj1.EMP3-HFobj2.EMP3)^2) < 1.e-6 end end Eref = -4.05225276 @testset "IMSRG results under bare EM500,hw20,e2,nmesh50" begin - IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true) + IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,return_obj=true,fn_params="parameters/optional_parameters.jl") Es = IMSRGobj.H.zerobody[1] @test abs(Eref-Es[1]) < 1.e-6 end @testset "VSIMSRG results under bare EM500,hw20,e2,nmesh50" begin - IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true) + IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,corenuc=core,ref="nuc",valencespace=vspace,return_obj=true,fn_params="parameters/optional_parameters.jl") Es = IMSRGobj.H.zerobody[1] @test abs(Eref - Es[1]) < 1.e-6 end @@ -43,7 +43,7 @@ sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin" hw = 20 emax = 2 - IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,Operators=["Rp2"],return_obj=true) + IMSRGobj = hf_main(nucs,sntf,hw,emax;doIMSRG=true,Operators=["Rp2"],return_obj=true,fn_params="parameters/optional_parameters.jl") Rp2_ref = 1.559825^2 @test abs(IMSRGobj.ExpectationValues["Rp2"] - Rp2_ref)^2 < 1.e-6 end diff --git a/test/runtests.jl b/test/runtests.jl index 699a3925..274eb6a4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ using Printf @testset "NuclearToolkit.jl" begin println("pwd: ", pwd()) - println("readdir() ",readdir()) + println("readdir() ",readdir("interaction_file")) include("chiEFTint_test.jl") include("HFMBPT_IMSRG_test.jl") From 29272132b23bf8e47acce23336b42ab6c987b3a2 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 15:47:54 +0900 Subject: [PATCH 13/14] CI*.yml updated --- .github/workflows/CI.yml | 1 - .github/workflows/CI_pullrequest.yml | 1 - .gitignore | 4 +- .gitignore~ | 32 ++++ test/interaction_file/ckpot.snt | 51 ++++++ test/interaction_file/random_snts/tmp_0.snt | 174 ++++++++++++++++++++ test/interaction_file/random_snts/tmp_1.snt | 174 ++++++++++++++++++++ test/interaction_file/random_snts/tmp_2.snt | 174 ++++++++++++++++++++ test/interaction_file/random_snts/tmp_3.snt | 174 ++++++++++++++++++++ test/interaction_file/random_snts/tmp_4.snt | 174 ++++++++++++++++++++ test/interaction_file/usdb.snt | 173 +++++++++++++++++++ 11 files changed, 1128 insertions(+), 4 deletions(-) create mode 100644 .gitignore~ create mode 100644 test/interaction_file/ckpot.snt create mode 100755 test/interaction_file/random_snts/tmp_0.snt create mode 100755 test/interaction_file/random_snts/tmp_1.snt create mode 100755 test/interaction_file/random_snts/tmp_2.snt create mode 100755 test/interaction_file/random_snts/tmp_3.snt create mode 100755 test/interaction_file/random_snts/tmp_4.snt create mode 100644 test/interaction_file/usdb.snt diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 01884f49..1c37b7ce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,7 +31,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" run: | - export JULIA_PROJECT=@. julia --project -e 'import Pkg; Pkg.test()' build: runs-on: ubuntu-latest diff --git a/.github/workflows/CI_pullrequest.yml b/.github/workflows/CI_pullrequest.yml index b725c814..8a34c756 100644 --- a/.github/workflows/CI_pullrequest.yml +++ b/.github/workflows/CI_pullrequest.yml @@ -32,7 +32,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - name: "Run tests" run: | - export JULIA_PROJECT=@. julia --project -e 'import Pkg; Pkg.test()' # env: # JULIA_NUM_THREADS: 2 diff --git a/.gitignore b/.gitignore index 15aeed65..753360a6 100644 --- a/.gitignore +++ b/.gitignore @@ -23,8 +23,8 @@ src/.DS_Store docs/.DS_Store # potential files and Omega generated through IMSRG flows -*.snt -*.snt.bin +tbme*.snt +tbme*.snt.bin /snts /flowOmega logfile.dat diff --git a/.gitignore~ b/.gitignore~ new file mode 100644 index 00000000..15aeed65 --- /dev/null +++ b/.gitignore~ @@ -0,0 +1,32 @@ +# Files generated by invoking Julia with --code-coverage +*.jl.cov +*.jl.*.cov + +# Files generated by invoking Julia with --track-allocation +*.jl.mem + +# System-specific files and directories generated by the BinaryProvider and BinDeps packages +# They contain absolute paths specific to the host computer, and so should not be committed +deps/deps.jl +deps/build.log +deps/downloads/ +deps/usr/ +deps/src/ + +# Build artifacts for creating documentation generated by the Documenter package +docs/build/ +docs/site/ + +# Mac +.DS_Store +src/.DS_Store +docs/.DS_Store + +# potential files and Omega generated through IMSRG flows +*.snt +*.snt.bin +/snts +/flowOmega +logfile.dat +*/logfile.dat + diff --git a/test/interaction_file/ckpot.snt b/test/interaction_file/ckpot.snt new file mode 100644 index 00000000..439832b5 --- /dev/null +++ b/test/interaction_file/ckpot.snt @@ -0,0 +1,51 @@ +! ckpot: Cohen-Kurath int. for p-shell +! assuming a potentical +! S. Cohen and D. Kurath, Nucl. Phys. 73, 1 (1965) +! +! model space + 2 2 2 2 + 1 0 1 1 -1 ! 1 = p 0p_1/2 + 2 0 1 3 -1 ! 2 = p 0p_3/2 + 3 0 1 1 1 ! 3 = n 0p_1/2 + 4 0 1 3 1 ! 4 = n 0p_3/2 +! interaction + 4 0 + 1 1 2.41900 + 2 2 1.12900 + 3 3 2.41900 + 4 4 1.12900 + 34 0 6 + 1 1 1 1 0 0.24400 + 1 1 2 2 0 -5.05260 + 1 2 1 2 1 0.73440 + 1 2 1 2 2 -1.14430 + 1 2 2 2 2 1.74230 + 2 2 2 2 0 -3.32870 + 2 2 2 2 2 0.08780 + 3 3 3 3 0 0.24400 + 3 3 4 4 0 -5.05260 + 3 4 3 4 1 0.73440 + 3 4 3 4 2 -1.14430 + 3 4 4 4 2 1.74230 + 4 4 4 4 0 -3.32870 + 4 4 4 4 2 0.08780 + 1 3 1 3 0 0.24400 + 1 3 1 3 1 -4.29215 + 1 3 1 4 1 -0.85185 + 1 3 2 3 1 0.85185 + 1 3 2 4 0 -5.05260 + 1 3 2 4 1 1.76980 + 1 4 1 4 1 -2.91415 + 2 3 1 4 1 3.64855 + 2 3 2 3 1 -2.91415 + 1 4 1 4 2 -2.60110 + 2 3 1 4 2 -1.45680 + 2 3 2 3 2 -2.60110 + 1 4 2 4 1 -2.26670 + 2 3 2 4 1 2.26670 + 1 4 2 4 2 1.23199 + 2 3 2 4 2 -1.23199 + 2 4 2 4 0 -3.32870 + 2 4 2 4 1 -3.43620 + 2 4 2 4 2 0.08780 + 2 4 2 4 3 -7.26680 diff --git a/test/interaction_file/random_snts/tmp_0.snt b/test/interaction_file/random_snts/tmp_0.snt new file mode 100755 index 00000000..c02dc189 --- /dev/null +++ b/test/interaction_file/random_snts/tmp_0.snt @@ -0,0 +1,174 @@ + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 + 1 1 -3.39031 + 2 2 2.16518 + 3 3 -2.99736 + 4 4 -3.39031 + 5 5 2.16518 + 6 6 -2.99736 + 158 1 18 -0.30000 + 1 1 1 1 0 -0.85530 + 1 1 2 2 0 -2.44906 + 1 1 3 3 0 -2.90590 + 1 2 1 2 1 0.19335 + 1 2 1 2 2 1.53362 + 1 2 1 3 2 -0.94798 + 1 2 2 2 2 1.35368 + 1 2 2 3 1 0.53668 + 1 2 2 3 2 -0.70083 + 1 2 3 3 2 0.17115 + 1 3 1 3 2 0.93041 + 1 3 1 3 3 2.51718 + 1 3 2 2 2 -2.07347 + 1 3 2 3 2 1.19679 + 1 3 2 3 3 -0.39619 + 1 3 3 3 2 -2.01965 + 2 2 2 2 0 -0.83638 + 2 2 2 2 2 -0.59792 + 2 2 2 3 2 -0.33488 + 2 2 3 3 0 -4.51865 + 2 2 3 3 2 -1.15914 + 2 3 2 3 1 2.13584 + 2 3 2 3 2 0.88631 + 2 3 2 3 3 -0.95346 + 2 3 2 3 4 -2.79447 + 2 3 3 3 2 -0.77092 + 2 3 3 3 4 1.21957 + 3 3 3 3 0 -3.73863 + 3 3 3 3 2 0.79213 + 3 3 3 3 4 0.67397 + 1 4 1 4 0 -0.85530 + 1 4 1 4 1 -5.10957 + 1 4 1 5 1 0.67866 + 1 4 2 4 1 -0.67866 + 1 4 2 5 0 -2.44906 + 1 4 2 5 1 -0.52991 + 1 4 2 6 1 -1.62673 + 1 4 3 5 1 1.62673 + 1 4 3 6 0 -2.90590 + 1 4 3 6 1 0.47921 + 1 5 1 5 1 -1.44498 + 1 5 1 5 2 -1.13746 + 1 5 1 6 2 -0.07124 + 1 5 2 4 1 1.63832 + 1 5 2 4 2 -2.67107 + 1 5 2 5 1 0.03403 + 1 5 2 5 2 0.95719 + 1 5 2 6 1 1.28495 + 1 5 2 6 2 0.22084 + 1 5 3 4 2 -0.87673 + 1 5 3 5 1 -0.74827 + 1 5 3 5 2 0.92166 + 1 5 3 6 1 -0.56220 + 1 5 3 6 2 0.12102 + 1 6 1 6 2 0.27005 + 1 6 1 6 3 -0.15691 + 1 6 2 4 2 0.87673 + 1 6 2 5 2 -1.46616 + 1 6 2 5 3 -1.02327 + 1 6 2 6 2 0.68344 + 1 6 2 6 3 -0.80586 + 1 6 3 4 2 0.66035 + 1 6 3 4 3 -2.67409 + 1 6 3 5 2 -0.51335 + 1 6 3 5 3 0.40967 + 1 6 3 6 2 -1.42811 + 1 6 3 6 3 -2.02850 + 2 4 2 4 1 -1.44498 + 2 4 2 4 2 -1.13746 + 2 4 2 5 1 -0.03403 + 2 4 2 5 2 -0.95719 + 2 4 2 6 1 -0.74827 + 2 4 2 6 2 0.92166 + 2 4 3 4 2 0.07124 + 2 4 3 5 1 1.28495 + 2 4 3 5 2 0.22084 + 2 4 3 6 1 0.56220 + 2 4 3 6 2 -0.12102 + 2 5 2 5 0 -0.83638 + 2 5 2 5 1 -1.58987 + 2 5 2 5 2 -0.59792 + 2 5 2 5 3 -3.29542 + 2 5 2 6 1 -0.96387 + 2 5 2 6 2 -0.23679 + 2 5 2 6 3 -1.22747 + 2 5 3 4 2 -1.46616 + 2 5 3 4 3 -1.02327 + 2 5 3 5 1 0.96387 + 2 5 3 5 2 0.23679 + 2 5 3 5 3 1.22747 + 2 5 3 6 0 -4.51865 + 2 5 3 6 1 1.61539 + 2 5 3 6 2 -1.15914 + 2 5 3 6 3 0.49426 + 2 6 2 6 1 -2.60685 + 2 6 2 6 2 -0.99035 + 2 6 2 6 3 -1.75842 + 2 6 2 6 4 -4.31990 + 2 6 3 4 2 0.51335 + 2 6 3 4 3 -0.40967 + 2 6 3 5 1 4.74269 + 2 6 3 5 2 -1.87666 + 2 6 3 5 3 0.80496 + 2 6 3 5 4 -1.52544 + 2 6 3 6 1 -3.24348 + 2 6 3 6 2 -0.54513 + 2 6 3 6 3 -1.49610 + 2 6 3 6 4 0.86237 + 3 4 3 4 2 0.27005 + 3 4 3 4 3 -0.15691 + 3 4 3 5 2 -0.68344 + 3 4 3 5 3 0.80586 + 3 4 3 6 2 -1.42811 + 3 4 3 6 3 -2.02850 + 3 5 3 5 1 -2.60685 + 3 5 3 5 2 -0.99035 + 3 5 3 5 3 -1.75842 + 3 5 3 5 4 -4.31990 + 3 5 3 6 1 3.24348 + 3 5 3 6 2 0.54513 + 3 5 3 6 3 1.49610 + 3 5 3 6 4 -0.86237 + 3 6 3 6 0 -3.73863 + 3 6 3 6 1 -0.47646 + 3 6 3 6 2 0.79213 + 3 6 3 6 3 -0.62826 + 3 6 3 6 4 0.67397 + 3 6 3 6 5 -6.21546 + 4 4 4 4 0 -0.85530 + 4 4 5 5 0 -2.44906 + 4 4 6 6 0 -2.90590 + 4 5 4 5 1 0.19335 + 4 5 4 5 2 1.53362 + 4 5 4 6 2 -0.94798 + 4 5 5 5 2 1.35368 + 4 5 5 6 1 0.53668 + 4 5 5 6 2 -0.70083 + 4 5 6 6 2 0.17115 + 4 6 4 6 2 0.93041 + 4 6 4 6 3 2.51718 + 4 6 5 5 2 -2.07347 + 4 6 5 6 2 1.19679 + 4 6 5 6 3 -0.39619 + 4 6 6 6 2 -2.01965 + 5 5 5 5 0 -0.83638 + 5 5 5 5 2 -0.59792 + 5 5 5 6 2 -0.33488 + 5 5 6 6 0 -4.51865 + 5 5 6 6 2 -1.15914 + 5 6 5 6 1 2.13584 + 5 6 5 6 2 0.88631 + 5 6 5 6 3 -0.95346 + 5 6 5 6 4 -2.79447 + 5 6 6 6 2 -0.77092 + 5 6 6 6 4 1.21957 + 6 6 6 6 0 -3.73863 + 6 6 6 6 2 0.79213 + 6 6 6 6 4 0.67397 + diff --git a/test/interaction_file/random_snts/tmp_1.snt b/test/interaction_file/random_snts/tmp_1.snt new file mode 100755 index 00000000..9835c5ad --- /dev/null +++ b/test/interaction_file/random_snts/tmp_1.snt @@ -0,0 +1,174 @@ + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 + 1 1 -3.11411 + 2 2 2.32651 + 3 3 -5.19791 + 4 4 -3.11411 + 5 5 2.32651 + 6 6 -5.19791 + 158 1 18 -0.30000 + 1 1 1 1 0 -1.16210 + 1 1 2 2 0 -0.95520 + 1 1 3 3 0 -0.95479 + 1 2 1 2 1 -0.82418 + 1 2 1 2 2 -0.28149 + 1 2 1 3 2 -2.62177 + 1 2 2 2 2 -0.73189 + 1 2 2 3 1 -1.44062 + 1 2 2 3 2 0.48191 + 1 2 3 3 2 -1.60496 + 1 3 1 3 2 -1.13791 + 1 3 1 3 3 1.25993 + 1 3 2 2 2 0.86473 + 1 3 2 3 2 1.45260 + 1 3 2 3 3 1.29470 + 1 3 3 3 2 0.39682 + 2 2 2 2 0 -2.30881 + 2 2 2 2 2 0.84834 + 2 2 2 3 2 -0.75410 + 2 2 3 3 0 -3.98320 + 2 2 3 3 2 -1.91741 + 2 3 2 3 1 0.34031 + 2 3 2 3 2 -0.33291 + 2 3 2 3 3 -0.35535 + 2 3 2 3 4 -1.80323 + 2 3 3 3 2 -1.56657 + 2 3 3 3 4 2.51511 + 3 3 3 3 0 -4.48312 + 3 3 3 3 2 0.60193 + 3 3 3 3 4 -0.86286 + 1 4 1 4 0 -1.16210 + 1 4 1 4 1 -3.81447 + 1 4 1 5 1 2.05076 + 1 4 2 4 1 -2.05076 + 1 4 2 5 0 -0.95520 + 1 4 2 5 1 1.34756 + 1 4 2 6 1 -2.71800 + 1 4 3 5 1 2.71800 + 1 4 3 6 0 -0.95479 + 1 4 3 6 1 -2.51171 + 1 5 1 5 1 -3.33314 + 1 5 1 5 2 -1.37988 + 1 5 1 6 2 -0.09099 + 1 5 2 4 1 2.50896 + 1 5 2 4 2 -1.09839 + 1 5 2 5 1 0.97336 + 1 5 2 5 2 -0.51753 + 1 5 2 6 1 -0.33346 + 1 5 2 6 2 -0.28136 + 1 5 3 4 2 -2.53078 + 1 5 3 5 1 -1.10716 + 1 5 3 5 2 -0.76327 + 1 5 3 6 1 -1.03417 + 1 5 3 6 2 -1.13488 + 1 6 1 6 2 -1.20573 + 1 6 1 6 3 -0.65220 + 1 6 2 4 2 2.53078 + 1 6 2 5 2 0.61146 + 1 6 2 5 3 -0.57125 + 1 6 2 6 2 1.25457 + 1 6 2 6 3 -0.77685 + 1 6 3 4 2 0.06782 + 1 6 3 4 3 -1.91213 + 1 6 3 5 2 -0.19803 + 1 6 3 5 3 2.07155 + 1 6 3 6 2 0.28059 + 1 6 3 6 3 -0.24622 + 2 4 2 4 1 -3.33314 + 2 4 2 4 2 -1.37988 + 2 4 2 5 1 -0.97336 + 2 4 2 5 2 0.51753 + 2 4 2 6 1 -1.10716 + 2 4 2 6 2 -0.76327 + 2 4 3 4 2 0.09099 + 2 4 3 5 1 -0.33346 + 2 4 3 5 2 -0.28136 + 2 4 3 6 1 1.03417 + 2 4 3 6 2 1.13488 + 2 5 2 5 0 -2.30881 + 2 5 2 5 1 -1.25010 + 2 5 2 5 2 0.84834 + 2 5 2 5 3 -4.82501 + 2 5 2 6 1 0.11574 + 2 5 2 6 2 -0.53323 + 2 5 2 6 3 -1.80311 + 2 5 3 4 2 0.61146 + 2 5 3 4 3 -0.57125 + 2 5 3 5 1 -0.11574 + 2 5 3 5 2 0.53323 + 2 5 3 5 3 1.80311 + 2 5 3 6 0 -3.98320 + 2 5 3 6 1 0.31280 + 2 5 3 6 2 -1.91741 + 2 5 3 6 3 2.17059 + 2 6 2 6 1 -2.45876 + 2 6 2 6 2 -2.02932 + 2 6 2 6 3 -1.14994 + 2 6 2 6 4 -3.94203 + 2 6 3 4 2 0.19803 + 2 6 3 4 3 -2.07155 + 2 6 3 5 1 2.79907 + 2 6 3 5 2 -1.69641 + 2 6 3 5 3 0.79459 + 2 6 3 5 4 -2.13881 + 2 6 3 6 1 -2.37028 + 2 6 3 6 2 -1.10773 + 2 6 3 6 3 -1.10047 + 2 6 3 6 4 1.77845 + 3 4 3 4 2 -1.20573 + 3 4 3 4 3 -0.65220 + 3 4 3 5 2 -1.25457 + 3 4 3 5 3 0.77685 + 3 4 3 6 2 0.28059 + 3 4 3 6 3 -0.24622 + 3 5 3 5 1 -2.45876 + 3 5 3 5 2 -2.02932 + 3 5 3 5 3 -1.14994 + 3 5 3 5 4 -3.94203 + 3 5 3 6 1 2.37028 + 3 5 3 6 2 1.10773 + 3 5 3 6 3 1.10047 + 3 5 3 6 4 -1.77845 + 3 6 3 6 0 -4.48312 + 3 6 3 6 1 -1.35452 + 3 6 3 6 2 0.60193 + 3 6 3 6 3 -1.47586 + 3 6 3 6 4 -0.86286 + 3 6 3 6 5 -5.75420 + 4 4 4 4 0 -1.16210 + 4 4 5 5 0 -0.95520 + 4 4 6 6 0 -0.95479 + 4 5 4 5 1 -0.82418 + 4 5 4 5 2 -0.28149 + 4 5 4 6 2 -2.62177 + 4 5 5 5 2 -0.73189 + 4 5 5 6 1 -1.44062 + 4 5 5 6 2 0.48191 + 4 5 6 6 2 -1.60496 + 4 6 4 6 2 -1.13791 + 4 6 4 6 3 1.25993 + 4 6 5 5 2 0.86473 + 4 6 5 6 2 1.45260 + 4 6 5 6 3 1.29470 + 4 6 6 6 2 0.39682 + 5 5 5 5 0 -2.30881 + 5 5 5 5 2 0.84834 + 5 5 5 6 2 -0.75410 + 5 5 6 6 0 -3.98320 + 5 5 6 6 2 -1.91741 + 5 6 5 6 1 0.34031 + 5 6 5 6 2 -0.33291 + 5 6 5 6 3 -0.35535 + 5 6 5 6 4 -1.80323 + 5 6 6 6 2 -1.56657 + 5 6 6 6 4 2.51511 + 6 6 6 6 0 -4.48312 + 6 6 6 6 2 0.60193 + 6 6 6 6 4 -0.86286 + diff --git a/test/interaction_file/random_snts/tmp_2.snt b/test/interaction_file/random_snts/tmp_2.snt new file mode 100755 index 00000000..66178188 --- /dev/null +++ b/test/interaction_file/random_snts/tmp_2.snt @@ -0,0 +1,174 @@ + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 + 1 1 -3.33711 + 2 2 0.73586 + 3 3 -2.17079 + 4 4 -3.33711 + 5 5 0.73586 + 6 6 -2.17079 + 158 1 18 -0.30000 + 1 1 1 1 0 -3.66830 + 1 1 2 2 0 -2.65718 + 1 1 3 3 0 -0.37510 + 1 2 1 2 1 -0.28821 + 1 2 1 2 2 -1.31554 + 1 2 1 3 2 -2.72110 + 1 2 2 2 2 0.18505 + 1 2 2 3 1 -1.61671 + 1 2 2 3 2 1.28700 + 1 2 3 3 2 0.85687 + 1 3 1 3 2 0.03678 + 1 3 1 3 3 1.23724 + 1 3 2 2 2 -0.96625 + 1 3 2 3 2 2.08237 + 1 3 2 3 3 1.80142 + 1 3 3 3 2 -0.22802 + 2 2 2 2 0 -1.66212 + 2 2 2 2 2 0.28236 + 2 2 2 3 2 1.21019 + 2 2 3 3 0 -4.13853 + 2 2 3 3 2 -1.54358 + 2 3 2 3 1 2.18852 + 2 3 2 3 2 0.40706 + 2 3 2 3 3 -1.04027 + 2 3 2 3 4 -0.03440 + 2 3 3 3 2 2.11082 + 2 3 3 3 4 3.11370 + 3 3 3 3 0 -1.66980 + 3 3 3 3 2 0.87222 + 3 3 3 3 4 -2.16752 + 1 4 1 4 0 -3.66830 + 1 4 1 4 1 -3.19706 + 1 4 1 5 1 -0.72558 + 1 4 2 4 1 0.72558 + 1 4 2 5 0 -2.65718 + 1 4 2 5 1 -1.43867 + 1 4 2 6 1 -2.49160 + 1 4 3 5 1 2.49160 + 1 4 3 6 0 -0.37510 + 1 4 3 6 1 -0.47933 + 1 5 1 5 1 -1.25999 + 1 5 1 5 2 -2.09800 + 1 5 1 6 2 0.72817 + 1 5 2 4 1 0.97178 + 1 5 2 4 2 -0.78246 + 1 5 2 5 1 -0.62951 + 1 5 2 5 2 0.13085 + 1 5 2 6 1 -0.17683 + 1 5 2 6 2 0.33055 + 1 5 3 4 2 -3.44927 + 1 5 3 5 1 -1.43988 + 1 5 3 5 2 -0.95645 + 1 5 3 6 1 -0.28497 + 1 5 3 6 2 0.60590 + 1 6 1 6 2 0.51125 + 1 6 1 6 3 -2.16888 + 1 6 2 4 2 3.44927 + 1 6 2 5 2 -0.68324 + 1 6 2 5 3 1.22035 + 1 6 2 6 2 0.96565 + 1 6 2 6 3 0.93866 + 1 6 3 4 2 -0.47447 + 1 6 3 4 3 -3.40612 + 1 6 3 5 2 -1.11672 + 1 6 3 5 3 0.86276 + 1 6 3 6 2 -0.16123 + 1 6 3 6 3 -0.20132 + 2 4 2 4 1 -1.25999 + 2 4 2 4 2 -2.09800 + 2 4 2 5 1 0.62951 + 2 4 2 5 2 -0.13085 + 2 4 2 6 1 -1.43988 + 2 4 2 6 2 -0.95645 + 2 4 3 4 2 -0.72817 + 2 4 3 5 1 -0.17683 + 2 4 3 5 2 0.33055 + 2 4 3 6 1 0.28497 + 2 4 3 6 2 -0.60590 + 2 5 2 5 0 -1.66212 + 2 5 2 5 1 -3.17580 + 2 5 2 5 2 0.28236 + 2 5 2 5 3 -2.90122 + 2 5 2 6 1 -0.90881 + 2 5 2 6 2 0.85573 + 2 5 2 6 3 -0.13958 + 2 5 3 4 2 -0.68324 + 2 5 3 4 3 1.22035 + 2 5 3 5 1 0.90881 + 2 5 3 5 2 -0.85573 + 2 5 3 5 3 0.13958 + 2 5 3 6 0 -4.13853 + 2 5 3 6 1 2.50512 + 2 5 3 6 2 -1.54358 + 2 5 3 6 3 2.31386 + 2 6 2 6 1 -1.77714 + 2 6 2 6 2 -1.27639 + 2 6 2 6 3 -1.65448 + 2 6 2 6 4 -3.30990 + 2 6 3 4 2 1.11672 + 2 6 3 4 3 -0.86276 + 2 6 3 5 1 3.96566 + 2 6 3 5 2 -1.68345 + 2 6 3 5 3 0.61421 + 2 6 3 5 4 -3.27549 + 2 6 3 6 1 -1.17205 + 2 6 3 6 2 1.49257 + 2 6 3 6 3 -1.23641 + 2 6 3 6 4 2.20172 + 3 4 3 4 2 0.51125 + 3 4 3 4 3 -2.16888 + 3 4 3 5 2 -0.96565 + 3 4 3 5 3 -0.93866 + 3 4 3 6 2 -0.16123 + 3 4 3 6 3 -0.20132 + 3 5 3 5 1 -1.77714 + 3 5 3 5 2 -1.27639 + 3 5 3 5 3 -1.65448 + 3 5 3 5 4 -3.30990 + 3 5 3 6 1 1.17205 + 3 5 3 6 2 -1.49257 + 3 5 3 6 3 1.23641 + 3 5 3 6 4 -2.20172 + 3 6 3 6 0 -1.66980 + 3 6 3 6 1 -0.92519 + 3 6 3 6 2 0.87222 + 3 6 3 6 3 -0.91172 + 3 6 3 6 4 -2.16752 + 3 6 3 6 5 -5.47564 + 4 4 4 4 0 -3.66830 + 4 4 5 5 0 -2.65718 + 4 4 6 6 0 -0.37510 + 4 5 4 5 1 -0.28821 + 4 5 4 5 2 -1.31554 + 4 5 4 6 2 -2.72110 + 4 5 5 5 2 0.18505 + 4 5 5 6 1 -1.61671 + 4 5 5 6 2 1.28700 + 4 5 6 6 2 0.85687 + 4 6 4 6 2 0.03678 + 4 6 4 6 3 1.23724 + 4 6 5 5 2 -0.96625 + 4 6 5 6 2 2.08237 + 4 6 5 6 3 1.80142 + 4 6 6 6 2 -0.22802 + 5 5 5 5 0 -1.66212 + 5 5 5 5 2 0.28236 + 5 5 5 6 2 1.21019 + 5 5 6 6 0 -4.13853 + 5 5 6 6 2 -1.54358 + 5 6 5 6 1 2.18852 + 5 6 5 6 2 0.40706 + 5 6 5 6 3 -1.04027 + 5 6 5 6 4 -0.03440 + 5 6 6 6 2 2.11082 + 5 6 6 6 4 3.11370 + 6 6 6 6 0 -1.66980 + 6 6 6 6 2 0.87222 + 6 6 6 6 4 -2.16752 + diff --git a/test/interaction_file/random_snts/tmp_3.snt b/test/interaction_file/random_snts/tmp_3.snt new file mode 100755 index 00000000..996d080d --- /dev/null +++ b/test/interaction_file/random_snts/tmp_3.snt @@ -0,0 +1,174 @@ + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 + 1 1 -1.92377 + 2 2 3.28229 + 3 3 -5.80679 + 4 4 -1.92377 + 5 5 3.28229 + 6 6 -5.80679 + 158 1 18 -0.30000 + 1 1 1 1 0 -0.32670 + 1 1 2 2 0 -0.64562 + 1 1 3 3 0 -0.82558 + 1 2 1 2 1 1.56425 + 1 2 1 2 2 1.35874 + 1 2 1 3 2 0.36920 + 1 2 2 2 2 -1.56710 + 1 2 2 3 1 -0.67035 + 1 2 2 3 2 1.60326 + 1 2 3 3 2 -0.54345 + 1 3 1 3 2 -2.33236 + 1 3 1 3 3 -0.02109 + 1 3 2 2 2 0.44140 + 1 3 2 3 2 1.91953 + 1 3 2 3 3 1.56775 + 1 3 3 3 2 -1.77268 + 2 2 2 2 0 -3.42913 + 2 2 2 2 2 0.94661 + 2 2 2 3 2 0.26711 + 2 2 3 3 0 -1.73124 + 2 2 3 3 2 -1.13620 + 2 3 2 3 1 -0.83247 + 2 3 2 3 2 0.05087 + 2 3 2 3 3 0.31459 + 2 3 2 3 4 -1.32076 + 2 3 3 3 2 0.63654 + 2 3 3 3 4 2.64069 + 3 3 3 3 0 -0.82633 + 3 3 3 3 2 0.70313 + 3 3 3 3 4 0.54036 + 1 4 1 4 0 -0.32670 + 1 4 1 4 1 -2.50882 + 1 4 1 5 1 -0.68530 + 1 4 2 4 1 0.68530 + 1 4 2 5 0 -0.64562 + 1 4 2 5 1 -0.26442 + 1 4 2 6 1 -2.08895 + 1 4 3 5 1 2.08895 + 1 4 3 6 0 -0.82558 + 1 4 3 6 1 0.23635 + 1 5 1 5 1 -1.17007 + 1 5 1 5 2 -1.03741 + 1 5 1 6 2 2.14787 + 1 5 2 4 1 2.73433 + 1 5 2 4 2 -2.39615 + 1 5 2 5 1 0.41781 + 1 5 2 5 2 -1.10811 + 1 5 2 6 1 1.10097 + 1 5 2 6 2 1.03655 + 1 5 3 4 2 -1.77867 + 1 5 3 5 1 -1.77132 + 1 5 3 5 2 -0.56671 + 1 5 3 6 1 -0.01466 + 1 5 3 6 2 -0.38428 + 1 6 1 6 2 -2.02917 + 1 6 1 6 3 -2.30003 + 1 6 2 4 2 1.77867 + 1 6 2 5 2 0.31211 + 1 6 2 5 3 -1.16909 + 1 6 2 6 2 1.64407 + 1 6 2 6 3 -0.74928 + 1 6 3 4 2 -0.30319 + 1 6 3 4 3 -2.27894 + 1 6 3 5 2 -0.27546 + 1 6 3 5 3 2.31703 + 1 6 3 6 2 -1.25347 + 1 6 3 6 3 0.19491 + 2 4 2 4 1 -1.17007 + 2 4 2 4 2 -1.03741 + 2 4 2 5 1 -0.41781 + 2 4 2 5 2 1.10811 + 2 4 2 6 1 -1.77132 + 2 4 2 6 2 -0.56671 + 2 4 3 4 2 -2.14787 + 2 4 3 5 1 1.10097 + 2 4 3 5 2 1.03655 + 2 4 3 6 1 0.01466 + 2 4 3 6 2 0.38428 + 2 5 2 5 0 -3.42913 + 2 5 2 5 1 -1.72961 + 2 5 2 5 2 0.94661 + 2 5 2 5 3 -1.25187 + 2 5 2 6 1 -0.98753 + 2 5 2 6 2 0.18887 + 2 5 2 6 3 -2.41566 + 2 5 3 4 2 0.31211 + 2 5 3 4 3 -1.16909 + 2 5 3 5 1 0.98753 + 2 5 3 5 2 -0.18887 + 2 5 3 5 3 2.41566 + 2 5 3 6 0 -1.73124 + 2 5 3 6 1 2.64170 + 2 5 3 6 2 -1.13620 + 2 5 3 6 3 2.99122 + 2 6 2 6 1 -3.90863 + 2 6 2 6 2 -2.76463 + 2 6 2 6 3 -0.90887 + 2 6 2 6 4 -3.68712 + 2 6 3 4 2 0.27546 + 2 6 3 4 3 -2.31703 + 2 6 3 5 1 3.07616 + 2 6 3 5 2 -2.81550 + 2 6 3 5 3 1.22346 + 2 6 3 5 4 -2.36636 + 2 6 3 6 1 -1.77025 + 2 6 3 6 2 0.45010 + 2 6 3 6 3 -1.63300 + 2 6 3 6 4 1.86725 + 3 4 3 4 2 -2.02917 + 3 4 3 4 3 -2.30003 + 3 4 3 5 2 -1.64407 + 3 4 3 5 3 0.74928 + 3 4 3 6 2 -1.25347 + 3 4 3 6 3 0.19491 + 3 5 3 5 1 -3.90863 + 3 5 3 5 2 -2.76463 + 3 5 3 5 3 -0.90887 + 3 5 3 5 4 -3.68712 + 3 5 3 6 1 1.77025 + 3 5 3 6 2 -0.45010 + 3 5 3 6 3 1.63300 + 3 5 3 6 4 -1.86725 + 3 6 3 6 0 -0.82633 + 3 6 3 6 1 -0.69179 + 3 6 3 6 2 0.70313 + 3 6 3 6 3 -0.06869 + 3 6 3 6 4 0.54036 + 3 6 3 6 5 -3.71394 + 4 4 4 4 0 -0.32670 + 4 4 5 5 0 -0.64562 + 4 4 6 6 0 -0.82558 + 4 5 4 5 1 1.56425 + 4 5 4 5 2 1.35874 + 4 5 4 6 2 0.36920 + 4 5 5 5 2 -1.56710 + 4 5 5 6 1 -0.67035 + 4 5 5 6 2 1.60326 + 4 5 6 6 2 -0.54345 + 4 6 4 6 2 -2.33236 + 4 6 4 6 3 -0.02109 + 4 6 5 5 2 0.44140 + 4 6 5 6 2 1.91953 + 4 6 5 6 3 1.56775 + 4 6 6 6 2 -1.77268 + 5 5 5 5 0 -3.42913 + 5 5 5 5 2 0.94661 + 5 5 5 6 2 0.26711 + 5 5 6 6 0 -1.73124 + 5 5 6 6 2 -1.13620 + 5 6 5 6 1 -0.83247 + 5 6 5 6 2 0.05087 + 5 6 5 6 3 0.31459 + 5 6 5 6 4 -1.32076 + 5 6 6 6 2 0.63654 + 5 6 6 6 4 2.64069 + 6 6 6 6 0 -0.82633 + 6 6 6 6 2 0.70313 + 6 6 6 6 4 0.54036 + diff --git a/test/interaction_file/random_snts/tmp_4.snt b/test/interaction_file/random_snts/tmp_4.snt new file mode 100755 index 00000000..24b19a93 --- /dev/null +++ b/test/interaction_file/random_snts/tmp_4.snt @@ -0,0 +1,174 @@ + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 + 1 1 -1.65911 + 2 2 0.62205 + 3 3 -5.34834 + 4 4 -1.65911 + 5 5 0.62205 + 6 6 -5.34834 + 158 1 18 -0.30000 + 1 1 1 1 0 -0.89305 + 1 1 2 2 0 0.02831 + 1 1 3 3 0 -3.27607 + 1 2 1 2 1 -0.57476 + 1 2 1 2 2 -0.45385 + 1 2 1 3 2 -1.38998 + 1 2 2 2 2 -0.26861 + 1 2 2 3 1 -1.03620 + 1 2 2 3 2 1.43020 + 1 2 3 3 2 -2.22302 + 1 3 1 3 2 -1.63214 + 1 3 1 3 3 2.23719 + 1 3 2 2 2 -1.39813 + 1 3 2 3 2 -1.61584 + 1 3 2 3 3 1.75195 + 1 3 3 3 2 -2.89878 + 2 2 2 2 0 -3.88926 + 2 2 2 2 2 0.89453 + 2 2 2 3 2 0.60430 + 2 2 3 3 0 -3.39172 + 2 2 3 3 2 -0.15301 + 2 3 2 3 1 -0.97450 + 2 3 2 3 2 -1.16077 + 2 3 2 3 3 2.57855 + 2 3 2 3 4 -1.20054 + 2 3 3 3 2 1.32771 + 2 3 3 3 4 2.41698 + 3 3 3 3 0 -1.82730 + 3 3 3 3 2 -0.48377 + 3 3 3 3 4 0.62233 + 1 4 1 4 0 -0.89305 + 1 4 1 4 1 -4.38893 + 1 4 1 5 1 -0.28241 + 1 4 2 4 1 0.28241 + 1 4 2 5 0 0.02831 + 1 4 2 5 1 -1.70619 + 1 4 2 6 1 -1.97674 + 1 4 3 5 1 1.97674 + 1 4 3 6 0 -3.27607 + 1 4 3 6 1 1.44606 + 1 5 1 5 1 -3.26692 + 1 5 1 5 2 -1.79447 + 1 5 1 6 2 -0.17510 + 1 5 2 4 1 2.69216 + 1 5 2 4 2 -1.34061 + 1 5 2 5 1 -0.29030 + 1 5 2 5 2 -0.18994 + 1 5 2 6 1 0.94222 + 1 5 2 6 2 -0.32406 + 1 5 3 4 2 -1.21488 + 1 5 3 5 1 -1.97843 + 1 5 3 5 2 -1.75426 + 1 5 3 6 1 0.76889 + 1 5 3 6 2 -1.57192 + 1 6 1 6 2 -0.83288 + 1 6 1 6 3 -0.66250 + 1 6 2 4 2 1.21488 + 1 6 2 5 2 -0.98863 + 1 6 2 5 3 -0.06721 + 1 6 2 6 2 -0.18996 + 1 6 2 6 3 0.35421 + 1 6 3 4 2 -0.79926 + 1 6 3 4 3 -2.89970 + 1 6 3 5 2 1.42588 + 1 6 3 5 3 1.39774 + 1 6 3 6 2 -2.04975 + 1 6 3 6 3 0.06226 + 2 4 2 4 1 -3.26692 + 2 4 2 4 2 -1.79447 + 2 4 2 5 1 0.29030 + 2 4 2 5 2 0.18994 + 2 4 2 6 1 -1.97843 + 2 4 2 6 2 -1.75426 + 2 4 3 4 2 0.17510 + 2 4 3 5 1 0.94222 + 2 4 3 5 2 -0.32406 + 2 4 3 6 1 -0.76889 + 2 4 3 6 2 1.57192 + 2 5 2 5 0 -3.88926 + 2 5 2 5 1 -3.38791 + 2 5 2 5 2 0.89453 + 2 5 2 5 3 -2.66416 + 2 5 2 6 1 -1.45261 + 2 5 2 6 2 0.42731 + 2 5 2 6 3 -1.41312 + 2 5 3 4 2 -0.98863 + 2 5 3 4 3 -0.06721 + 2 5 3 5 1 1.45261 + 2 5 3 5 2 -0.42731 + 2 5 3 5 3 1.41312 + 2 5 3 6 0 -3.39172 + 2 5 3 6 1 3.33947 + 2 5 3 6 2 -0.15301 + 2 5 3 6 3 1.44583 + 2 6 2 6 1 -4.22198 + 2 6 2 6 2 -2.28741 + 2 6 2 6 3 -0.31468 + 2 6 2 6 4 -2.72919 + 2 6 3 4 2 -1.42588 + 2 6 3 4 3 -1.39774 + 2 6 3 5 1 3.24748 + 2 6 3 5 2 -1.12664 + 2 6 3 5 3 2.89322 + 2 6 3 5 4 -1.52865 + 2 6 3 6 1 -1.28727 + 2 6 3 6 2 0.93884 + 2 6 3 6 3 -1.24388 + 2 6 3 6 4 1.70906 + 3 4 3 4 2 -0.83288 + 3 4 3 4 3 -0.66250 + 3 4 3 5 2 0.18996 + 3 4 3 5 3 -0.35421 + 3 4 3 6 2 -2.04975 + 3 4 3 6 3 0.06226 + 3 5 3 5 1 -4.22198 + 3 5 3 5 2 -2.28741 + 3 5 3 5 3 -0.31468 + 3 5 3 5 4 -2.72919 + 3 5 3 6 1 1.28727 + 3 5 3 6 2 -0.93884 + 3 5 3 6 3 1.24388 + 3 5 3 6 4 -1.70906 + 3 6 3 6 0 -1.82730 + 3 6 3 6 1 0.60139 + 3 6 3 6 2 -0.48377 + 3 6 3 6 3 -1.51058 + 3 6 3 6 4 0.62233 + 3 6 3 6 5 -2.90435 + 4 4 4 4 0 -0.89305 + 4 4 5 5 0 0.02831 + 4 4 6 6 0 -3.27607 + 4 5 4 5 1 -0.57476 + 4 5 4 5 2 -0.45385 + 4 5 4 6 2 -1.38998 + 4 5 5 5 2 -0.26861 + 4 5 5 6 1 -1.03620 + 4 5 5 6 2 1.43020 + 4 5 6 6 2 -2.22302 + 4 6 4 6 2 -1.63214 + 4 6 4 6 3 2.23719 + 4 6 5 5 2 -1.39813 + 4 6 5 6 2 -1.61584 + 4 6 5 6 3 1.75195 + 4 6 6 6 2 -2.89878 + 5 5 5 5 0 -3.88926 + 5 5 5 5 2 0.89453 + 5 5 5 6 2 0.60430 + 5 5 6 6 0 -3.39172 + 5 5 6 6 2 -0.15301 + 5 6 5 6 1 -0.97450 + 5 6 5 6 2 -1.16077 + 5 6 5 6 3 2.57855 + 5 6 5 6 4 -1.20054 + 5 6 6 6 2 1.32771 + 5 6 6 6 4 2.41698 + 6 6 6 6 0 -1.82730 + 6 6 6 6 2 -0.48377 + 6 6 6 6 4 0.62233 + diff --git a/test/interaction_file/usdb.snt b/test/interaction_file/usdb.snt new file mode 100644 index 00000000..b03ba66e --- /dev/null +++ b/test/interaction_file/usdb.snt @@ -0,0 +1,173 @@ +3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 +6 0 + 1 1 -3.20790000 + 2 2 2.11170000 + 3 3 -3.92570000 + 4 4 -3.20790000 + 5 5 2.11170000 + 6 6 -3.92570000 +158 1 18 -0.300000 + 1 1 1 1 0 -1.6913000 + 1 1 2 2 0 -1.0150000 + 1 1 3 3 0 -1.5602000 + 1 2 1 2 1 0.5158000 + 1 2 1 2 2 -0.3034000 + 1 2 1 3 2 -1.6131000 + 1 2 2 2 2 -0.3494000 + 1 2 2 3 1 -0.0456000 + 1 2 2 3 2 0.3713000 + 1 2 3 3 2 -0.8866000 + 1 3 1 3 2 -0.9405000 + 1 3 1 3 3 0.6841000 + 1 3 2 2 2 -0.3173000 + 1 3 2 3 2 0.3147000 + 1 3 2 3 3 0.5525000 + 1 3 3 3 2 -0.9317000 + 2 2 2 2 0 -1.8992000 + 2 2 2 2 2 -0.0974000 + 2 2 2 3 2 0.5032000 + 2 2 3 3 0 -3.1025000 + 2 2 3 3 2 -1.2187000 + 2 3 2 3 1 0.6556000 + 2 3 2 3 2 -0.1545000 + 2 3 2 3 3 0.7673000 + 2 3 2 3 4 -1.4447000 + 2 3 3 3 2 0.2137000 + 2 3 3 3 4 1.3349000 + 3 3 3 3 0 -2.5598000 + 3 3 3 3 2 -1.0007000 + 3 3 3 3 4 -0.2069000 + 1 4 1 4 0 -1.6913000 + 1 4 1 4 1 -3.7093000 + 1 4 1 5 1 0.6506089 + 1 4 2 4 1 -0.6506089 + 1 4 2 5 0 -1.0150000 + 1 4 2 5 1 0.1574000 + 1 4 2 6 1 -1.4301942 + 1 4 3 5 1 1.4301942 + 1 4 3 6 0 -1.5602000 + 1 4 3 6 1 -0.5344000 + 1 5 1 5 1 -1.7651000 + 1 5 1 5 2 -1.0769000 + 1 5 1 6 2 0.4489500 + 1 5 2 4 1 2.2809000 + 1 5 2 4 2 -0.7735000 + 1 5 2 5 1 0.6005458 + 1 5 2 5 2 -0.2470631 + 1 5 2 6 1 0.7887500 + 1 5 2 6 2 -0.0358000 + 1 5 3 4 2 -2.0620500 + 1 5 3 5 1 -0.8343500 + 1 5 3 5 2 -0.4071000 + 1 5 3 6 1 -0.0192333 + 1 5 3 6 2 -0.6269209 + 1 6 1 6 2 -0.6279500 + 1 6 1 6 3 -1.7491000 + 1 6 2 4 2 2.0620500 + 1 6 2 5 2 -0.2243650 + 1 6 2 5 3 0.0684479 + 1 6 2 6 2 0.4805500 + 1 6 2 6 3 -0.3500500 + 1 6 3 4 2 -0.3125500 + 1 6 3 4 3 -2.4332000 + 1 6 3 5 2 0.1658500 + 1 6 3 5 3 0.9025500 + 1 6 3 6 2 -0.6588114 + 1 6 3 6 3 -0.8603368 + 2 4 2 4 1 -1.7651000 + 2 4 2 4 2 -1.0769000 + 2 4 2 5 1 -0.6005458 + 2 4 2 5 2 0.2470631 + 2 4 2 6 1 -0.8343500 + 2 4 2 6 2 -0.4071000 + 2 4 3 4 2 -0.4489500 + 2 4 3 5 1 0.7887500 + 2 4 3 5 2 -0.0358000 + 2 4 3 6 1 0.0192333 + 2 4 3 6 2 0.6269209 + 2 5 2 5 0 -1.8992000 + 2 5 2 5 1 -1.6582000 + 2 5 2 5 2 -0.0974000 + 2 5 2 5 3 -2.9660000 + 2 5 2 6 1 -0.1359059 + 2 5 2 6 2 0.3558161 + 2 5 2 6 3 -1.0111627 + 2 5 3 4 2 -0.2243650 + 2 5 3 4 3 0.0684479 + 2 5 3 5 1 0.1359059 + 2 5 3 5 2 -0.3558161 + 2 5 3 5 3 1.0111627 + 2 5 3 6 0 -3.1025000 + 2 5 3 6 1 1.6647000 + 2 5 3 6 2 -1.2187000 + 2 5 3 6 3 1.1792000 + 2 6 2 6 1 -2.6771500 + 2 6 2 6 2 -2.1831000 + 2 6 2 6 3 -0.2225500 + 2 6 2 6 4 -3.0318000 + 2 6 3 4 2 -0.1658500 + 2 6 3 4 3 -0.9025500 + 2 6 3 5 1 3.3327500 + 2 6 3 5 2 -2.0286000 + 2 6 3 5 3 0.9898500 + 2 6 3 5 4 -1.5871000 + 2 6 3 6 1 -2.4739545 + 2 6 3 6 2 0.1511087 + 2 6 3 6 3 -1.6335581 + 2 6 3 6 4 0.9439168 + 3 4 3 4 2 -0.6279500 + 3 4 3 4 3 -1.7491000 + 3 4 3 5 2 -0.4805500 + 3 4 3 5 3 0.3500500 + 3 4 3 6 2 -0.6588114 + 3 4 3 6 3 -0.8603368 + 3 5 3 5 1 -2.6771500 + 3 5 3 5 2 -2.1831000 + 3 5 3 5 3 -0.2225500 + 3 5 3 5 4 -3.0318000 + 3 5 3 6 1 2.4739545 + 3 5 3 6 2 -0.1511087 + 3 5 3 6 3 1.6335581 + 3 5 3 6 4 -0.9439168 + 3 6 3 6 0 -2.5598000 + 3 6 3 6 1 -1.3796000 + 3 6 3 6 2 -1.0007000 + 3 6 3 6 3 -1.6651000 + 3 6 3 6 4 -0.2069000 + 3 6 3 6 5 -4.3205000 + 4 4 4 4 0 -1.6913000 + 4 4 5 5 0 -1.0150000 + 4 4 6 6 0 -1.5602000 + 4 5 4 5 1 0.5158000 + 4 5 4 5 2 -0.3034000 + 4 5 4 6 2 -1.6131000 + 4 5 5 5 2 -0.3494000 + 4 5 5 6 1 -0.0456000 + 4 5 5 6 2 0.3713000 + 4 5 6 6 2 -0.8866000 + 4 6 4 6 2 -0.9405000 + 4 6 4 6 3 0.6841000 + 4 6 5 5 2 -0.3173000 + 4 6 5 6 2 0.3147000 + 4 6 5 6 3 0.5525000 + 4 6 6 6 2 -0.9317000 + 5 5 5 5 0 -1.8992000 + 5 5 5 5 2 -0.0974000 + 5 5 5 6 2 0.5032000 + 5 5 6 6 0 -3.1025000 + 5 5 6 6 2 -1.2187000 + 5 6 5 6 1 0.6556000 + 5 6 5 6 2 -0.1545000 + 5 6 5 6 3 0.7673000 + 5 6 5 6 4 -1.4447000 + 5 6 6 6 2 0.2137000 + 5 6 6 6 4 1.3349000 + 6 6 6 6 0 -2.5598000 + 6 6 6 6 2 -1.0007000 + 6 6 6 6 4 -0.2069000 From b8bcc381f24cad1b5e5624cbd43558eb9b83e130 Mon Sep 17 00:00:00 2001 From: SotaYoshida Date: Mon, 4 Mar 2024 06:51:07 +0000 Subject: [PATCH 14/14] Update log_sample_script.txt --- example/log_sample_script.txt | 2 + ...hell_coreO16refO16_O16_hw20e4_Delta0.0.snt | 175 ++++++++++++++++++ ..._coreO16refO16_O16_hw20e4_Delta0.0_Rp2.snt | 175 ++++++++++++++++++ 3 files changed, 352 insertions(+) create mode 100644 vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0.snt create mode 100644 vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0_Rp2.snt diff --git a/example/log_sample_script.txt b/example/log_sample_script.txt index 2eed9bf1..f72c683a 100644 --- a/example/log_sample_script.txt +++ b/example/log_sample_script.txt @@ -1,3 +1,4 @@ +option in optional_parameters.jl will be used. --- chiEFTparameters used --- n_mesh = 50 pmax_fm = 5.0 @@ -31,6 +32,7 @@ size of dWS (jmax 9 lmax 40 e2max 8 Nnmax 20): # of sp states 15 # of channels 2bstate 55 #TBME = 34320 E(2H): bare = -2.224578 srg = -2.224578 Diff.1.484e-10 +option in optional_parameters.jl will be used. size of dWS (jmax 9 lmax 40 e2max 8 Nnmax 20): dtri 4.46 MB dcgm0 1.11 MB d6j_int 1.11 MB d6j_lj 0.28 MB d9j_lsj 1.76 MB dictHOB 0.44 MB diff --git a/vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0.snt b/vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0.snt new file mode 100644 index 00000000..f149e463 --- /dev/null +++ b/vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0.snt @@ -0,0 +1,175 @@ +!input interaction => tbme_em500n3lo_srg2.0hw20emax4.snt.bin +!Op:Hamiltonian, zerobody: -156.59729163 + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 20 + 1 1 -0.785963 + 4 4 -4.880650 + 2 2 7.287169 + 5 5 3.369814 + 3 3 -2.024052 + 6 6 -6.294431 + 158 0 20.00000 + 2 3 2 3 4 -1.652141 + 2 3 3 3 4 1.589057 + 3 3 3 3 4 -0.040063 + 1 6 1 6 3 -2.582206 + 1 6 3 4 3 -2.746191 + 1 6 2 5 3 0.042460 + 1 6 2 6 3 -0.720335 + 1 6 3 5 3 0.918921 + 1 6 3 6 3 -1.582865 + 3 4 3 4 3 -2.622435 + 2 5 3 4 3 -0.004356 + 2 6 3 4 3 -0.928007 + 3 4 3 5 3 0.767474 + 3 4 3 6 3 -1.599253 + 2 5 2 5 3 -3.638236 + 2 5 2 6 3 -1.751884 + 2 5 3 5 3 1.790877 + 2 5 3 6 3 0.562478 + 2 6 2 6 3 -0.721422 + 2 6 3 5 3 0.566882 + 2 6 3 6 3 -1.720089 + 3 5 3 5 3 -0.777046 + 3 5 3 6 3 1.731746 + 3 6 3 6 3 -1.089275 + 1 1 1 1 0 -1.760383 + 1 1 2 2 0 -1.263229 + 1 1 3 3 0 -1.508961 + 2 2 2 2 0 -0.384073 + 2 2 3 3 0 -3.955770 + 3 3 3 3 0 -1.697512 + 1 5 1 5 2 -1.467643 + 1 5 1 6 2 0.655391 + 1 5 2 4 2 -0.518974 + 1 5 3 4 2 -2.604268 + 1 5 2 5 2 -0.197157 + 1 5 2 6 2 -0.999313 + 1 5 3 5 2 -1.814110 + 1 5 3 6 2 -0.859748 + 1 6 1 6 2 -1.225061 + 1 6 2 4 2 2.585762 + 1 6 3 4 2 -0.601848 + 1 6 2 5 2 -0.849113 + 1 6 2 6 2 1.444724 + 1 6 3 5 2 1.112417 + 1 6 3 6 2 -0.730121 + 2 4 2 4 2 -1.464434 + 2 4 3 4 2 -0.650044 + 2 4 2 5 2 0.190557 + 2 4 2 6 2 -1.819322 + 2 4 3 5 2 -1.014451 + 2 4 3 6 2 0.875514 + 3 4 3 4 2 -1.257007 + 2 5 3 4 2 -0.872846 + 2 6 3 4 2 -1.122293 + 3 4 3 5 2 -1.472628 + 3 4 3 6 2 -0.737218 + 2 5 2 5 2 -0.409408 + 2 5 2 6 2 0.796247 + 2 5 3 5 2 -0.793732 + 2 5 3 6 2 -0.962897 + 2 6 2 6 2 -2.940835 + 2 6 3 5 2 -2.535385 + 2 6 3 6 2 0.215100 + 3 5 3 5 2 -2.974266 + 3 5 3 6 2 -0.230675 + 3 6 3 6 2 -1.665831 + 1 4 1 4 1 -3.605260 + 1 4 1 5 1 -0.077959 + 1 4 2 4 1 0.098823 + 1 4 2 5 1 -0.270265 + 1 4 2 6 1 -2.297611 + 1 4 3 5 1 2.337913 + 1 4 3 6 1 -1.007728 + 1 5 1 5 1 -2.876169 + 1 5 2 4 1 2.747981 + 1 5 2 5 1 1.146474 + 1 5 2 6 1 0.958555 + 1 5 3 5 1 -1.163835 + 1 5 3 6 1 -0.350453 + 2 4 2 4 1 -2.877172 + 2 4 2 5 1 -1.153929 + 2 4 2 6 1 -1.127880 + 2 4 3 5 1 0.969235 + 2 4 3 6 1 0.364332 + 2 5 2 5 1 -1.046355 + 2 5 2 6 1 0.151921 + 2 5 3 5 1 -0.121601 + 2 5 3 6 1 2.421661 + 2 6 2 6 1 -3.225087 + 2 6 3 5 1 3.005688 + 2 6 3 6 1 -2.895372 + 3 5 3 5 1 -3.353336 + 3 5 3 6 1 2.902879 + 3 6 3 6 1 -0.984511 + 4 4 4 4 0 -2.286403 + 4 4 5 5 0 -1.355113 + 4 4 6 6 0 -1.605889 + 5 5 5 5 0 -0.886480 + 5 5 6 6 0 -4.154933 + 6 6 6 6 0 -2.304438 + 4 5 4 5 2 -0.885813 + 4 5 4 6 2 -1.940868 + 4 5 5 5 2 -0.224157 + 4 5 5 6 2 0.807250 + 4 5 6 6 2 -1.228542 + 4 6 4 6 2 -1.803225 + 4 6 5 5 2 -1.223378 + 4 6 5 6 2 0.308123 + 4 6 6 6 2 -1.015357 + 5 5 5 5 2 -0.359773 + 5 5 5 6 2 1.129547 + 5 5 6 6 2 -0.934619 + 5 6 5 6 2 -0.395232 + 5 6 6 6 2 0.277493 + 6 6 6 6 2 -1.652928 + 5 6 5 6 4 -2.171276 + 5 6 6 6 4 1.676396 + 6 6 6 6 4 -0.521973 + 4 6 4 6 3 0.127249 + 4 6 5 6 3 0.162911 + 5 6 5 6 3 -0.206016 + 1 2 1 2 2 -0.449692 + 1 2 1 3 2 -1.829618 + 1 2 2 2 2 -0.190902 + 1 2 2 3 2 0.755254 + 1 2 3 3 2 -1.157465 + 1 3 1 3 2 -1.281861 + 1 3 2 2 2 -1.152612 + 1 3 2 3 2 0.285414 + 1 3 3 3 2 -0.949715 + 2 2 2 2 2 0.031828 + 2 2 2 3 2 1.065174 + 2 2 3 3 2 -0.888374 + 2 3 2 3 2 0.054567 + 2 3 3 3 2 0.290712 + 3 3 3 3 2 -1.100273 + 2 6 2 6 4 -4.200387 + 2 6 3 5 4 -1.991830 + 2 6 3 6 4 1.179002 + 3 5 3 5 4 -4.254746 + 3 5 3 6 4 -1.202928 + 3 6 3 6 4 -0.531971 + 1 3 1 3 3 0.548646 + 1 3 2 3 3 0.143468 + 2 3 2 3 3 0.183872 + 1 4 1 4 0 -2.339914 + 1 4 2 5 0 -1.399456 + 1 4 3 6 0 -1.642406 + 2 5 2 5 0 -1.050066 + 2 5 3 6 0 -4.202401 + 3 6 3 6 0 -2.483902 + 1 2 1 2 1 0.213977 + 1 2 2 3 1 -0.206459 + 2 3 2 3 1 0.082890 + 3 6 3 6 5 -5.140433 + 4 5 4 5 1 -0.156485 + 4 5 5 6 1 -0.202198 + 5 6 5 6 1 -0.347085 diff --git a/vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0_Rp2.snt b/vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0_Rp2.snt new file mode 100644 index 00000000..df8914ae --- /dev/null +++ b/vsimsrg_sd-shell_coreO16refO16_O16_hw20e4_Delta0.0_Rp2.snt @@ -0,0 +1,175 @@ +!input interaction => tbme_em500n3lo_srg2.0hw20emax4.snt.bin +!Op:Rp2, zerobody: 4.40732392 + 3 3 8 8 + 1 1 0 1 -1 + 2 0 2 3 -1 + 3 0 2 5 -1 + 4 1 0 1 1 + 5 0 2 3 1 + 6 0 2 5 1 + 6 0 20 + 1 1 1.074234 + 4 4 0.034391 + 2 2 1.084849 + 5 5 0.128713 + 3 3 0.930611 + 6 6 -0.017233 + 158 0 20.00000 + 2 3 2 3 4 -0.012151 + 2 3 3 3 4 0.011734 + 3 3 3 3 4 -0.013068 + 1 6 1 6 3 -0.022129 + 1 6 3 4 3 -0.007805 + 1 6 2 5 3 -0.013907 + 1 6 2 6 3 -0.004977 + 1 6 3 5 3 0.002220 + 1 6 3 6 3 -0.003843 + 3 4 3 4 3 -0.007162 + 2 5 3 4 3 0.018294 + 2 6 3 4 3 0.002798 + 3 4 3 5 3 -0.013780 + 3 4 3 6 3 0.002692 + 2 5 2 5 3 -0.010598 + 2 5 2 6 3 -0.018863 + 2 5 3 5 3 -0.002932 + 2 5 3 6 3 0.000929 + 2 6 2 6 3 -0.011713 + 2 6 3 5 3 -0.002660 + 2 6 3 6 3 -0.012623 + 3 5 3 5 3 0.005874 + 3 5 3 6 3 0.005710 + 3 6 3 6 3 -0.004765 + 1 1 1 1 0 -0.021291 + 1 1 2 2 0 0.006633 + 1 1 3 3 0 0.006258 + 2 2 2 2 0 0.023407 + 2 2 3 3 0 -0.022942 + 3 3 3 3 0 0.021405 + 1 5 1 5 2 -0.009117 + 1 5 1 6 2 0.006712 + 1 5 2 4 2 -0.004740 + 1 5 3 4 2 -0.011588 + 1 5 2 5 2 0.003576 + 1 5 2 6 2 -0.001932 + 1 5 3 5 2 -0.004848 + 1 5 3 6 2 -0.002810 + 1 6 1 6 2 -0.012561 + 1 6 2 4 2 0.023620 + 1 6 3 4 2 -0.003574 + 1 6 2 5 2 -0.005889 + 1 6 2 6 2 0.007638 + 1 6 3 5 2 0.007153 + 1 6 3 6 2 -0.001670 + 2 4 2 4 2 -0.004249 + 2 4 3 4 2 -0.009646 + 2 4 2 5 2 -0.003421 + 2 4 2 6 2 -0.003379 + 2 4 3 5 2 0.002095 + 2 4 3 6 2 -0.004630 + 3 4 3 4 2 -0.000643 + 2 5 3 4 2 0.002356 + 2 6 3 4 2 -0.007076 + 3 4 3 5 2 0.005166 + 3 4 3 6 2 0.000968 + 2 5 2 5 2 -0.000240 + 2 5 2 6 2 0.004727 + 2 5 3 5 2 -0.003786 + 2 5 3 6 2 -0.003002 + 2 6 2 6 2 -0.023023 + 2 6 3 5 2 -0.014308 + 2 6 3 6 2 0.004422 + 3 5 3 5 2 -0.009437 + 3 5 3 6 2 0.003708 + 3 6 3 6 2 -0.013830 + 1 4 1 4 1 -0.021971 + 1 4 1 5 1 -0.013245 + 1 4 2 4 1 0.006064 + 1 4 2 5 1 -0.007666 + 1 4 2 6 1 -0.007861 + 1 4 3 5 1 -0.007499 + 1 4 3 6 1 0.004544 + 1 5 1 5 1 -0.007624 + 1 5 2 4 1 0.001600 + 1 5 2 5 1 -0.001485 + 1 5 2 6 1 -0.002671 + 1 5 3 5 1 0.008824 + 1 5 3 6 1 -0.000025 + 2 4 2 4 1 -0.003157 + 2 4 2 5 1 0.006159 + 2 4 2 6 1 -0.004579 + 2 4 3 5 1 -0.003329 + 2 4 3 6 1 -0.003181 + 2 5 2 5 1 0.001831 + 2 5 2 6 1 -0.012446 + 2 5 3 5 1 -0.009776 + 2 5 3 6 1 0.009136 + 2 6 2 6 1 -0.023254 + 2 6 3 5 1 0.000466 + 2 6 3 6 1 -0.012572 + 3 5 3 5 1 0.029905 + 3 5 3 6 1 0.001043 + 3 6 3 6 1 0.011394 + 4 4 4 4 0 -0.000772 + 4 4 5 5 0 0.002011 + 4 4 6 6 0 0.004767 + 5 5 5 5 0 0.004237 + 5 5 6 6 0 0.002668 + 6 6 6 6 0 0.006513 + 4 5 4 5 2 -0.000431 + 4 5 4 6 2 -0.000157 + 4 5 5 5 2 0.000865 + 4 5 5 6 2 0.000155 + 4 5 6 6 2 0.002223 + 4 6 4 6 2 0.000202 + 4 6 5 5 2 0.000556 + 4 6 5 6 2 -0.001496 + 4 6 6 6 2 0.002202 + 5 5 5 5 2 -0.000246 + 5 5 5 6 2 -0.000229 + 5 5 6 6 2 0.000469 + 5 6 5 6 2 0.000090 + 5 6 6 6 2 0.000988 + 6 6 6 6 2 -0.000461 + 5 6 5 6 4 -0.002305 + 5 6 6 6 4 -0.000532 + 6 6 6 6 4 -0.001709 + 4 6 4 6 3 -0.002161 + 4 6 5 6 3 0.000029 + 5 6 5 6 3 -0.001836 + 1 2 1 2 2 -0.000245 + 1 2 1 3 2 -0.016418 + 1 2 2 2 2 0.008551 + 1 2 2 3 2 0.007554 + 1 2 3 3 2 0.001122 + 1 3 1 3 2 -0.014895 + 1 3 2 2 2 -0.004942 + 1 3 2 3 2 -0.010295 + 1 3 3 3 2 -0.002576 + 2 2 2 2 2 0.001635 + 2 2 2 3 2 0.010933 + 2 2 3 3 2 -0.004905 + 2 3 2 3 2 -0.000857 + 2 3 3 3 2 -0.000778 + 3 3 3 3 2 -0.021133 + 2 6 2 6 4 -0.034126 + 2 6 3 5 4 -0.013050 + 2 6 3 6 4 0.011511 + 3 5 3 5 4 -0.011986 + 3 5 3 6 4 0.002336 + 3 6 3 6 4 -0.009781 + 1 3 1 3 3 -0.008996 + 1 3 2 3 3 0.007152 + 2 3 2 3 3 -0.006881 + 1 4 1 4 0 -0.015198 + 1 4 2 5 0 0.004509 + 1 4 3 6 0 0.005077 + 2 5 2 5 0 0.013756 + 2 5 3 6 0 -0.013010 + 3 6 3 6 0 0.010568 + 1 2 1 2 1 -0.004454 + 1 2 2 3 1 0.000099 + 2 3 2 3 1 0.007595 + 3 6 3 6 5 -0.025277 + 4 5 4 5 1 -0.001474 + 4 5 5 6 1 -0.000763 + 5 6 5 6 1 0.001204