Top-level Top-level
+Top-level
Table of Contents
-
-
-1 Summary
-
-
diff --git a/mo/lib/guess.ml b/mo/lib/guess.ml
index 17af71b..1f28fa0 100644
--- a/mo/lib/guess.ml
+++ b/mo/lib/guess.ml
@@ -5,6 +5,7 @@ type mo = Mo_dim.t
type guess =
| Hcore of (ao,ao) Matrix.t
+| GWH of (ao,ao) Matrix.t
| Huckel of (ao,ao) Matrix.t
| Matrix of (ao,mo) Matrix.t
@@ -12,38 +13,40 @@ type t = guess
module El = Particles.Electrons
-let hcore_guess ao_basis =
+let hcore_guess ao_basis =
let eN_ints = Ao.Basis.eN_ints ao_basis
and kin_ints = Ao.Basis.kin_ints ao_basis
in
Matrix.add eN_ints kin_ints
-let huckel_guess ao_basis =
+let gwh_guess ao_basis =
let c = 0.5 *. 1.75 in
- let eN_ints = Ao.Basis.eN_ints ao_basis
- and kin_ints = Ao.Basis.kin_ints ao_basis
- in
- let m_F = Matrix.add eN_ints kin_ints in
let ao_num = Ao.Basis.size ao_basis
and overlap = Ao.Basis.overlap ao_basis
in
+ let m_F = hcore_guess ao_basis in
let diag = Vector.init ao_num (fun i -> m_F%:(i,i) ) in
-
- function
- | 0 -> invalid_arg "Huckel guess needs a non-zero number of occupied MOs."
- | _nocc ->
- Matrix.init_cols ao_num ao_num (fun i j ->
+ Matrix.init_cols ao_num ao_num (fun i j ->
if (i<>j) then
- c *. (overlap%:(i,j)) /. ((overlap%:(i,i)) *. (overlap%:(j,j)) ) *. (diag%.(i) +. diag%.(j))
+ c *. (overlap%:(i,j)) /. ((overlap%:(i,i)) *. (overlap%:(j,j)) ) *. (diag%.(i) +. diag%.(j))
else
- diag%.(i)
+ diag%.(i)
)
-let make ?(nocc=0) ~guess ao_basis =
+let huckel_guess ao_basis =
+ function
+ | 0 -> invalid_arg "Huckel guess needs a non-zero number of occupied MOs."
+ | _nocc ->
+ let m_F = gwh_guess ao_basis in
+ (*TODO: F(l,l) = F_gwh(l,l) + \sum{mu,nu} P_{mu,nu} (mu nu| l l) *)
+ m_F
+
+let make ?(nocc=0) ~guess ao_basis =
match guess with
| `Hcore -> Hcore (hcore_guess ao_basis)
+ | `GWH -> Hcore (gwh_guess ao_basis)
| `Huckel -> Huckel (huckel_guess ao_basis nocc)
| `Matrix m -> Matrix m
diff --git a/mo/lib/guess.mli b/mo/lib/guess.mli
index 967a611..77f6690 100644
--- a/mo/lib/guess.mli
+++ b/mo/lib/guess.mli
@@ -1,12 +1,15 @@
open Linear_algebra
-(** Guess for Hartree-Fock calculations. *)
+(** Guess for Hartree-Fock calculations.
+Ref: https://pubs.acs.org/doi/10.1021/acs.jctc.8b01089
+*)
type ao = Ao.Ao_dim.t
type mo = Mo_dim.t
type guess =
| Hcore of (ao,ao) Matrix.t (* Core Hamiltonian Matrix *)
+| GWH of (ao,ao) Matrix.t (* Generalized Wolfsberg-Helmholtz (GWH) *)
| Huckel of (ao,ao) Matrix.t (* Huckel Hamiltonian Matrix *)
| Matrix of (ao,mo) Matrix.t (* Guess Eigenvectors *)
@@ -15,6 +18,6 @@ type t = guess
val make :
?nocc:int ->
- guess:[ `Hcore | `Huckel | `Matrix of (ao,mo) Matrix.t ] ->
+ guess:[ `Hcore | `GWH | `Huckel | `Matrix of (ao,mo) Matrix.t ] ->
Ao.Basis.t -> t
diff --git a/mo/lib/hartree_fock.ml b/mo/lib/hartree_fock.ml
index 3ac4b5d..4be7271 100644
--- a/mo/lib/hartree_fock.ml
+++ b/mo/lib/hartree_fock.ml
@@ -188,7 +188,7 @@ let exchange_energy t =
let make
?kind
- ?guess:(guess=`Huckel)
+ ?guess:(guess=`GWH)
?max_scf:(max_scf=64)
?level_shift:(level_shift=0.2)
?threshold_SCF:(threshold_SCF=1.e-8)
@@ -249,6 +249,7 @@ let make
in
match guess with
| Guess.Hcore m_H -> c_of_h m_H
+ | Guess.GWH m_H -> c_of_h m_H
| Guess.Huckel m_H -> c_of_h m_H
| Guess.Matrix m_C -> m_C
in
diff --git a/mo/lib/hartree_fock.mli b/mo/lib/hartree_fock.mli
index 0c2f6cb..3e8b2f0 100644
--- a/mo/lib/hartree_fock.mli
+++ b/mo/lib/hartree_fock.mli
@@ -43,11 +43,11 @@ val kin_energy : t -> float
val eN_energy : t -> float
(** Electron-nucleus potential energy *)
-
-val coulomb_energy : t -> float
+
+val coulomb_energy : t -> float
(** Electron-Electron potential energy *)
-val exchange_energy : t -> float
+val exchange_energy : t -> float
(** Exchange energy *)
val nocc : t -> int
@@ -59,7 +59,7 @@ val empty: hartree_fock_data
val make :
?kind:hartree_fock_kind ->
- ?guess:[ `Hcore | `Huckel | `Matrix of (ao,mo) Matrix.t ] ->
+ ?guess:[ `Hcore | `GWH | `Huckel | `Matrix of (ao,mo) Matrix.t ] ->
?max_scf:int ->
?level_shift:float -> ?threshold_SCF:float ->
Simulation.t -> t
-2 Summary
+
+