!!****f* ABINIT/ptg_S4
!!
!! NAME
!! ptg_S4
!!
!! FUNCTION
!!
!! COPYRIGHT
!! Copyright (C) 2010-2021 ABINIT group (MG)
!! 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
!!
!! OUTPUT
!!
!! PARENTS
!!      m_ptgroups
!!
!! CHILDREN
!!
!! SOURCE
!!
!********************************************************************************
! This include file has been automatically generated by the script ptg.py
! Do not edit! Change the script source instead.
!********************************************************************************

! Point group name  S4 (-4)

#if defined HAVE_CONFIG_H
#include "config.h"
#endif

#include "abi_common.h"


module m_ptg_S4
contains
!!**



 subroutine ptg_S4 (nsym,nclass,sym,class_ids,class_names,Irr)
 use defs_basis
 use m_abicore
 use m_defs_ptgroups,  only : irrep_t
 implicit none
!Arguments ------------------------------------
 integer,intent(out) :: nclass,nsym
 !arrays
 integer,allocatable,intent(out) :: sym(:,:,:), class_ids(:,:)
 character(len=5),allocatable,intent(out) :: class_names(:)
 type(irrep_t),allocatable,intent(out) :: Irr(:)
 !Local variables-------------------------------
 complex(dpc) :: j=(0.0_dp,1.0_dp)
 ! ********************************************************************************
! List of symmetries packed in classes
 nsym = 4
 ABI_MALLOC(sym, (3,3,nsym))
 sym(:,:,1) = RESHAPE( (/1, 0, 0, 0, 1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,2) = RESHAPE( (/-1, 0, 0, 0, -1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,3) = RESHAPE( (/0, -1, 0, 1, 0, 0, 0, 0, -1/) ,(/3,3/) )
 sym(:,:,4) = RESHAPE( (/0, 1, 0, -1, 0, 0, 0, 0, -1/) ,(/3,3/) )

! Number of classes and corresponding indeces
 nclass = 4
 ABI_MALLOC(class_ids, (2,nclass))
 class_ids(1,1) = 1
 class_ids(2,1) = 1
 class_ids(1,2) = 2
 class_ids(2,2) = 2
 class_ids(1,3) = 3
 class_ids(2,3) = 3
 class_ids(1,4) = 4
 class_ids(2,4) = 4

ABI_MALLOC(class_names,(4))
 class_names(1) = "1+"
 class_names(2) = "2+"
 class_names(3) = "-4+"
 class_names(4) = "-4+"

! List of irreducible representations.
 ABI_MALLOC(Irr, (4))
 Irr(1)%name = "A"
 Irr(1)%dim = 1
 Irr(1)%nsym = 4
 ABI_MALLOC(Irr(1)%mat, (1,1,4))
 Irr(1)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,3) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,4) =  RESHAPE( (/1.0/), (/1, 1/) )

 Irr(2)%name = "B"
 Irr(2)%dim = 1
 Irr(2)%nsym = 4
 ABI_MALLOC(Irr(2)%mat, (1,1,4))
 Irr(2)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,3) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,4) =  RESHAPE( (/-1.0/), (/1, 1/) )

 Irr(3)%name = "E1"
 Irr(3)%dim = 1
 Irr(3)%nsym = 4
 ABI_MALLOC(Irr(3)%mat, (1,1,4))
 Irr(3)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,2) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(3)%mat(:,:,3) =  RESHAPE( (/1*j/), (/1, 1/) )
 Irr(3)%mat(:,:,4) =  RESHAPE( (/-1*j/), (/1, 1/) )

 Irr(4)%name = "E2"
 Irr(4)%dim = 1
 Irr(4)%nsym = 4
 ABI_MALLOC(Irr(4)%mat, (1,1,4))
 Irr(4)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,2) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(4)%mat(:,:,3) =  RESHAPE( (/-1*j/), (/1, 1/) )
 Irr(4)%mat(:,:,4) =  RESHAPE( (/1*j/), (/1, 1/) )

 RETURN
  if (.FALSE.) write(std_out,*) j
 end subroutine ptg_S4
!!***

end module m_ptg_S4
!!***
