diff --git a/include/parameters.h b/include/parameters.h index 279fe1e..850485b 100644 --- a/include/parameters.h +++ b/include/parameters.h @@ -18,5 +18,6 @@ double precision,parameter :: CxLDA = - (3d0/4d0)*(3d0/pi)**(1d0/3d0) double precision,parameter :: Cx0 = - (4d0/3d0)*(1d0/pi)**(1d0/3d0) - double precision,parameter :: Cx1 = - (176d0/105d0)*(1d0/pi)**(1d0/3d0) +! double precision,parameter :: Cx1 = - (176d0/105d0)*(1d0/pi)**(1d0/3d0) + double precision,parameter :: Cx1 = - 0.904*(176d0/105d0)*(1d0/pi)**(1d0/3d0) diff --git a/input/basis b/input/basis index a59a2e4..a1f7a8d 100644 --- a/input/basis +++ b/input/basis @@ -1,11 +1,27 @@ -1 1 +1 5 S 3 - 1 3.42525091 0.15432897 - 2 0.62391373 0.53532814 - 3 0.16885540 0.44463454 -2 1 + 1 13.0100000 0.0196850 + 2 1.9620000 0.1379770 + 3 0.4446000 0.4781480 +S 1 + 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 +P 1 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 +2 5 S 3 - 1 3.42525091 0.15432897 - 2 0.62391373 0.53532814 - 3 0.16885540 0.44463454 + 1 13.0100000 0.0196850 + 2 1.9620000 0.1379770 + 3 0.4446000 0.4781480 +S 1 + 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 +P 1 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 diff --git a/input/dft b/input/dft index c502657..49205b9 100644 --- a/input/dft +++ b/input/dft @@ -1,12 +1,12 @@ # Restricted or unrestricted KS calculation - GOK-RKS + LIM-RKS # exchange rung: # Hartree = 0 # LDA = 1: RS51,RMFL20 # GGA = 2: RB88 # Hybrid = 4 # Hartree-Fock = 666 - 1 RS51 + 1 RMFL20 # correlation rung: # Hartree = 0 # LDA = 1: RVWN5,RMFL20 @@ -19,6 +19,6 @@ # Number of states in ensemble (nEns) 2 # Ensemble weights: wEns(1),...,wEns(nEns-1) - 0.5000 + 0.25 # GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type 32 0.00001 T 5 1 1 diff --git a/input/weight b/input/weight index a59a2e4..a1f7a8d 100644 --- a/input/weight +++ b/input/weight @@ -1,11 +1,27 @@ -1 1 +1 5 S 3 - 1 3.42525091 0.15432897 - 2 0.62391373 0.53532814 - 3 0.16885540 0.44463454 -2 1 + 1 13.0100000 0.0196850 + 2 1.9620000 0.1379770 + 3 0.4446000 0.4781480 +S 1 + 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 +P 1 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 +2 5 S 3 - 1 3.42525091 0.15432897 - 2 0.62391373 0.53532814 - 3 0.16885540 0.44463454 + 1 13.0100000 0.0196850 + 2 1.9620000 0.1379770 + 3 0.4446000 0.4781480 +S 1 + 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 +P 1 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 diff --git a/src/eDFT/GOK_RKS.f90 b/src/eDFT/GOK_RKS.f90 index fee56d5..bfd8db2 100644 --- a/src/eDFT/GOK_RKS.f90 +++ b/src/eDFT/GOK_RKS.f90 @@ -1,5 +1,5 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, & - max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,Ew,EwGIC,F) + max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,Ew,EwGIC,c) ! Perform restricted Kohn-Sham calculation for ensembles @@ -31,7 +31,7 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxS double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) double precision,intent(in) :: ENuc - double precision,intent(inout):: F(nBas,nBas) + double precision,intent(inout):: c(nBas,nBas) ! Local variables @@ -47,9 +47,9 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxS double precision :: Ec double precision,allocatable :: eps(:) - double precision,allocatable :: c(:,:) double precision,allocatable :: cp(:,:) double precision,allocatable :: J(:,:) + double precision,allocatable :: F(:,:) double precision,allocatable :: Fp(:,:) double precision,allocatable :: Fx(:,:) double precision,allocatable :: FxHF(:,:) @@ -120,8 +120,8 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxS ! Memory allocation - allocate(eps(nBas),c(nBas,nBas),cp(nBas,nBas), & - J(nBas,nBas),Fp(nBas,nBas),Fx(nBas,nBas), & + allocate(eps(nBas),cp(nBas,nBas),J(nBas,nBas), & + F(nBas,nBas),Fp(nBas,nBas),Fx(nBas,nBas), & FxHF(nBas,nBas),Fc(nBas,nBas),err(nBas,nBas), & Pw(nBas,nBas),rhow(nGrid),drhow(ncart,nGrid), & err_diis(nBasSq,max_diis),F_diis(nBasSq,max_diis), & @@ -130,6 +130,9 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxS ! Guess coefficients and eigenvalues if(.not. restart) then + +! call mo_guess(nBas,nO,guess_type,S,Hc,ERI,J,Fx,X,cp,F,Fp,eps,c,P) + if(guess_type == 1) then cp(:,:) = matmul(transpose(X(:,:)),matmul(Hc(:,:),X(:,:))) diff --git a/src/eDFT/LIM_RKS.f90 b/src/eDFT/LIM_RKS.f90 index 25c4976..44da113 100644 --- a/src/eDFT/LIM_RKS.f90 +++ b/src/eDFT/LIM_RKS.f90 @@ -1,5 +1,5 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, & - max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,F) + max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,c) ! Perform restricted Kohn-Sham calculation for ensembles @@ -29,7 +29,7 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) double precision,intent(in) :: ENuc - double precision,intent(out) :: F(nBas,nBas) + double precision,intent(out) :: c(nBas,nBas) ! Local variables @@ -66,7 +66,7 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres write(*,*) call GOK_RKS(.false.,x_rung,x_DFA,c_rung,c_DFA,nEns,wLIM,nGrid,weight,maxSCF,thresh, & - max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,EwZW,EwGICZW,F) + max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,EwZW,EwGICZW,c) !------------------------------------------------------------------------ ! Equiensemble calculation @@ -83,7 +83,7 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres write(*,*) call GOK_RKS(.true.,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, & - max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,EwEW,EwGICEW,F) + max_diis,guess_type,nBas,AO,dAO,nO,nV,S,T,V,Hc,ERI,X,ENuc,EwEW,EwGICEW,c) !------------------------------------------------------------------------ ! LIM excitation energies diff --git a/src/eDFT/eDFT.f90 b/src/eDFT/eDFT.f90 index 464bc01..fd9e70f 100644 --- a/src/eDFT/eDFT.f90 +++ b/src/eDFT/eDFT.f90 @@ -27,7 +27,7 @@ program eDFT double precision,allocatable :: Hc(:,:) double precision,allocatable :: X(:,:) double precision,allocatable :: ERI(:,:,:,:) - double precision,allocatable :: F(:,:) + double precision,allocatable :: c(:,:) character(len=7) :: method integer :: x_rung,c_rung @@ -110,7 +110,7 @@ program eDFT ! Memory allocation for one- and two-electron integrals allocate(S(nBas,nBas),T(nBas,nBas),V(nBas,nBas),Hc(nBas,nBas), & - X(nBas,nBas),ERI(nBas,nBas,nBas,nBas),F(nBas,nBas)) + X(nBas,nBas),ERI(nBas,nBas,nBas,nBas),c(nBas,nBas)) ! Read integrals @@ -161,7 +161,7 @@ program eDFT call cpu_time(start_KS) call GOK_RKS(.false.,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, & nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc, & - Ew,EwGIC,F(:,:)) + Ew,EwGIC,c(:,:)) call cpu_time(end_KS) t_KS = end_KS - start_KS @@ -179,7 +179,7 @@ program eDFT call cpu_time(start_KS) call LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns(:),nGrid,weight(:),maxSCF,thresh,max_diis,guess_type, & nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc, & - F(:,:)) + c(:,:)) call cpu_time(end_KS) t_KS = end_KS - start_KS diff --git a/src/eDFT/print_restricted_individual_energy.f90 b/src/eDFT/print_restricted_individual_energy.f90 index e162a94..376a94d 100644 --- a/src/eDFT/print_restricted_individual_energy.f90 +++ b/src/eDFT/print_restricted_individual_energy.f90 @@ -143,7 +143,7 @@ subroutine print_restricted_individual_energy(nEns,ENuc,Ew,EwGIC,ET,EV,EJ,Ex,Ec, write(*,'(A60)') '-------------------------------------------------' do iEns=2,nEns - write(*,'(A40,I2,A2,F16.10,A3)') ' Auxiliary excitation energy 1 ->',iEns,': ',Omaux(iEns)+OmxcDD(iEns),' au' + write(*,'(A40,I2,A2,F16.10,A3)') ' Excitation energy 1 ->',iEns,': ',Omaux(iEns)+OmxcDD(iEns),' au' write(*,*) write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns), ' au' write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns), ' au' @@ -153,7 +153,7 @@ subroutine print_restricted_individual_energy(nEns,ENuc,Ew,EwGIC,ET,EV,EJ,Ex,Ec, write(*,'(A60)') '-------------------------------------------------' do iEns=2,nEns - write(*,'(A40,I2,A2,F16.10,A3)') ' Auxiliary excitation energy 1 ->',iEns,': ',(Omaux(iEns)+OmxcDD(iEns))*HaToeV,' eV' + write(*,'(A40,I2,A2,F16.10,A3)') ' Excitation energy 1 ->',iEns,': ',(Omaux(iEns)+OmxcDD(iEns))*HaToeV,' eV' write(*,*) write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns)*HaToeV, ' eV' write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'