mirror of
https://github.com/pfloos/quack
synced 2024-11-04 21:23:55 +01:00
guess
This commit is contained in:
parent
196ac67c26
commit
e7fa09cbd0
@ -18,5 +18,6 @@
|
|||||||
|
|
||||||
double precision,parameter :: CxLDA = - (3d0/4d0)*(3d0/pi)**(1d0/3d0)
|
double precision,parameter :: CxLDA = - (3d0/4d0)*(3d0/pi)**(1d0/3d0)
|
||||||
double precision,parameter :: Cx0 = - (4d0/3d0)*(1d0/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)
|
||||||
|
|
||||||
|
32
input/basis
32
input/basis
@ -1,11 +1,27 @@
|
|||||||
1 1
|
1 5
|
||||||
S 3
|
S 3
|
||||||
1 3.42525091 0.15432897
|
1 13.0100000 0.0196850
|
||||||
2 0.62391373 0.53532814
|
2 1.9620000 0.1379770
|
||||||
3 0.16885540 0.44463454
|
3 0.4446000 0.4781480
|
||||||
2 1
|
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
|
S 3
|
||||||
1 3.42525091 0.15432897
|
1 13.0100000 0.0196850
|
||||||
2 0.62391373 0.53532814
|
2 1.9620000 0.1379770
|
||||||
3 0.16885540 0.44463454
|
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
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# Restricted or unrestricted KS calculation
|
# Restricted or unrestricted KS calculation
|
||||||
GOK-RKS
|
LIM-RKS
|
||||||
# exchange rung:
|
# exchange rung:
|
||||||
# Hartree = 0
|
# Hartree = 0
|
||||||
# LDA = 1: RS51,RMFL20
|
# LDA = 1: RS51,RMFL20
|
||||||
# GGA = 2: RB88
|
# GGA = 2: RB88
|
||||||
# Hybrid = 4
|
# Hybrid = 4
|
||||||
# Hartree-Fock = 666
|
# Hartree-Fock = 666
|
||||||
1 RS51
|
1 RMFL20
|
||||||
# correlation rung:
|
# correlation rung:
|
||||||
# Hartree = 0
|
# Hartree = 0
|
||||||
# LDA = 1: RVWN5,RMFL20
|
# LDA = 1: RVWN5,RMFL20
|
||||||
@ -19,6 +19,6 @@
|
|||||||
# Number of states in ensemble (nEns)
|
# Number of states in ensemble (nEns)
|
||||||
2
|
2
|
||||||
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
||||||
0.5000
|
0.25
|
||||||
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
|
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
|
||||||
32 0.00001 T 5 1 1
|
32 0.00001 T 5 1 1
|
||||||
|
32
input/weight
32
input/weight
@ -1,11 +1,27 @@
|
|||||||
1 1
|
1 5
|
||||||
S 3
|
S 3
|
||||||
1 3.42525091 0.15432897
|
1 13.0100000 0.0196850
|
||||||
2 0.62391373 0.53532814
|
2 1.9620000 0.1379770
|
||||||
3 0.16885540 0.44463454
|
3 0.4446000 0.4781480
|
||||||
2 1
|
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
|
S 3
|
||||||
1 3.42525091 0.15432897
|
1 13.0100000 0.0196850
|
||||||
2 0.62391373 0.53532814
|
2 1.9620000 0.1379770
|
||||||
3 0.16885540 0.44463454
|
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
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, &
|
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
|
! 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) :: ERI(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: ENuc
|
double precision,intent(in) :: ENuc
|
||||||
|
|
||||||
double precision,intent(inout):: F(nBas,nBas)
|
double precision,intent(inout):: c(nBas,nBas)
|
||||||
|
|
||||||
! Local variables
|
! 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 :: Ec
|
||||||
|
|
||||||
double precision,allocatable :: eps(:)
|
double precision,allocatable :: eps(:)
|
||||||
double precision,allocatable :: c(:,:)
|
|
||||||
double precision,allocatable :: cp(:,:)
|
double precision,allocatable :: cp(:,:)
|
||||||
double precision,allocatable :: J(:,:)
|
double precision,allocatable :: J(:,:)
|
||||||
|
double precision,allocatable :: F(:,:)
|
||||||
double precision,allocatable :: Fp(:,:)
|
double precision,allocatable :: Fp(:,:)
|
||||||
double precision,allocatable :: Fx(:,:)
|
double precision,allocatable :: Fx(:,:)
|
||||||
double precision,allocatable :: FxHF(:,:)
|
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
|
! Memory allocation
|
||||||
|
|
||||||
allocate(eps(nBas),c(nBas,nBas),cp(nBas,nBas), &
|
allocate(eps(nBas),cp(nBas,nBas),J(nBas,nBas), &
|
||||||
J(nBas,nBas),Fp(nBas,nBas),Fx(nBas,nBas), &
|
F(nBas,nBas),Fp(nBas,nBas),Fx(nBas,nBas), &
|
||||||
FxHF(nBas,nBas),Fc(nBas,nBas),err(nBas,nBas), &
|
FxHF(nBas,nBas),Fc(nBas,nBas),err(nBas,nBas), &
|
||||||
Pw(nBas,nBas),rhow(nGrid),drhow(ncart,nGrid), &
|
Pw(nBas,nBas),rhow(nGrid),drhow(ncart,nGrid), &
|
||||||
err_diis(nBasSq,max_diis),F_diis(nBasSq,max_diis), &
|
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
|
! Guess coefficients and eigenvalues
|
||||||
|
|
||||||
if(.not. restart) then
|
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
|
if(guess_type == 1) then
|
||||||
|
|
||||||
cp(:,:) = matmul(transpose(X(:,:)),matmul(Hc(:,:),X(:,:)))
|
cp(:,:) = matmul(transpose(X(:,:)),matmul(Hc(:,:),X(:,:)))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, &
|
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
|
! 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) :: ERI(nBas,nBas,nBas,nBas)
|
||||||
double precision,intent(in) :: ENuc
|
double precision,intent(in) :: ENuc
|
||||||
|
|
||||||
double precision,intent(out) :: F(nBas,nBas)
|
double precision,intent(out) :: c(nBas,nBas)
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
call GOK_RKS(.false.,x_rung,x_DFA,c_rung,c_DFA,nEns,wLIM,nGrid,weight,maxSCF,thresh, &
|
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
|
! Equiensemble calculation
|
||||||
@ -83,7 +83,7 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thres
|
|||||||
write(*,*)
|
write(*,*)
|
||||||
|
|
||||||
call GOK_RKS(.true.,x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,maxSCF,thresh, &
|
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
|
! LIM excitation energies
|
||||||
|
@ -27,7 +27,7 @@ program eDFT
|
|||||||
double precision,allocatable :: Hc(:,:)
|
double precision,allocatable :: Hc(:,:)
|
||||||
double precision,allocatable :: X(:,:)
|
double precision,allocatable :: X(:,:)
|
||||||
double precision,allocatable :: ERI(:,:,:,:)
|
double precision,allocatable :: ERI(:,:,:,:)
|
||||||
double precision,allocatable :: F(:,:)
|
double precision,allocatable :: c(:,:)
|
||||||
|
|
||||||
character(len=7) :: method
|
character(len=7) :: method
|
||||||
integer :: x_rung,c_rung
|
integer :: x_rung,c_rung
|
||||||
@ -110,7 +110,7 @@ program eDFT
|
|||||||
! Memory allocation for one- and two-electron integrals
|
! Memory allocation for one- and two-electron integrals
|
||||||
|
|
||||||
allocate(S(nBas,nBas),T(nBas,nBas),V(nBas,nBas),Hc(nBas,nBas), &
|
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
|
! Read integrals
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ program eDFT
|
|||||||
call cpu_time(start_KS)
|
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, &
|
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, &
|
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)
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
t_KS = end_KS - start_KS
|
t_KS = end_KS - start_KS
|
||||||
@ -179,7 +179,7 @@ program eDFT
|
|||||||
call cpu_time(start_KS)
|
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, &
|
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, &
|
nBas,AO(:,:),dAO(:,:,:),nO(1),nV(1),S(:,:),T(:,:),V(:,:),Hc(:,:),ERI(:,:,:,:),X(:,:),ENuc, &
|
||||||
F(:,:))
|
c(:,:))
|
||||||
call cpu_time(end_KS)
|
call cpu_time(end_KS)
|
||||||
|
|
||||||
t_KS = end_KS - start_KS
|
t_KS = end_KS - start_KS
|
||||||
|
@ -143,7 +143,7 @@ subroutine print_restricted_individual_energy(nEns,ENuc,Ew,EwGIC,ET,EV,EJ,Ex,Ec,
|
|||||||
write(*,'(A60)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
|
||||||
do iEns=2,nEns
|
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(*,*)
|
||||||
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns), ' au'
|
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns), ' au'
|
||||||
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(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)') '-------------------------------------------------'
|
write(*,'(A60)') '-------------------------------------------------'
|
||||||
|
|
||||||
do iEns=2,nEns
|
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(*,*)
|
||||||
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' auxiliary energy contribution : ',Omaux(iEns)*HaToeV, ' eV'
|
||||||
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'
|
write(*,'(A44, F16.10,A3)') ' x ensemble derivative : ',OmxDD(iEns)*HaToeV, ' eV'
|
||||||
|
Loading…
Reference in New Issue
Block a user