mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-06 22:23:42 +01:00
Fixed Huckel guess
This commit is contained in:
parent
2a7a586c92
commit
74ae9acd1a
@ -24,9 +24,7 @@ let huckel_guess ao_basis =
|
|||||||
let eN_ints = Ao.Basis.eN_ints ao_basis
|
let eN_ints = Ao.Basis.eN_ints ao_basis
|
||||||
and kin_ints = Ao.Basis.kin_ints ao_basis
|
and kin_ints = Ao.Basis.kin_ints ao_basis
|
||||||
in
|
in
|
||||||
let m_F =
|
let m_F = Matrix.add eN_ints kin_ints in
|
||||||
Matrix.add eN_ints kin_ints
|
|
||||||
in
|
|
||||||
let ao_num = Ao.Basis.size ao_basis
|
let ao_num = Ao.Basis.size ao_basis
|
||||||
and overlap = Ao.Basis.overlap ao_basis
|
and overlap = Ao.Basis.overlap ao_basis
|
||||||
in
|
in
|
||||||
@ -35,14 +33,11 @@ let huckel_guess ao_basis =
|
|||||||
function
|
function
|
||||||
| 0 -> invalid_arg "Huckel guess needs a non-zero number of occupied MOs."
|
| 0 -> invalid_arg "Huckel guess needs a non-zero number of occupied MOs."
|
||||||
| _nocc ->
|
| _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
|
if (i<>j) then
|
||||||
if (diag%.(i) +. diag%.(j)) < 0. then
|
c *. (overlap%:(i,j)) *. (diag%.(i) +. diag%.(j))
|
||||||
c *. (overlap%:(i,j)) *. (diag%.(i) +. diag%.(j)) +. m_F%:(i,j) (*TODO Pseudo *)
|
|
||||||
else
|
|
||||||
m_F%:(i,j) (*TODO Pseudo *)
|
|
||||||
else
|
else
|
||||||
diag%.(i)
|
diag%.(i)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user