Skip to content

Commit f596217

Browse files
update databasearray_to_df -> basis_to_df
1 parent 5708bcc commit f596217

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

generate_database.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,10 @@ function main()
102102
end
103103

104104
basis = basisarray(states, models)
105-
database_states = databasearray(states, models)
106105
@info "Generated state table with $(length(basis.states)) states"
107106

108107
@info "Converting states to database table..."
109-
states_df = databasearray_to_df(database_states, parameters)
108+
states_df = basis_to_df(basis, parameters)
110109

111110
@info "Calculating matrix elements..."
112111
@timelog row_col_value_dict = all_matrix_element(basis, parameters)

utils.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,26 @@ function rcv_to_df(row_col_value::Vector{Tuple{Int64,Int64,Float64}})
8181
return df
8282
end
8383

84-
function databasearray_to_df(T::DataBaseArray, P::Parameters)
84+
function basis_to_df(T::BasisArray, P::Parameters)
8585
df = DataFrame(
8686
id = collect(START_ID:(size(T)-1+START_ID)),
87-
energy = MQDT.get_e(T, P),
87+
energy = MQDT.get_e(T, P) / 219474.6313632, # convert 1/cm to atomic units
8888
parity = MQDT.get_p(T),
8989
n = MQDT.get_n(T, P),
9090
nu = MQDT.get_nu(T),
9191
f = MQDT.get_f(T),
9292
exp_nui = MQDT.exp_nui(T),
93-
exp_l = MQDT.exp_L(T),
94-
exp_j = MQDT.exp_J(T),
95-
exp_s = MQDT.exp_S(T),
96-
exp_l_ryd = MQDT.exp_lr(T),
97-
exp_j_ryd = MQDT.exp_Jr(T),
93+
exp_l = MQDT.calc_exp_qn(T, "l_tot"),
94+
exp_j = MQDT.calc_exp_qn(T, "j_tot"),
95+
exp_s = MQDT.calc_exp_qn(T, "s_tot"),
96+
exp_l_ryd = MQDT.calc_exp_qn(T, "l_r"),
97+
exp_j_ryd = MQDT.calc_exp_qn(T, "j_r"),
9898
std_nui = MQDT.std_nui(T),
99-
std_l = MQDT.std_L(T),
100-
std_j = MQDT.std_J(T),
101-
std_s = MQDT.std_S(T),
102-
std_l_ryd = MQDT.std_lr(T),
103-
std_j_ryd = MQDT.std_Jr(T),
99+
std_l = MQDT.calc_std_qn(T, "l_tot"),
100+
std_j = MQDT.calc_std_qn(T, "j_tot"),
101+
std_s = MQDT.calc_std_qn(T, "s_tot"),
102+
std_l_ryd = MQDT.calc_std_qn(T, "l_r"),
103+
std_j_ryd = MQDT.calc_std_qn(T, "j_r"),
104104
is_j_total_momentum = MQDT.is_J(T, P),
105105
is_calculated_with_mqdt = MQDT.is_mqdt(T),
106106
underspecified_channel_contribution = MQDT.get_neg(T),

0 commit comments

Comments
 (0)