mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-30 12:43:40 +02:00
Added function to get # of SOMOs. #143
This commit is contained in:
parent
081f8a67ab
commit
0e50ff9149
@ -251,6 +251,8 @@ subroutine obtain_connected_I_foralpha(Ialpha, connectedI, nconnectedI, excitati
|
||||
|
||||
nconnectedI = 0
|
||||
|
||||
p = 0
|
||||
q = 0
|
||||
Isomo = Ialpha(1,1)
|
||||
Idomo = Ialpha(1,2)
|
||||
do i=1,N_configuration
|
||||
@ -305,3 +307,14 @@ subroutine obtain_connected_I_foralpha(Ialpha, connectedI, nconnectedI, excitati
|
||||
|
||||
|
||||
end subroutine obtain_connected_I_foralpha
|
||||
|
||||
function getNSOMO(Icfg) result(NSOMO)
|
||||
implicit none
|
||||
integer(bit_kind),intent(in) :: Icfg(N_int,2)
|
||||
integer :: NSOMO
|
||||
integer :: i
|
||||
NSOMO = 0
|
||||
do i = 1,N_int
|
||||
NSOMO += POPCNT(Icfg(i,1))
|
||||
enddo
|
||||
end function getNSOMO
|
||||
|
@ -278,6 +278,8 @@ subroutine obtain_connected_I_foralpha(Ialpha, connectedI, nconnectedI, excitati
|
||||
|
||||
nconnectedI = 0
|
||||
|
||||
p = 0
|
||||
q = 0
|
||||
Isomo = Ialpha(1,1)
|
||||
Idomo = Ialpha(1,2)
|
||||
do i=1,N_configuration
|
||||
@ -333,3 +335,18 @@ subroutine obtain_connected_I_foralpha(Ialpha, connectedI, nconnectedI, excitati
|
||||
|
||||
end subroutine obtain_connected_I_foralpha
|
||||
#+end_src
|
||||
|
||||
** Function to get the NSOMOs (seniority)
|
||||
|
||||
#+begin_src f90 :main no :tangle configuration_CI_sigma_helpers.irp.f
|
||||
function getNSOMO(Icfg) result(NSOMO)
|
||||
implicit none
|
||||
integer(bit_kind),intent(in) :: Icfg(N_int,2)
|
||||
integer :: NSOMO
|
||||
integer :: i
|
||||
NSOMO = 0
|
||||
do i = 1,N_int
|
||||
NSOMO += POPCNT(Icfg(i,1))
|
||||
enddo
|
||||
end function getNSOMO
|
||||
#+end_src
|
||||
|
Loading…
Reference in New Issue
Block a user