Repository navigation
Add direct-BTD and Refactor Hamiltonian HDF5 dataflow - #45
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the initialization and handling of block tridiagonal (BTD) Hamiltonians in the NEGF code, with a focus on supporting a new "direct" BTD initialization mode. It also enhances the management of contact metadata, improves error checking, and streamlines the retrieval of device Hamiltonian data from cache files. The changes ensure more robust and flexible initialization, especially for large systems, and improve code maintainability.
BTD Initialization and Direct Mode Support:
NegfHamiltonian, including new arguments (btd_initialization,direct_btd_max_mib), validation checks, and integration with theinitialize_directfunction for memory-efficient initialization without constructing the full Hamiltonian. (Fca3e61bL63, Fca3e61bL75, Fca3e61bL215, Fca3e61bL256)Contact Metadata and Reduced Contacts:
contact_metadatato manage reduced contact information, enabling more accurate handling of lead-device coupling matrices and supporting explicit reduced contacts in both lead property calculations and cache packing. (Fccb08d0L310, Fccb08d0L385, Fccb08d0L408, Fccb08d0L892, Fccb08d0L964)Device Hamiltonian Cache Handling:
get_hs_deviceto robustly read both.h5and.pthcache formats, including explicit handling for incomplete or outdated caches, block tridiagonal vs. dense layouts, and improved error messages. Added a helper for k-point index lookup. (Fca3e61bL869, Fca3e61bL977)Code Cleanup and Minor Fixes:
References: