TABLE OF CONTENTS


ABINIT/fixsym [ Functions ]

[ Top ] [ Functions ]

NAME

 fixsym

FUNCTION

 Using input indsym which tells which atoms are related by symmetry,
 check that iatfix consistently fixes (freezes) all atoms which are
 related by symmetry, i.e. that iatfix does not break symmetry.

COPYRIGHT

 Copyright (C) 1998-2017 ABINIT group (DCA, XG, GMR)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .
 For the initials of contributors, see ~abinit/doc/developers/contributors.txt .

INPUTS

 iatfix(3,natom)=integer array with 1 in every position for which
  the atom is to be kept fixed
  NOTE that this is not the input data structure for iatfix but it is
  the internal data structure used through most of the subroutines
 indsym(4,nsym,natom)=indirect indexing array for symmetrically related
  atoms; 4th element is label of symmetrically related atom
 natom=number of atoms
 nsym=number of symmetries (should be > 1 when this is called)

OUTPUT

  (only checking)

 NOTE
  Stops execution with an error message if iatfix breaks symmetry.

PARENTS

      gstate

CHILDREN

SOURCE

42 #if defined HAVE_CONFIG_H
43 #include "config.h"
44 #endif
45 
46 #include "abi_common.h"
47 
48 
49 subroutine fixsym(iatfix,indsym,natom,nsym)
50 
51  use defs_basis
52  use m_profiling_abi
53  use m_errors
54 
55 !This section has been created automatically by the script Abilint (TD).
56 !Do not modify the following lines by hand.
57 #undef ABI_FUNC
58 #define ABI_FUNC 'fixsym'
59 !End of the abilint section
60 
61  implicit none
62 
63 !Arguments ------------------------------------
64 !scalars
65  integer,intent(in) :: natom,nsym
66 !arrays
67  integer,intent(in) :: iatfix(3,natom),indsym(4,nsym,natom)
68 
69 !Local variables-------------------------------
70 !scalars
71  integer :: iatom,isym,jatom
72  character(len=500) :: message
73 
74 ! *************************************************************************
75 
76  if (nsym > 1) then
77    do iatom=1,natom
78      do isym=1,nsym
79 !      jatom is the label of a symmetrically related atom
80        jatom=indsym(4,isym,iatom)
81 !      Thus the atoms jatom and iatom must be fixed along the same directions
82        if ( iatfix(1,jatom) /=  iatfix(1,iatom) .or. &
83 &       iatfix(2,jatom) /=  iatfix(2,iatom) .or. &
84 &       iatfix(3,jatom) /=  iatfix(3,iatom)       ) then
85          write(message, '(a,i6,a,a,i6,a,a,a,a,a,a,a)' )&
86 &         '  Atom number ',jatom,' is symmetrically',&
87 &         ' equivalent to atom number ',iatom,',',ch10,&
88 &         '  but according to iatfix, iatfixx, iatfixy and iatfixz, they',ch10,&
89 &         '  are not fixed along the same directions, which is forbidden.',ch10,&
90 &         '  Action : modify either the symmetry or iatfix(x,y,z) and resubmit.'
91          MSG_ERROR(message)
92        end if
93      end do
94    end do
95  end if
96 
97 end subroutine fixsym