dipc-cc / hubbard

Python tools for mean-field Hubbard models
https://dipc-cc.github.io/hubbard/
GNU Lesser General Public License v3.0
21 stars 8 forks source link

Default q-values for spin-polarized calculations with odd number of electrons #102

Closed tfrederiksen closed 3 years ago

tfrederiksen commented 3 years ago

Spin-polarized calculations for molecules with an odd number of electrons should reflect this difference in the populations of the two spin components, rather than operating with fractional q-values. This branch fixes this by forcing integer division.

sofiasanz commented 3 years ago

Agreed. Actually we should also modify the case for unpolarized systems since we face the same problem there, no? The thing is that a system with an odd number of electrons has an open-shell solution, should we then allow the code to obtain the closed-shell solution (unpolarized) for such systems?

tfrederiksen commented 3 years ago

The unpolarized case is fine as it is, here the total number of electrons must be equally distributed between the two spin-components.

sofiasanz commented 3 years ago

OK I thought that maybe it was a bit unnatural to simulate it like that, but I guess we can do such calculation. I think this branch is ready to go.

tfrederiksen commented 3 years ago

The unpolarized case would be treated the same way in any DFT code. The use need to understand what he/she is doing.