We are indexing into our orthonormalization matrix using these n, but since there are repeats, it creates a slice of our original GTO overlap matrix that thus also repeats. This resulting matrix will not be positive semidefinite and therefore cannot be orthonormalized, so it's caught by our positive semidefinite checkers.
To fix this, we iterate through each neighbor species and orthonormalize the individual sub blocks.
If there are multiple species, then the radial channels within a tensor block will repeat for each species, like this:
We are indexing into our orthonormalization matrix using these n, but since there are repeats, it creates a slice of our original GTO overlap matrix that thus also repeats. This resulting matrix will not be positive semidefinite and therefore cannot be orthonormalized, so it's caught by our positive semidefinite checkers.
To fix this, we iterate through each neighbor species and orthonormalize the individual sub blocks.