10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

Added Full_CI to qp_edit

This commit is contained in:
Anthony Scemama 2014-11-12 10:27:04 +01:00
parent 915aae403d
commit fbebdca621
2 changed files with 30 additions and 3 deletions

View File

@ -9,7 +9,8 @@ module Full_ci : sig
do_pt2_end : bool;
} with sexp
;;
val read : unit -> t
val read : unit -> t
val write : t-> unit
val to_string : t -> string
val to_rst : t -> Rst_string.t
val of_rst : Rst_string.t -> t
@ -33,6 +34,11 @@ end = struct
|> Det_number_max.of_int
;;
let write_n_det_max_fci ndet =
Det_number_max.to_int ndet
|> Ezfio.set_full_ci_n_det_max_fci
;;
let read_pt2_max () =
if not (Ezfio.has_full_ci_pt2_max ()) then
get_default "pt2_max"
@ -43,6 +49,11 @@ end = struct
|> PT2_energy.of_float
;;
let write_pt2_max pt2_max =
PT2_energy.to_float pt2_max
|> Ezfio.set_full_ci_pt2_max
;;
let read_do_pt2_end () =
if not (Ezfio.has_full_ci_do_pt2_end ()) then
get_default "do_pt2_end"
@ -52,6 +63,10 @@ end = struct
Ezfio.get_full_ci_do_pt2_end ()
;;
let write_do_pt2_end =
Ezfio.set_full_ci_do_pt2_end
;;
let read () =
{ n_det_max_fci = read_n_det_max_fci ();
@ -60,6 +75,16 @@ end = struct
}
;;
let write { n_det_max_fci ;
pt2_max ;
do_pt2_end ;
} =
write_n_det_max_fci n_det_max_fci;
write_pt2_max pt2_max;
write_do_pt2_end do_pt2_end;
;;
let to_string b =
Printf.sprintf "
n_det_max_fci = %s

View File

@ -83,10 +83,12 @@ let set str s =
in
match s with
(*
| Full_ci ->
| Hartree_fock ->
| Mo_basis ->
*)
| Full_ci ->
Input.Full_ci.of_rst str
|> Input.Full_ci.write
| Electrons ->
Input.Electrons.of_rst str
|> Input.Electrons.write
@ -132,7 +134,6 @@ let run ezfio_filename =
List.map ~f:get [
Ao_basis ;
Mo_basis ;
Full_ci ;
Hartree_fock ;
])
in
@ -144,6 +145,7 @@ let run ezfio_filename =
Nuclei ;
Electrons ;
Bielec_integrals ;
Full_ci ;
Cisd_sc2 ;
Determinants ;
]