10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-07 14:43:41 +01:00
QCaml/Basis/ERI.ml

43 lines
872 B
OCaml
Raw Normal View History

2018-01-19 03:14:06 +01:00
(** Electron-electron repulsion integrals *)
2018-02-02 01:25:10 +01:00
open Constants
open Util
2018-03-26 19:15:09 +02:00
2019-03-12 14:07:59 +01:00
module Zm = struct
2018-06-01 14:42:47 +02:00
let name = "Electron repulsion integrals"
2018-10-23 13:39:06 +02:00
2019-03-12 14:07:59 +01:00
open Zero_m_parameters
let zero_m z =
let expo_pq_inv = z.expo_p_inv +. z.expo_q_inv in
assert (expo_pq_inv <> 0.);
let exp_pq = 1. /. expo_pq_inv in
2019-03-12 14:07:59 +01:00
let t =
if z.norm_pq_sq > integrals_cutoff then
z.norm_pq_sq *. exp_pq
else 0.
in
let maxm = z.maxm in
let result = boys_function ~maxm t in
let rec aux accu k = function
| 0 -> result.(k) <- result.(k) *. accu
| l ->
begin
result.(k) <- result.(k) *. accu;
let new_accu = -. accu *. exp_pq in
aux new_accu (k+1) (l-1)
end
2018-06-01 14:42:47 +02:00
in
2019-03-12 14:07:59 +01:00
let f = two_over_sq_pi *. (sqrt exp_pq) in
aux f 0 maxm;
result
2018-06-01 14:42:47 +02:00
end
2018-10-23 13:39:06 +02:00
module M = TwoElectronIntegrals.Make(Zm)
include M
2018-02-02 10:10:05 +01:00