From 1ff2505f039c446d5edf798dbffea8a6c733cfe5 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 25 Sep 2020 16:00:20 +0200 Subject: [PATCH] Removed Schwartz screening --- Basis/TwoElectronIntegrals.ml | 4 ++-- Basis/TwoElectronIntegrals.mli | 2 ++ MOBasis/Localisation.ml | 5 ++++- SCF/HartreeFock.ml | 4 ---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Basis/TwoElectronIntegrals.ml b/Basis/TwoElectronIntegrals.ml index b7987ef..42c2565 100644 --- a/Basis/TwoElectronIntegrals.ml +++ b/Basis/TwoElectronIntegrals.ml @@ -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 filter_contracted_shell_pairs ?(cutoff=integrals_cutoff) ~basis shell_pairs = List.rev_map (fun pair -> match Cspc.make ~cutoff pair pair with @@ -35,6 +36,7 @@ module Make(T : TwoEI_structure) = struct ) shell_pairs |> List.filter (fun (_, schwartz_p_max) -> schwartz_p_max >= cutoff) |> List.rev_map fst + *) (* TODO @@ -106,7 +108,6 @@ module Make(T : TwoEI_structure) = struct let shell_pairs = Csp.of_contracted_shell_array shell - |> filter_contracted_shell_pairs ~basis ~cutoff in Printf.printf "%d significant shell pairs computed in %f seconds\n" @@ -212,7 +213,6 @@ module Make(T : TwoEI_structure) = struct let shell_pairs = Csp.of_contracted_shell_array shell - |> filter_contracted_shell_pairs ~basis ~cutoff in if Parallel.master then diff --git a/Basis/TwoElectronIntegrals.mli b/Basis/TwoElectronIntegrals.mli index 3195950..49b2499 100644 --- a/Basis/TwoElectronIntegrals.mli +++ b/Basis/TwoElectronIntegrals.mli @@ -24,10 +24,12 @@ module Make : functor (T : TwoEI_structure) -> sig include module type of FourIdxStorage +(* val filter_contracted_shell_pairs : ?cutoff:float -> basis:Basis.t -> ContractedShellPair.t list -> ContractedShellPair.t list (** Uses Schwartz screening on contracted shell pairs. *) +*) val of_basis : Basis.t -> t (** Compute all ERI's for a given {!Basis.t}. *) diff --git a/MOBasis/Localisation.ml b/MOBasis/Localisation.ml index a40723a..150b30a 100644 --- a/MOBasis/Localisation.ml +++ b/MOBasis/Localisation.ml @@ -67,7 +67,7 @@ (* 5. Fonction d'affichage *) 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 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. *) @@ -114,7 +114,10 @@ let localize mo_basis separation = in let ao_basis = MOBasis.ao_basis mo_basis in let n_core = + (* (Nuclei.small_core @@ Simulation.nuclei @@ MOBasis.simulation mo_basis) / 2 + *) + 0 in let charge = Simulation.charge simulation |>Charge.to_int diff --git a/SCF/HartreeFock.ml b/SCF/HartreeFock.ml index e5bb4fc..907eb9a 100644 --- a/SCF/HartreeFock.ml +++ b/SCF/HartreeFock.ml @@ -223,7 +223,6 @@ let make (* Orthogonalization matrix *) let m_X = Ao.ortho ao_basis - |> Util.remove_epsilons in (* Overlap matrix *) @@ -277,7 +276,6 @@ let make (* Density matrix over nocc occupied MOs *) let m_P = gemm ~alpha:2. ~transb:`T ~k:nocc m_C m_C - |> Util.remove_epsilons in (* Fock matrix in AO basis *) @@ -358,7 +356,6 @@ let make (* MOs in AO basis *) let m_C = gemm m_X m_C' - |> Util.remove_epsilons |> Conventions.rephase in @@ -561,7 +558,6 @@ let make (* MOs in AO basis *) let m_C = gemm m_X m_C' - |> Util.remove_epsilons |> Conventions.rephase in