atomic spin populations
Is your feature request related to a problem? Please describe.
I would like to (quantitatively) analyze xTB atomic spin populations for radical chemistry
Describe the solution you'd like
In the same way that Result.get_charges() returns a numpy array of atomic charges, Result.get_spin_pops() would return two numpy arrays of alpha and beta atomic spin populations
Describe alternatives you've considered
The alternative is reading in the orbital coefficients and occupations, and performing the analysis externally. Seeing as the code for generating mulliken/CM5 charge populations exists internally, this will likely require just a slight modification to existing code.
Additional context
Note that xtb currently does not support spin-polarized calculations, all calculations are performed using a restricted open-shell formalism.
However, we are working on a spin-polarization expression for GFN2-xTB (cc @haneug).
Good to know - even within an RO framework it would be useful to have an atomic spin population API!
Alternatively, if someone could point me to some way to get the AO overlap matrix (or even just the basis set parameters) in a given xTB implementation that would be very helpful.
Probably something along this lines: https://github.com/grimme-lab/xtb/discussions/478#discussioncomment-2789695
That looks promising, although I'm running into version issues with tblite for my existing code (examples run with incorrect energies and as a result do not converge). Does a similar API exist in this codebase?
I'm running into version issues with tblite for my existing code
Not sure if I understand what this is supposed to mean, if you suspect a bug I'd appreciate it getting reported.
When I install tblite with a fresh install of python the examples given work fine, but when trying to install tblite in the environment for an existing code base I'm working with (where we currently call this python api), it runs incorrectly, making me believe there are some version incompatibilities (that also are not getting picked up by pip, which I used to install tblite in both instances). I'm not sure what exactly is failing though, so I'd hesitate to report it as a bug.