mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-30 16:13:42 +02:00
Input_bi_ints is written by qp_edit
This commit is contained in:
parent
f9fe342c58
commit
a6d2892ab7
@ -13,7 +13,8 @@ module Bielec_integrals : sig
|
||||
direct : 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
|
||||
@ -40,6 +41,11 @@ end = struct
|
||||
Ezfio.get_bielec_integrals_read_ao_integrals ()
|
||||
;;
|
||||
|
||||
let write_read_ao_integrals =
|
||||
Ezfio.set_bielec_integrals_read_ao_integrals
|
||||
;;
|
||||
|
||||
|
||||
let read_read_mo_integrals () =
|
||||
if not (Ezfio.has_bielec_integrals_read_mo_integrals ()) then
|
||||
get_default "read_mo_integrals"
|
||||
@ -49,6 +55,11 @@ end = struct
|
||||
Ezfio.get_bielec_integrals_read_mo_integrals ()
|
||||
;;
|
||||
|
||||
let write_read_mo_integrals =
|
||||
Ezfio.set_bielec_integrals_read_mo_integrals
|
||||
;;
|
||||
|
||||
|
||||
let read_write_ao_integrals () =
|
||||
if not (Ezfio.has_bielec_integrals_write_ao_integrals ()) then
|
||||
get_default "write_ao_integrals"
|
||||
@ -58,6 +69,11 @@ end = struct
|
||||
Ezfio.get_bielec_integrals_write_ao_integrals ()
|
||||
;;
|
||||
|
||||
let write_write_ao_integrals =
|
||||
Ezfio.set_bielec_integrals_write_ao_integrals
|
||||
;;
|
||||
|
||||
|
||||
let read_write_mo_integrals () =
|
||||
if not (Ezfio.has_bielec_integrals_write_mo_integrals ()) then
|
||||
get_default "write_mo_integrals"
|
||||
@ -67,6 +83,11 @@ end = struct
|
||||
Ezfio.get_bielec_integrals_write_mo_integrals ()
|
||||
;;
|
||||
|
||||
let write_write_mo_integrals =
|
||||
Ezfio.set_bielec_integrals_write_mo_integrals
|
||||
;;
|
||||
|
||||
|
||||
let read_direct () =
|
||||
if not (Ezfio.has_bielec_integrals_direct ()) then
|
||||
get_default "direct"
|
||||
@ -76,6 +97,11 @@ end = struct
|
||||
Ezfio.get_bielec_integrals_direct ()
|
||||
;;
|
||||
|
||||
let write_direct =
|
||||
Ezfio.set_bielec_integrals_direct
|
||||
;;
|
||||
|
||||
|
||||
let read_threshold_ao () =
|
||||
if not (Ezfio.has_bielec_integrals_threshold_ao ()) then
|
||||
get_default "threshold_ao"
|
||||
@ -86,6 +112,12 @@ end = struct
|
||||
|> Threshold.of_float
|
||||
;;
|
||||
|
||||
let write_threshold_ao t =
|
||||
Threshold.to_float t
|
||||
|> Ezfio.set_bielec_integrals_threshold_ao
|
||||
;;
|
||||
|
||||
|
||||
let read_threshold_mo () =
|
||||
if not (Ezfio.has_bielec_integrals_threshold_mo ()) then
|
||||
get_default "threshold_mo"
|
||||
@ -96,6 +128,12 @@ end = struct
|
||||
|> Threshold.of_float
|
||||
;;
|
||||
|
||||
let write_threshold_mo t =
|
||||
Threshold.to_float t
|
||||
|> Ezfio.set_bielec_integrals_threshold_mo
|
||||
;;
|
||||
|
||||
|
||||
let read ()=
|
||||
let result =
|
||||
{ read_ao_integrals = read_read_ao_integrals();
|
||||
@ -115,6 +153,22 @@ end = struct
|
||||
result
|
||||
;;
|
||||
|
||||
let write b =
|
||||
if (b.read_ao_integrals &&
|
||||
b.write_ao_integrals) then
|
||||
failwith "Read and Write AO integrals are both true.";
|
||||
if (b.read_mo_integrals &&
|
||||
b.write_mo_integrals) then
|
||||
failwith "Read and Write MO integrals are both true.";
|
||||
write_read_ao_integrals b.read_ao_integrals;
|
||||
write_read_mo_integrals b.read_mo_integrals;
|
||||
write_write_ao_integrals b.write_ao_integrals ;
|
||||
write_write_mo_integrals b.write_mo_integrals ;
|
||||
write_threshold_ao b.threshold_ao;
|
||||
write_threshold_mo b.threshold_mo;
|
||||
write_direct b.direct;
|
||||
;;
|
||||
|
||||
let to_string b =
|
||||
Printf.sprintf "
|
||||
read_ao_integrals = %s
|
||||
|
@ -92,10 +92,10 @@ let set str s =
|
||||
*)
|
||||
| Nuclei ->
|
||||
Input.Nuclei.of_rst str
|
||||
|> Input.Nuclei.write;
|
||||
|> Input.Nuclei.write
|
||||
| Bielec_integrals ->
|
||||
let b = Input.Bielec_integrals.of_rst str in
|
||||
print_string (Input.Bielec_integrals.to_string b);
|
||||
Input.Bielec_integrals.of_rst str
|
||||
|> Input.Bielec_integrals.write
|
||||
(*
|
||||
| Ao_basis ->
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user