Automatic UHF calculation for odd number of electrons #1107
Labels
bug
Something isn't working
easy to fix
This issue has a low difficulty and little entry-barrier, great to get started with this project
Describe the bug
If a system contains an odd number of electrons, xTB will automatically enforce a UHF calculation with one unpaired electron. However, this adjustment occurs without any warning, and the output incorrectly displays
unpaired electrons = 0
, which can be misleading. This becomes particularly problematic when the system is supposed to carry a charge, but the charge information is missing.To Reproduce
Steps to reproduce the behaviour:
xtb struc.xyz
vs.xtb struc.xyz -uhf 1
yields the same resultInput Geometry
Output without charge and UHF information
Output with given UHF information
Output with given charge information
Expected behaviour
I would at least expect that the number of unpaired electrons is adjusted in the output and ideally a warning should be printed. In ORCA these calculations would immediately crash so that users do not obtain misleading results.
The text was updated successfully, but these errors were encountered: