mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Moved n_states_diag
This commit is contained in:
parent
4d31da34ff
commit
a30a00bab9
@ -93,23 +93,6 @@ end = struct
|
||||
;;
|
||||
|
||||
|
||||
let read_n_states_diag () =
|
||||
if not (Ezfio.has_determinants_n_states_diag ()) then
|
||||
read_n_states ()
|
||||
|> States_number.to_int
|
||||
|> Ezfio.set_determinants_n_states_diag
|
||||
;
|
||||
Ezfio.get_determinants_n_states_diag ()
|
||||
|> States_number.of_int
|
||||
;;
|
||||
|
||||
let write_n_states_diag ~n_states n =
|
||||
let n_states = States_number.to_int n_states
|
||||
and n = States_number.to_int n
|
||||
in
|
||||
Ezfio.set_determinants_n_states_diag (max n_states n)
|
||||
;;
|
||||
|
||||
let read_expected_s2 () =
|
||||
if not (Ezfio.has_determinants_expected_s2 ()) then
|
||||
begin
|
||||
|
@ -47,12 +47,8 @@ let input_data = "
|
||||
|
||||
* States_number : int
|
||||
assert (x > 0) ;
|
||||
if (x > 100) then
|
||||
warning \"More than 100 states\";
|
||||
if (Ezfio.has_determinants_n_states_diag ()) then
|
||||
assert (x <= (Ezfio.get_determinants_n_states_diag ()))
|
||||
else if (Ezfio.has_determinants_n_states ()) then
|
||||
assert (x <= (Ezfio.get_determinants_n_states ()));
|
||||
if (x > 1000) then
|
||||
warning \"More than 1000 states\";
|
||||
|
||||
* Bit_kind_size : int
|
||||
begin match x with
|
||||
|
@ -796,10 +796,10 @@ def create_build_ninja_global():
|
||||
|
||||
|
||||
l_string += ["build dummy_target: update_build_ninja_root",
|
||||
"build ocaml_target: make_ocaml | dummy_target",
|
||||
"build ocaml_target: make_ocaml all",
|
||||
"",
|
||||
"build all: make_all dummy_target ocaml_target",
|
||||
"default all",
|
||||
"build all: make_all dummy_target",
|
||||
"default ocaml_target",
|
||||
"",
|
||||
"build clean: make_clean dummy_target",
|
||||
"", ]
|
||||
|
12
src/Davidson/EZFIO.cfg
Normal file
12
src/Davidson/EZFIO.cfg
Normal file
@ -0,0 +1,12 @@
|
||||
[threshold_davidson]
|
||||
type: Threshold
|
||||
doc: Thresholds of Davidson's algorithm
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 1.e-12
|
||||
|
||||
[n_states_diag]
|
||||
type: States_number
|
||||
doc: n_states_diag
|
||||
default: 1
|
||||
interface: ezfio,provider,ocaml
|
||||
|
@ -40,12 +40,6 @@ doc: Force the wave function to be an eigenfunction of S^2
|
||||
interface: ezfio,provider,ocaml
|
||||
default: False
|
||||
|
||||
[threshold_davidson]
|
||||
type: Threshold
|
||||
doc: Thresholds of Davidson's algorithm
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 1.e-12
|
||||
|
||||
[threshold_generators]
|
||||
type: Threshold
|
||||
doc: Thresholds on generators (fraction of the norm)
|
||||
@ -58,12 +52,6 @@ doc: Thresholds on selectors (fraction of the norm)
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.999
|
||||
|
||||
[n_states_diag]
|
||||
type: States_number
|
||||
doc: n_states_diag
|
||||
default: 1
|
||||
interface: ezfio,provider,ocaml
|
||||
|
||||
[n_int]
|
||||
interface: ezfio
|
||||
doc: n_int
|
||||
|
@ -11,7 +11,7 @@ BEGIN_PROVIDER [ character*(64), diag_algorithm ]
|
||||
diag_algorithm = "Lapack"
|
||||
endif
|
||||
|
||||
if (N_det < N_states_diag) then
|
||||
if (N_det < N_states) then
|
||||
diag_algorithm = "Lapack"
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
@ -1,25 +0,0 @@
|
||||
BEGIN_PROVIDER [ integer, N_states_diag ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Number of states to consider for the diagonalization
|
||||
END_DOC
|
||||
|
||||
logical :: has
|
||||
PROVIDE ezfio_filename
|
||||
call ezfio_has_determinants_n_states_diag(has)
|
||||
if (has) then
|
||||
call ezfio_get_determinants_n_states_diag(N_states_diag)
|
||||
else
|
||||
N_states_diag = N_states
|
||||
endif
|
||||
if (N_states_diag < N_states) then
|
||||
N_states_diag = N_states
|
||||
endif
|
||||
|
||||
call write_time(output_determinants)
|
||||
call write_int(output_determinants, N_states_diag, &
|
||||
'N_states_diag')
|
||||
|
||||
|
||||
END_PROVIDER
|
||||
|
Loading…
Reference in New Issue
Block a user