mirror of
https://github.com/pfloos/quack
synced 2024-12-22 20:35:36 +01:00
fixed the allocate problem for occnum
This commit is contained in:
parent
e6f519561a
commit
dbb560f77a
@ -19,7 +19,7 @@
|
||||
# Number of states in ensemble (nEns)
|
||||
3
|
||||
# Ensemble weights: wEns(1),...,wEns(nEns-1)
|
||||
0.00 1.00
|
||||
1.00 0.00
|
||||
# Ncentered ? 0 for NO
|
||||
0
|
||||
# Parameters for CC weight-dependent exchange functional
|
||||
|
@ -37,7 +37,7 @@ subroutine GOK_RKS(restart,x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,aCC_
|
||||
double precision,intent(in) :: ENuc
|
||||
|
||||
double precision,intent(inout):: c(nBas,nBas)
|
||||
double precision,intent(in):: occnum(2,2,32,2,32,2,3)
|
||||
double precision,intent(in):: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
! Local variables
|
||||
|
@ -30,7 +30,7 @@ subroutine GOK_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nGrid,weight,aCC_w1,aCC_w
|
||||
double precision,intent(in) :: X(nBas,nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: ENuc
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
! Local variables
|
||||
|
@ -31,7 +31,7 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,aCC_w1,aCC_w2,nGr
|
||||
double precision,intent(in) :: X(nBas,nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: ENuc
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ subroutine MOM_RKS(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,nGrid,weight, &
|
||||
double precision,intent(in) :: X(nBas,nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: ENuc
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
|
||||
|
@ -59,8 +59,7 @@ program eDFT
|
||||
integer :: guess_type
|
||||
integer :: ortho_type
|
||||
|
||||
! double precision,allocatable,dimension(:,:,:) :: occnum
|
||||
double precision,dimension(2,2,3) :: occnum
|
||||
double precision,allocatable :: occnum(:,:,:)
|
||||
integer :: Cx_choice
|
||||
|
||||
! Hello World
|
||||
@ -112,7 +111,7 @@ program eDFT
|
||||
|
||||
|
||||
! Allocate ensemble weights
|
||||
|
||||
allocate(occnum(nspin,2,maxEns))
|
||||
allocate(wEns(maxEns))
|
||||
call read_options(method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,aCC_w1,aCC_w2, &
|
||||
maxSCF,thresh,DIIS,max_diis,guess_type,ortho_type,doNcentered,ncent,occnum,Cx_choice)
|
||||
|
@ -30,7 +30,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
|
||||
double precision,intent(in) :: X(nBas,nBas)
|
||||
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: ENuc
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
! Local variables
|
||||
|
@ -21,7 +21,7 @@ subroutine read_options(method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,aCC_w1,aC
|
||||
double precision,intent(out) :: wEns(maxEns)
|
||||
double precision,intent(out) :: aCC_w1(3)
|
||||
double precision,intent(out) :: aCC_w2(3)
|
||||
double precision,intent(inout) :: occnum(2,2,3)
|
||||
double precision,intent(inout):: occnum(nspin,2,maxEns)
|
||||
|
||||
integer,intent(out) :: maxSCF
|
||||
double precision,intent(out) :: thresh
|
||||
@ -141,10 +141,9 @@ subroutine read_options(method,x_rung,x_DFA,c_rung,c_DFA,SGn,nEns,wEns,aCC_w1,aC
|
||||
call matout(3,1,aCC_w2)
|
||||
write(*,*)
|
||||
|
||||
!allocate(occnum(nspin,2,nEns))
|
||||
! Read occupation numbers for orbitals nO and nO+1
|
||||
read(1,*)
|
||||
do J=1,3
|
||||
do J=1,nEns
|
||||
read(1,*) (occnum(1,I,J),I=1,2)
|
||||
read(1,*) (occnum(2,I,J),I=1,2)
|
||||
end do
|
||||
|
@ -12,7 +12,7 @@ subroutine restricted_auxiliary_energy(nBas,nEns,nO,eps,Eaux,occnum)
|
||||
integer,intent(in) :: nEns
|
||||
integer,intent(in) :: nO
|
||||
double precision,intent(in) :: eps(nBas)
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
|
||||
|
||||
! Local variables
|
||||
|
@ -12,7 +12,7 @@ subroutine restricted_density_matrix(nBas,nEns,nO,c,P,occnum)
|
||||
integer,intent(in) :: nEns
|
||||
integer,intent(in) :: nO
|
||||
double precision,intent(in) :: c(nBas,nBas)
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
|
||||
|
||||
! Local variables
|
||||
|
@ -38,7 +38,7 @@ subroutine restricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,n
|
||||
double precision,intent(in) :: J(nBas,nBas)
|
||||
|
||||
double precision :: Ew
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ subroutine unrestricted_auxiliary_energy(nBas,nEns,nO,eps,Eaux,occnum)
|
||||
integer,intent(in) :: nEns
|
||||
integer,intent(in) :: nO(nspin)
|
||||
double precision,intent(in) :: eps(nBas,nspin)
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
|
||||
|
||||
! Local variables
|
||||
|
@ -12,7 +12,7 @@ subroutine unrestricted_density_matrix(nBas,nEns,nO,c,P,occnum)
|
||||
integer,intent(in) :: nEns
|
||||
integer,intent(in) :: nO(nspin)
|
||||
double precision,intent(in) :: c(nBas,nBas,nspin)
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
|
||||
|
||||
! Local variables
|
||||
|
@ -41,7 +41,7 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
||||
double precision,intent(in) :: FxHF(nBas,nBas,nspin)
|
||||
double precision,intent(in) :: Fc(nBas,nBas,nspin)
|
||||
double precision :: Ew
|
||||
double precision,intent(in) :: occnum(2,2,3)
|
||||
double precision,intent(in) :: occnum(nspin,2,nEns)
|
||||
integer,intent(in) :: Cx_choice
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user