mirror of https://gitlab.com/QEF/q-e.git
75 lines
1.6 KiB
Fortran
75 lines
1.6 KiB
Fortran
!
|
|
! Copyright (C) 2001-2006 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,
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
!
|
|
!----------------------------------------------------------------------------
|
|
SUBROUTINE init_run()
|
|
!----------------------------------------------------------------------------
|
|
!
|
|
USE klist, ONLY : nkstot
|
|
USE wvfct, ONLY : nbnd, et, wg, btype
|
|
USE control_flags, ONLY : lmd
|
|
USE dynamics_module, ONLY : allocate_dyn_vars
|
|
!
|
|
IMPLICIT NONE
|
|
!
|
|
!
|
|
CALL start_clock( 'init_run' )
|
|
!
|
|
CALL setup()
|
|
!
|
|
! ... allocate memory for G- and R-space fft arrays
|
|
!
|
|
CALL allocate_fft()
|
|
!
|
|
! ... generate reciprocal-lattice vectors and fft indices
|
|
!
|
|
CALL ggen()
|
|
!
|
|
CALL summary()
|
|
!
|
|
! ... allocate memory for all other arrays (potentials, wavefunctions etc)
|
|
!
|
|
CALL allocate_nlpot()
|
|
CALL allocate_locpot()
|
|
CALL allocate_wfc()
|
|
!
|
|
ALLOCATE( et( nbnd, nkstot ) , wg( nbnd, nkstot ), btype( nbnd, nkstot ) )
|
|
!
|
|
et(:,:) = 0.D0
|
|
wg(:,:) = 0.D0
|
|
!
|
|
btype(:,:) = 1
|
|
!
|
|
CALL openfil()
|
|
!
|
|
CALL init_h()
|
|
!
|
|
IF ( lmd ) CALL allocate_dyn_vars()
|
|
!
|
|
CALL stop_clock( 'init_run' )
|
|
!
|
|
RETURN
|
|
!
|
|
END SUBROUTINE init_run
|
|
!
|
|
!----------------------------------------------------------------------------
|
|
SUBROUTINE init_h()
|
|
!----------------------------------------------------------------------------
|
|
!
|
|
IMPLICIT NONE
|
|
!
|
|
CALL hinit0()
|
|
CALL potinit()
|
|
!
|
|
CALL newd()
|
|
!
|
|
CALL wfcinit()
|
|
!
|
|
RETURN
|
|
!
|
|
END SUBROUTINE init_h
|