10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 04:13:33 +01:00

Removed Schwartz screening

This commit is contained in:
Anthony Scemama 2020-09-25 16:00:20 +02:00
parent df59f1c07e
commit 1ff2505f03
4 changed files with 8 additions and 7 deletions

View File

@ -24,6 +24,7 @@ module Make(T : TwoEI_structure) = struct
let class_of_contracted_shell_pair_couple = T.class_of_contracted_shell_pair_couple let class_of_contracted_shell_pair_couple = T.class_of_contracted_shell_pair_couple
(*
let filter_contracted_shell_pairs ?(cutoff=integrals_cutoff) ~basis shell_pairs = let filter_contracted_shell_pairs ?(cutoff=integrals_cutoff) ~basis shell_pairs =
List.rev_map (fun pair -> List.rev_map (fun pair ->
match Cspc.make ~cutoff pair pair with match Cspc.make ~cutoff pair pair with
@ -35,6 +36,7 @@ module Make(T : TwoEI_structure) = struct
) shell_pairs ) shell_pairs
|> List.filter (fun (_, schwartz_p_max) -> schwartz_p_max >= cutoff) |> List.filter (fun (_, schwartz_p_max) -> schwartz_p_max >= cutoff)
|> List.rev_map fst |> List.rev_map fst
*)
(* TODO (* TODO
@ -106,7 +108,6 @@ module Make(T : TwoEI_structure) = struct
let shell_pairs = let shell_pairs =
Csp.of_contracted_shell_array shell Csp.of_contracted_shell_array shell
|> filter_contracted_shell_pairs ~basis ~cutoff
in in
Printf.printf "%d significant shell pairs computed in %f seconds\n" Printf.printf "%d significant shell pairs computed in %f seconds\n"
@ -212,7 +213,6 @@ module Make(T : TwoEI_structure) = struct
let shell_pairs = let shell_pairs =
Csp.of_contracted_shell_array shell Csp.of_contracted_shell_array shell
|> filter_contracted_shell_pairs ~basis ~cutoff
in in
if Parallel.master then if Parallel.master then

View File

@ -24,10 +24,12 @@ module Make : functor (T : TwoEI_structure) ->
sig sig
include module type of FourIdxStorage include module type of FourIdxStorage
(*
val filter_contracted_shell_pairs : val filter_contracted_shell_pairs :
?cutoff:float -> basis:Basis.t -> ?cutoff:float -> basis:Basis.t ->
ContractedShellPair.t list -> ContractedShellPair.t list ContractedShellPair.t list -> ContractedShellPair.t list
(** Uses Schwartz screening on contracted shell pairs. *) (** Uses Schwartz screening on contracted shell pairs. *)
*)
val of_basis : Basis.t -> t val of_basis : Basis.t -> t
(** Compute all ERI's for a given {!Basis.t}. *) (** Compute all ERI's for a given {!Basis.t}. *)

View File

@ -67,7 +67,7 @@
(* 5. Fonction d'affichage *) (* 5. Fonction d'affichage *)
let methode = "Boys_er";; (* Method for th orbitals localization *) let methode = "Boys_er";; (* Method for th orbitals localization *)
let iteration = 1000000;; (* Maximum number of iteration for each localization *) let iteration = 1_000_000;; (* Maximum number of iteration for each localization *)
let cc = 10e-6;; (* Convergence criterion *) let cc = 10e-6;; (* Convergence criterion *)
let pre_angle = 0.001;; (* Rotation of the matrix with a small angle to improve the convergence *) let pre_angle = 0.001;; (* Rotation of the matrix with a small angle to improve the convergence *)
let epsilon = 1.;; (* Rotation angle = angle /. epsilon, default value : epsilon = 1. *) let epsilon = 1.;; (* Rotation angle = angle /. epsilon, default value : epsilon = 1. *)
@ -114,7 +114,10 @@ let localize mo_basis separation =
in in
let ao_basis = MOBasis.ao_basis mo_basis in let ao_basis = MOBasis.ao_basis mo_basis in
let n_core = let n_core =
(*
(Nuclei.small_core @@ Simulation.nuclei @@ MOBasis.simulation mo_basis) / 2 (Nuclei.small_core @@ Simulation.nuclei @@ MOBasis.simulation mo_basis) / 2
*)
0
in in
let charge = Simulation.charge simulation let charge = Simulation.charge simulation
|>Charge.to_int |>Charge.to_int

View File

@ -223,7 +223,6 @@ let make
(* Orthogonalization matrix *) (* Orthogonalization matrix *)
let m_X = let m_X =
Ao.ortho ao_basis Ao.ortho ao_basis
|> Util.remove_epsilons
in in
(* Overlap matrix *) (* Overlap matrix *)
@ -277,7 +276,6 @@ let make
(* Density matrix over nocc occupied MOs *) (* Density matrix over nocc occupied MOs *)
let m_P = let m_P =
gemm ~alpha:2. ~transb:`T ~k:nocc m_C m_C gemm ~alpha:2. ~transb:`T ~k:nocc m_C m_C
|> Util.remove_epsilons
in in
(* Fock matrix in AO basis *) (* Fock matrix in AO basis *)
@ -358,7 +356,6 @@ let make
(* MOs in AO basis *) (* MOs in AO basis *)
let m_C = let m_C =
gemm m_X m_C' gemm m_X m_C'
|> Util.remove_epsilons
|> Conventions.rephase |> Conventions.rephase
in in
@ -561,7 +558,6 @@ let make
(* MOs in AO basis *) (* MOs in AO basis *)
let m_C = let m_C =
gemm m_X m_C' gemm m_X m_C'
|> Util.remove_epsilons
|> Conventions.rephase |> Conventions.rephase
in in