mirror of
https://github.com/LCPQ/quantum_package
synced 2025-04-19 06:50:26 +02: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 () =
|
let read_expected_s2 () =
|
||||||
if not (Ezfio.has_determinants_expected_s2 ()) then
|
if not (Ezfio.has_determinants_expected_s2 ()) then
|
||||||
begin
|
begin
|
||||||
|
@ -47,12 +47,8 @@ let input_data = "
|
|||||||
|
|
||||||
* States_number : int
|
* States_number : int
|
||||||
assert (x > 0) ;
|
assert (x > 0) ;
|
||||||
if (x > 100) then
|
if (x > 1000) then
|
||||||
warning \"More than 100 states\";
|
warning \"More than 1000 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 ()));
|
|
||||||
|
|
||||||
* Bit_kind_size : int
|
* Bit_kind_size : int
|
||||||
begin match x with
|
begin match x with
|
||||||
|
@ -796,10 +796,10 @@ def create_build_ninja_global():
|
|||||||
|
|
||||||
|
|
||||||
l_string += ["build dummy_target: update_build_ninja_root",
|
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",
|
"build all: make_all dummy_target",
|
||||||
"default all",
|
"default ocaml_target",
|
||||||
"",
|
"",
|
||||||
"build clean: make_clean dummy_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
|
interface: ezfio,provider,ocaml
|
||||||
default: False
|
default: False
|
||||||
|
|
||||||
[threshold_davidson]
|
|
||||||
type: Threshold
|
|
||||||
doc: Thresholds of Davidson's algorithm
|
|
||||||
interface: ezfio,provider,ocaml
|
|
||||||
default: 1.e-12
|
|
||||||
|
|
||||||
[threshold_generators]
|
[threshold_generators]
|
||||||
type: Threshold
|
type: Threshold
|
||||||
doc: Thresholds on generators (fraction of the norm)
|
doc: Thresholds on generators (fraction of the norm)
|
||||||
@ -58,12 +52,6 @@ doc: Thresholds on selectors (fraction of the norm)
|
|||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: 0.999
|
default: 0.999
|
||||||
|
|
||||||
[n_states_diag]
|
|
||||||
type: States_number
|
|
||||||
doc: n_states_diag
|
|
||||||
default: 1
|
|
||||||
interface: ezfio,provider,ocaml
|
|
||||||
|
|
||||||
[n_int]
|
[n_int]
|
||||||
interface: ezfio
|
interface: ezfio
|
||||||
doc: n_int
|
doc: n_int
|
||||||
|
@ -11,7 +11,7 @@ BEGIN_PROVIDER [ character*(64), diag_algorithm ]
|
|||||||
diag_algorithm = "Lapack"
|
diag_algorithm = "Lapack"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (N_det < N_states_diag) then
|
if (N_det < N_states) then
|
||||||
diag_algorithm = "Lapack"
|
diag_algorithm = "Lapack"
|
||||||
endif
|
endif
|
||||||
END_PROVIDER
|
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…
x
Reference in New Issue
Block a user