Skip to content

Commit

Permalink
Fix: subtract e_fermi from blocks in ToPybinding (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
QG-phy authored Jun 17, 2024
1 parent f4e6536 commit 16bf20a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dptb/postprocess/topybinding.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_lattice(self, data: Union[AtomicData, ase.Atoms, str], AtomicData_option
onsite_blocks= tuple(map(lambda x:
(x.split("_")[0],
data['pos'].cpu().numpy()[int(x.split("_")[0])] * Ang2nm,
blocks[x].detach().cpu().numpy()),
blocks[x].detach().cpu().numpy() - e_fermi * np.eye(blocks[x].shape[0])),
onsite_bonds))

hop_blocks = tuple(map(lambda x:
Expand Down
10 changes: 5 additions & 5 deletions examples/hBN_pybinding/band.ipynb

Large diffs are not rendered by default.

0 comments on commit 16bf20a

Please sign in to comment.