2003-01-20 05:58:50 +08:00
|
|
|
!
|
2005-03-21 22:01:19 +08:00
|
|
|
! Copyright (C) 2004 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 .
|
|
|
|
!
|
2003-01-20 05:58:50 +08:00
|
|
|
!---------------------------------------------------------------------
|
2003-02-08 00:04:36 +08:00
|
|
|
subroutine read_pseudo (is, iunps, ierr)
|
2003-01-20 05:58:50 +08:00
|
|
|
!---------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
! read "is"-th pseudopotential in the Unified Pseudopotential Format
|
|
|
|
! from unit "iunps" - convert and copy to internal PWscf variables
|
|
|
|
! return error code in "ierr" (success: ierr=0)
|
|
|
|
!
|
|
|
|
use pseudo_types
|
|
|
|
use read_pseudo_module
|
2004-04-27 21:44:55 +08:00
|
|
|
use upf_to_internal
|
2003-01-20 05:58:50 +08:00
|
|
|
!
|
|
|
|
implicit none
|
|
|
|
!
|
2003-02-08 00:04:36 +08:00
|
|
|
integer :: is, iunps, ierr
|
2003-01-20 05:58:50 +08:00
|
|
|
!
|
|
|
|
TYPE (pseudo_upf) :: upf
|
|
|
|
!
|
|
|
|
!
|
|
|
|
call read_pseudo_upf(iunps, upf, ierr)
|
|
|
|
!
|
2004-04-27 21:44:55 +08:00
|
|
|
if (ierr == 0) then
|
|
|
|
call set_pseudo_upf (is, upf)
|
2003-01-20 05:58:50 +08:00
|
|
|
end if
|
2004-04-27 21:44:55 +08:00
|
|
|
!
|
2003-01-20 05:58:50 +08:00
|
|
|
CALL deallocate_pseudo_upf( upf )
|
2004-04-27 21:44:55 +08:00
|
|
|
!
|
2003-01-20 05:58:50 +08:00
|
|
|
end subroutine read_pseudo
|