2004-05-08 01:33:12 +08:00
|
|
|
!
|
|
|
|
! Copyright (C) 2001-2003 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 openfil_pp()
|
|
|
|
!----------------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
! ... This routine opens all files needed to the self consistent run,
|
|
|
|
! ... sets various file names, units, record lengths
|
|
|
|
!
|
|
|
|
USE kinds, ONLY : DP
|
|
|
|
USE wvfct, ONLY : nbnd, npwx
|
2007-02-15 01:02:32 +08:00
|
|
|
use control_flags, ONLY: twfcollect
|
|
|
|
USE io_files, ONLY : prefix, iunwfc, nwordwfc
|
2004-11-04 21:35:00 +08:00
|
|
|
USE noncollin_module, ONLY : npol
|
2004-05-08 01:33:12 +08:00
|
|
|
!
|
|
|
|
IMPLICIT NONE
|
|
|
|
!
|
|
|
|
LOGICAL :: exst
|
2007-02-15 01:02:32 +08:00
|
|
|
!
|
2004-05-08 01:33:12 +08:00
|
|
|
twfcollect=.false.
|
|
|
|
!
|
|
|
|
! ... nwordwfc is the record length for the direct-access file
|
|
|
|
! ... containing wavefunctions
|
|
|
|
!
|
2004-06-14 23:22:24 +08:00
|
|
|
nwordwfc = 2 * nbnd * npwx * npol
|
2004-05-08 01:33:12 +08:00
|
|
|
!
|
2005-06-17 21:27:38 +08:00
|
|
|
CALL diropn( iunwfc, 'wfc', nwordwfc, exst )
|
2004-05-08 01:33:12 +08:00
|
|
|
!
|
|
|
|
IF ( .NOT. exst ) THEN
|
2006-03-23 19:00:52 +08:00
|
|
|
call errore ('openfil_pp','file '//TRIM( prefix )//'.wfc'//' not found',1)
|
2004-05-08 01:33:12 +08:00
|
|
|
END IF
|
|
|
|
!
|
|
|
|
RETURN
|
|
|
|
!
|
|
|
|
END SUBROUTINE openfil_pp
|