mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-26 14:31:44 +02:00
Fixed state_average_weight.gz different from array
This commit is contained in:
parent
ee53802402
commit
ab0eb1256b
2
configure
vendored
2
configure
vendored
@ -497,7 +497,7 @@ def create_ninja_and_rc(l_installed):
|
||||
'export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)',
|
||||
'export C_INCLUDE_PATH=$(qp_prepend_export "C_INCLUDE_PATH" "${QP_ROOT}"/include)',
|
||||
'',
|
||||
'if [[ $SHELL == "bash" ]] ; then',
|
||||
'if [[ $SHELL == "/bin/bash" ]] ; then',
|
||||
' source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh',
|
||||
'fi',
|
||||
'',
|
||||
|
@ -119,21 +119,31 @@ end = struct
|
||||
;;
|
||||
|
||||
let read_state_average_weight () =
|
||||
let n_states =
|
||||
read_n_states ()
|
||||
|> States_number.to_int
|
||||
in
|
||||
if not (Ezfio.has_determinants_state_average_weight ()) then
|
||||
begin
|
||||
let n_states =
|
||||
read_n_states ()
|
||||
|> States_number.to_int
|
||||
in
|
||||
begin
|
||||
let data =
|
||||
Array.init n_states (fun _ -> 1./.(float_of_int n_states))
|
||||
|> Array.map ~f:Positive_float.of_float
|
||||
in
|
||||
write_state_average_weight data;
|
||||
end;
|
||||
Ezfio.get_determinants_state_average_weight ()
|
||||
|> Ezfio.flattened_ezfio
|
||||
|> Array.map ~f:Positive_float.of_float
|
||||
write_state_average_weight data
|
||||
end;
|
||||
let result =
|
||||
Ezfio.get_determinants_state_average_weight ()
|
||||
|> Ezfio.flattened_ezfio
|
||||
|> Array.map ~f:Positive_float.of_float
|
||||
in
|
||||
if Array.length result = n_states then
|
||||
result
|
||||
else
|
||||
let data =
|
||||
Array.init n_states (fun _ -> 1./.(float_of_int n_states))
|
||||
|> Array.map ~f:Positive_float.of_float
|
||||
in
|
||||
(write_state_average_weight data; data)
|
||||
;;
|
||||
|
||||
let read_expected_s2 () =
|
||||
|
Loading…
Reference in New Issue
Block a user