diff --git a/examples/molecule.N2 b/examples/molecule.N2 index 35e31a1..d47ae67 100644 --- a/examples/molecule.N2 +++ b/examples/molecule.N2 @@ -2,4 +2,4 @@ 2 7 7 0 0 # Znuc x y z N 0. 0. 0. - N 0. 0. 2.0 + N 0. 0. 1.8 diff --git a/input/basis b/input/basis index b246175..120ad98 100644 --- a/input/basis +++ b/input/basis @@ -1,26 +1,58 @@ -1 3 -S 3 1.00 - 0.9910616896D+02 0.1543289673D+00 - 0.1805231239D+02 0.5353281423D+00 - 0.4885660238D+01 0.4446345422D+00 -S 3 1.00 - 0.3780455879D+01 -0.9996722919D-01 - 0.8784966449D+00 0.3995128261D+00 - 0.2857143744D+00 0.7001154689D+00 -P 3 1.00 - 0.3780455879D+01 0.1559162750D+00 - 0.8784966449D+00 0.6076837186D+00 - 0.2857143744D+00 0.3919573931D+00 -2 3 -S 3 1.00 - 0.9910616896D+02 0.1543289673D+00 - 0.1805231239D+02 0.5353281423D+00 - 0.4885660238D+01 0.4446345422D+00 -S 3 1.00 - 0.3780455879D+01 -0.9996722919D-01 - 0.8784966449D+00 0.3995128261D+00 - 0.2857143744D+00 0.7001154689D+00 -P 3 1.00 - 0.3780455879D+01 0.1559162750D+00 - 0.8784966449D+00 0.6076837186D+00 - 0.2857143744D+00 0.3919573931D+00 +1 6 +S 8 1.00 + 9046.0000000 0.0007000 + 1357.0000000 0.0053890 + 309.3000000 0.0274060 + 87.7300000 0.1032070 + 28.5600000 0.2787230 + 10.2100000 0.4485400 + 3.8380000 0.2782380 + 0.7466000 0.0154400 +S 8 1.00 + 9046.0000000 -0.0001530 + 1357.0000000 -0.0012080 + 309.3000000 -0.0059920 + 87.7300000 -0.0245440 + 28.5600000 -0.0674590 + 10.2100000 -0.1580780 + 3.8380000 -0.1218310 + 0.7466000 0.5490030 +S 1 1.00 + 0.2248000 1.0000000 +P 3 1.00 + 13.5500000 0.0399190 + 2.9170000 0.2171690 + 0.7973000 0.5103190 +P 1 1.00 + 0.2185000 1.0000000 +D 1 1.00 + 0.8170000 1.0000000 +2 6 +S 8 1.00 + 9046.0000000 0.0007000 + 1357.0000000 0.0053890 + 309.3000000 0.0274060 + 87.7300000 0.1032070 + 28.5600000 0.2787230 + 10.2100000 0.4485400 + 3.8380000 0.2782380 + 0.7466000 0.0154400 +S 8 1.00 + 9046.0000000 -0.0001530 + 1357.0000000 -0.0012080 + 309.3000000 -0.0059920 + 87.7300000 -0.0245440 + 28.5600000 -0.0674590 + 10.2100000 -0.1580780 + 3.8380000 -0.1218310 + 0.7466000 0.5490030 +S 1 1.00 + 0.2248000 1.0000000 +P 3 1.00 + 13.5500000 0.0399190 + 2.9170000 0.2171690 + 0.7973000 0.5103190 +P 1 1.00 + 0.2185000 1.0000000 +D 1 1.00 + 0.8170000 1.0000000 diff --git a/input/methods b/input/methods index 4b948cf..5b88684 100644 --- a/input/methods +++ b/input/methods @@ -5,11 +5,11 @@ # CCD CCSD CCSD(T) ringCCD ladderCCD F F F F F # CIS RPA RPAx ppRPA ADC - F T T F F + T T T F F # GF2 GF3 F F # G0W0 evGW qsGW - F F F + T F F # G0T0 evGT qsGT F F F # MCMP2 diff --git a/input/molecule b/input/molecule index 35e31a1..d47ae67 100644 --- a/input/molecule +++ b/input/molecule @@ -2,4 +2,4 @@ 2 7 7 0 0 # Znuc x y z N 0. 0. 0. - N 0. 0. 2.0 + N 0. 0. 1.8 diff --git a/input/options b/input/options index 91ed066..6d0cc55 100644 --- a/input/options +++ b/input/options @@ -11,6 +11,6 @@ # GW: maxSCF thresh DIIS n_diis COHSEX SOSEX BSE TDA G0W GW0 lin eta 64 0.00001 T 5 F F T F F F F 0.000 # ACFDT: AC Kx XBS - T T T + T F F # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift 1000000 100000 10 0.3 10000 1234 T diff --git a/input/weight b/input/weight index b246175..120ad98 100644 --- a/input/weight +++ b/input/weight @@ -1,26 +1,58 @@ -1 3 -S 3 1.00 - 0.9910616896D+02 0.1543289673D+00 - 0.1805231239D+02 0.5353281423D+00 - 0.4885660238D+01 0.4446345422D+00 -S 3 1.00 - 0.3780455879D+01 -0.9996722919D-01 - 0.8784966449D+00 0.3995128261D+00 - 0.2857143744D+00 0.7001154689D+00 -P 3 1.00 - 0.3780455879D+01 0.1559162750D+00 - 0.8784966449D+00 0.6076837186D+00 - 0.2857143744D+00 0.3919573931D+00 -2 3 -S 3 1.00 - 0.9910616896D+02 0.1543289673D+00 - 0.1805231239D+02 0.5353281423D+00 - 0.4885660238D+01 0.4446345422D+00 -S 3 1.00 - 0.3780455879D+01 -0.9996722919D-01 - 0.8784966449D+00 0.3995128261D+00 - 0.2857143744D+00 0.7001154689D+00 -P 3 1.00 - 0.3780455879D+01 0.1559162750D+00 - 0.8784966449D+00 0.6076837186D+00 - 0.2857143744D+00 0.3919573931D+00 +1 6 +S 8 1.00 + 9046.0000000 0.0007000 + 1357.0000000 0.0053890 + 309.3000000 0.0274060 + 87.7300000 0.1032070 + 28.5600000 0.2787230 + 10.2100000 0.4485400 + 3.8380000 0.2782380 + 0.7466000 0.0154400 +S 8 1.00 + 9046.0000000 -0.0001530 + 1357.0000000 -0.0012080 + 309.3000000 -0.0059920 + 87.7300000 -0.0245440 + 28.5600000 -0.0674590 + 10.2100000 -0.1580780 + 3.8380000 -0.1218310 + 0.7466000 0.5490030 +S 1 1.00 + 0.2248000 1.0000000 +P 3 1.00 + 13.5500000 0.0399190 + 2.9170000 0.2171690 + 0.7973000 0.5103190 +P 1 1.00 + 0.2185000 1.0000000 +D 1 1.00 + 0.8170000 1.0000000 +2 6 +S 8 1.00 + 9046.0000000 0.0007000 + 1357.0000000 0.0053890 + 309.3000000 0.0274060 + 87.7300000 0.1032070 + 28.5600000 0.2787230 + 10.2100000 0.4485400 + 3.8380000 0.2782380 + 0.7466000 0.0154400 +S 8 1.00 + 9046.0000000 -0.0001530 + 1357.0000000 -0.0012080 + 309.3000000 -0.0059920 + 87.7300000 -0.0245440 + 28.5600000 -0.0674590 + 10.2100000 -0.1580780 + 3.8380000 -0.1218310 + 0.7466000 0.5490030 +S 1 1.00 + 0.2248000 1.0000000 +P 3 1.00 + 13.5500000 0.0399190 + 2.9170000 0.2171690 + 0.7973000 0.5103190 +P 1 1.00 + 0.2185000 1.0000000 +D 1 1.00 + 0.8170000 1.0000000 diff --git a/src/QuAcK/linear_response.f90 b/src/QuAcK/linear_response.f90 index 5c865e7..5feb310 100644 --- a/src/QuAcK/linear_response.f90 +++ b/src/QuAcK/linear_response.f90 @@ -18,7 +18,13 @@ subroutine linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,lambda,e,ERI,r integer :: ia double precision :: trace_matrix - double precision,allocatable :: A(:,:),B(:,:),ApB(:,:),AmB(:,:),AmBSq(:,:),Z(:,:) + double precision,allocatable :: A(:,:) + double precision,allocatable :: B(:,:) + double precision,allocatable :: ApB(:,:) + double precision,allocatable :: AmB(:,:) + double precision,allocatable :: AmBSq(:,:) + double precision,allocatable :: AmBIv(:,:) + double precision,allocatable :: Z(:,:) ! Output variables @@ -27,10 +33,9 @@ subroutine linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,lambda,e,ERI,r double precision,intent(out) :: XpY(nS,nS) double precision,intent(out) :: XmY(nS,nS) - ! Memory allocation - allocate(A(nS,nS),B(nS,nS),ApB(nS,nS),AmB(nS,nS),AmBSq(nS,nS),Z(nS,nS)) + allocate(A(nS,nS),B(nS,nS),ApB(nS,nS),AmB(nS,nS),AmBSq(nS,nS),AmBIv(nS,nS),Z(nS,nS)) ! Build A and B matrices @@ -57,32 +62,33 @@ subroutine linear_response(ispin,dRPA,TDA,BSE,nBas,nC,nO,nV,nR,nS,lambda,e,ERI,r call diagonalize_matrix(nS,AmB,Omega) if(minval(Omega) < 0d0) & - call print_warning('You may have instabilities in linear response!!') + call print_warning('You may have instabilities in linear response: A-B is not positive definite!!') do ia=1,nS if(Omega(ia) < 0d0) Omega(ia) = 0d0 end do - call ADAt(nS,AmB,sqrt(Omega),AmBSq) + call ADAt(nS,AmB,1d0*sqrt(Omega),AmBSq) + call ADAt(nS,AmB,1d0/sqrt(Omega),AmBIv) Z = matmul(AmBSq,matmul(ApB,AmBSq)) call diagonalize_matrix(nS,Z,Omega) if(minval(Omega) < 0d0) & - call print_warning('You may have instabilities in linear response!!') + call print_warning('You may have instabilities in linear response: negative excitations!!') do ia=1,nS if(Omega(ia) < 0d0) Omega(ia) = 0d0 end do Omega = sqrt(Omega) + XpY = matmul(transpose(Z),AmBSq) call DA(nS,1d0/sqrt(Omega),XpY) - call ADAt(nS,AmB,1d0/sqrt(Omega),AmBSq) - XmY = matmul(transpose(Z),AmBSq) - call DA(nS,sqrt(Omega),XmY) + XmY = matmul(transpose(Z),AmBIv) + call DA(nS,1d0*sqrt(Omega),XmY) ! Compute the RPA correlation energy