mirror of https://gitlab.com/QEF/q-e.git
Fixed compilation problem in gipaw. Reduntant "trnvect" routine replaced
by "cryst_to_cart" (pelase check for unintended side effects) git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6303 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
8c284bd324
commit
a57597c9c6
|
@ -1,5 +1,5 @@
|
|||
!
|
||||
! Copyright (C) 2001 PWSCF group
|
||||
! Copyright (C) 2008-2010 Quantum ESPRESSO and GIPAW group
|
||||
! This file is distributed under the terms of the
|
||||
! GNU General Public License. See the file `License'
|
||||
! in the root directory of the present distribution,
|
||||
|
@ -100,15 +100,6 @@ SUBROUTINE psymmetrize_field(field, iflag)
|
|||
|
||||
deallocate(aux)
|
||||
END SUBROUTINE psymmetrize_field
|
||||
|
||||
|
||||
!
|
||||
! Copyright (C) 2001 PWSCF group
|
||||
! This file is distributed under the terms of the
|
||||
! GNU General Public License. See the file `License'
|
||||
! in the root directory of the present distribution,
|
||||
! or http://www.gnu.org/copyleft/gpl.txt .
|
||||
!
|
||||
!
|
||||
!---------------------------------------------------------------------
|
||||
subroutine syme2 (dvsym, iflag)
|
||||
|
@ -116,7 +107,7 @@ subroutine syme2 (dvsym, iflag)
|
|||
!
|
||||
!
|
||||
use kinds, only : DP
|
||||
USE symme, ONLY : s, nsym, ftau
|
||||
USE symme, ONLY : s, nsym, ftau, crys_to_cart
|
||||
use pwcom
|
||||
implicit none
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ subroutine xsf_vector_3d(v, nr1, nr2, nr3, nrx1, nrx2, nrx3, &
|
|||
x(2) = dble(i2)/dble(nr2)
|
||||
x(3) = dble(i3)/dble(nr3)
|
||||
! crystal to cartesian
|
||||
call trnvect (x, at, bg, 1)
|
||||
call cryst_to_cart (1, x, bg, 1)
|
||||
x = x * alat * BOHR_RADIUS_ANGS
|
||||
write(ounit,'(''X '',3x,3f15.9,2x,3e12.4)') x, v(i1,i2,i3,1:3)
|
||||
enddo
|
||||
|
|
|
@ -121,7 +121,7 @@ subroutine set_irr (nat, at, bg, xq, s, invs, nsym, rtau, irt, &
|
|||
!call write_matrix('symmetrized matrix',wdyn,nat)
|
||||
!
|
||||
! Diagonalize the symmetrized random matrix.
|
||||
! Transform the symmetryzed matrix, currently in crystal coordinates,
|
||||
! Transform the symmetrized matrix, currently in crystal coordinates,
|
||||
! in cartesian coordinates.
|
||||
!
|
||||
do na = 1, nat
|
||||
|
|
|
@ -26,27 +26,13 @@ subroutine symdvscf (nper, irr, dvtosym)
|
|||
! the representation under conside
|
||||
|
||||
complex(DP) :: dvtosym (nrx1, nrx2, nrx3, nspin_mag, nper)
|
||||
! the potential to symmetriz
|
||||
! the potential to be symmetrized
|
||||
|
||||
integer :: is, ri, rj, rk, i, j, k, ipert, jpert, ipol, isym, &
|
||||
irot
|
||||
! counter on spin polarizations
|
||||
!
|
||||
! the rotated points
|
||||
!
|
||||
!
|
||||
! counter on mesh points
|
||||
!
|
||||
! counter on perturbations
|
||||
! counter on perturbations
|
||||
! counter on polarizations
|
||||
! counter on symmetries
|
||||
! the rotation
|
||||
|
||||
real(DP) :: g1 (48), g2 (48), g3 (48), in1, in2, in3
|
||||
! used to construct the phases
|
||||
! auxiliary variables
|
||||
|
||||
! counters
|
||||
real(DP) :: gf(3), n(3)
|
||||
! temp variables
|
||||
complex(DP), allocatable :: dvsym (:,:,:,:)
|
||||
! the symmetrized potential
|
||||
complex(DP) :: aux2, term (3, 48), phase (48)
|
||||
|
@ -61,21 +47,14 @@ subroutine symdvscf (nper, irr, dvtosym)
|
|||
!
|
||||
! if necessary we symmetrize with respect to S(irotmq)*q = -q + Gi
|
||||
!
|
||||
in1 = tpi / DBLE (nr1)
|
||||
in2 = tpi / DBLE (nr2)
|
||||
in3 = tpi / DBLE (nr3)
|
||||
n(1) = tpi / DBLE (nr1)
|
||||
n(2) = tpi / DBLE (nr2)
|
||||
n(3) = tpi / DBLE (nr3)
|
||||
if (minus_q) then
|
||||
g1 (1) = 0.d0
|
||||
g2 (1) = 0.d0
|
||||
g3 (1) = 0.d0
|
||||
do ipol = 1, 3
|
||||
g1 (1) = g1 (1) + gimq (ipol) * in1 * at (ipol, 1)
|
||||
g2 (1) = g2 (1) + gimq (ipol) * in2 * at (ipol, 2)
|
||||
g3 (1) = g3 (1) + gimq (ipol) * in3 * at (ipol, 3)
|
||||
enddo
|
||||
term (1, 1) = CMPLX(cos (g1 (1) ), sin (g1 (1) ) ,kind=DP)
|
||||
term (2, 1) = CMPLX(cos (g2 (1) ), sin (g2 (1) ) ,kind=DP)
|
||||
term (3, 1) = CMPLX(cos (g3 (1) ), sin (g3 (1) ) ,kind=DP)
|
||||
gf(:) = gimq (1) * at (1, :) * n(:) + &
|
||||
gimq (2) * at (2, :) * n(:) + &
|
||||
gimq (3) * at (3, :) * n(:)
|
||||
term (:, 1) = CMPLX(cos (gf (:) ), sin (gf (:) ) ,kind=DP)
|
||||
do is = 1, nspin_lsda
|
||||
phase (1) = (1.d0, 0.d0)
|
||||
do k = 1, nr3
|
||||
|
@ -118,17 +97,10 @@ subroutine symdvscf (nper, irr, dvtosym)
|
|||
! Here we symmetrize with respect to the small group of q
|
||||
!
|
||||
do isym = 1, nsymq
|
||||
g1 (isym) = 0.d0
|
||||
g2 (isym) = 0.d0
|
||||
g3 (isym) = 0.d0
|
||||
do ipol = 1, 3
|
||||
g1 (isym) = g1 (isym) + gi (ipol, isym) * in1 * at (ipol, 1)
|
||||
g2 (isym) = g2 (isym) + gi (ipol, isym) * in2 * at (ipol, 2)
|
||||
g3 (isym) = g3 (isym) + gi (ipol, isym) * in3 * at (ipol, 3)
|
||||
enddo
|
||||
term (1, isym) = CMPLX(cos (g1 (isym) ), sin (g1 (isym) ) ,kind=DP)
|
||||
term (2, isym) = CMPLX(cos (g2 (isym) ), sin (g2 (isym) ) ,kind=DP)
|
||||
term (3, isym) = CMPLX(cos (g3 (isym) ), sin (g3 (isym) ) ,kind=DP)
|
||||
gf(:) = gi (1,isym) * at (1, :) * n(:) + &
|
||||
gi (2,isym) * at (2, :) * n(:) + &
|
||||
gi (3,isym) * at (3, :) * n(:)
|
||||
term (:, isym) = CMPLX(cos (gf (:) ), sin (gf (:) ) ,kind=DP)
|
||||
enddo
|
||||
|
||||
do is = 1, nspin_lsda
|
||||
|
|
|
@ -396,7 +396,7 @@ subroutine setup_nnkp
|
|||
do ik=1, iknum
|
||||
do ib = 1, nnb
|
||||
g_(:) = REAL( g_kpb(:,ik,ib) )
|
||||
call trnvect (g_, at, bg, 1)
|
||||
call cryst_to_cart (1, g_, bg, 1)
|
||||
gg_ = g_(1)*g_(1) + g_(2)*g_(2) + g_(3)*g_(3)
|
||||
ig_(ik,ib) = 0
|
||||
ig = 1
|
||||
|
@ -728,7 +728,7 @@ subroutine read_nnkp
|
|||
do ik=1, iknum
|
||||
do ib = 1, nnb
|
||||
g_(:) = REAL( g_kpb(:,ik,ib) )
|
||||
call trnvect (g_, at, bg, 1)
|
||||
call cryst_to_cart (1, g_, bg, 1)
|
||||
gg_ = g_(1)*g_(1) + g_(2)*g_(2) + g_(3)*g_(3)
|
||||
ig_(ik,ib) = 0
|
||||
ig = 1
|
||||
|
@ -913,7 +913,7 @@ subroutine compute_mmn
|
|||
ikp = kpb(ik,ib)
|
||||
!
|
||||
g_(:) = REAL( g_kpb(:,ik,ib) )
|
||||
call trnvect (g_, at, bg, 1)
|
||||
call cryst_to_cart (1, g_, bg, 1)
|
||||
dxk(:,ind) = xk(:,ikp) +g_(:) - xk(:,ik)
|
||||
qg(ind) = dxk(1,ind)*dxk(1,ind)+dxk(2,ind)*dxk(2,ind)+dxk(3,ind)*dxk(3,ind)
|
||||
enddo
|
||||
|
|
|
@ -211,7 +211,6 @@ tabd.o \
|
|||
transform_becsum_so.o \
|
||||
transform_becsum_nc.o \
|
||||
trnvecc.o \
|
||||
trnvect.o \
|
||||
tweights.o \
|
||||
update_pot.o \
|
||||
usnldiag.o \
|
||||
|
|
|
@ -684,7 +684,7 @@ SUBROUTINE forces_us_efield(forces_bp, pdir, e_field)
|
|||
sigmaion(:,:)=0.d0
|
||||
if(.not.l3dstring ) return
|
||||
pol_cry(:)=ion_pol(:)
|
||||
call trnvect (pol_cry, at, bg, -1)
|
||||
call cryst_to_cart (1, pol_cry, at, -1)
|
||||
do ipol=1,3
|
||||
do i=1,3
|
||||
do j=1,3
|
||||
|
|
|
@ -1454,7 +1454,6 @@ transform_becsum_so.o : ../Modules/uspp.o
|
|||
transform_becsum_so.o : noncol.o
|
||||
transform_becsum_so.o : pwcom.o
|
||||
trnvecc.o : ../Modules/kind.o
|
||||
trnvect.o : ../Modules/kind.o
|
||||
tweights.o : ../Modules/kind.o
|
||||
update_pot.o : ../Modules/cell_base.o
|
||||
update_pot.o : ../Modules/constants.o
|
||||
|
|
|
@ -140,7 +140,7 @@ SUBROUTINE new_ns(ns)
|
|||
ENDDO
|
||||
ENDDO
|
||||
|
||||
! symmetryze the quantities nr -> ns
|
||||
! symmetrize the quantities nr -> ns
|
||||
DO na = 1, nat
|
||||
nt = ityp (na)
|
||||
IF (Hubbard_U(nt).NE.0.d0 .OR. Hubbard_alpha(nt).NE.0.d0) THEN
|
||||
|
|
|
@ -254,10 +254,10 @@ SUBROUTINE PAW_symmetrize(becsum)
|
|||
! represented in a simple but not general way.
|
||||
! I will fix this when everything works.
|
||||
REAL(DP), TARGET :: d0(1,1,48)
|
||||
TYPE symmetryzation_tensor
|
||||
TYPE symmetrization_tensor
|
||||
REAL(DP),POINTER :: d(:,:,:)
|
||||
END TYPE symmetryzation_tensor
|
||||
TYPE(symmetryzation_tensor) :: D(0:3)
|
||||
END TYPE symmetrization_tensor
|
||||
TYPE(symmetrization_tensor) :: D(0:3)
|
||||
|
||||
IF( nsym==1 ) RETURN
|
||||
d0(1,1,:) = 1._dp
|
||||
|
@ -1623,10 +1623,10 @@ SUBROUTINE PAW_desymmetrize(dbecsum)
|
|||
! represented in a simple but not general way.
|
||||
! I will fix this when everything works.
|
||||
REAL(DP), TARGET :: d0(1,1,48)
|
||||
TYPE symmetryzation_tensor
|
||||
TYPE symmetrization_tensor
|
||||
REAL(DP),POINTER :: d(:,:,:)
|
||||
END TYPE symmetryzation_tensor
|
||||
TYPE(symmetryzation_tensor) :: D(0:3)
|
||||
END TYPE symmetrization_tensor
|
||||
TYPE(symmetrization_tensor) :: D(0:3)
|
||||
|
||||
IF( nsym == 1 ) RETURN
|
||||
d0(1,1,:) = 1._dp
|
||||
|
@ -1783,10 +1783,10 @@ SUBROUTINE PAW_dusymmetrize(dbecsum,npe,irr,npertx,nsymq,irgq,rtau,xq,t)
|
|||
! represented in a simple but not general way.
|
||||
! I will fix this when everything works.
|
||||
REAL(DP), TARGET :: d0(1,1,48)
|
||||
TYPE symmetryzation_tensor
|
||||
TYPE symmetrization_tensor
|
||||
REAL(DP),POINTER :: d(:,:,:)
|
||||
END TYPE symmetryzation_tensor
|
||||
TYPE(symmetryzation_tensor) :: D(0:3)
|
||||
END TYPE symmetrization_tensor
|
||||
TYPE(symmetrization_tensor) :: D(0:3)
|
||||
|
||||
IF( nsymq==1 ) RETURN
|
||||
d0(1,1,:) = 1._dp
|
||||
|
@ -1956,10 +1956,10 @@ SUBROUTINE PAW_dumqsymmetrize(dbecsum,npe,irr,npertx,isymq,rtau,xq,tmq)
|
|||
! represented in a simple but not general way.
|
||||
! I will fix this when everything works.
|
||||
REAL(DP), TARGET :: d0(1,1,48)
|
||||
TYPE symmetryzation_tensor
|
||||
TYPE symmetrization_tensor
|
||||
REAL(DP),POINTER :: d(:,:,:)
|
||||
END TYPE symmetryzation_tensor
|
||||
TYPE(symmetryzation_tensor) :: D(0:3)
|
||||
END TYPE symmetrization_tensor
|
||||
TYPE(symmetrization_tensor) :: D(0:3)
|
||||
|
||||
d0(1,1,:) = 1._dp
|
||||
D(0)%d => d0 ! d0(1,1,48)
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
!
|
||||
! Copyright (C) 2001 PWSCF group
|
||||
! This file is distributed under the terms of the
|
||||
! GNU General Public License. See the file `License'
|
||||
! in the root directory of the present distribution,
|
||||
! or http://www.gnu.org/copyleft/gpl.txt .
|
||||
!
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
subroutine trnvect (vect, at, bg, iflag)
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
! This routine transforms a vector (like forces which in the
|
||||
! crystal axis is represented on the basis of the reciprocal lattice
|
||||
! vectors) from crystal to cartesian axis (iflag.gt.0)
|
||||
! and viceversa (iflag.le.0)
|
||||
!
|
||||
USE kinds
|
||||
implicit none
|
||||
integer :: iflag
|
||||
! input: gives the versus of the transformati
|
||||
|
||||
real(DP) :: vect (3), at (3, 3), bg (3, 3)
|
||||
! inp/out: the vector to transform
|
||||
! input: direct lattice vectors
|
||||
! input: reciprocal lattice vectors
|
||||
real(DP) :: work (3)
|
||||
! a working array
|
||||
|
||||
integer :: ipol, ialpha
|
||||
! counter on crystal coordinates
|
||||
! counter on cartesian coordinates
|
||||
if (iflag.gt.0) then
|
||||
!
|
||||
! forward transformation, from crystal to cartesian axis
|
||||
!
|
||||
do ipol = 1, 3
|
||||
work (ipol) = vect (ipol)
|
||||
enddo
|
||||
do ialpha = 1, 3
|
||||
vect (ialpha) = 0.d0
|
||||
do ipol = 1, 3
|
||||
vect (ialpha) = vect (ialpha) + work (ipol) * bg (ialpha, ipol)
|
||||
enddo
|
||||
enddo
|
||||
else
|
||||
!
|
||||
! backward transformation, from cartesian to crystal axis
|
||||
!
|
||||
do ipol = 1, 3
|
||||
work (ipol) = 0.d0
|
||||
do ialpha = 1, 3
|
||||
work (ipol) = work (ipol) + vect (ialpha) * at (ialpha, ipol)
|
||||
enddo
|
||||
enddo
|
||||
do ipol = 1, 3
|
||||
vect (ipol) = work (ipol)
|
||||
enddo
|
||||
endif
|
||||
return
|
||||
end subroutine trnvect
|
5
TODO
5
TODO
|
@ -59,8 +59,7 @@ TODO LIST - January 2010
|
|||
4.1.4 coming soon (?): electron-phonon with Wannier stuff
|
||||
4.1.5 almost ready: interface with plumed for metadynamics
|
||||
once it works, old metadynamics stuff can be removed
|
||||
4.1.6 almost ready: G-space symmetrization. Once ready, the
|
||||
wrappers should be removed and the algorithm made final.
|
||||
4.1.6 work in progress: G-space symmetrization also for phonons
|
||||
4.1.7 next: bio-oriented stuff (Solvent Models, PCM, QM-MM)
|
||||
4.1.8 not big but ongoing (or not going) since a long time:
|
||||
Wyckoff interface
|
||||
|
@ -148,7 +147,7 @@ TODO LIST - January 2010
|
|||
4.4 Cleanup
|
||||
4.4.1 Increase modularization by
|
||||
- collecting variables and routines acting on those variables
|
||||
into modules (e.g.: symmetry)
|
||||
into modules. Presently ongoing, to be completed: symmetry
|
||||
- classifying modules in a hierarchical way
|
||||
- avoiding as much as possible that modules depend on many
|
||||
other modules
|
||||
|
|
Loading…
Reference in New Issue