30 #include "../base/base_uses.f90"
38 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'orbital_pointers'
44 INTEGER,
DIMENSION(:, :),
ALLOCATABLE :: so,
soset
45 INTEGER,
DIMENSION(:, :, :),
ALLOCATABLE ::
co,
coset
75 SUBROUTINE create_orbital_pointers(maxl)
76 INTEGER,
INTENT(IN) :: maxl
78 INTEGER :: iso, l, lx, ly, lz, m
81 CALL cp_abort(__location__, &
82 "Orbital pointers are already allocated. "// &
83 "Use the init routine for an update")
87 CALL cp_abort(__location__, &
88 "A negative maximum angular momentum quantum "// &
97 ALLOCATE (
nco(-1:maxl))
102 nco(l) = (l + 1)*(l + 2)/2
107 ALLOCATE (
ncoset(-1:maxl))
117 ALLOCATE (
co(0:maxl, 0:maxl, 0:maxl))
121 ALLOCATE (
coset(-1:maxl, -1:maxl, -1:maxl))
134 co(lx, ly, lz) = 1 + (l - lx)*(l - lx + 1)/2 + lz
148 indco(1:3,
coset(lx, ly, lz)) = (/lx, ly, lz/)
155 ALLOCATE (
nso(-1:maxl))
165 ALLOCATE (
nsoset(-1:maxl))
183 indso(1:2, iso) = (/l, m/)
188 ALLOCATE (so(0:maxl, -maxl:maxl),
soset(0:maxl, -maxl:maxl))
193 so(l, m) =
nso(l) - (l - m)
202 END SUBROUTINE create_orbital_pointers
253 INTEGER,
INTENT(IN) :: maxl
259 CALL cp_abort(__location__, &
260 "A negative maximum angular momentum quantum "// &
268 CALL create_orbital_pointers(maxl)
Provides Cartesian and spherical orbital pointers and indices.
integer, save, public current_maxl
subroutine, public init_orbital_pointers(maxl)
Initialize or update the orbital pointers.
integer, dimension(:, :, :), allocatable, public co
subroutine, public deallocate_orbital_pointers()
Deallocate the orbital pointers.
integer, dimension(:), allocatable, public nco
integer, dimension(:), allocatable, public nsoset
integer, dimension(:, :), allocatable, public indso
integer, dimension(:), allocatable, public ncoset
integer, dimension(:, :), allocatable, public soset
integer, dimension(:, :, :), allocatable, public coset
integer, dimension(:, :), allocatable, public indco
integer, dimension(:), allocatable, public nso
integer, dimension(:, :), allocatable, public indso_inv