Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in KPM method #40

Open
BertJorissen opened this issue Jan 11, 2023 · 1 comment
Open

Bug in KPM method #40

BertJorissen opened this issue Jan 11, 2023 · 1 comment
Labels

Comments

@BertJorissen
Copy link
Collaborator

auto const row = index_queue[h2_row];
has the expression of a vector where the index is taken from using an other vector. However, if the Hamiltonian is block-diagonal, the index_queue doesn't contain all the indices to connect all the sites to each other. In essence, you could only reorder for one 'block'. If the matrix is block-diagonal, is would be faster to treat the system in separate calculations. However, this can create strange segmentation errors if for example the hopping parameter between two different systems is changed and goes through zero.

An easy fix is to assign the value of 'row' to the first nonzero integer not in index_queue, and also add this integer to the slice_border_indices-vector. This fix works, and will be added in a future release.

@BertJorissen
Copy link
Collaborator Author

Currenlty, all the bug related to the KPM method are solved. The bugs originated from block-diagonal systems, and systems where there were rows/columns with zeros or where the first diagonal-element of a block-diagonal section was zero.

Also, the function KPM.calc_spatial_ldos now works with multi-orbital models.

To install this updated version, please use pip uninstall pybinding and pip install git+https://github.com/BertJorissen/pybinding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant