3
subroutine get_orbital_set(line,set_mask)
5
use subs, only : txt2wrd, orbital
9
character(len=*), intent(in) :: line
10
logical, intent(out) :: set_mask(:)
12
print *, "Size of set_mask: ", size(set_mask)
15
call txt2wrd (line, wrd, nwd, nlwmx)
16
if (nwd.gt.nlwmx) stop "* Groups per subset limit exceeded."
18
if (trim(wrd(1)).eq.'+') then
21
if (k.le.0.or.k.gt.no_u) then
22
print *, "Wrong orbital number: ", k
31
call orbital (wrd(iw), ia, cx, n, l, k)
34
print *, "Error in orb spec: ", trim(wrd(iw))
41
if (trim(label(i)) .eq. trim(cx)) it=i
44
print *, "Wrong species: ", trim(cx)
49
print *, "Atom index too big: ", ia
52
!!! Could go on checking whether a given
53
!!! atom has the orbitals specified, instead
54
!!! or giving an empty result
56
! See which orbitals match
59
if ((za(io).eq.ia).or.(ia.eq.0.and.zc(io).eq.it)) then
60
if ((zn(io).eq.n.or.n.eq.-1).and. &
61
(zl(io).eq.l.or.l.eq.-1).and. &
62
(zx(io).eq.k.or.k.eq.-1)) then
71
end subroutine get_orbital_set
73
end module orbital_set