mirror of
https://github.com/LCPQ/quantum_package
synced 2025-04-16 13:39:32 +02:00
Input_cisd_sc2.ml
This commit is contained in:
parent
7f76f8e2c6
commit
c1cbf80080
@ -25,7 +25,7 @@ determinants
|
|||||||
s2_eig True
|
s2_eig True
|
||||||
|
|
||||||
full_ci
|
full_ci
|
||||||
n_det_max_fci 1000000
|
n_det_max_fci 10000
|
||||||
pt2_max 1.e-4
|
pt2_max 1.e-4
|
||||||
do_pt2_end True
|
do_pt2_end True
|
||||||
|
|
||||||
@ -33,4 +33,8 @@ hartree_fock
|
|||||||
n_it_scf_max 200
|
n_it_scf_max 200
|
||||||
thresh_scf 1.e-10
|
thresh_scf 1.e-10
|
||||||
|
|
||||||
|
cisd_sc2_selected
|
||||||
|
n_det_max_cisd_sc2 10000
|
||||||
|
pt2_max 1.e-4
|
||||||
|
do_pt2_end True
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ include Input_ao_basis;;
|
|||||||
include Input_bi_integrals;;
|
include Input_bi_integrals;;
|
||||||
include Input_bitmasks;;
|
include Input_bitmasks;;
|
||||||
include Input_cis;;
|
include Input_cis;;
|
||||||
|
include Input_cisd_sc2;;
|
||||||
include Input_determinants;;
|
include Input_determinants;;
|
||||||
|
|
||||||
|
|
||||||
|
69
ocaml/Input_cisd_sc2.ml
Normal file
69
ocaml/Input_cisd_sc2.ml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
open Qptypes;;
|
||||||
|
open Qputils;;
|
||||||
|
open Core.Std;;
|
||||||
|
|
||||||
|
module Cisd_sc2 : sig
|
||||||
|
type t
|
||||||
|
val read : unit -> t
|
||||||
|
val to_string : t -> string
|
||||||
|
end = struct
|
||||||
|
type t =
|
||||||
|
{ n_det_max_cisd_sc2 : Strictly_positive_int.t;
|
||||||
|
pt2_max : Positive_float.t;
|
||||||
|
do_pt2_end : bool;
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
|
||||||
|
let get_default = Qpackage.get_ezfio_default "cisd_sc2_selected";;
|
||||||
|
|
||||||
|
let read_n_det_max_cisd_sc2 () =
|
||||||
|
if not (Ezfio.has_cisd_sc2_selected_n_det_max_cisd_sc2 ()) then
|
||||||
|
get_default "n_det_max_cisd_sc2"
|
||||||
|
|> Int.of_string
|
||||||
|
|> Ezfio.set_cisd_sc2_selected_n_det_max_cisd_sc2
|
||||||
|
;
|
||||||
|
Ezfio.get_cisd_sc2_selected_n_det_max_cisd_sc2 ()
|
||||||
|
|> Strictly_positive_int.of_int
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
let read_pt2_max () =
|
||||||
|
if not (Ezfio.has_cisd_sc2_selected_pt2_max ()) then
|
||||||
|
get_default "pt2_max"
|
||||||
|
|> Float.of_string
|
||||||
|
|> Ezfio.set_cisd_sc2_selected_pt2_max
|
||||||
|
;
|
||||||
|
Ezfio.get_cisd_sc2_selected_pt2_max ()
|
||||||
|
|> Positive_float.of_float
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
let read_do_pt2_end () =
|
||||||
|
if not (Ezfio.has_cisd_sc2_selected_do_pt2_end ()) then
|
||||||
|
get_default "do_pt2_end"
|
||||||
|
|> Bool.of_string
|
||||||
|
|> Ezfio.set_cisd_sc2_selected_do_pt2_end
|
||||||
|
;
|
||||||
|
Ezfio.get_cisd_sc2_selected_do_pt2_end ()
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
let read () =
|
||||||
|
{ n_det_max_cisd_sc2 = read_n_det_max_cisd_sc2 ();
|
||||||
|
pt2_max = read_pt2_max ();
|
||||||
|
do_pt2_end = read_do_pt2_end ();
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
|
||||||
|
let to_string b =
|
||||||
|
Printf.sprintf "
|
||||||
|
n_det_max_cisd_sc2 = %s
|
||||||
|
pt2_max = %s
|
||||||
|
do_pt2_end = %s
|
||||||
|
"
|
||||||
|
(Strictly_positive_int.to_string b.n_det_max_cisd_sc2)
|
||||||
|
(Positive_float.to_string b.pt2_max)
|
||||||
|
(Bool.to_string b.do_pt2_end)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
@ -33,4 +33,11 @@ let test_dets () =
|
|||||||
print_endline (Input.Determinants.to_string b);
|
print_endline (Input.Determinants.to_string b);
|
||||||
;;
|
;;
|
||||||
|
|
||||||
test_dets();;
|
let test_cisd_sc2 () =
|
||||||
|
Ezfio.set_file "F2.ezfio" ;
|
||||||
|
let b = Input.Cisd_sc2.read ()
|
||||||
|
in
|
||||||
|
print_endline (Input.Cisd_sc2.to_string b);
|
||||||
|
;;
|
||||||
|
|
||||||
|
test_cisd_sc2();;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user