From 66913f9a37d364f9997fe160e26623342c8f9bd5 Mon Sep 17 00:00:00 2001 From: pfloos Date: Wed, 6 Sep 2023 13:16:44 +0200 Subject: [PATCH] OK with ROHF --- src/HF/ROHF_fock_matrix.f90 | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/HF/ROHF_fock_matrix.f90 b/src/HF/ROHF_fock_matrix.f90 index 6f7db38..4b35a96 100644 --- a/src/HF/ROHF_fock_matrix.f90 +++ b/src/HF/ROHF_fock_matrix.f90 @@ -1,6 +1,16 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F) -! Construct the ROHF Fock matrix +! Construct the ROHF Fock matrix in the AO basis +! For open shells, the ROHF Fock matrix in the MO basis reads +! +! | F-K | F + K/2 | F | +! |---------------------------------| +! | F + K/2 | F | F - K/2 | +! |---------------------------------| +! | F | F - K/2 | F + K | +! +! with F = 1/2 (Fa + Fb) and K = Fb - Fa +! implicit none include 'parameters.h' @@ -32,14 +42,14 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F) ! Roothan canonicalization parameters - aC = -0.5d0 - bC = +1.5d0 + aC = +1.5d0 + bC = -0.5d0 aO = +0.5d0 bO = +0.5d0 - aV = +1.5d0 - bV = -0.5d0 + aV = -0.5d0 + bV = +1.5d0 ! Number of closed, open, and virtual orbitals @@ -49,8 +59,8 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F) ! Block-by-block Fock matrix -! call AOtoMO_transform(nBas,c,Fa) -! call AOtoMO_transform(nBas,c,Fb) + call AOtoMO_transform(nBas,c,Fa) + call AOtoMO_transform(nBas,c,Fb) F(1:nC, 1:nC ) = aC*Fa(1:nC, 1:nC ) + bC*Fb(1:nC, 1:nC ) F(1:nC, nC+1:nC+nO ) = Fb(1:nC, nC+1:nC+nO ) @@ -64,8 +74,8 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F) F(nO+nC+1:nC+nO+nV, nC+1:nC+nO ) = Fa(nO+nC+1:nC+nO+nV, nC+1:nC+nO ) F(nO+nC+1:nC+nO+nV,nO+nC+1:nC+nO+nV) = aV*Fa(nO+nC+1:nC+nO+nV,nO+nC+1:nC+nO+nV) + bV*Fb(nO+nC+1:nC+nO+nV,nO+nC+1:nC+nO+nV) -! call MOtoAO_transform(nBas,S,c,F) -! call MOtoAO_transform(nBas,S,c,Fa) -! call MOtoAO_transform(nBas,S,c,Fb) + call MOtoAO_transform(nBas,S,c,F) + call MOtoAO_transform(nBas,S,c,Fa) + call MOtoAO_transform(nBas,S,c,Fb) end subroutine