mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 20:34:58 +01:00
Simplified calculation of n_CSF. #158
This commit is contained in:
parent
8da63eeb7d
commit
94a069c2d5
@ -28,25 +28,22 @@
|
|||||||
detDimperBF = 0
|
detDimperBF = 0
|
||||||
MS = elec_alpha_num-elec_beta_num
|
MS = elec_alpha_num-elec_beta_num
|
||||||
! number of cfgs = number of dets for 0 somos
|
! number of cfgs = number of dets for 0 somos
|
||||||
n_CSF = cfg_seniority_index(0)-1
|
n_CSF = 0
|
||||||
ncfgprev = cfg_seniority_index(0)
|
ncfgprev = cfg_seniority_index(0)
|
||||||
do i = 0-iand(MS,1)+2, NSOMOMax,2
|
do i = iand(MS,1), NSOMOMax-2,2
|
||||||
if(cfg_seniority_index(i) .EQ. -1)then
|
if(cfg_seniority_index(i+2) .EQ. -1) then
|
||||||
ncfgpersomo = N_configuration + 1
|
ncfgpersomo = N_configuration + 1
|
||||||
else
|
else
|
||||||
ncfgpersomo = cfg_seniority_index(i)
|
ncfgpersomo = cfg_seniority_index(i+2)
|
||||||
endif
|
endif
|
||||||
ncfg = ncfgpersomo - ncfgprev
|
ncfg = ncfgpersomo - ncfgprev
|
||||||
!detDimperBF = max(1,nint((binom(i,(i+1)/2))))
|
if(iand(MS,1) .EQ. 0) then
|
||||||
if (i > 2) then
|
dimcsfpercfg = max(1,nint((binom(i,i/2)-binom(i,i/2+1))))
|
||||||
dimcsfpercfg = max(1,nint((binom(i-2,(i-2+1)/2)-binom(i-2,((i-2+1)/2)+1))))
|
else
|
||||||
else
|
dimcsfpercfg = max(1,nint((binom(i,(i+1)/2)-binom(i,(i+3)/2))))
|
||||||
dimcsfpercfg = 1
|
endif
|
||||||
endif
|
n_CSF += ncfg * dimcsfpercfg
|
||||||
n_CSF += ncfg * dimcsfpercfg
|
ncfgprev = cfg_seniority_index(i+2)
|
||||||
!if(cfg_seniority_index(i+2) == -1) EXIT
|
|
||||||
!if(detDimperBF > maxDetDimPerBF) maxDetDimPerBF = detDimperBF
|
|
||||||
ncfgprev = cfg_seniority_index(i)
|
|
||||||
enddo
|
enddo
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user