Commit 307ac27
committed
LCAO per-atom gamma: add per-band weight normalization
Fix weight computation: normalize w_In per band before multiplying by
gamma_unwrapped[n]. Without this, the Log-per-atom gamma after
Löwdin orthogonalization doesn't sum to the Wilson loop determinant.
Per-string gamma for gdir=3 (1x1x2) verified correct:
gI = (-1.98, -2.39, -2.39) sum = -6.76 ~ Wilson determinant -6.75
[DeltaP P1] still prints ~(0,0,0) because branch selection in
deltap_wannier.cpp:1070-1150 shifts values to match previous-step's
reference (which is zero on first call). Branch selection is a
separate issue from weight normalization.
BN LCAO regression: gamma=(3.999, 3.500), passes.1 parent 54c3963 commit 307ac27
1 file changed
Lines changed: 20 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1024 | 1017 | | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1025 | 1021 | | |
1026 | 1022 | | |
1027 | 1023 | | |
1028 | 1024 | | |
1029 | 1025 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1034 | 1040 | | |
1035 | 1041 | | |
1036 | 1042 | | |
| |||
0 commit comments