Commit a374fe8
committed
fix: correct k-phase convention in cal_DMR_td for TDDFT hybrid gauge
The cal_DMR_td function used e^{+i(k+A)R} for the k->R Fourier transform,
which is the same convention as folding_HR_td (R->k transform). This is
incorrect because the inverse transform should use the conjugate phase.
Changed cal_DMR_td to use e^{-i(k+A)R} (conjugate of folding_HR_td's
e^{+i(k+A)R}), ensuring DMR(R) satisfies Hermiticity: DMR(-R) = DMR(R)^dagger.
Key changes:
- Negate k·R phase: arg = -(kvec_d · dR) * TWO_PI
- Conjugate phase_hybrid for hybrid gauge (td_stype==2): std::conj(phase_hybrid)
This gives e^{-iA·R} instead of e^{+iA·R}
Note: cal_DMR (ground-state) is intentionally left unchanged with e^{+ikR}
to maintain consistency with all downstream code (charge density, forces, etc.).
The ground-state DMR is self-consistent with the +ikR convention for
time-reversal symmetric systems where DM(R) is real.1 parent ee6ec4c commit a374fe8
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
| 270 | + | |
270 | 271 | | |
271 | | - | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
278 | | - | |
| 278 | + | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
0 commit comments