wstat_readin.f90 1.61 KB
Newer Older
Marco Govoni's avatar
Marco Govoni committed
1
!
Marco Govoni's avatar
Marco Govoni committed
2
! Copyright (C) 2015-2021 M. Govoni
Marco Govoni's avatar
Marco Govoni committed
3
4
5
6
7
8
9
! 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 .
!
! This file is part of WEST.
!
10
! Contributors to this file:
Marco Govoni's avatar
Marco Govoni committed
11
12
13
14
15
16
17
! Marco Govoni
!
!-----------------------------------------------------------------------
SUBROUTINE wstat_readin()
  !-----------------------------------------------------------------------
  !
  USE uspp,             ONLY : okvan
Govoni's avatar
Govoni committed
18
19
  USE gvecs,            ONLY : doublegrid
  USE spin_orb,         ONLY : domag
20
21
22
  USE mp_bands,         ONLY : nbgrp
  USE funct,            ONLY : dft_is_hybrid
  USE westcom,          ONLY : l_kinetic_only
Marco Govoni's avatar
Marco Govoni committed
23
24
25
26
27
  !
  IMPLICIT NONE
  !
  CALL start_clock('wstat_readin')
  !
28
29
  ! READ INPUT_WEST
  !
Marco Govoni's avatar
Marco Govoni committed
30
  CALL fetch_input_yml(1,(/1/),.TRUE.,.FALSE.)
Marco Govoni's avatar
Marco Govoni committed
31
  !
32
33
  ! read the input file produced by the pwscf program
  ! allocate memory and recalculate what is needed
Marco Govoni's avatar
Marco Govoni committed
34
35
36
37
38
39
40
  !
  CALL read_pwout( )
  !
  ! PW checks
  !
  IF (domag) CALL errore('wstat_readin','domag version not available',1)
  IF (okvan) CALL errore('wstat_readin','ultrasoft pseudopotential not implemented',1)
41
42
43
44
45
  IF (doublegrid) CALL errore('wstat_readin','double grid not implemented',1)
  IF (nbgrp > 1) THEN
     IF (dft_is_hybrid()) CALL errore('wstat_readin','band groups not implemented for hybrids',1)
     IF (l_kinetic_only) CALL errore('wstat_readin','band groups not implemented for kinetic only',1)
  ENDIF
Marco Govoni's avatar
Marco Govoni committed
46
  !
47
48
  ! READ other sections of the input file
  !
Marco Govoni's avatar
Marco Govoni committed
49
  CALL fetch_input_yml(2,(/2,5/),.TRUE.,.FALSE.)
50
  !
Marco Govoni's avatar
Marco Govoni committed
51
52
53
  CALL stop_clock('wstat_readin')
  !
END SUBROUTINE