mirror of https://gitlab.com/QEF/q-e.git
bug fixed in phonon calculation with nosym=.true.
minus_q and related variables where not set properly: minus_q was always set .false. while instead it may be .true. for some value of q (gamma for instance). git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@503 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
0b32850e1f
commit
cfe2536ac0
|
@ -52,18 +52,13 @@ subroutine set_irr_nosym (nat, at, bg, xq, s, invs, nsym, rtau, &
|
||||||
! output: the matrice sending q -> -q+G
|
! output: the matrice sending q -> -q+G
|
||||||
|
|
||||||
logical :: minus_q
|
logical :: minus_q
|
||||||
! output: if true one symmetry send q -
|
! output: if true one symmetry send q -> -q+G
|
||||||
integer :: imode
|
integer :: imode
|
||||||
! counter on modes
|
! counter on modes
|
||||||
!
|
!
|
||||||
! set the information on the symmetry group
|
! set the information on the symmetry group
|
||||||
!
|
!
|
||||||
nsymq = 1
|
call smallgq (xq,at,bg,s,nsym,irgq,nsymq,irotmq,minus_q,gi,gimq)
|
||||||
minus_q = .false.
|
|
||||||
gi (1, 1) = 0.d0
|
|
||||||
gi (2, 1) = 0.d0
|
|
||||||
gi (3, 1) = 0.d0
|
|
||||||
irgq (1) = 1
|
|
||||||
!
|
!
|
||||||
! set the modes
|
! set the modes
|
||||||
!
|
!
|
||||||
|
@ -80,11 +75,16 @@ subroutine set_irr_nosym (nat, at, bg, xq, s, invs, nsym, rtau, &
|
||||||
! in the basis of the displacements
|
! in the basis of the displacements
|
||||||
!
|
!
|
||||||
call setv (2 * max_irr_dim * max_irr_dim * 48 * 3 * nat, 0.d0, t, 1)
|
call setv (2 * max_irr_dim * max_irr_dim * 48 * 3 * nat, 0.d0, t, 1)
|
||||||
|
|
||||||
call setv (2 * max_irr_dim * max_irr_dim * 3 * nat, 0.d0, tmq, 1)
|
call setv (2 * max_irr_dim * max_irr_dim * 3 * nat, 0.d0, tmq, 1)
|
||||||
|
|
||||||
do imode = 1, 3 * nat
|
do imode = 1, 3 * nat
|
||||||
t (1, 1, 1, imode) = (1.d0, 0.d0)
|
t (1, 1, 1, imode) = (1.d0, 0.d0)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
tmq = (0.d0,0.d0)
|
||||||
|
if (minus_q) then
|
||||||
|
tmq (1, 1, :) = (1.d0, 0.d0)
|
||||||
|
end if
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine set_irr_nosym
|
end subroutine set_irr_nosym
|
||||||
|
|
26
PH/syme.f90
26
PH/syme.f90
|
@ -18,7 +18,6 @@ subroutine syme (dvsym)
|
||||||
!
|
!
|
||||||
#include "machine.h"
|
#include "machine.h"
|
||||||
|
|
||||||
|
|
||||||
use pwcom
|
use pwcom
|
||||||
use parameters, only : DP
|
use parameters, only : DP
|
||||||
use phcom
|
use phcom
|
||||||
|
@ -26,7 +25,7 @@ subroutine syme (dvsym)
|
||||||
|
|
||||||
complex(kind=DP) :: dvsym (nrx1, nrx2, nrx3, nspin, 3)
|
complex(kind=DP) :: dvsym (nrx1, nrx2, nrx3, nspin, 3)
|
||||||
complex(kind=DP), allocatable :: aux (:,:,:,:)
|
complex(kind=DP), allocatable :: aux (:,:,:,:)
|
||||||
! the potential to symme
|
! the potential to symmetrize
|
||||||
! auxiliary quantity
|
! auxiliary quantity
|
||||||
|
|
||||||
integer :: is, ri, rj, rk, i, j, k, irot, ipol, jpol
|
integer :: is, ri, rj, rk, i, j, k, irot, ipol, jpol
|
||||||
|
@ -36,14 +35,17 @@ subroutine syme (dvsym)
|
||||||
! counter on symmetries
|
! counter on symmetries
|
||||||
! counter on polarizations
|
! counter on polarizations
|
||||||
|
|
||||||
|
do is = 1, nspin
|
||||||
|
do ipol = 1, 3
|
||||||
|
dvsym(:,:,:,is,ipol) = CMPLX(REAL(dvsym(:,:,:,is,ipol)),0.d0)
|
||||||
|
end do
|
||||||
|
end do
|
||||||
if (nsym.eq.1) return
|
if (nsym.eq.1) return
|
||||||
allocate (aux(nrx1 , nrx2 , nrx3 , 3))
|
allocate (aux(nrx1 , nrx2 , nrx3 , 3))
|
||||||
do is = 1, nspin
|
do is = 1, nspin
|
||||||
do ipol = 1, 3
|
do ipol = 1, 3
|
||||||
call ZCOPY (nrx1 * nrx2 * nrx3, dvsym (1, 1, 1, is, ipol), &
|
call ZCOPY (nrx1*nrx2*nrx3, dvsym(1,1,1,is,ipol), 1, aux(1,1,1,ipol), 1)
|
||||||
1, aux (1, 1, 1, ipol), 1)
|
call setv (2*nrx1*nrx2*nrx3, 0.d0, dvsym(1,1,1,is,ipol), 1)
|
||||||
call setv (2 * nrx1 * nrx2 * nrx3, 0.d0, dvsym (1, 1, 1, is, ipol) &
|
|
||||||
, 1)
|
|
||||||
enddo
|
enddo
|
||||||
!
|
!
|
||||||
! symmmetrize
|
! symmmetrize
|
||||||
|
@ -52,15 +54,15 @@ subroutine syme (dvsym)
|
||||||
do j = 1, nr2
|
do j = 1, nr2
|
||||||
do i = 1, nr1
|
do i = 1, nr1
|
||||||
do irot = 1, nsym
|
do irot = 1, nsym
|
||||||
call ruotaijk (s (1, 1, irot), ftau (1, irot), i, j, k, nr1, nr2, &
|
call ruotaijk (s(1,1,irot), ftau(1,irot), i, j, k, &
|
||||||
nr3, ri, rj, rk)
|
nr1, nr2, nr3, ri, rj, rk)
|
||||||
!
|
!
|
||||||
! ruotaijk find the rotated of i,j,k with the inverse of S
|
! ruotaijk find the rotated of i,j,k with the inverse of S
|
||||||
!
|
!
|
||||||
do ipol = 1, 3
|
do ipol = 1, 3
|
||||||
do jpol = 1, 3
|
do jpol = 1, 3
|
||||||
dvsym (i, j, k, is, ipol) = dvsym (i, j, k, is, ipol) + s (ipol, &
|
dvsym(i,j,k,is,ipol) = dvsym(i,j,k,is,ipol) + &
|
||||||
jpol, irot) * aux (ri, rj, rk, jpol)
|
s(ipol,jpol,irot) * aux(ri,rj,rk,jpol)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
@ -68,10 +70,8 @@ subroutine syme (dvsym)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
do ipol = 1, 3
|
do ipol = 1, 3
|
||||||
call DSCAL (2 * nrx1 * nrx2 * nrx3, 1.d0 / float (nsym), dvsym (1, &
|
call DSCAL (2*nrx1*nrx2*nrx3, 1.d0/float(nsym), dvsym(1,1,1,is,ipol), 1)
|
||||||
1, 1, is, ipol), 1)
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
deallocate (aux)
|
deallocate (aux)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue