mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-08-30 00:03:42 +02:00
Fixed ERI
This commit is contained in:
parent
2877a9d492
commit
666a4f4f69
29
Basis/ERI.ml
29
Basis/ERI.ml
@ -121,35 +121,20 @@ let to_file ~filename basis =
|
|||||||
|
|
||||||
for i=0 to (Array.length basis) - 1 do
|
for i=0 to (Array.length basis) - 1 do
|
||||||
print_int basis.(i).Contracted_shell.indice ; print_newline ();
|
print_int basis.(i).Contracted_shell.indice ; print_newline ();
|
||||||
(*
|
|
||||||
for j=0 to i do
|
for j=0 to i do
|
||||||
*)
|
|
||||||
for j=0 to (Array.length basis) - 1 do
|
|
||||||
(*
|
|
||||||
let schwartz_p, schwartz_p_max = schwartz.(i).(j) in
|
let schwartz_p, schwartz_p_max = schwartz.(i).(j) in
|
||||||
*)
|
|
||||||
try
|
try
|
||||||
(*
|
|
||||||
if (schwartz_p_max < cutoff) then raise NullIntegral;
|
if (schwartz_p_max < cutoff) then raise NullIntegral;
|
||||||
*)
|
|
||||||
let
|
let
|
||||||
shell_p = shell_pairs.(i).(j)
|
shell_p = shell_pairs.(i).(j)
|
||||||
in
|
in
|
||||||
|
|
||||||
(*
|
|
||||||
for k=0 to i do
|
for k=0 to i do
|
||||||
for l=0 to k do
|
for l=0 to k do
|
||||||
*)
|
|
||||||
for k=0 to (Array.length basis) - 1 do
|
|
||||||
for l=0 to (Array.length basis) - 1 do
|
|
||||||
(*
|
|
||||||
let schwartz_q, schwartz_q_max = schwartz.(k).(l) in
|
let schwartz_q, schwartz_q_max = schwartz.(k).(l) in
|
||||||
*)
|
|
||||||
try
|
try
|
||||||
(*
|
|
||||||
if schwartz_p_max *. schwartz_q_max < cutoff2 then
|
if schwartz_p_max *. schwartz_q_max < cutoff2 then
|
||||||
raise NullIntegral;
|
raise NullIntegral;
|
||||||
*)
|
|
||||||
let
|
let
|
||||||
shell_q = shell_pairs.(k).(l)
|
shell_q = shell_pairs.(k).(l)
|
||||||
in
|
in
|
||||||
@ -162,26 +147,14 @@ let to_file ~filename basis =
|
|||||||
let cls =
|
let cls =
|
||||||
if swap then
|
if swap then
|
||||||
if Array.length shell_p < 2 then
|
if Array.length shell_p < 2 then
|
||||||
(*
|
|
||||||
contracted_class_shell_pairs ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p
|
contracted_class_shell_pairs ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p
|
||||||
*)
|
|
||||||
contracted_class_shell_pairs shell_q shell_p
|
|
||||||
else
|
else
|
||||||
(*
|
|
||||||
contracted_class_shell_pairs_vec ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p
|
contracted_class_shell_pairs_vec ~schwartz_p:schwartz_q ~schwartz_q:schwartz_p shell_q shell_p
|
||||||
*)
|
|
||||||
contracted_class_shell_pairs_vec shell_q shell_p
|
|
||||||
else
|
else
|
||||||
if Array.length shell_q < 2 then
|
if Array.length shell_q < 2 then
|
||||||
(*
|
|
||||||
contracted_class_shell_pairs ~schwartz_p ~schwartz_q shell_p shell_q
|
contracted_class_shell_pairs ~schwartz_p ~schwartz_q shell_p shell_q
|
||||||
*)
|
|
||||||
contracted_class_shell_pairs shell_p shell_q
|
|
||||||
else
|
else
|
||||||
(*
|
|
||||||
contracted_class_shell_pairs_vec ~schwartz_p ~schwartz_q shell_p shell_q
|
contracted_class_shell_pairs_vec ~schwartz_p ~schwartz_q shell_p shell_q
|
||||||
*)
|
|
||||||
contracted_class_shell_pairs_vec shell_p shell_q
|
|
||||||
in
|
in
|
||||||
|
|
||||||
(* Write the data in the output file *)
|
(* Write the data in the output file *)
|
||||||
@ -207,7 +180,6 @@ let to_file ~filename basis =
|
|||||||
Zmap.find cls key
|
Zmap.find cls key
|
||||||
in
|
in
|
||||||
eri_array.{(i_c-1),(k_c-1),(j_c-1),(l_c-1)} <- value;
|
eri_array.{(i_c-1),(k_c-1),(j_c-1),(l_c-1)} <- value;
|
||||||
(*
|
|
||||||
eri_array.{(j_c-1),(k_c-1),(i_c-1),(l_c-1)} <- value;
|
eri_array.{(j_c-1),(k_c-1),(i_c-1),(l_c-1)} <- value;
|
||||||
eri_array.{(i_c-1),(l_c-1),(j_c-1),(k_c-1)} <- value;
|
eri_array.{(i_c-1),(l_c-1),(j_c-1),(k_c-1)} <- value;
|
||||||
eri_array.{(j_c-1),(l_c-1),(i_c-1),(k_c-1)} <- value;
|
eri_array.{(j_c-1),(l_c-1),(i_c-1),(k_c-1)} <- value;
|
||||||
@ -215,7 +187,6 @@ let to_file ~filename basis =
|
|||||||
eri_array.{(k_c-1),(j_c-1),(l_c-1),(i_c-1)} <- value;
|
eri_array.{(k_c-1),(j_c-1),(l_c-1),(i_c-1)} <- value;
|
||||||
eri_array.{(l_c-1),(i_c-1),(k_c-1),(j_c-1)} <- value;
|
eri_array.{(l_c-1),(i_c-1),(k_c-1),(j_c-1)} <- value;
|
||||||
eri_array.{(l_c-1),(j_c-1),(k_c-1),(i_c-1)} <- value;
|
eri_array.{(l_c-1),(j_c-1),(k_c-1),(i_c-1)} <- value;
|
||||||
*)
|
|
||||||
if (abs_float value > cutoff) then
|
if (abs_float value > cutoff) then
|
||||||
(inn := !inn + 1;
|
(inn := !inn + 1;
|
||||||
)
|
)
|
||||||
|
@ -27,11 +27,9 @@ let run ~out =
|
|||||||
let basis = Lazy.force Basis.basis in
|
let basis = Lazy.force Basis.basis in
|
||||||
print_endline @@ Basis.to_string basis;
|
print_endline @@ Basis.to_string basis;
|
||||||
|
|
||||||
(*
|
Overlap.to_file ~filename:(out_file^".overlap") basis;
|
||||||
Overlap.to_file ~filename:(out_file^".overlap") basis
|
NucInt.to_file ~filename:(out_file^".nuc") basis nuclei;
|
||||||
ERI.to_file ~filename:(out_file^".eri") basis
|
ERI.to_file ~filename:(out_file^".eri") basis
|
||||||
*)
|
|
||||||
NucInt.to_file ~filename:(out_file^".nuc") basis nuclei
|
|
||||||
|
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
|
Loading…
Reference in New Issue
Block a user