TABLE OF CONTENTS
ABINIT/rchkGSheader [ Functions ]
NAME
rchkGSheader
FUNCTION
This routine reads the GS header information in the GKK file and checks it
COPYRIGHT
Copyright (C) 2004-2018 ABINIT group (MVer, MG) This file is distributed under the terms of the GNU General Public Licence, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt . For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
INPUTS
natom = number of atoms from DDB, for check kptirr_phon = coordinates of the irreducible kpoints close to the FS
OUTPUT
hdr = header information nband = number of bands for rest of calculation should be the same for all kpts
PARENTS
elphon
CHILDREN
hdr_echo,hdr_fort_read
SOURCE
34 #if defined HAVE_CONFIG_H 35 #include "config.h" 36 #endif 37 38 #include "abi_common.h" 39 40 subroutine rchkGSheader (hdr,natom,nband,unitgkk) 41 42 43 use defs_basis 44 use defs_abitypes 45 use m_profiling_abi 46 use m_errors 47 use m_hdr 48 49 !This section has been created automatically by the script Abilint (TD). 50 !Do not modify the following lines by hand. 51 #undef ABI_FUNC 52 #define ABI_FUNC 'rchkGSheader' 53 !End of the abilint section 54 55 implicit none 56 57 !Arguments ------------------------------------ 58 !scalars 59 integer,intent(in) :: natom,unitgkk 60 integer,intent(out) :: nband 61 type(hdr_type),intent(inout) :: hdr 62 63 !Local variables------------------------------- 64 !scalars 65 integer :: fform 66 character(len=500) :: message 67 68 ! ************************************************************************* 69 ! 70 !read in general header of _GKK file 71 !this is where we get nkpt, ngkpt(:,:)... which are also read in 72 !rdddb9 and inprep8. Probably should do some checking to avoid 73 !using ddb files from other configurations 74 ! 75 rewind(unitgkk) 76 call hdr_fort_read(hdr, unitgkk, fform) 77 ABI_CHECK(fform/=0," GKK header mis-read. fform == 0") 78 79 if (hdr%natom /= natom) then 80 MSG_ERROR('natom in gkk file is different from anaddb input') 81 end if 82 83 if (any(hdr%nband(:) /= hdr%nband(1))) then 84 write(message,'(3a)')& 85 & 'Use the same number of bands for all kpts: ',ch10,& 86 & 'could have spurious effects if efermi is too close to the last band ' 87 MSG_ERROR(message) 88 end if 89 90 call hdr_echo(hdr, fform, 4, unit=std_out) 91 92 nband=hdr%nband(1) 93 94 end subroutine rchkGSheader