10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-10-19 22:41:48 +02:00

Cleaned one-electron integrals

This commit is contained in:
Anthony Scemama 2018-10-17 16:28:57 +02:00
parent 75790e6972
commit bfa9fa8637
50 changed files with 530 additions and 1114 deletions

View File

@ -5,7 +5,7 @@ QP_ROOT=$PWD
cd -
# Normal installation
PACKAGES="core.v0.10.0 cryptokit ocamlfind sexplib.v0.10.0 zmq ppx_sexp_conv ppx_deriving jbuilder.1.0+beta17"
PACKAGES="core.v0.10.0 cryptokit ocamlfind sexplib.v0.10.0 zmq ppx_sexp_conv ppx_deriving"
# Needed for ZeroMQ
export C_INCLUDE_PATH="${QP_ROOT}"/include:"${C_INCLUDE_PATH}"
@ -76,8 +76,8 @@ source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
NCPUs=$(cat /proc/cpuinfo | grep -i MHz | wc -l)
${QP_ROOT}/bin/opam install -j ${NCPUs} stdint.0.4.2 -y -q || exit 1
${QP_ROOT}/bin/opam install -j ${NCPUs} ${PACKAGES} -y -q || exit 1
${QP_ROOT}/bin/opam install -j ${NCPUs} stdint.0.4.2 -y || exit 1
echo ${PACKAGES} | xargs ${QP_ROOT}/bin/opam install -j ${NCPUs} -y || exit 1
rm -f ../_build/ocaml.log

View File

@ -1,101 +1,38 @@
(* =~=~ *)
(* Init *)
(* =~=~ *)
open Qptypes;;
open Qputils;;
open Core;;
module Ao_basis : sig
type t =
{ ao_basis : AO_basis_name.t;
ao_num : AO_number.t ;
ao_prim_num : AO_prim_number.t array;
ao_prim_num_max : AO_prim_number.t;
ao_nucl : Nucl_number.t array;
ao_power : Symmetry.Xyz.t array;
ao_coef : AO_coef.t array;
ao_expo : AO_expo.t array;
ao_cartesian : bool;
} [@@deriving sexp]
;;
val read : unit -> t option
(* Generate type *)
type t =
{
disk_access_ao_one_integrals : Disk_access.t;
} [@@deriving sexp]
;;
val read : unit -> t option
val write : t-> unit
val to_string : t -> string
val to_basis : t -> Basis.t
val write : t -> unit
val to_md5 : t -> MD5.t
val to_rst : t -> Rst_string.t
val of_rst : Rst_string.t -> t option
end = struct
type t =
{ ao_basis : AO_basis_name.t;
ao_num : AO_number.t ;
ao_prim_num : AO_prim_number.t array;
ao_prim_num_max : AO_prim_number.t;
ao_nucl : Nucl_number.t array;
ao_power : Symmetry.Xyz.t array;
ao_coef : AO_coef.t array;
ao_expo : AO_expo.t array;
ao_cartesian : bool;
} [@@deriving sexp]
;;
(* Generate type *)
type t =
{
disk_access_ao_one_integrals : Disk_access.t;
} [@@deriving sexp]
;;
let get_default = Qpackage.get_ezfio_default "ao_basis";;
let read_ao_basis () =
Ezfio.get_ao_basis_ao_basis ()
|> AO_basis_name.of_string
;;
let read_ao_num () =
Ezfio.get_ao_basis_ao_num ()
|> AO_number.of_int
;;
let read_ao_prim_num () =
Ezfio.get_ao_basis_ao_prim_num ()
|> Ezfio.flattened_ezfio
|> Array.map ~f:AO_prim_number.of_int
;;
let read_ao_prim_num_max () =
Ezfio.get_ao_basis_ao_prim_num ()
|> Ezfio.flattened_ezfio
|> Array.fold ~f:(fun x y -> if x>y then x else y) ~init:0
|> AO_prim_number.of_int
;;
let read_ao_nucl () =
let nmax = Nucl_number.get_max () in
Ezfio.get_ao_basis_ao_nucl ()
|> Ezfio.flattened_ezfio
|> Array.map ~f:(fun x-> Nucl_number.of_int ~max:nmax x)
;;
let read_ao_power () =
let x = Ezfio.get_ao_basis_ao_power () in
let dim = x.Ezfio.dim.(0) in
let data = Ezfio.flattened_ezfio x in
let result = Array.init dim ~f:(fun x -> "") in
for i=1 to dim
do
if (data.(i-1) > 0) then
result.(i-1) <- result.(i-1)^"x"^(Int.to_string data.(i-1));
if (data.(dim+i-1) > 0) then
result.(i-1) <- result.(i-1)^"y"^(Int.to_string data.(dim+i-1));
if (data.(2*dim+i-1) > 0) then
result.(i-1) <- result.(i-1)^"z"^(Int.to_string data.(2*dim+i-1));
done;
Array.map ~f:Symmetry.Xyz.of_string result
;;
let read_ao_coef () =
Ezfio.get_ao_basis_ao_coef ()
|> Ezfio.flattened_ezfio
|> Array.map ~f:AO_coef.of_float
;;
let read_ao_expo () =
Ezfio.get_ao_basis_ao_expo ()
|> Ezfio.flattened_ezfio
|> Array.map ~f:AO_expo.of_float
;;
(* =~=~=~=~=~=~==~=~=~=~=~=~ *)
(* Generate Special Function *)
(* =~=~=~==~=~~=~=~=~=~=~=~=~ *)
(* Read snippet for ao_cartesian *)
let read_ao_cartesian () =
if not (Ezfio.has_ao_basis_ao_cartesian ()) then
get_default "ao_cartesian"
@ -104,191 +41,133 @@ end = struct
;
Ezfio.get_ao_basis_ao_cartesian ()
;;
let to_long_basis b =
let ao_num = AO_number.to_int b.ao_num in
let gto_array = Array.init (AO_number.to_int b.ao_num)
~f:(fun i ->
let s = Symmetry.Xyz.to_symmetry b.ao_power.(i) in
let ao_prim_num = AO_prim_number.to_int b.ao_prim_num.(i) in
let prims = List.init ao_prim_num ~f:(fun j ->
let prim = { GaussianPrimitive.sym = s ;
GaussianPrimitive.expo = b.ao_expo.(ao_num*j+i)
}
in
let coef = b.ao_coef.(ao_num*j+i) in
(prim,coef)
) in
Gto.of_prim_coef_list prims
)
in
let rec do_work accu sym gto nucl =
match (sym, gto, nucl) with
| (s::srest, g::grest, n::nrest) ->
do_work ((s,g,n)::accu) srest grest nrest
| ([],[],[]) -> List.rev accu
| _ -> assert false
in
do_work []
(Array.to_list b.ao_power)
(Array.to_list gto_array)
(Array.to_list b.ao_nucl)
;;
let to_basis b =
to_long_basis b
|> Long_basis.to_basis
;;
let to_md5 b =
let short_basis = to_basis b in
Basis.to_md5 short_basis
;;
let write_md5 b =
to_md5 b
|> MD5.to_string
|> Ezfio.set_ao_basis_ao_md5
(* Write snippet for ao_cartesian *)
let write_ao_cartesian =
Ezfio.set_ao_basis_ao_cartesian
;;
let write_ao_basis name =
AO_basis_name.to_string name
|> Ezfio.set_ao_basis_ao_basis
(* Read snippet for ao_prim_num_max *)
let read_ao_prim_num_max () =
if not (Ezfio.has_ao_basis_ao_prim_num_max ()) then
get_default "ao_prim_num_max"
|> Int.of_string
|> Ezfio.set_ao_basis_ao_prim_num_max
;
Ezfio.get_ao_basis_ao_prim_num_max ()
;;
(* Write snippet for ao_prim_num_max *)
let write_ao_prim_num_max =
Ezfio.set_ao_basis_ao_prim_num_max
;;
let write b =
let { ao_basis ;
ao_num ;
ao_prim_num ;
ao_prim_num_max ;
ao_nucl ;
ao_power ;
ao_coef ;
ao_expo ;
ao_cartesian ;
} = b
in
write_md5 b ;
write_ao_basis ao_basis;
(* Read snippet for disk_access_ao_one_integrals *)
let read_disk_access_ao_one_integrals () =
if not (Ezfio.has_ao_basis_disk_access_ao_one_integrals ()) then
get_default "disk_access_ao_one_integrals"
|> String.of_string
|> Ezfio.set_ao_basis_disk_access_ao_one_integrals
;
Ezfio.get_ao_basis_disk_access_ao_one_integrals ()
|> Disk_access.of_string
;;
(* Write snippet for disk_access_ao_one_integrals *)
let write_disk_access_ao_one_integrals var =
Disk_access.to_string var
|> Ezfio.set_ao_basis_disk_access_ao_one_integrals
;;
let read () =
if (Ezfio.has_ao_basis_ao_basis ()) then
begin
let result =
{ ao_basis = read_ao_basis ();
ao_num = read_ao_num () ;
ao_prim_num = read_ao_prim_num ();
ao_prim_num_max = read_ao_prim_num_max ();
ao_nucl = read_ao_nucl ();
ao_power = read_ao_power ();
ao_coef = read_ao_coef () ;
ao_expo = read_ao_expo () ;
ao_cartesian = read_ao_cartesian () ;
}
in
to_md5 result
|> MD5.to_string
|> Ezfio.set_ao_basis_ao_md5 ;
Some result
end
else
None
(* Read snippet for integral_kinetic *)
let read_integral_kinetic () =
if not (Ezfio.has_ao_basis_integral_kinetic ()) then
get_default "integral_kinetic"
|> Float.of_string
|> Ezfio.set_ao_basis_integral_kinetic
;
Ezfio.get_ao_basis_integral_kinetic ()
;;
let to_rst b =
let print_sym =
let l = List.init (Array.length b.ao_power) ~f:(
fun i -> ( (i+1),b.ao_nucl.(i),b.ao_power.(i) ) ) in
let rec do_work = function
| [] -> []
| (i,n,x)::tail ->
(Printf.sprintf " %5d %6d %-8s\n" i (Nucl_number.to_int n) (Symmetry.Xyz.to_string x))::
(do_work tail)
in do_work l
|> String.concat
in
let short_basis = to_basis b in
Printf.sprintf "
Name of the AO basis ::
ao_basis = %s
Cartesian coordinates (6d,10f,...) ::
ao_cartesian = %s
Basis set (read-only) ::
%s
======= ========= ===========
Basis Nucleus Symmetries
======= ========= ===========
%s
======= ========= ===========
" (AO_basis_name.to_string b.ao_basis)
(Bool.to_string b.ao_cartesian)
(Basis.to_string short_basis
|> String.split ~on:'\n'
|> List.map ~f:(fun x-> " "^x)
|> String.concat ~sep:"\n"
) print_sym
|> Rst_string.of_string
(* Write snippet for integral_kinetic *)
let write_integral_kinetic =
Ezfio.set_ao_basis_integral_kinetic
;;
let read_rst s =
let s = Rst_string.to_string s
|> String.split ~on:'\n'
in
let rec extract_basis = function
| [] -> failwith "Error in basis set"
| line :: tail ->
let line = String.strip line in
if line = "Basis set (read-only) ::" then
String.concat tail ~sep:"\n"
else
extract_basis tail
in
extract_basis s
(* Read snippet for integral_nuclear *)
let read_integral_nuclear () =
if not (Ezfio.has_ao_basis_integral_nuclear ()) then
get_default "integral_nuclear"
|> Float.of_string
|> Ezfio.set_ao_basis_integral_nuclear
;
Ezfio.get_ao_basis_integral_nuclear ()
;;
(* Write snippet for integral_nuclear *)
let write_integral_nuclear =
Ezfio.set_ao_basis_integral_nuclear
;;
let to_string b =
Printf.sprintf "
ao_basis = %s
ao_num = %s
ao_prim_num = %s
ao_prim_num_max = %s
ao_nucl = %s
ao_power = %s
ao_coef = %s
ao_expo = %s
ao_cartesian = %s
md5 = %s
"
(AO_basis_name.to_string b.ao_basis)
(AO_number.to_string b.ao_num)
(b.ao_prim_num |> Array.to_list |> List.map
~f:(AO_prim_number.to_string) |> String.concat ~sep:", " )
(AO_prim_number.to_string b.ao_prim_num_max)
(b.ao_nucl |> Array.to_list |> List.map ~f:Nucl_number.to_string |>
String.concat ~sep:", ")
(b.ao_power |> Array.to_list |> List.map ~f:(fun x->
"("^(Symmetry.Xyz.to_string x)^")" )|> String.concat ~sep:", ")
(b.ao_coef |> Array.to_list |> List.map ~f:AO_coef.to_string
|> String.concat ~sep:", ")
(b.ao_expo |> Array.to_list |> List.map ~f:AO_expo.to_string
|> String.concat ~sep:", ")
(b.ao_cartesian |> Bool.to_string)
(to_md5 b |> MD5.to_string )
(* Read snippet for integral_overlap *)
let read_integral_overlap () =
if not (Ezfio.has_ao_basis_integral_overlap ()) then
get_default "integral_overlap"
|> Float.of_string
|> Ezfio.set_ao_basis_integral_overlap
;
Ezfio.get_ao_basis_integral_overlap ()
;;
(* Write snippet for integral_overlap *)
let write_integral_overlap =
Ezfio.set_ao_basis_integral_overlap
;;
end
(* Read snippet for integral_pseudo *)
let read_integral_pseudo () =
if not (Ezfio.has_ao_basis_integral_pseudo ()) then
get_default "integral_pseudo"
|> Float.of_string
|> Ezfio.set_ao_basis_integral_pseudo
;
Ezfio.get_ao_basis_integral_pseudo ()
;;
(* Write snippet for integral_pseudo *)
let write_integral_pseudo =
Ezfio.set_ao_basis_integral_pseudo
;;
(* =~=~=~=~=~=~=~=~=~=~=~=~ *)
(* Generate Global Function *)
(* =~=~=~=~=~=~=~=~=~=~=~=~ *)
(* Read all *)
let read() =
Some
{
disk_access_ao_one_integrals = read_disk_access_ao_one_integrals ();
}
;;
(* Write all *)
let write{
disk_access_ao_one_integrals;
} =
write_disk_access_ao_one_integrals disk_access_ao_one_integrals;
;;
(* to_string*)
let to_string b =
Printf.sprintf "
disk_access_ao_one_integrals = %s
"
(Disk_access.to_string b.disk_access_ao_one_integrals)
;;
(* to_rst*)
let to_rst b =
Printf.sprintf "
Read/Write AO one-electron integrals from/to disk [ Write | Read | None ] ::
disk_access_ao_one_integrals = %s
"
(Disk_access.to_string b.disk_access_ao_one_integrals)
|> Rst_string.of_string
;;
include Generic_input_of_rst;;
let of_rst = of_rst t_of_sexp;;
end

View File

@ -1,229 +1,131 @@
open Qptypes
open Qputils
open Core
(* =~=~ *)
(* Init *)
(* =~=~ *)
open Qptypes;;
open Qputils;;
open Core;;
module Mo_basis : sig
type t =
{ mo_tot_num : MO_number.t ;
mo_label : MO_label.t;
mo_class : MO_class.t array;
mo_occ : MO_occ.t array;
mo_coef : (MO_coef.t array) array;
ao_md5 : MD5.t;
} [@@deriving sexp]
val read : unit -> t option
(* Generate type *)
type t =
{
disk_access_mo_one_integrals : Disk_access.t;
} [@@deriving sexp]
;;
val read : unit -> t option
val write : t-> unit
val to_string : t -> string
val to_rst : t -> Rst_string.t
val of_rst : Rst_string.t -> t option
end = struct
type t =
{ mo_tot_num : MO_number.t ;
mo_label : MO_label.t;
mo_class : MO_class.t array;
mo_occ : MO_occ.t array;
mo_coef : (MO_coef.t array) array;
ao_md5 : MD5.t;
} [@@deriving sexp]
let get_default = Qpackage.get_ezfio_default "mo_basis"
(* Generate type *)
type t =
{
disk_access_mo_one_integrals : Disk_access.t;
} [@@deriving sexp]
;;
let read_mo_label () =
if not (Ezfio.has_mo_basis_mo_label ()) then
Ezfio.set_mo_basis_mo_label "None"
let get_default = Qpackage.get_ezfio_default "mo_basis";;
(* =~=~=~=~=~=~==~=~=~=~=~=~ *)
(* Generate Special Function *)
(* =~=~=~==~=~~=~=~=~=~=~=~=~ *)
(* Read snippet for disk_access_mo_one_integrals *)
let read_disk_access_mo_one_integrals () =
if not (Ezfio.has_mo_basis_disk_access_mo_one_integrals ()) then
get_default "disk_access_mo_one_integrals"
|> String.of_string
|> Ezfio.set_mo_basis_disk_access_mo_one_integrals
;
Ezfio.get_mo_basis_mo_label ()
|> MO_label.of_string
Ezfio.get_mo_basis_disk_access_mo_one_integrals ()
|> Disk_access.of_string
;;
(* Write snippet for disk_access_mo_one_integrals *)
let write_disk_access_mo_one_integrals var =
Disk_access.to_string var
|> Ezfio.set_mo_basis_disk_access_mo_one_integrals
;;
(* Read snippet for integral_kinetic *)
let read_integral_kinetic () =
if not (Ezfio.has_mo_basis_integral_kinetic ()) then
get_default "integral_kinetic"
|> Float.of_string
|> Ezfio.set_mo_basis_integral_kinetic
;
Ezfio.get_mo_basis_integral_kinetic ()
;;
(* Write snippet for integral_kinetic *)
let write_integral_kinetic =
Ezfio.set_mo_basis_integral_kinetic
;;
let read_ao_md5 () =
let ao_md5 =
match (Input_ao_basis.Ao_basis.read ()) with
| None -> failwith "Unable to read AO basis"
| Some result -> Input_ao_basis.Ao_basis.to_md5 result
in
let result =
if not (Ezfio.has_mo_basis_ao_md5 ()) then
begin
MD5.to_string ao_md5
|> Ezfio.set_mo_basis_ao_md5
end;
Ezfio.get_mo_basis_ao_md5 ()
|> MD5.of_string
in
if (ao_md5 <> result) then
failwith "The current MOs don't correspond to the current AOs.";
result
(* Read snippet for integral_nuclear *)
let read_integral_nuclear () =
if not (Ezfio.has_mo_basis_integral_nuclear ()) then
get_default "integral_nuclear"
|> Float.of_string
|> Ezfio.set_mo_basis_integral_nuclear
;
Ezfio.get_mo_basis_integral_nuclear ()
;;
(* Write snippet for integral_nuclear *)
let write_integral_nuclear =
Ezfio.set_mo_basis_integral_nuclear
;;
(* Read snippet for integral_pseudo *)
let read_integral_pseudo () =
if not (Ezfio.has_mo_basis_integral_pseudo ()) then
get_default "integral_pseudo"
|> Float.of_string
|> Ezfio.set_mo_basis_integral_pseudo
;
Ezfio.get_mo_basis_integral_pseudo ()
;;
(* Write snippet for integral_pseudo *)
let write_integral_pseudo =
Ezfio.set_mo_basis_integral_pseudo
;;
let read_mo_tot_num () =
Ezfio.get_mo_basis_mo_tot_num ()
|> MO_number.of_int
let read_mo_class () =
if not (Ezfio.has_mo_basis_mo_class ()) then
begin
let mo_tot_num = MO_number.to_int (read_mo_tot_num ()) in
let data =
Array.init mo_tot_num ~f:(fun _ -> MO_class.(to_string (Active [])))
|> Array.to_list
in
Ezfio.ezfio_array_of_list ~rank:1
~dim:[| mo_tot_num |] ~data:data
|> Ezfio.set_mo_basis_mo_class
end;
Ezfio.flattened_ezfio (Ezfio.get_mo_basis_mo_class () )
|> Array.map ~f:MO_class.of_string
let read_mo_occ () =
if not (Ezfio.has_mo_basis_mo_label ()) then
begin
let elec_alpha_num = Ezfio.get_electrons_elec_alpha_num ()
and elec_beta_num = Ezfio.get_electrons_elec_beta_num ()
and mo_tot_num = MO_number.to_int (read_mo_tot_num ()) in
let data = Array.init mo_tot_num ~f:(fun i ->
if (i<elec_beta_num) then 2.
else if (i < elec_alpha_num) then 1.
else 0.) |> Array.to_list in
Ezfio.ezfio_array_of_list ~rank:1
~dim:[| mo_tot_num |] ~data:data
|> Ezfio.set_mo_basis_mo_occ
end;
Ezfio.flattened_ezfio (Ezfio.get_mo_basis_mo_occ () )
|> Array.map ~f:MO_occ.of_float
let read_mo_coef () =
let a = Ezfio.get_mo_basis_mo_coef ()
|> Ezfio.flattened_ezfio
|> Array.map ~f:MO_coef.of_float
in
let mo_tot_num = read_mo_tot_num () |> MO_number.to_int in
let ao_num = (Array.length a)/mo_tot_num in
Array.init mo_tot_num ~f:(fun j ->
Array.sub ~pos:(j*ao_num) ~len:(ao_num) a
)
let read () =
if (Ezfio.has_mo_basis_mo_tot_num ()) then
Some
{ mo_tot_num = read_mo_tot_num ();
mo_label = read_mo_label () ;
mo_class = read_mo_class ();
mo_occ = read_mo_occ ();
mo_coef = read_mo_coef ();
ao_md5 = read_ao_md5 ();
}
else
None
let mo_coef_to_string mo_coef =
let ao_num = Array.length mo_coef.(0)
and mo_tot_num = Array.length mo_coef in
let rec print_five imin imax =
match (imax-imin+1) with
| 1 ->
let header = [ Printf.sprintf " #%15d" (imin+1) ; ] in
let new_lines =
List.init ao_num ~f:(fun i ->
Printf.sprintf " %3d %15.10f " (i+1)
(MO_coef.to_float mo_coef.(imin ).(i)) )
in header @ new_lines
| 2 ->
let header = [ Printf.sprintf " #%15d %15d" (imin+1) (imin+2) ; ] in
let new_lines =
List.init ao_num ~f:(fun i ->
Printf.sprintf " %3d %15.10f %15.10f" (i+1)
(MO_coef.to_float mo_coef.(imin ).(i))
(MO_coef.to_float mo_coef.(imin+1).(i)) )
in header @ new_lines
| 3 ->
let header = [ Printf.sprintf " #%15d %15d %15d"
(imin+1) (imin+2) (imin+3); ] in
let new_lines =
List.init ao_num ~f:(fun i ->
Printf.sprintf " %3d %15.10f %15.10f %15.10f" (i+1)
(MO_coef.to_float mo_coef.(imin ).(i))
(MO_coef.to_float mo_coef.(imin+1).(i))
(MO_coef.to_float mo_coef.(imin+2).(i)) )
in header @ new_lines
| 4 ->
let header = [ Printf.sprintf " #%15d %15d %15d %15d"
(imin+1) (imin+2) (imin+3) (imin+4) ; ] in
let new_lines =
List.init ao_num ~f:(fun i ->
Printf.sprintf " %3d %15.10f %15.10f %15.10f %15.10f" (i+1)
(MO_coef.to_float mo_coef.(imin ).(i))
(MO_coef.to_float mo_coef.(imin+1).(i))
(MO_coef.to_float mo_coef.(imin+2).(i))
(MO_coef.to_float mo_coef.(imin+3).(i)) )
in header @ new_lines
| 5 ->
let header = [ Printf.sprintf " #%15d %15d %15d %15d %15d"
(imin+1) (imin+2) (imin+3) (imin+4) (imin+5) ; ] in
let new_lines =
List.init ao_num ~f:(fun i ->
Printf.sprintf " %3d %15.10f %15.10f %15.10f %15.10f %15.10f" (i+1)
(MO_coef.to_float mo_coef.(imin ).(i))
(MO_coef.to_float mo_coef.(imin+1).(i))
(MO_coef.to_float mo_coef.(imin+2).(i))
(MO_coef.to_float mo_coef.(imin+3).(i))
(MO_coef.to_float mo_coef.(imin+4).(i)) )
in header @ new_lines
| _ -> assert false
in
let rec create_list accu i =
if (i+4 < mo_tot_num) then
create_list ( (print_five i (i+3) |> String.concat ~sep:"\n")::accu ) (i+4)
else
(print_five i (mo_tot_num-1) |> String.concat ~sep:"\n")::accu |> List.rev
in
create_list [] 0 |> String.concat ~sep:"\n\n"
let to_rst b =
Printf.sprintf "
Label of the molecular orbitals ::
mo_label = %s
Total number of MOs ::
mo_tot_num = %s
MO coefficients ::
%s
"
(MO_label.to_string b.mo_label)
(MO_number.to_string b.mo_tot_num)
(mo_coef_to_string b.mo_coef)
|> Rst_string.of_string
let to_string b =
Printf.sprintf "
mo_label = %s
mo_tot_num = \"%s\"
mo_clas = %s
mo_occ = %s
mo_coef = %s
"
(MO_label.to_string b.mo_label)
(MO_number.to_string b.mo_tot_num)
(b.mo_class |> Array.to_list |> List.map
~f:(MO_class.to_string) |> String.concat ~sep:", " )
(b.mo_occ |> Array.to_list |> List.map
~f:(MO_occ.to_string) |> String.concat ~sep:", " )
(b.mo_coef |> Array.map
~f:(fun x-> Array.map ~f:MO_coef.to_string x |> String.concat_array
~sep:"," ) |>
String.concat_array ~sep:"\n" )
end
(* =~=~=~=~=~=~=~=~=~=~=~=~ *)
(* Generate Global Function *)
(* =~=~=~=~=~=~=~=~=~=~=~=~ *)
(* Read all *)
let read() =
Some
{
disk_access_mo_one_integrals = read_disk_access_mo_one_integrals ();
}
;;
(* Write all *)
let write{
disk_access_mo_one_integrals;
} =
write_disk_access_mo_one_integrals disk_access_mo_one_integrals;
;;
(* to_string*)
let to_string b =
Printf.sprintf "
disk_access_mo_one_integrals = %s
"
(Disk_access.to_string b.disk_access_mo_one_integrals)
;;
(* to_rst*)
let to_rst b =
Printf.sprintf "
Read/Write MO one-electron integrals from/to disk [ Write | Read | None ] ::
disk_access_mo_one_integrals = %s
"
(Disk_access.to_string b.disk_access_mo_one_integrals)
|> Rst_string.of_string
;;
include Generic_input_of_rst;;
let of_rst = of_rst t_of_sexp;;
end

View File

@ -1 +1 @@
Integrals_Bielec MOGuess Bitmask
Integrals_Bielec AO_one_e_integrals MOGuess Bitmask

View File

@ -1 +1 @@
Integrals_Monoelec Integrals_Bielec Hartree_Fock
AO_one_e_integrals MO_one_e_integrals Integrals_Bielec Hartree_Fock

View File

@ -1,7 +1,7 @@
program read_integrals
PROVIDE ezfio_filename
call ezfio_set_integrals_monoelec_disk_access_ao_one_integrals("None")
call ezfio_set_ao_one_e_integrals_disk_access_ao_one_integrals("None")
call run
end
@ -22,41 +22,54 @@ subroutine run
integer(key_kind) :: key
allocate (A(ao_num,ao_num))
A = 0.d0
iunit = getunitandopen('kinetic_ao','r')
do
do
read (iunit,*,end=10) i,j, integral
A(i,j) = integral
A(j,i) = integral
enddo
10 continue
close(iunit)
call write_one_e_integrals('ao_kinetic_integral', A, size(A,1), size(A,2))
call ezfio_set_ao_one_e_integrals_integral_kinetic(A(1:ao_num, 1:ao_num))
A = 0.d0
iunit = getunitandopen('overlap_ao','r')
do
read (iunit,*,end=11) i,j, integral
A(i,j) = integral
enddo
11 continue
close(iunit)
call ezfio_set_ao_one_e_integrals_integral_overlap(A(1:ao_num, 1:ao_num))
A = 0.d0
iunit = getunitandopen('pseudo_ao','r')
do
read (iunit,*,end=14) i,j, integral
A(i,j) = integral
enddo
14 continue
close(iunit)
call ezfio_set_ao_one_e_integrals_integral_pseudo(A(1:ao_num,1:ao_num))
A = 0.d0
iunit = getunitandopen('nuclear_ao','r')
do
do
read (iunit,*,end=12) i,j, integral
A(i,j) = integral
A(j,i) = integral
enddo
12 continue
close(iunit)
call write_one_e_integrals('ao_ne_integral', A, size(A,1), size(A,2))
call ezfio_set_ao_one_e_integrals_integral_nuclear(A(1:ao_num, 1:ao_num))
call write_one_e_integrals('ao_pseudo_integral', ao_pseudo_integral,&
size(ao_pseudo_integral,1), size(ao_pseudo_integral,2))
call ezfio_set_integrals_monoelec_disk_access_ao_one_integrals("Read")
call ezfio_set_ao_one_e_integrals_disk_access_ao_one_integrals("Read")
allocate(buffer_i(ao_num**4), buffer_values(ao_num**4))
iunit = getunitandopen('bielec_ao','r')
n_integrals=0
do
buffer_values = 0.d0
do
read (iunit,*,end=13) i,j,k,l, integral
n_integrals += 1
call bielec_integrals_index(i, j, k, l, buffer_i(n_integrals) )
@ -64,7 +77,8 @@ subroutine run
enddo
13 continue
close(iunit)
call insert_into_ao_integrals_map(n_integrals,buffer_i,buffer_values)
call map_sort(ao_integrals_map)

View File

@ -11,7 +11,7 @@ program read_integrals
integer :: i,j,n
PROVIDE ezfio_filename
call ezfio_set_integrals_monoelec_disk_access_mo_one_integrals("None")
call ezfio_set_mo_one_e_integrals_disk_access_mo_one_integrals("None")
logical :: has
call ezfio_has_mo_basis_mo_tot_num(has)
@ -74,7 +74,7 @@ subroutine run
enddo
10 continue
close(iunit)
call write_one_e_integrals('mo_kinetic_integral', A, size(A,1), size(A,2))
call ezfio_set_mo_one_e_integrals_integral_kinetic(mo_kinetic_integral)
iunit = getunitandopen('nuclear_mo','r')
@ -84,10 +84,10 @@ subroutine run
enddo
12 continue
close(iunit)
call write_one_e_integrals('mo_ne_integral', A, size(A,1), size(A,2))
call ezfio_set_mo_one_e_integrals_integral_nuclear(A)
call ezfio_set_mo_one_e_integrals_integral_pseudo(mo_pseudo_integral)
call write_one_e_integrals('mo_pseudo_integral', mo_pseudo_integral,&
size(mo_pseudo_integral,1), size(mo_pseudo_integral,2))
call ezfio_set_mo_one_e_integrals_disk_access_mo_one_integrals("Read")
call ezfio_set_integrals_monoelec_disk_access_mo_one_integrals("Read")

View File

@ -11,7 +11,7 @@ program read_integrals
integer :: i,j,n
PROVIDE ezfio_filename
call ezfio_set_integrals_monoelec_disk_access_mo_one_integrals("None")
call ezfio_set_mo_one_e_integrals_disk_access_mo_one_integrals("None")
logical :: has
call ezfio_has_mo_basis_mo_tot_num(has)
@ -66,7 +66,7 @@ subroutine run
enddo
10 continue
close(iunit)
call write_one_e_integrals('mo_kinetic_integral', A, size(A,1), size(A,2))
call ezfio_set_mo_one_e_integrals_integral_kinetic(mo_kinetic_integral)
iunit = getunitandopen('nuclear_mo','r')
@ -76,11 +76,8 @@ subroutine run
enddo
12 continue
close(iunit)
call write_one_e_integrals('mo_ne_integral', A, size(A,1), size(A,2))
call ezfio_set_mo_one_e_integrals_integral_nuclear(A)
call ezfio_set_mo_one_e_integrals_integral_pseudo(mo_pseudo_integral)
call write_one_e_integrals('mo_pseudo_integral', mo_pseudo_integral,&
size(mo_pseudo_integral,1), size(mo_pseudo_integral,2))
call ezfio_set_integrals_monoelec_disk_access_mo_one_integrals("Read")
call ezfio_set_mo_one_e_integrals_disk_access_mo_one_integrals("Read")
end

View File

@ -301,7 +301,6 @@ if __name__ == '__main__':
# Don't update if we are not in the main repository
from is_master_repository import is_master_repository
if not is_master_repository:
print >> sys.stderr, 'Not in the master repo'
sys.exit(0)
path = os.path.join(module_abs, ".gitignore")

View File

@ -55,33 +55,3 @@ doc: If true, use AOs in Cartesian coordinates (6d,10f,...)
interface: ezfio, provider
default: false
[integral_overlap]
type: double precision
doc: Overlap integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[integral_nuclear]
type: double precision
doc: Nucleus-electron integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[integral_kinetic]
type: double precision
doc: Kinetic energy integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[integral_pseudo]
type: double precision
doc: Pseudopotential integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false

View File

@ -0,0 +1,35 @@
[integral_nuclear]
type: double precision
doc: Nucleus-electron integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[integral_kinetic]
type: double precision
doc: Kinetic energy integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[integral_pseudo]
type: double precision
doc: Pseudopotential integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[integral_overlap]
type: double precision
doc: Overlap integrals in AO basis set
size: (ao_basis.ao_num,ao_basis.ao_num)
interface: ezfio
default: false
[disk_access_ao_one_integrals]
type: Disk_access
doc: Read/Write AO one-electron integrals from/to disk [ Write | Read | None ]
interface: ezfio,provider,ocaml
default: None

View File

@ -0,0 +1 @@
AO_Basis Pseudo

View File

@ -0,0 +1,14 @@
==================
AO_one_e_integrals
==================
All the one-electron integrals in AO basis are here.
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.

View File

@ -1,4 +1,4 @@
BEGIN_PROVIDER [ double precision, ao_overlap_matrix,(ao_num,ao_num) ]
BEGIN_PROVIDER [ double precision, ao_overlap,(ao_num,ao_num) ]
&BEGIN_PROVIDER [ double precision, ao_overlap_x,(ao_num,ao_num) ]
&BEGIN_PROVIDER [ double precision, ao_overlap_y,(ao_num,ao_num) ]
&BEGIN_PROVIDER [ double precision, ao_overlap_z,(ao_num,ao_num) ]
@ -14,6 +14,15 @@
double precision :: alpha, beta, c
double precision :: A_center(3), B_center(3)
integer :: power_A(3), power_B(3)
ao_overlap = 0.d0
ao_overlap_x = 0.d0
ao_overlap_y = 0.d0
ao_overlap_z = 0.d0
if (read_ao_one_integrals) then
call ezfio_get_ao_one_e_integrals_integral_overlap(ao_overlap(1:ao_num, 1:ao_num))
print *, 'AO overlap integrals read from disk'
else
dim1=100
!$OMP PARALLEL DO SCHEDULE(GUIDED) &
!$OMP DEFAULT(NONE) &
@ -21,7 +30,7 @@
!$OMP overlap_x,overlap_y, overlap_z, overlap, &
!$OMP alpha, beta,i,j,c) &
!$OMP SHARED(nucl_coord,ao_power,ao_prim_num, &
!$OMP ao_overlap_x,ao_overlap_y,ao_overlap_z,ao_overlap_matrix,ao_num,ao_coef_normalized_ordered_transp,ao_nucl, &
!$OMP ao_overlap_x,ao_overlap_y,ao_overlap_z,ao_overlap,ao_num,ao_coef_normalized_ordered_transp,ao_nucl, &
!$OMP ao_expo_ordered_transp,dim1)
do j=1,ao_num
A_center(1) = nucl_coord( ao_nucl(j), 1 )
@ -31,10 +40,6 @@
power_A(2) = ao_power( j, 2 )
power_A(3) = ao_power( j, 3 )
do i= 1,ao_num
ao_overlap_matrix(i,j)= 0.d0
ao_overlap_x(i,j)= 0.d0
ao_overlap_y(i,j)= 0.d0
ao_overlap_z(i,j)= 0.d0
B_center(1) = nucl_coord( ao_nucl(i), 1 )
B_center(2) = nucl_coord( ao_nucl(i), 2 )
B_center(3) = nucl_coord( ao_nucl(i), 3 )
@ -47,7 +52,7 @@
beta = ao_expo_ordered_transp(l,i)
call overlap_gaussian_xyz(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,overlap_y,overlap_z,overlap,dim1)
c = ao_coef_normalized_ordered_transp(n,j) * ao_coef_normalized_ordered_transp(l,i)
ao_overlap_matrix(i,j) += c * overlap
ao_overlap(i,j) += c * overlap
ao_overlap_x(i,j) += c * overlap_x
ao_overlap_y(i,j) += c * overlap_y
ao_overlap_z(i,j) += c * overlap_z
@ -56,6 +61,11 @@
enddo
enddo
!$OMP END PARALLEL DO
endif
if (write_ao_one_integrals) then
call ezfio_set_ao_one_e_integrals_integral_overlap(ao_overlap(1:ao_num, 1:ao_num))
print *, 'AO overlap integrals written to disk'
endif
END_PROVIDER
@ -119,7 +129,7 @@ BEGIN_PROVIDER [ double precision, S_inv,(ao_num,ao_num) ]
BEGIN_DOC
! S^-1
END_DOC
call get_pseudo_inverse(ao_overlap_matrix,size(ao_overlap_matrix,1),ao_num,ao_num,S_inv,size(S_inv,1))
call get_pseudo_inverse(ao_overlap,size(ao_overlap,1),ao_num,ao_num,S_inv,size(S_inv,1))
END_PROVIDER
BEGIN_PROVIDER [ double precision, S_half_inv, (AO_num,AO_num) ]
@ -136,7 +146,7 @@ BEGIN_PROVIDER [ double precision, S_half_inv, (AO_num,AO_num) ]
integer :: info, i, j, k
double precision, parameter :: threshold_overlap_AO_eigenvalues = 1.d-6
LDA = size(AO_overlap_matrix,1)
LDA = size(AO_overlap,1)
LDC = size(S_half_inv,1)
allocate( &
@ -145,7 +155,7 @@ BEGIN_PROVIDER [ double precision, S_half_inv, (AO_num,AO_num) ]
D(AO_num))
call svd( &
AO_overlap_matrix,LDA, &
AO_overlap,LDA, &
U,LDC, &
D, &
Vt,LDA, &
@ -194,7 +204,7 @@ BEGIN_PROVIDER [ double precision, S_half, (ao_num,ao_num) ]
allocate(U(ao_num,ao_num),Vt(ao_num,ao_num),D(ao_num))
call svd(ao_overlap_matrix,size(ao_overlap_matrix,1),U,size(U,1),D,Vt,size(Vt,1),ao_num,ao_num)
call svd(ao_overlap,size(ao_overlap,1),U,size(U,1),D,Vt,size(Vt,1),ao_num,ao_num)
do i=1,ao_num
D(i) = dsqrt(D(i))

View File

@ -128,7 +128,7 @@ BEGIN_PROVIDER [double precision, ao_kinetic_integral, (ao_num,ao_num)]
integer :: i,j,k,l
if (read_ao_one_integrals) then
call ezfio_get_ao_basis_integral_kinetic(ao_kinetic_integral)
call ezfio_get_ao_one_e_integrals_integral_kinetic(ao_kinetic_integral)
print *, 'AO kinetic integrals read from disk'
else
!$OMP PARALLEL DO DEFAULT(NONE) &
@ -142,7 +142,7 @@ BEGIN_PROVIDER [double precision, ao_kinetic_integral, (ao_num,ao_num)]
!$OMP END PARALLEL DO
endif
if (write_ao_one_integrals) then
call ezfio_set_ao_basis_integral_kinetic(ao_kinetic_integral)
call ezfio_set_ao_one_e_integrals_integral_kinetic(ao_kinetic_integral)
print *, 'AO kinetic integrals written to disk'
endif
END_PROVIDER

View File

@ -11,7 +11,7 @@ BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral, (ao_num,ao_num)]
double precision :: overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult
if (read_ao_one_integrals) then
call ezfio_get_ao_basis_integral_nuclear(ao_nucl_elec_integral)
call ezfio_get_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral)
print *, 'AO N-e integrals read from disk'
else
@ -73,7 +73,7 @@ BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral, (ao_num,ao_num)]
!$OMP END PARALLEL
endif
if (write_ao_one_integrals) then
call ezfio_set_ao_basis_integral_nuclear(ao_nucl_elec_integral)
call ezfio_set_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral)
print *, 'AO N-e integrals written to disk'
endif

View File

@ -5,7 +5,7 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral, (ao_num,ao_num)]
END_DOC
if (read_ao_one_integrals) then
call ezfio_get_ao_basis_integral_pseudo(ao_pseudo_integral)
call ezfio_get_ao_one_e_integrals_integral_pseudo(ao_pseudo_integral)
print *, 'AO pseudopotential integrals read from disk'
else
@ -21,7 +21,7 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral, (ao_num,ao_num)]
endif
if (write_ao_one_integrals) then
call ezfio_set_ao_basis_integral_pseudo(ao_pseudo_integral)
call ezfio_set_ao_one_e_integrals_integral_pseudo(ao_pseudo_integral)
print *, 'AO pseudopotential integrals written to disk'
endif

View File

@ -0,0 +1,28 @@
BEGIN_PROVIDER [ logical, read_ao_one_integrals ]
&BEGIN_PROVIDER [ logical, write_ao_one_integrals ]
BEGIN_DOC
! One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
END_DOC
implicit none
if (disk_access_ao_one_integrals.EQ.'Read') then
read_ao_one_integrals = .True.
write_ao_one_integrals = .False.
else if (disk_access_ao_one_integrals.EQ.'Write') then
read_ao_one_integrals = .False.
write_ao_one_integrals = .True.
else if (disk_access_ao_one_integrals.EQ.'None') then
read_ao_one_integrals = .False.
write_ao_one_integrals = .False.
else
print *, 'bielec_integrals/disk_access_ao_integrals has a wrong type'
stop 1
endif
END_PROVIDER

View File

@ -46,7 +46,7 @@ BEGIN_PROVIDER [ integer(bit_kind), full_ijkl_bitmask_4, (N_int,4) ]
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), core_inact_act_bitmask_4, (N_int,4) ]
BEGIN_PROVIDER [ integer(bit_kind), core_inact_act_bitmask_4, (N_int,4) ]
implicit none
integer :: i
do i=1,N_int

View File

@ -1 +1 @@
Integrals_Monoelec Integrals_Bielec
MO_Basis MO_one_e_integrals Integrals_Bielec

View File

@ -1 +1 @@
Pseudo Bitmask ZMQ FourIdx
AO_one_e_integrals MO_one_e_integrals Pseudo Bitmask ZMQ FourIdx AO_Basis MO_Basis

View File

@ -1,12 +0,0 @@
[disk_access_mo_one_integrals]
type: Disk_access
doc: Read/Write MO one-electron integrals from/to disk [ Write | Read | None ]
interface: ezfio,provider,ocaml
default: None
[disk_access_ao_one_integrals]
type: Disk_access
doc: Read/Write AO one-electron integrals from/to disk [ Write | Read | None ]
interface: ezfio,provider,ocaml
default: None

View File

@ -1 +0,0 @@
MO_Basis Pseudo

View File

@ -1,332 +0,0 @@
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
* `Pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo>`_
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
* `Pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo>`_
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
`ao_deriv2_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/kin_ao_ints.irp.f#L1>`_
second derivatives matrix elements in the ao basis
.. math::
.br
{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle
`ao_deriv2_y <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/kin_ao_ints.irp.f#L2>`_
second derivatives matrix elements in the ao basis
.. math::
.br
{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle
`ao_deriv2_z <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/kin_ao_ints.irp.f#L3>`_
second derivatives matrix elements in the ao basis
.. math::
.br
{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle
`ao_deriv_1_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L148>`_
array of the integrals of AO_i * d/dx AO_j
array of the integrals of AO_i * d/dy AO_j
array of the integrals of AO_i * d/dz AO_j
`ao_deriv_1_y <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L149>`_
array of the integrals of AO_i * d/dx AO_j
array of the integrals of AO_i * d/dy AO_j
array of the integrals of AO_i * d/dz AO_j
`ao_deriv_1_z <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L150>`_
array of the integrals of AO_i * d/dx AO_j
array of the integrals of AO_i * d/dy AO_j
array of the integrals of AO_i * d/dz AO_j
`ao_dipole_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L75>`_
array of the integrals of AO_i * x AO_j
array of the integrals of AO_i * y AO_j
array of the integrals of AO_i * z AO_j
`ao_dipole_y <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L76>`_
array of the integrals of AO_i * x AO_j
array of the integrals of AO_i * y AO_j
array of the integrals of AO_i * z AO_j
`ao_dipole_z <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L77>`_
array of the integrals of AO_i * x AO_j
array of the integrals of AO_i * y AO_j
array of the integrals of AO_i * z AO_j
`ao_kinetic_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/kin_ao_ints.irp.f#L125>`_
array of the priminitve basis kinetic integrals
\langle \chi_i |\hat{T}| \chi_j \rangle
`ao_mono_elec_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/ao_mono_ints.irp.f#L1>`_
array of the mono electronic hamiltonian on the AOs basis
: sum of the kinetic and nuclear electronic potential
`ao_mono_elec_integral_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/ao_mono_ints.irp.f#L2>`_
array of the mono electronic hamiltonian on the AOs basis
: sum of the kinetic and nuclear electronic potential
`ao_nucl_elec_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L1>`_
interaction nuclear electron
`ao_nucl_elec_integral_per_atom <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L83>`_
ao_nucl_elec_integral_per_atom(i,j,k) = -<AO(i)|1/|r-Rk|AO(j)>
where Rk is the geometry of the kth atom
`ao_pseudo_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L1>`_
Pseudo-potential integrals
`ao_pseudo_integral_local <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L32>`_
Local pseudo-potential
`ao_pseudo_integral_non_local <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L131>`_
Local pseudo-potential
`ao_spread_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L1>`_
array of the integrals of AO_i * x^2 AO_j
array of the integrals of AO_i * y^2 AO_j
array of the integrals of AO_i * z^2 AO_j
`ao_spread_y <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L2>`_
array of the integrals of AO_i * x^2 AO_j
array of the integrals of AO_i * y^2 AO_j
array of the integrals of AO_i * z^2 AO_j
`ao_spread_z <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L3>`_
array of the integrals of AO_i * x^2 AO_j
array of the integrals of AO_i * y^2 AO_j
array of the integrals of AO_i * z^2 AO_j
`check_ortho <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/check_orthonormality.irp.f#L1>`_
Undocumented
`disk_access_ao_one_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/ezfio_interface.irp.f#L25>`_
Read/Write AO one-electron integrals from/to disk [ Write | Read | None ]
`disk_access_mo_one_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/ezfio_interface.irp.f#L6>`_
Read/Write MO one-electron integrals from/to disk [ Write | Read | None ]
`do_print <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/check_orthonormality.irp.f#L11>`_
Undocumented
`give_polynom_mult_center_mono_elec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L228>`_
Undocumented
`i_x1_pol_mult_mono_elec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L356>`_
Undocumented
`i_x2_pol_mult_mono_elec <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L427>`_
Undocumented
`int_gaus_pol <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L498>`_
Undocumented
`mo_dipole_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_mo.irp.f#L1>`_
array of the integrals of MO_i * x MO_j
array of the integrals of MO_i * y MO_j
array of the integrals of MO_i * z MO_j
`mo_dipole_y <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_mo.irp.f#L2>`_
array of the integrals of MO_i * x MO_j
array of the integrals of MO_i * y MO_j
array of the integrals of MO_i * z MO_j
`mo_dipole_z <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_mo.irp.f#L3>`_
array of the integrals of MO_i * x MO_j
array of the integrals of MO_i * y MO_j
array of the integrals of MO_i * z MO_j
`mo_kinetic_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/kin_mo_ints.irp.f#L1>`_
Kinetic energy integrals in the MO basis
`mo_mono_elec_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/mo_mono_ints.irp.f#L1>`_
array of the mono electronic hamiltonian on the MOs basis :
sum of the kinetic and nuclear electronic potential (and pseudo potential if needed)
`mo_nucl_elec_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_mo_ints.irp.f#L1>`_
interaction nuclear electron on the MO basis
`mo_nucl_elec_integral_per_atom <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_mo_ints.irp.f#L28>`_
mo_nucl_elec_integral_per_atom(i,j,k) = -<MO(i)|1/|r-Rk|MO(j)>
where Rk is the geometry of the kth atom
`mo_pseudo_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_mo_pseudo_ints.irp.f#L1>`_
interaction nuclear electron on the MO basis
`mo_spread_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_mo.irp.f#L32>`_
array of the integrals of MO_i * x^2 MO_j
array of the integrals of MO_i * y^2 MO_j
array of the integrals of MO_i * z^2 MO_j
`mo_spread_y <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_mo.irp.f#L33>`_
array of the integrals of MO_i * x^2 MO_j
array of the integrals of MO_i * y^2 MO_j
array of the integrals of MO_i * z^2 MO_j
`mo_spread_z <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_mo.irp.f#L34>`_
array of the integrals of MO_i * x^2 MO_j
array of the integrals of MO_i * y^2 MO_j
array of the integrals of MO_i * z^2 MO_j
`nai_pol_mult <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L148>`_
Undocumented
`orthonormalize_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/orthonormalize.irp.f#L1>`_
Undocumented
`overlap_bourrin_deriv_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L365>`_
Undocumented
`overlap_bourrin_dipole <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L318>`_
Undocumented
`overlap_bourrin_spread <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L265>`_
Undocumented
`overlap_bourrin_x <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L380>`_
Undocumented
`overlap_bourrin_x_abs <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L226>`_
Undocumented
`power <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/spread_dipole_ao.irp.f#L310>`_
Undocumented
`pseudo_dz_k_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L233>`_
Transposed arrays for pseudopotentials
`pseudo_dz_kl_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L251>`_
Transposed arrays for pseudopotentials
`pseudo_n_k_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L232>`_
Transposed arrays for pseudopotentials
`pseudo_n_kl_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L250>`_
Transposed arrays for pseudopotentials
`pseudo_v_k_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L231>`_
Transposed arrays for pseudopotentials
`pseudo_v_kl_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_pseudo_ints.irp.f#L249>`_
Transposed arrays for pseudopotentials
`read_ao_one_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/read_write.irp.f#L1>`_
One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
`read_mo_one_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/read_write.irp.f#L2>`_
One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
`read_one_e_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/read_write.irp.f#L67>`_
Read the 1-electron integrals into in A(m,n) from file 'filename'
`save_ortho_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/save_ortho_mos.irp.f#L1>`_
Undocumented
`v_e_n <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L479>`_
Undocumented
`v_phi <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L543>`_
Undocumented
`v_r <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L527>`_
Undocumented
`v_theta <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L556>`_
Undocumented
`wallis <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/pot_ao_ints.irp.f#L572>`_
Undocumented
`write_ao_one_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/read_write.irp.f#L3>`_
One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
`write_mo_one_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/read_write.irp.f#L4>`_
One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
`write_one_e_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Integrals_Monoelec/read_write.irp.f#L49>`_
Write the 1-electron integrals stored in A(m,n) into file 'filename'

View File

@ -1,84 +0,0 @@
BEGIN_PROVIDER [ logical, read_ao_one_integrals ]
&BEGIN_PROVIDER [ logical, read_mo_one_integrals ]
&BEGIN_PROVIDER [ logical, write_ao_one_integrals ]
&BEGIN_PROVIDER [ logical, write_mo_one_integrals ]
BEGIN_DOC
! One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
END_DOC
implicit none
if (disk_access_ao_one_integrals.EQ.'Read') then
read_ao_one_integrals = .True.
write_ao_one_integrals = .False.
else if (disk_access_ao_one_integrals.EQ.'Write') then
read_ao_one_integrals = .False.
write_ao_one_integrals = .True.
else if (disk_access_ao_one_integrals.EQ.'None') then
read_ao_one_integrals = .False.
write_ao_one_integrals = .False.
else
print *, 'bielec_integrals/disk_access_ao_integrals has a wrong type'
stop 1
endif
if (disk_access_mo_one_integrals.EQ.'Read') then
read_mo_one_integrals = .True.
write_mo_one_integrals = .False.
else if (disk_access_mo_one_integrals.EQ.'Write') then
read_mo_one_integrals = .False.
write_mo_one_integrals = .True.
else if (disk_access_mo_one_integrals.EQ.'None') then
read_mo_one_integrals = .False.
write_mo_one_integrals = .False.
else
print *, 'bielec_integrals/disk_access_mo_integrals has a wrong type'
stop 1
endif
END_PROVIDER
subroutine write_one_e_integrals(filename, A, m, n)
implicit none
BEGIN_DOC
! Write the 1-electron integrals stored in A(m,n) into file 'filename'
END_DOC
character(len=*), intent(in) :: filename
integer, intent(in) :: m,n
double precision, intent(in) :: A(m,n)
integer :: iunit
integer, external :: getUnitAndOpen
character*(256) :: f
iunit = getUnitAndOpen( trim(ezfio_work_dir)//trim(filename), 'W' )
write(iunit) A
close(iunit)
end
subroutine read_one_e_integrals(filename, A, m, n)
implicit none
BEGIN_DOC
! Read the 1-electron integrals into in A(m,n) from file 'filename'
END_DOC
character(len=*), intent(in) :: filename
integer, intent(in) :: m,n
double precision, intent(out) :: A(m,n)
integer :: iunit
integer, external :: getUnitAndOpen
character*(256) :: f
iunit = getUnitAndOpen( trim(ezfio_work_dir)//trim(filename), 'R' )
read(iunit) A
close(iunit)
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1 +1 @@
Integrals_Monoelec
MO_Basis MO_one_e_integrals

View File

@ -31,26 +31,3 @@ type: character*(32)
doc: Ao_md5
interface: ezfio
[integral_nuclear]
type: double precision
doc: Nucleus-electron integrals in MO basis set
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
interface: ezfio
default: false
[integral_kinetic]
type: double precision
doc: Kinetic energy integrals in MO basis set
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
interface: ezfio
default: false
[integral_pseudo]
type: double precision
doc: Pseudopotential integrals in MO basis set
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
interface: ezfio
default: false

View File

@ -1 +1 @@
AO_Basis Electrons
AO_Basis AO_one_e_integrals Electrons

View File

@ -174,18 +174,6 @@ BEGIN_PROVIDER [ double precision, mo_coef_transp, (mo_tot_num,ao_num) ]
END_PROVIDER
BEGIN_PROVIDER [ double precision, S_mo_coef, (ao_num, mo_tot_num) ]
implicit none
BEGIN_DOC
! Product S.C where S is the overlap matrix in the AO basis and C the mo_coef matrix.
END_DOC
call dgemm('N','N', ao_num, mo_tot_num, ao_num, &
1.d0, ao_overlap,size(ao_overlap,1), &
mo_coef, size(mo_coef,1), &
0.d0, S_mo_coef, size(S_mo_coef,1))
END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_occ, (mo_tot_num) ]
implicit none
@ -254,33 +242,6 @@ subroutine ao_to_mo(A_ao,LDA_ao,A_mo,LDA_mo)
deallocate(T)
end
subroutine mo_to_ao(A_mo,LDA_mo,A_ao,LDA_ao)
implicit none
BEGIN_DOC
! Transform A from the MO basis to the AO basis
!
! (S.C).A_mo.(S.C)t
END_DOC
integer, intent(in) :: LDA_ao,LDA_mo
double precision, intent(in) :: A_mo(LDA_mo,mo_tot_num)
double precision, intent(out) :: A_ao(LDA_ao,ao_num)
double precision, allocatable :: T(:,:)
allocate ( T(mo_tot_num,ao_num) )
call dgemm('N','T', mo_tot_num, ao_num, mo_tot_num, &
1.d0, A_mo,size(A_mo,1), &
S_mo_coef, size(S_mo_coef,1), &
0.d0, T, size(T,1))
call dgemm('N','N', ao_num, ao_num, mo_tot_num, &
1.d0, S_mo_coef, size(S_mo_coef,1), &
T, size(T,1), &
0.d0, A_ao, size(A_ao,1))
deallocate(T)
end
subroutine mo_to_ao_no_overlap(A_mo,LDA_mo,A_ao,LDA_ao)
implicit none
BEGIN_DOC

View File

@ -1,53 +0,0 @@
program pouet
implicit none
integer :: i,j,k
double precision :: r(3)
double precision, allocatable :: aos_array(:),mos_array(:),ao_ortho_array(:)
allocate(aos_array(ao_num),mos_array(mo_tot_num), ao_ortho_array(ao_num))
integer :: nx,ny
double precision :: interval_x
double precision :: xmin,xmax
double precision :: dx
double precision :: interval_y
double precision :: ymin,ymax
double precision :: dy
double precision :: val_max
!do i = 1, ao_num
! write(41,'(100(F16.10,X))'),ao_ortho_canonical_overlap(i,:)
!enddo
!stop
xmin = nucl_coord(1,1)-6.d0
xmax = nucl_coord(2,1)+6.d0
interval_x = xmax - xmin
!interval_x = nucl_dist(1,3)
nx = 500
dx = interval_x/dble(nx)
!dx = dabs(interval_x)/dble(nx) * 1.d0/sqrt(2.d0)
r = 0.d0
r(3) = xmin
!r(2) = nucl_coord(1,2)
!r(3) = nucl_coord(1,3)
!r(1) = nucl_coord(2,1)
!r(2) = 1.D0
!r(3) = nucl_coord(2,3)
double precision :: dr(3)
!dr = 0.d0
!dr(1) = -dx
!dr(3) = dx
do j = 1, nx+1
call give_all_mos_at_r(r,mos_array)
write(37,'(100(F16.10,X))') r(3),mos_array(1)*mos_array(1) , mos_array(2)*mos_array(2), mos_array(1)*mos_array(2)
write(38,'(100(F16.10,X))') r(3),mos_array(1), mos_array(2), mos_array(1)*mos_array(2)
! write(38,'(100(F16.10,X))') r(3),mos_array(10), mos_array(2) - 0.029916d0 * mos_array(10),mos_array(2) + 0.029916d0 * mos_array(10)
r(3) += dx
! r += dr
enddo
deallocate(aos_array,mos_array, ao_ortho_array)
end

View File

@ -0,0 +1,27 @@
[integral_nuclear]
type: double precision
doc: Nucleus-electron integrals in MO basis set
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
interface: ezfio
default: false
[integral_kinetic]
type: double precision
doc: Kinetic energy integrals in MO basis set
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
interface: ezfio
default: false
[integral_pseudo]
type: double precision
doc: Pseudopotential integrals in MO basis set
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
interface: ezfio
default: false
[disk_access_mo_one_integrals]
type: Disk_access
doc: Read/Write MO one-electron integrals from/to disk [ Write | Read | None ]
interface: ezfio,provider,ocaml
default: None

View File

@ -0,0 +1 @@
AO_one_e_integrals MO_Basis Pseudo

View File

@ -0,0 +1,14 @@
==================
MO_one_e_integrals
==================
All the one-electron integrals in MO basis are here.
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.

View File

@ -0,0 +1,41 @@
subroutine mo_to_ao(A_mo,LDA_mo,A_ao,LDA_ao)
implicit none
BEGIN_DOC
! Transform A from the MO basis to the AO basis
!
! (S.C).A_mo.(S.C)t
END_DOC
integer, intent(in) :: LDA_ao,LDA_mo
double precision, intent(in) :: A_mo(LDA_mo,mo_tot_num)
double precision, intent(out) :: A_ao(LDA_ao,ao_num)
double precision, allocatable :: T(:,:)
allocate ( T(mo_tot_num,ao_num) )
call dgemm('N','T', mo_tot_num, ao_num, mo_tot_num, &
1.d0, A_mo,size(A_mo,1), &
S_mo_coef, size(S_mo_coef,1), &
0.d0, T, size(T,1))
call dgemm('N','N', ao_num, ao_num, mo_tot_num, &
1.d0, S_mo_coef, size(S_mo_coef,1), &
T, size(T,1), &
0.d0, A_ao, size(A_ao,1))
deallocate(T)
end
BEGIN_PROVIDER [ double precision, S_mo_coef, (ao_num, mo_tot_num) ]
implicit none
BEGIN_DOC
! Product S.C where S is the overlap matrix in the AO basis and C the mo_coef matrix.
END_DOC
call dgemm('N','N', ao_num, mo_tot_num, ao_num, &
1.d0, ao_overlap,size(ao_overlap,1), &
mo_coef, size(mo_coef,1), &
0.d0, S_mo_coef, size(S_mo_coef,1))
END_PROVIDER

View File

@ -5,7 +5,7 @@ BEGIN_PROVIDER [double precision, mo_kinetic_integral, (mo_tot_num,mo_tot_num)]
END_DOC
if (read_mo_one_integrals) then
call ezfio_get_mo_basis_integral_kinetic(mo_kinetic_integral)
call ezfio_get_mo_one_e_integrals_integral_kinetic(mo_kinetic_integral)
print *, 'MO kinetic integrals read from disk'
else
call ao_to_mo( &
@ -16,7 +16,7 @@ BEGIN_PROVIDER [double precision, mo_kinetic_integral, (mo_tot_num,mo_tot_num)]
)
endif
if (write_mo_one_integrals) then
call ezfio_set_mo_basis_integral_kinetic(mo_kinetic_integral)
call ezfio_set_mo_one_e_integrals_integral_kinetic(mo_kinetic_integral)
print *, 'MO kinetic integrals written to disk'
endif

View File

@ -5,7 +5,7 @@ BEGIN_PROVIDER [double precision, mo_nucl_elec_integral, (mo_tot_num,mo_tot_num)
END_DOC
if (read_mo_one_integrals) then
call ezfio_get_mo_basis_integral_nuclear(mo_nucl_elec_integral)
call ezfio_get_mo_one_e_integrals_integral_nuclear(mo_nucl_elec_integral)
print *, 'MO N-e integrals read from disk'
else
call ao_to_mo( &
@ -16,7 +16,7 @@ BEGIN_PROVIDER [double precision, mo_nucl_elec_integral, (mo_tot_num,mo_tot_num)
)
endif
if (write_mo_one_integrals) then
call ezfio_set_mo_basis_integral_nuclear(mo_nucl_elec_integral)
call ezfio_set_mo_one_e_integrals_integral_nuclear(mo_nucl_elec_integral)
print *, 'MO N-e integrals written to disk'
endif

View File

@ -5,7 +5,7 @@ BEGIN_PROVIDER [double precision, mo_pseudo_integral, (mo_tot_num,mo_tot_num)]
END_DOC
if (read_mo_one_integrals) then
call ezfio_get_mo_basis_integral_pseudo(mo_pseudo_integral)
call ezfio_get_mo_one_e_integrals_integral_pseudo(mo_pseudo_integral)
print *, 'MO pseudopotential integrals read from disk'
else
call ao_to_mo( &
@ -16,7 +16,7 @@ BEGIN_PROVIDER [double precision, mo_pseudo_integral, (mo_tot_num,mo_tot_num)]
)
endif
if (write_mo_one_integrals) then
call ezfio_set_mo_basis_integral_pseudo(mo_pseudo_integral)
call ezfio_set_mo_one_e_integrals_integral_pseudo(mo_pseudo_integral)
print *, 'MO pseudopotential integrals written to disk'
endif

View File

@ -0,0 +1,28 @@
BEGIN_PROVIDER [ logical, read_mo_one_integrals ]
&BEGIN_PROVIDER [ logical, write_mo_one_integrals ]
BEGIN_DOC
! One level of abstraction for disk_access_mo_integrals
END_DOC
implicit none
if (disk_access_mo_one_integrals.EQ.'Read') then
read_mo_one_integrals = .True.
write_mo_one_integrals = .False.
else if (disk_access_mo_one_integrals.EQ.'Write') then
read_mo_one_integrals = .False.
write_mo_one_integrals = .True.
else if (disk_access_mo_one_integrals.EQ.'None') then
read_mo_one_integrals = .False.
write_mo_one_integrals = .False.
else
print *, 'bielec_integrals/disk_access_mo_integrals has a wrong type'
stop 1
endif
END_PROVIDER

View File

@ -1 +1 @@
Integrals_Monoelec Integrals_Bielec Bitmask
MO_one_e_integrals Integrals_Bielec Bitmask