10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-21 20:03:32 +01:00

Added multipole integrals in run_integrals

This commit is contained in:
Anthony Scemama 2020-09-25 16:17:43 +02:00
parent 1ff2505f03
commit c8b1170270
3 changed files with 25 additions and 0 deletions

View File

@ -227,3 +227,18 @@ let of_basis basis =
done;
result
let to_file ~filename eni_array =
let n = Mat.dim1 eni_array in
let oc = open_out filename in
for j=1 to n do
for i=1 to j do
let value = eni_array.{i,j} in
if (value <> 0.) then
Printf.fprintf oc " %5d %5d %20.15f\n" i j value;
done;
done;
close_out oc

View File

@ -55,3 +55,8 @@ val matrix_r2 : t -> Mat.t
val of_basis : Basis.t -> t
val to_file : filename:string -> Mat.t -> unit
(** Write a matrix to a file *)

View File

@ -48,10 +48,15 @@ let run () =
let eN_ints = AOBasis.eN_ints ao_basis in
let kin_ints = AOBasis.kin_ints ao_basis in
let ee_ints = AOBasis.ee_ints ao_basis in
let multipole = AOBasis.multipole ao_basis in
Overlap.to_file ~filename:("Ov.dat") overlap;
NucInt.to_file ~filename:("Nuc.dat") eN_ints;
KinInt.to_file ~filename:("Kin.dat") kin_ints;
ERI.to_file ~filename:("ERI.dat") ee_ints;
Multipole.to_file ~filename:("x.dat") (Multipole.matrix_x multipole);
Multipole.to_file ~filename:("y.dat") (Multipole.matrix_y multipole);
Multipole.to_file ~filename:("z.dat") (Multipole.matrix_z multipole);
match range_separation with
| Some _mu ->
ERI_lr.to_file ~filename:("ERI_lr.dat") (AOBasis.ee_lr_ints ao_basis)