# How to calculate the Berry connection difference?

For Bloch electrons, the Berry connection is defined as $$\mathcal{A}_n(\mathbf{k}) = i\langle u_{n\mathbf{k}}|\partial_\mathbf{k}|u_{n\mathbf{k}}\rangle \tag{1}$$ where $$u_{n\mathbf{k}}$$ is the cell-periodic part of the Bloch function with band index $$n$$ and crystal momentum $$\mathbf{k}$$. Now, I'd like to evaluate the difference $$\mathcal{A}_n(\mathbf{k})-\mathcal{A}_m(\mathbf{k})$$, where the empty bands are also included. Although the Berry connection itself is Gauge dependent, the difference should be Gauge invariant due to the arbitrary phase term cancellation. As far as I know, Wannier90 could evaluate it. However, the wannierization for empty entangled bands is less efficient. Apart from Wannier90, is there any other DFT (say, VASP, QE) post processing scripts or codes that have the ability?

• Correct. The Berry connection is itself gauge dependent. For Berry phase calculations, one does not care the alignment of the phases while evaluating the overlap matrix $\langle u_{n\mathbf{k}} | u_{n\mathbf{k+b}} \rangle$. However, one need the alignment for Berry connection calculation. Wannier-berri is a post processing code based on wannier90. Oct 12 at 3:19