From 0a4d5a92256386104132af54b9393915d85fd6b6 Mon Sep 17 00:00:00 2001 From: giannozz Date: Thu, 16 Jun 2011 15:43:28 +0000 Subject: [PATCH] ibrav=-12 (as 12 with a and c axis orthogonal) seems to work git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7882 c92efa57-630b-4861-b058-cf58834340f0 --- PW/input.f90 | 20 ++++++++++++++------ PW/symm_base.f90 | 2 +- doc-def/INPUT_PW.def | 2 +- flib/latgen.f90 | 6 +++--- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/PW/input.f90 b/PW/input.f90 index 8b50d490c..a395cf84c 100644 --- a/PW/input.f90 +++ b/PW/input.f90 @@ -1303,18 +1303,26 @@ SUBROUTINE iosys() celldm_(2) = b / a celldm_(3) = c / a ! - IF ( ibrav_ /= 14 ) THEN - ! - ! ... trigonal and monoclinic lattices - ! - celldm_(4) = cosab - ELSE + IF ( ibrav_ == 14 ) THEN ! ! ... triclinic lattice ! celldm_(4) = cosbc celldm_(5) = cosac celldm_(6) = cosab + ! + ELSE IF ( ibrav_ ==-12 ) THEN + ! + ! ... monoclinic P lattice, unique axis b + ! + celldm_(5) = cosac + ! + ELSE + ! + ! ... trigonal and monoclinic lattices, unique axis c + ! + celldm_(4) = cosab + ! ENDIF ! ELSEIF ( celldm_(1) /= 0.D0 .and. a /= 0.D0 ) THEN diff --git a/PW/symm_base.f90 b/PW/symm_base.f90 index cee586425..59b1fedca 100644 --- a/PW/symm_base.f90 +++ b/PW/symm_base.f90 @@ -726,7 +726,7 @@ SUBROUTINE set_sym_bl(ibrav, symm_type) CALL hexsym( ) symm_type='hexagonal' ! - ELSE IF ( ( ibrav >= 1 .AND. ibrav <= 14 ) .OR. & + ELSE IF ( ( ibrav >= 1 .AND. ibrav <= 14 ) .OR. (ibrav == -12 ) .OR. & ( ibrav == 0 .AND. symm_type == 'cubic' ) ) THEN ! ! ... here for the cubic bravais lattice diff --git a/doc-def/INPUT_PW.def b/doc-def/INPUT_PW.def index a74e10f2a..3fd8c9673 100644 --- a/doc-def/INPUT_PW.def +++ b/doc-def/INPUT_PW.def @@ -372,7 +372,7 @@ input_description -distribution {Quantum Espresso} -package PWscf -program pw.x 11 Orthorhombic body-centered celldm(2)=b/a,celldm(3)=c/a 12 Monoclinic P, unique axis c celldm(2)=b/a,celldm(3)=c/a, celldm(4)=cos(ab) - -12 Monoclinic P, uniqe axis b celldm(2)=b/a,celldm(3)=c/a, + -12 Monoclinic P, unique axis b celldm(2)=b/a,celldm(3)=c/a, celldm(5)=cos(ac) 13 Monoclinic base-centered celldm(2)=b/a,celldm(3)=c/a, celldm(4)=cos(ab) diff --git a/flib/latgen.f90 b/flib/latgen.f90 index 5645d626a..aeb7949ca 100644 --- a/flib/latgen.f90 +++ b/flib/latgen.f90 @@ -1,5 +1,5 @@ ! -! Copyright (C) 2001-2003 PWSCF group +! Copyright (C) 2001-2011 Quantum ESPRESSO 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, @@ -247,8 +247,8 @@ subroutine latgen(ibrav,celldm,a1,a2,a3,omega) sen=sqrt(1.d0-celldm(5)**2) a1(1)=celldm(1) a2(2)=celldm(1)*celldm(2) - a3(1)=celldm(1)*celldm(3)*sen - a3(3)=celldm(1)*celldm(3)*celldm(5) + a3(1)=celldm(1)*celldm(3)*celldm(5) + a3(3)=celldm(1)*celldm(3)*sen ! else if (ibrav == 13) then !