westpp_readin.f90 1.55 KB
Newer Older
Marco Govoni's avatar
Marco Govoni committed
1
!
2
! Copyright (C) 2015-2017 M. Govoni 
Marco Govoni's avatar
Marco Govoni committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! 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.
!
! Contributors to this file: 
! Marco Govoni
!
!-----------------------------------------------------------------------
SUBROUTINE westpp_readin()
  !-----------------------------------------------------------------------
  !
  USE ions_base,        ONLY : nat
  USE uspp,             ONLY : okvan
  USE io_files,         ONLY : tmp_dir, prefix
  USE io_global,        ONLY : stdout
  USE noncollin_module, ONLY : noncolin
  USE mp,               ONLY : mp_bcast
Govoni's avatar
Govoni committed
23
24
  USE gvecs,            ONLY : doublegrid
  USE spin_orb,         ONLY : domag
Marco Govoni's avatar
Marco Govoni committed
25
26
27
28
29
30
31
32
33
  !
  IMPLICIT NONE
  !
  ! Workspace
  !
  INTEGER :: iunit =5, ios
  !
  CALL start_clock('westpp_readin')
  !
34
  !CALL fetch_namelist(3,(/1,2,4/))
35
36
37
38
  !
  ! READ INPUT_WEST
  !
  CALL fetch_input((/1/),.TRUE.)
Marco Govoni's avatar
Marco Govoni committed
39
40
41
42
43
44
45
46
47
48
49
50
51
  !
  !  read the input file produced by the pwscf program
  !  allocate memory and recalculate what is needed
  !
  !CALL read_file( )
  CALL read_pwout( )
  !
  ! PW checks
  !
  IF (domag) CALL errore('westpp_readin','domag version not available',1)
  IF (okvan) CALL errore('westpp_readin','ultrasoft pseudopotential not implemented',1)
  IF (doublegrid) CALL errore('westpp_readin', 'double grid not implemented',1)
  !
52
53
54
55
  ! READ other sections of the input file
  !
  CALL fetch_input((/2,4/),.TRUE.)
  !
Marco Govoni's avatar
Marco Govoni committed
56
57
58
  CALL stop_clock('westpp_readin')
  !
END SUBROUTINE