mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 18:16:12 +01:00
Added Hartree_fock to qp_edit
This commit is contained in:
parent
fbebdca621
commit
8e55dc9f33
@ -8,7 +8,8 @@ module Hartree_fock : sig
|
||||
thresh_scf : Threshold.t;
|
||||
} 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
|
||||
@ -31,14 +32,25 @@ end = struct
|
||||
|> Strictly_positive_int.of_int
|
||||
;;
|
||||
|
||||
let read_thresh_scf() =
|
||||
let write_n_it_scf_max n_it_scf_max =
|
||||
Strictly_positive_int.to_int n_it_scf_max
|
||||
|> Ezfio.set_hartree_fock_n_it_scf_max
|
||||
;;
|
||||
|
||||
let read_thresh_scf () =
|
||||
if not (Ezfio.has_hartree_fock_thresh_scf()) then
|
||||
get_default "thresh_scf"
|
||||
|> Float.of_string
|
||||
|> Ezfio.set_hartree_fock_thresh_scf
|
||||
;
|
||||
Ezfio.get_hartree_fock_thresh_scf ()
|
||||
|> Threshold.of_float ;;
|
||||
|> Threshold.of_float
|
||||
;;
|
||||
|
||||
let write_thresh_scf thresh_scf =
|
||||
Threshold.to_float thresh_scf
|
||||
|> Ezfio.set_hartree_fock_thresh_scf
|
||||
;;
|
||||
|
||||
|
||||
let read () =
|
||||
@ -47,6 +59,15 @@ end = struct
|
||||
}
|
||||
;;
|
||||
|
||||
|
||||
let write { n_it_scf_max ;
|
||||
thresh_scf ;
|
||||
} =
|
||||
write_n_it_scf_max n_it_scf_max;
|
||||
write_thresh_scf thresh_scf
|
||||
;;
|
||||
|
||||
|
||||
let to_string b =
|
||||
Printf.sprintf "
|
||||
n_it_scf_max = %s
|
||||
|
@ -83,9 +83,11 @@ let set str s =
|
||||
in
|
||||
match s with
|
||||
(*
|
||||
| Hartree_fock ->
|
||||
| Mo_basis ->
|
||||
*)
|
||||
| Hartree_fock ->
|
||||
Input.Hartree_fock.of_rst str
|
||||
|> Input.Hartree_fock.write
|
||||
| Full_ci ->
|
||||
Input.Full_ci.of_rst str
|
||||
|> Input.Full_ci.write
|
||||
@ -134,7 +136,6 @@ let run ezfio_filename =
|
||||
List.map ~f:get [
|
||||
Ao_basis ;
|
||||
Mo_basis ;
|
||||
Hartree_fock ;
|
||||
])
|
||||
in
|
||||
String.concat output
|
||||
@ -145,8 +146,9 @@ let run ezfio_filename =
|
||||
Nuclei ;
|
||||
Electrons ;
|
||||
Bielec_integrals ;
|
||||
Full_ci ;
|
||||
Hartree_fock ;
|
||||
Cisd_sc2 ;
|
||||
Full_ci ;
|
||||
Determinants ;
|
||||
]
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user