diff --git a/ocaml/Input_full_ci.ml b/ocaml/Input_full_ci.ml index 516ca0cf..08c305c8 100644 --- a/ocaml/Input_full_ci.ml +++ b/ocaml/Input_full_ci.ml @@ -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 diff --git a/ocaml/qp_edit.ml b/ocaml/qp_edit.ml index e4672ff7..c922b83b 100644 --- a/ocaml/qp_edit.ml +++ b/ocaml/qp_edit.ml @@ -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 ; ]