Extracting phonon velocity

Dear EPW users,

I am using EPW-5.4.1. To extract phonon velocities of Si (I am actually interested in the +/- sign of the velocity not the correct magnitude), I have added the following to the ephwann_shuffle.f90:

CALL vmewan2blochp(xxq, nmodes, nrr_q, irvec_q, ndegen_q, uf, vmefp(:, :, :), wf(:, qind), rws, nrws)
DO imode = 1, nmodes
      vmeq_av(:) = zero
      DO jmode = 1, nmodes
          vmeq_av(:) = vmeq_av(:) + REAL(vmefp(:, jmode, jmode), KIND = DP)
      ENDDO
          vmeqf(:, imode) = vmeq_av(:) 
ENDDO
write(99,'(6E26.16E3)') vmeqf(1,1), vmeqf(1,2), vmeqf(1,3), vmeqf(1,4), vmeqf(1,5), vmeqf(1,6)

I ran the code on 100 q-points and for all the q-points, all the 6 x-components of velocity are identical. Different q-points have different velocities but each q-point has the same velocity for acoustic and optical modes. The routines in the latest EPW seems to be similar. Is this a bug in the code?

Thanks,
Vahid

Vahid Askarpour
Department of Physics and Atmospheric Science
Dalhousie University
Halifax, Canada

The velocities of the modes can be obtained by simply doing the following single loop:

CALL vmewan2blochp(xxq, nmodes, nrr_q, irvec_q, ndegen_q, uf, vmefp(:, :, :), wf(:, qind), rws, nrws)
DO imode=1,nmodes
vmeqf(:, imode)=REAL(vmefp(:, imode, imode), KIND = DP)
ENDDO

I was averaging the six modes before so they were all equal to average.

Vahid