Skip to content

Commit

Permalink
Merge pull request #58 from antelmor/master
Browse files Browse the repository at this point in the history
Normalization correction for merging algorithm
  • Loading branch information
mailhexu authored Jul 4, 2024
2 parents 7b51ae7 + f2e9074 commit 7ecb5c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TB2J/io_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def __init__(self, *args, **kwargs):

def _set_projection_vectors(self):

spinat = self.spinat
norm = np.linalg.norm(self.spinat, axis=-1).reshape(-1, 1)
spinat = self.spinat / norm
idx = [self.ind_atoms[i] for i in self.index_spin if i >= 0]
projv = {}
for i, j in combinations_with_replacement(range(self.nspin), 2):
Expand Down

0 comments on commit 7ecb5c6

Please sign in to comment.