Skip to content

Commit

Permalink
Merge pull request #12 from marm314/master
Browse files Browse the repository at this point in the history
HFB SCF
  • Loading branch information
pfloos authored Feb 12, 2025
2 parents 7488f0c + acb50fe commit 810ab89
Show file tree
Hide file tree
Showing 17 changed files with 1,142 additions and 69 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
__pycache__

.ninja_deps
calcs/
calcs/input
calcs/int
calcs/mol
calcs/water.out
2 changes: 1 addition & 1 deletion PyDuck.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import os, sys
import argparse
Expand Down
6 changes: 3 additions & 3 deletions src/AOtoMO/Hartree_matrix_AO_basis.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
subroutine Hartree_matrix_AO_basis(nBas,P,G,H)
subroutine Hartree_matrix_AO_basis(nBas,P,ERI,H)

! Compute Hartree matrix in the AO basis

Expand All @@ -9,7 +9,7 @@ subroutine Hartree_matrix_AO_basis(nBas,P,G,H)

integer,intent(in) :: nBas
double precision,intent(in) :: P(nBas,nBas)
double precision,intent(in) :: G(nBas,nBas,nBas,nBas)
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)

! Local variables

Expand All @@ -25,7 +25,7 @@ subroutine Hartree_matrix_AO_basis(nBas,P,G,H)
do nu=1,nBas
do la=1,nBas
do mu=1,nBas
H(mu,nu) = H(mu,nu) + P(la,si)*G(mu,la,nu,si)
H(mu,nu) = H(mu,nu) + P(la,si)*ERI(mu,la,nu,si)
end do
end do
end do
Expand Down
38 changes: 38 additions & 0 deletions src/AOtoMO/anomalous_matrix_AO_basis.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
subroutine anomalous_matrix_AO_basis(nBas,sigma,Pa,ERI,L)

! Compute anomalous L matrix in the AO basis

implicit none
include 'parameters.h'

! Input variables

integer,intent(in) :: nBas
double precision,intent(in) :: sigma
double precision,intent(in) :: Pa(nBas,nBas)
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)

! Local variables

integer :: mu,nu,la,si

! Output variables

double precision,intent(out) :: L(nBas,nBas)

L(:,:) = 0d0

do nu=1,nBas
do si=1,nBas
do la=1,nBas
do mu=1,nBas
L(mu,nu) = L(mu,nu) + sigma*Pa(la,si)*ERI(la,si,mu,nu)
end do
end do
end do
end do

end subroutine

! ---

3 changes: 2 additions & 1 deletion src/AOtoMO/exchange_matrix_AO_basis.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ subroutine exchange_matrix_AO_basis(nBas,P,ERI,K)

double precision,intent(out) :: K(nBas,nBas)

K = 0d0
K(:,:) = 0d0

do nu=1,nBas
do si=1,nBas
do la=1,nBas
Expand Down
Loading

0 comments on commit 810ab89

Please sign in to comment.