<div dir="ltr"><div>Hi users,</div><div><br></div><div>I'm trying to compute three nbnd * nbnd matrices formed by the inner product < \phi_i | Ox | \phi_j>, < \phi_i | Oy | \phi_j>, and < \phi_i | Oz | \phi_j>, where these matrices are band matrices (non-zero entries form a diagonal that couples terms one reciprocal vector in the x/y/z direction away from each other). <br></div><div><br></div><div>Specifically, assuming we have a rectangular supercell Lx * Ly * Lz, the operators are Ox = exp^(i 2 \pi x/Lx), Oy = exp^(i 2 \pi y/Ly), Oz = exp^(i 2 \pi z/Lz), which couples only the terms one reciprocal vector away. <br></div><div><br></div><div>Does anyone know how I might do this efficiently, rather than gathering all wfcs onto one processor, explicitly creating the matrix, and doing a giant dgemv? <br></div><div><br></div><div>Even if I were to do that, is there a way to lookup the index one reciprocal vector away? <br></div><div><br></div><div>Best,</div><div>Andrew<br></div><div><br></div><div><br></div></div>