@@ -36,6 +36,9 @@ function parse_commandline()
3636 " --overwrite"
3737 help = " Delete the species folder if it exists and create a new one"
3838 action = :store_true
39+ " --skip-high-l"
40+ help = " Include high angular momentum (l) states in the calculation"
41+ action = :store_true
3942 end
4043
4144 return parse_args (s)
@@ -65,19 +68,32 @@ function main()
6568 println (" Parameters: n_min=$n_min , n_max=$n_max " )
6669 start_time = time ()
6770
68- CGcoefficient. wigner_init_float (n_max, " Jmax" , 9 ) # initialize Wigner symbol calculation
71+ # initialize Wigner symbol calculation
72+ if args[" skip-high-l" ]
73+ CGcoefficient. wigner_init_float (FMODEL_MAX_L[species], " Jmax" , 9 )
74+ else
75+ CGcoefficient. wigner_init_float (n_max - 1 , " Jmax" , 9 )
76+ end
6977 parameters = PARA_TABLE[species]
7078
7179 println (" Calculating low ℓ MQDT states..." )
72- low_l_models = MODELS_TABLE[species]
73- @time low_l_states = [eigenstates (n_min, n_max, M, parameters) for M in low_l_models]
74-
75- println (" Calculating high ℓ SQDT states..." )
76- l_max = n_max - 1
77- high_l_models = single_channel_models (5 : l_max, parameters)
78- @time high_l_states = [eigenstates (n_min, n_max, M, parameters) for M in high_l_models]
80+ models = MODELS_TABLE[species]
81+ @time states = [eigenstates (n_min, n_max, M, parameters) for M in models]
82+
83+ if args[" skip-high-l" ]
84+ println (" Skipping high ℓ states." )
85+ else
86+ println (" Calculating high ℓ SQDT states..." )
87+ l_max = n_max - 1
88+ l_start = FMODEL_MAX_L[species] + 1
89+ high_l_models = single_channel_models (l_start: l_max, parameters)
90+ @time high_l_states =
91+ [eigenstates (n_min, n_max, M, parameters) for M in high_l_models]
92+ states = vcat (states, high_l_states)
93+ models = vcat (models, high_l_models)
94+ end
7995
80- basis = basisarray (vcat (low_l_states, high_l_states), vcat (low_l_models, high_l_models) )
96+ basis = basisarray (states, models )
8197 state_table = state_data (basis, parameters)
8298 println (" Generated state table with $(nrow (state_table)) states" )
8399
@@ -94,7 +110,7 @@ function main()
94110 md = matrix_data (dd)
95111
96112 println (" Preparing database output..." )
97- db = databasearray (vcat (low_l_states, high_l_states), vcat (low_l_models, high_l_models) )
113+ db = databasearray (states, models )
98114 st = state_data (db, parameters)
99115
100116 println (" Storing database tables as parquet files..." )
0 commit comments