mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-02 10:38:24 +01:00
Renamed mu_erf into range_separation
This commit is contained in:
parent
712115fdcc
commit
29eb18bc19
@ -16,9 +16,9 @@ module T = struct
|
||||
|
||||
let zero_m z =
|
||||
let mu_erf =
|
||||
match z.mu_erf with
|
||||
match z.range_separation with
|
||||
| Some x -> x
|
||||
| None -> 0.5 (* TODO invalid_arg "mu_erf is None" *)
|
||||
| None -> 0.5 (* TODO invalid_arg "range_separation is None" *)
|
||||
in
|
||||
let m = mu_erf *. mu_erf in
|
||||
let expo_pq_inv = z.expo_p_inv +. z.expo_q_inv in
|
||||
|
@ -301,7 +301,7 @@ let rec hvrr_two_e
|
||||
|
||||
|
||||
|
||||
let contracted_class_shell_pair_couple ~zero_m ?mu_erf shell_pair_couple : float Zmap.t =
|
||||
let contracted_class_shell_pair_couple ~zero_m ?range_separation shell_pair_couple : float Zmap.t =
|
||||
|
||||
let maxm = Am.to_int (Cspc.ang_mom shell_pair_couple) in
|
||||
|
||||
@ -340,7 +340,7 @@ let contracted_class_shell_pair_couple ~zero_m ?mu_erf shell_pair_couple : float
|
||||
let norm_pq_sq = Co.dot center_pq center_pq in
|
||||
let expo_p_inv = Psp.exponent_inv sp_ab in
|
||||
let expo_q_inv = Psp.exponent_inv sp_cd in
|
||||
let zero = Zp.zero ?mu_erf zero_m in
|
||||
let zero = Zp.zero ?range_separation zero_m in
|
||||
let zero_m_array = zero_m
|
||||
{ zero with
|
||||
maxm ; expo_p_inv ; expo_q_inv ; norm_pq_sq ;
|
||||
@ -411,7 +411,7 @@ let contracted_class_shell_pair_couple ~zero_m ?mu_erf shell_pair_couple : float
|
||||
|
||||
|
||||
|
||||
let contracted_class_atomic_shell_pair_couple ~zero_m ?mu_erf atomic_shell_pair_couple : float Zmap.t =
|
||||
let contracted_class_atomic_shell_pair_couple ~zero_m ?range_separation atomic_shell_pair_couple : float Zmap.t =
|
||||
|
||||
let maxm = Am.to_int (Aspc.ang_mom atomic_shell_pair_couple) in
|
||||
|
||||
@ -454,7 +454,7 @@ let contracted_class_atomic_shell_pair_couple ~zero_m ?mu_erf atomic_shell_pair_
|
||||
let norm_pq_sq = Co.dot center_pq center_pq in
|
||||
let expo_q_inv = Psp.exponent_inv sp_cd in
|
||||
|
||||
let zero = Zp.zero ?mu_erf zero_m in
|
||||
let zero = Zp.zero ?range_separation zero_m in
|
||||
let zero_m_array = zero_m
|
||||
{ zero with
|
||||
maxm ; expo_p_inv ; expo_q_inv ; norm_pq_sq ;
|
||||
|
@ -142,7 +142,7 @@ let hvrr_two_e_vector (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
and vrr_v m angMom_a angMom_c =
|
||||
|
||||
match (angMom_a.Po.tot, angMom_c.Po.tot) with
|
||||
| (i,0) -> Some (vrr0_v angMom_a).(m)
|
||||
| (_,0) -> Some (vrr0_v angMom_a).(m)
|
||||
| (_,_) ->
|
||||
|
||||
let key = Zkey.of_powers_six angMom_a angMom_c in
|
||||
@ -577,7 +577,7 @@ let hvrr_two_e_vector (angMom_a, angMom_b, angMom_c, angMom_d)
|
||||
|
||||
|
||||
|
||||
let contracted_class_shell_pairs ~zero_m ?mu_erf ?schwartz_p ?schwartz_q shell_p shell_q : float Zmap.t =
|
||||
let contracted_class_shell_pairs ~zero_m ?range_separation ?schwartz_p ?schwartz_q shell_p shell_q : float Zmap.t =
|
||||
|
||||
let sp = Csp.shell_pairs shell_p
|
||||
and sq = Csp.shell_pairs shell_q
|
||||
@ -652,7 +652,7 @@ let contracted_class_shell_pairs ~zero_m ?mu_erf ?schwartz_p ?schwartz_q shell_p
|
||||
Co.dot center_pq center_pq
|
||||
in
|
||||
|
||||
let zero = Zp.zero ?mu_erf zero_m in
|
||||
let zero = Zp.zero ?range_separation zero_m in
|
||||
let zero_m_array =
|
||||
zero_m
|
||||
{zero with
|
||||
@ -761,7 +761,7 @@ let contracted_class_shell_pairs ~zero_m ?mu_erf ?schwartz_p ?schwartz_q shell_p
|
||||
z = (center_qc Co.Z).(cd) ;
|
||||
})
|
||||
in
|
||||
Array.iteri (fun ab shell_ab ->
|
||||
Array.iteri (fun ab _shell_ab ->
|
||||
let center_pa = Coordinate.make { Coordinate.
|
||||
x = (center_pa Co.X).(ab) ;
|
||||
y = (center_pa Co.Y).(ab) ;
|
||||
@ -769,7 +769,7 @@ let contracted_class_shell_pairs ~zero_m ?mu_erf ?schwartz_p ?schwartz_q shell_p
|
||||
}
|
||||
in
|
||||
let zero_m_array_tmp =
|
||||
Array.mapi (fun cd shell_cd ->
|
||||
Array.mapi (fun cd _shell_cd ->
|
||||
if (abs_float coef.(ab).(cd) < cutoff) then
|
||||
empty
|
||||
else
|
||||
@ -783,7 +783,7 @@ let contracted_class_shell_pairs ~zero_m ?mu_erf ?schwartz_p ?schwartz_q shell_p
|
||||
let norm_pq_sq =
|
||||
x *. x +. y *. y +. z *. z
|
||||
in
|
||||
let zero = Zp.zero ?mu_erf zero_m in
|
||||
let zero = Zp.zero ?range_separation zero_m in
|
||||
zero_m {zero with
|
||||
maxm ; expo_p_inv ; expo_q_inv ; norm_pq_sq ;
|
||||
center_pq = Coordinate.make Coordinate.{x ; y ; z} ;
|
||||
|
@ -8,15 +8,15 @@ type t =
|
||||
center_pa : Coordinate.t ;
|
||||
center_qc : Coordinate.t ;
|
||||
f12_factor : F12factor.t option;
|
||||
mu_erf : float option;
|
||||
range_separation : float option;
|
||||
zero_m_func : t -> float array ;
|
||||
}
|
||||
|
||||
let zero ?f12_factor ?mu_erf zero_m_func =
|
||||
let zero ?f12_factor ?range_separation zero_m_func =
|
||||
{
|
||||
zero_m_func ;
|
||||
f12_factor ;
|
||||
mu_erf;
|
||||
range_separation ;
|
||||
maxm=0 ;
|
||||
expo_p_inv = 0.;
|
||||
expo_q_inv = 0.;
|
||||
|
@ -5,7 +5,7 @@ type t = {
|
||||
basis : Basis.t;
|
||||
ao_basis : AOBasis.t;
|
||||
f12 : F12factor.t option;
|
||||
mu_erf : float option;
|
||||
range_separation : float option;
|
||||
nuclear_repulsion : float;
|
||||
}
|
||||
|
||||
@ -15,14 +15,14 @@ let electrons t = t.electrons
|
||||
let basis t = t.basis
|
||||
let ao_basis t = t.ao_basis
|
||||
let nuclear_repulsion t = t.nuclear_repulsion
|
||||
let mu_erf t = t.mu_erf
|
||||
let range_separation t = t.range_separation
|
||||
let f12 t = t.f12
|
||||
|
||||
let make ?cartesian:(cartesian=false)
|
||||
?multiplicity:(multiplicity=1)
|
||||
?charge:(charge=0)
|
||||
?f12
|
||||
?mu_erf
|
||||
?range_separation
|
||||
~nuclei
|
||||
basis
|
||||
=
|
||||
@ -48,12 +48,12 @@ let make ?cartesian:(cartesian=false)
|
||||
in
|
||||
|
||||
{
|
||||
charge ; basis ; nuclei ; electrons ; ao_basis ; f12 ; mu_erf ;
|
||||
charge ; basis ; nuclei ; electrons ; ao_basis ; f12 ; range_separation ;
|
||||
nuclear_repulsion ;
|
||||
}
|
||||
|
||||
|
||||
let of_filenames ?(cartesian=false) ?(multiplicity=1) ?(charge=0) ?f12 ?mu_erf ~nuclei ?(aux_basis_filenames=[]) basis_filename =
|
||||
let of_filenames ?(cartesian=false) ?(multiplicity=1) ?(charge=0) ?f12 ?range_separation ~nuclei ?(aux_basis_filenames=[]) basis_filename =
|
||||
let nuclei =
|
||||
Nuclei.of_filename nuclei
|
||||
in
|
||||
@ -61,6 +61,6 @@ let of_filenames ?(cartesian=false) ?(multiplicity=1) ?(charge=0) ?f12 ?mu_erf ~
|
||||
Basis.of_nuclei_and_basis_filenames ~nuclei (basis_filename :: aux_basis_filenames)
|
||||
in
|
||||
|
||||
lazy (make ?mu_erf ?f12 ~cartesian ~charge ~multiplicity ~nuclei basis)
|
||||
lazy (make ?range_separation ?f12 ~cartesian ~charge ~multiplicity ~nuclei basis)
|
||||
|> Parallel.broadcast
|
||||
|
||||
|
@ -21,7 +21,7 @@ val nuclear_repulsion : t -> float
|
||||
val f12 : t -> F12factor.t option
|
||||
(** f12 correlation factor *)
|
||||
|
||||
val mu_erf : t -> float option
|
||||
val range_separation : t -> float option
|
||||
(** Range-separation parameter of the electron repulsion integrals potential *)
|
||||
|
||||
(** {1 Creation} *)
|
||||
@ -29,10 +29,10 @@ val mu_erf : t -> float option
|
||||
val make :
|
||||
?cartesian:bool ->
|
||||
?multiplicity:int -> ?charge:int -> ?f12:F12factor.t ->
|
||||
?mu_erf:float -> nuclei:Nuclei.t -> Basis.t -> t
|
||||
?range_separation:float -> nuclei:Nuclei.t -> Basis.t -> t
|
||||
|
||||
val of_filenames :
|
||||
?cartesian:bool ->
|
||||
?multiplicity:int -> ?charge:int -> ?f12:F12factor.t ->
|
||||
?mu_erf: float -> nuclei:string -> ?aux_basis_filenames:string list -> string -> t
|
||||
?range_separation: float -> nuclei:string -> ?aux_basis_filenames:string list -> string -> t
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
let out_file : string option ref = ref None
|
||||
let basis_file : string option ref = ref None
|
||||
let nuclei_file : string option ref = ref None
|
||||
let mu_erf : float option ref = ref None
|
||||
let range_separation : float option ref = ref None
|
||||
|
||||
|
||||
let speclist = [
|
||||
@ -9,7 +9,7 @@ let speclist = [
|
||||
"File containing the atomic basis set") ;
|
||||
( "-x" , Arg.String (fun x -> nuclei_file := Some x),
|
||||
"File containing the nuclear coordinates") ;
|
||||
( "-m" , Arg.Float (fun x -> mu_erf := Some x),
|
||||
( "-m" , Arg.Float (fun x -> range_separation := Some x),
|
||||
"Value of mu, the range separation factor.") ;
|
||||
]
|
||||
|
||||
@ -22,11 +22,11 @@ let run () =
|
||||
match !nuclei_file with
|
||||
| None -> raise (Invalid_argument "Coordinate file should be specified with -x")
|
||||
| Some x -> x
|
||||
and mu_erf = !mu_erf
|
||||
and range_separation = !range_separation
|
||||
in
|
||||
|
||||
let s =
|
||||
Simulation.of_filenames ?mu_erf ~nuclei:nuclei_file basis_file
|
||||
Simulation.of_filenames ?range_separation ~nuclei:nuclei_file basis_file
|
||||
in
|
||||
|
||||
print_endline @@ Nuclei.to_string @@ Simulation.nuclei s;
|
||||
@ -43,8 +43,8 @@ let run () =
|
||||
NucInt.to_file ~filename:("Nuc.dat") eN_ints;
|
||||
KinInt.to_file ~filename:("Kin.dat") kin_ints;
|
||||
ERI.to_file ~filename:("ERI.dat") ee_ints;
|
||||
match mu_erf with
|
||||
| Some mu_erf ->
|
||||
match range_separation with
|
||||
| Some _mu ->
|
||||
ERI_lr.to_file ~filename:("ERI_lr.dat") (AOBasis.ee_lr_ints ao_basis)
|
||||
| None -> ()
|
||||
|
||||
|
@ -27,7 +27,7 @@ let () =
|
||||
in
|
||||
|
||||
let simulation_closed_shell =
|
||||
Simulation.of_filenames ~mu_erf:0.5 ~charge:0 ~cartesian:true ~multiplicity:1 ~nuclei:nuclei_file basis_file
|
||||
Simulation.of_filenames ~range_separation:0.5 ~charge:0 ~cartesian:true ~multiplicity:1 ~nuclei:nuclei_file basis_file
|
||||
in
|
||||
|
||||
let ao_basis =
|
||||
|
Loading…
Reference in New Issue
Block a user