diff --git a/GoDuck b/GoDuck index 8e8c1ba..e4226a1 100755 Binary files a/GoDuck and b/GoDuck differ diff --git a/INSTALL.txt b/INSTALL.txt index 95f1a34..bfce667 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,12 +1,17 @@ * define $QUACK_ROOT +* ninja +* opam + opam install ocamlc dune lacaml getopt zarith gmp alcotest +* cmake +* wget +* autoconf +* automake * blas * lapack -* ninja * gfortran * python3 * libtool -* opam -* cmake -* wget -* automake + +- problems with libxc install +- make clean in $QUACK_ROOT does not work diff --git a/input/methods b/input/methods index 61b1f1f..2242045 100644 --- a/input/methods +++ b/input/methods @@ -1,7 +1,7 @@ # RHF UHF KS MOM - F F T F + T F F F # MP2* MP3 MP2-F12 - F F F + F T F # CCD CCSD CCSD(T) F F F # drCCD rCCD lCCD pCCD diff --git a/input/options b/input/options index be544b7..0094fa0 100644 --- a/input/options +++ b/input/options @@ -1,18 +1,18 @@ # HF: maxSCF thresh DIIS n_diis guess_type ortho_type - 128 0.0000001 T 5 1 1 + 128 0.0000001 T 10 1 1 # MP: # CC: maxSCF thresh DIIS n_diis 64 0.0000001 T 5 # spin: TDA singlet triplet spin_conserved spin_flip - T T T T T + F T F T T # GF: maxSCF thresh DIIS n_diis lin eta renorm 256 0.00001 T 5 T 0.0 3 # GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0 256 0.00001 T 5 T 0.0 F F F F F # ACFDT: AC Kx XBS - T F T + F F T # BSE: BSE dBSE dTDA evDyn - T T T F + F T T F # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift 1000000 100000 10 0.3 10000 1234 T diff --git a/mol/h2.xyz b/mol/h2.xyz index a302682..494db3f 100644 --- a/mol/h2.xyz +++ b/mol/h2.xyz @@ -1,4 +1,4 @@ 2 H 0.0 0.0 0.0 -H 0.0 0.0 1.4 +H 0.0 0.0 5.0 diff --git a/src/HF/print_UHF.f90 b/src/HF/print_UHF.f90 index 67a5d8e..7f77473 100644 --- a/src/HF/print_UHF.f90 +++ b/src/HF/print_UHF.f90 @@ -66,7 +66,7 @@ subroutine print_UHF(nBas,nO,Ov,e,c,ENuc,ET,EV,EJ,Ex,EUHF,dipole) write(*,'(A40,1X,F16.10,A3)') ' Potential a energy: ',EV(1),' au' write(*,'(A40,1X,F16.10,A3)') ' Potential b energy: ',EV(2),' au' write(*,'(A60)') '-------------------------------------------------' - write(*,'(A40,1X,F16.10,A3)') ' Two-electron a energy: ',sum(EJ(:)) + sum(Ex(:)),' au' + write(*,'(A40,1X,F16.10,A3)') ' Two-electron energy: ',sum(EJ(:)) + sum(Ex(:)),' au' write(*,'(A40,1X,F16.10,A3)') ' Two-electron aa energy: ',EJ(1) + Ex(1),' au' write(*,'(A40,1X,F16.10,A3)') ' Two-electron ab energy: ',EJ(2),' au' write(*,'(A40,1X,F16.10,A3)') ' Two-electron bb energy: ',EJ(3) + Ex(2),' au' diff --git a/src/MP/MP3.f90 b/src/MP/MP3.f90 index 0539d31..3117a66 100644 --- a/src/MP/MP3.f90 +++ b/src/MP/MP3.f90 @@ -1,4 +1,4 @@ -subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) +subroutine MP3(nBasin,nCin,nOin,nVin,nRin,ERI,e,ENuc,EHF) ! Perform third-order Moller-Plesset calculation @@ -6,10 +6,14 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) ! Input variables - integer,intent(in) :: nBas,nEl + integer,intent(in) :: nBasin + integer,intent(in) :: nCin + integer,intent(in) :: nOin + integer,intent(in) :: nVin + integer,intent(in) :: nRin double precision,intent(in) :: ENuc,EHF - double precision,intent(in) :: e(nBas) - double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) + double precision,intent(in) :: e(nBasin) + double precision,intent(in) :: ERI(nBasin,nBasin,nBasin,nBasin) ! Local variables @@ -17,7 +21,11 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) double precision :: eps1,eps2,E3a,E3b,E3c double precision :: EcMP3 - integer :: nBas2,nO,nV + integer :: nBas + integer :: nC + integer :: nO + integer :: nV + integer :: nR integer :: i,j,k,l,a,b,c,d double precision,allocatable :: se(:) @@ -44,32 +52,31 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) ! Spatial to spin orbitals - nBas2 = 2*nBas + nBas = 2*nBasin + nC = 2*nCin + nO = 2*nOin + nV = 2*nVin + nR = 2*nRin - allocate(se(nBas2),sERI(nBas2,nBas2,nBas2,nBas2)) + allocate(se(nBas),sERI(nBas,nBas,nBas,nBas)) - call spatial_to_spin_MO_energy(nBas,e,nBas2,se) - call spatial_to_spin_ERI(nBas,ERI,nBas2,sERI) + call spatial_to_spin_MO_energy(nBasin,e,nBas,se) + call spatial_to_spin_ERI(nBasin,ERI,nBas,sERI) ! Antysymmetrize ERIs - allocate(dbERI(nBas2,nBas2,nBas2,nBas2)) + allocate(dbERI(nBas,nBas,nBas,nBas)) - call antisymmetrize_ERI(2,nBas2,sERI,dbERI) + call antisymmetrize_ERI(2,nBas,sERI,dbERI) deallocate(sERI) -! Define occupied and virtual spaces - - nO = nEl - nV = nBas2 - nO - ! Form energy denominator allocate(eO(nO),eV(nV)) eO(:) = se(1:nO) - eV(:) = se(nO+1:nBas2) + eV(:) = se(nO+1:nBas) deallocate(se) @@ -77,11 +84,11 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) allocate(OOOO(nO,nO,nO,nO),OOVV(nO,nO,nV,nV),OVVO(nO,nV,nV,nO),VVOO(nV,nV,nO,nO),VVVV(nV,nV,nV,nV)) - OOOO(:,:,:,:) = dbERI( 1:nO , 1:nO , 1:nO , 1:nO ) - OOVV(:,:,:,:) = dbERI( 1:nO , 1:nO ,nO+1:nBas2,nO+1:nBas2) - OVVO(:,:,:,:) = dbERI( 1:nO ,nO+1:nBas2,nO+1:nBas2, 1:nO ) - VVOO(:,:,:,:) = dbERI(nO+1:nBas2,nO+1:nBas2, 1:nO , 1:nO ) - VVVV(:,:,:,:) = dbERI(nO+1:nBas2,nO+1:nBas2,nO+1:nBas2,nO+1:nBas2) + OOOO(:,:,:,:) = dbERI( 1:nO , 1:nO , 1:nO , 1:nO ) + OOVV(:,:,:,:) = dbERI( 1:nO , 1:nO ,nO+1:nBas,nO+1:nBas) + OVVO(:,:,:,:) = dbERI( 1:nO ,nO+1:nBas,nO+1:nBas, 1:nO ) + VVOO(:,:,:,:) = dbERI(nO+1:nBas,nO+1:nBas, 1:nO , 1:nO ) + VVVV(:,:,:,:) = dbERI(nO+1:nBas,nO+1:nBas,nO+1:nBas,nO+1:nBas) deallocate(dbERI) @@ -89,10 +96,10 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) E2 = 0d0 - do i=1,nO - do j=1,nO - do a=1,nV - do b=1,nV + do i=nC+1,nO + do j=nC+1,nO + do a=1,nV-nR + do b=1,nV-nR eps = eO(i) + eO(j) - eV(a) - eV(b) @@ -109,12 +116,12 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) E3a = 0d0 - do i=1,nO - do j=1,nO - do k=1,nO - do l=1,nO - do a=1,nV - do b=1,nV + do i=nC+1,nO + do j=nC+1,nO + do k=nC+1,nO + do l=nC+1,nO + do a=1,nV-nR + do b=1,nV-nR eps1 = eO(i) + eO(j) - eV(a) - eV(b) eps2 = eO(k) + eO(l) - eV(a) - eV(b) @@ -130,12 +137,12 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) E3b = 0d0 - do i=1,nO - do j=1,nO - do a=1,nV - do b=1,nV - do c=1,nV - do d=1,nV + do i=nC+1,nO + do j=nC+1,nO + do a=1,nV-nR + do b=1,nV-nR + do c=1,nV-nR + do d=1,nV-nR eps1 = eO(i) + eO(j) - eV(a) - eV(b) eps2 = eO(i) + eO(j) - eV(c) - eV(d) @@ -151,12 +158,12 @@ subroutine MP3(nBas,nEl,ERI,e,ENuc,EHF) E3c = 0d0 - do i=1,nO - do j=1,nO - do k=1,nO - do a=1,nV - do b=1,nV - do c=1,nV + do i=nC+1,nO + do j=nC+1,nO + do k=nC+1,nO + do a=1,nV-nR + do b=1,nV-nR + do c=1,nV-nR eps1 = eO(i) + eO(j) - eV(a) - eV(b) eps2 = eO(i) + eO(k) - eV(a) - eV(c) diff --git a/src/QuAcK/QuAcK.f90 b/src/QuAcK/QuAcK.f90 index 7bab00d..540d625 100644 --- a/src/QuAcK/QuAcK.f90 +++ b/src/QuAcK/QuAcK.f90 @@ -473,7 +473,7 @@ program QuAcK else - call MP3(nBas,nEl,ERI_MO,eHF,ENuc,ERHF) + call MP3(nBas,nC,nO,nV,nR,ERI_MO,eHF,ENuc,ERHF) end if