subroutine setupImpurityExcitgen() ! get the number of ImpuritySites call constructBath() ! first, get the number of connections for each orbital allocate(nConnects(nBasis)) ! get the number of connected orbs per orb call constructConnections() ! and then the connections allocate(connections(nBasis, maxval(nConnects))) ! get the connections call constructConnections() ! set pSingles call assignPSingles() end subroutine setupImpurityExcitgen