zerothi / sisl

Electronic structure Python package for post analysis and large scale tight-binding DFT/NEGF calculations
https://zerothi.github.io/sisl
Mozilla Public License 2.0
173 stars 57 forks source link

Allow `State.degenerate_decouple` #802

Open zerothi opened 1 week ago

zerothi commented 1 week ago

Describe the feature

Up till now the decoupling algorithm was only present in the derivative method.

But, it does not belong there.

Instead one should dis-entangle the states through some kind of inner-product matrix with an operator.

The procedure could be something like this:

es = H.eigenstate(...)
# closewithin 1e-5 eV
degenerate = es.degenerate(1e-5)

for deg in degenerate:
    der_xyz = es.sub(deg).derivative(matrix=True)
    der = der_xyz[0] * 0.5 + der_xyz[1] * 0.5
    es.state[deg] = eigh(der)[1].T @ es.state[deg]