vme and dme confusion

Dear Experts,

reading the source of bloch2wannier it seems like vmedata.fmt stores the position (r_nm) matrix elements and dmedata.fmt stores the velocity (v_nm) matrix elements. If so, I think the names should be switched, as the current naming convention is extremely misleading. Furthermore the comments in the subroutine dmebloch2wan where the contents of dmedata.fmt are computed, mention that the object being computed is “p^(W)(R) in PRB 74, 195118 (2006) notations”, however this object does not appear anywhere in the paper.

I would like to understand which objects are really written to vmedata and dmedata.
Thanks for your help!

Dear Jakob,

Your interpretation is correct. The file names are a bit historical and refer to the velocity-interpolation scheme (vme = 'dipole' vs. vme = 'wannier'), not directly to the operator stored.

dmedata.fmt stores i[H,r], including the nonlocal-PP and USPP/PAW terms. Thus, operator-wise, it is the velocity/momentum matrix, not the dipole itself. The “dipole” name comes from
(i[H,r]{nm}=(E_n-E_m)r{nm}), i.e., it is the interband dipole up to the energy factor.

vmedata.fmt stores the position matrix elements from the .mmn overlaps, plus crrw for the quadrupole term. These are intermediate quantities; vmewan2bloch combines them with the k-derivative of the Wannier Hamiltonian to obtain the velocity matrix elements.

So, in short: dmedata.fmt stores velocity-related matrix elements directly, while vmedata.fmt stores the position/Berry-connection ingredients used to construct them.

We will clarify the code comments/documentation.

Best,

Shashi