Draft: Vibra phase change
This changes the phase convention in vibra
. To ensure that the eigenvectors obtained with vibra
conform to the 'normal' SIESTA conventions.
@garalb, @npapior, @fedepedron @jjunquer, I would appreciate your input on this. I am not 100% certain that my analysis is correct. However, I am working on an implementation of electron-phonon coupling, where the phase of the eigenvectors is essential and both of these changes are needed to correctly reproduce the literature.
-
Phase convention for constructing the dynamical matrix
To me this is the critical part: It is my understanding that in SIESTA we usually transform from real-space to k-space matrices using the convention
H(\mathbf{k})_{\nu\mu} = \sum_{\mathbf{R}}e^{i\mathbf{k}((\mathbf{R} + \mathbf{r}_\mu)-\mathbf{r}_\nu)} \langle \mathbf{0} \nu | \mathbf{H} | \mathbf{R} \mu \rangle.
If I further understand
vibra
correctly, we use a different convention:D(\mathbf{k})_{\alpha\beta} = \sum_{\mathbf{R}}e^{i\mathbf{k}(\mathbf{r}_{\alpha}-(\mathbf{r}_{\beta}+\mathbf{R}))} \langle \mathbf{0} \alpha | D | \mathbf{R} \beta \rangle
where
\langle \mathbf{0} \alpha | D | \mathbf{R} \beta \rangle=\frac{1}{\sqrt{M_\alpha M_\beta}}\frac{\partial^2 E}{\partial r_\alpha \partial (\mathbf{R}+r_\beta)}.
Due to the symmetry of the dynamical matrix, this does not affect the eigenvalues obtained but affects the complex phase of the eigenvectors.
2. Phase convention for eigenvector output
Change from gauge of the eigenvectors from e^{i\mathbf{k}(\mathbf{R}+\mathbf{r})} to e^{i\mathbf{k}\mathbf{R}}.