41    character(len=2)   :: namatm
 
   42    character(len=2)   :: icorr
 
   43    character(len=3)   :: irel
 
   44    character(len=4)   :: icore
 
   45    character(len=10), 
private :: method(6)
 
   46    character(len=70)  :: title
 
   54    real(real64), 
allocatable, 
private :: rofi(:)
 
   55    real(real64), 
allocatable     :: vps(:,:)
 
   56    real(real64), 
allocatable     :: chcore(:)
 
   57    real(real64), 
allocatable     :: rho_val(:)
 
   58    real(real64), 
allocatable     :: vso(:,:)
 
   65    integer,             
intent(in)    :: unit
 
   66    logical,             
intent(in)    :: ascii
 
   67    type(ps_psf_file_t), 
intent(inout) :: psf
 
   68    type(namespace_t),   
intent(in)    :: namespace
 
   70    integer  :: ndown, nup, i, l
 
   71    character(len=70) :: aux_s
 
   779000 
format(1x,a2,1x,a2,1x,a3,1x,a4)
 
   789010 
format(1x,6a10,/,1x,a70)
 
   799015 
format(1x,2i3,i5,3f20.10)
 
   85      read(unit, 9000) psf%namatm, psf%icorr, psf%irel, psf%icore
 
   86      read(unit, 9010) (psf%method(l),l=1,6), psf%title
 
   87      read(unit, 9015) psf%npotd, psf%npotu, psf%nr, psf%b, psf%a, psf%zval
 
   89      read(unit) psf%namatm, psf%icorr, psf%irel, psf%icore,     &
 
   90        (psf%method(l), l=1, 6), psf%title, psf%npotd, psf%npotu,  &
 
   91        psf%nr, psf%b, psf%a, psf%zval
 
   99    safe_allocate(psf%rofi   (1:psf%nr))
 
  100    safe_allocate(psf%vps    (1:psf%nr, 1:psf%npotd))
 
  101    safe_allocate(psf%chcore (1:psf%nr))
 
  102    safe_allocate(psf%rho_val(1:psf%nr))
 
  103    safe_allocate(psf%vso    (1:psf%nr, 1:psf%npotu))
 
  108      read(unit, 9040) aux_s
 
  109      read(unit, 9030) (psf%rofi(i), i=2, psf%nr)
 
  111      read(unit) (psf%rofi(i), i=2, psf%nr)
 
  117    do ndown = 1, psf%npotd
 
  119        read(unit, 9040) aux_s
 
  121        read(unit, 9030) (psf%vps(i, ndown), i=2, psf%nr)
 
  123        read(unit) l, (psf%vps(i, ndown), i=2, psf%nr)
 
  126      if (l /= ndown-1) 
then 
  127        message(1) = 
'Unexpected angular momentum' 
  128        message(2) = 
'Pseudopotential should be ordered by increasing l' 
  132      psf%vps(2:, ndown) = psf%vps(2:, ndown) / psf%rofi(2:)
 
  137    do nup = 1, psf%npotu
 
  139        read(unit, 9040) aux_s
 
  141        read(unit, 9030) (psf%vso(i, nup), i=2, psf%nr)
 
  143        read(unit) l, (psf%vso(i, nup), i=2, psf%nr)
 
  146      if ((l /= nup) .and. (psf%irel == 
'rel')) 
then 
  148        message(2) = 
'Pseudopotential should be ordered by increasing l' 
  152      psf%vso(2:, nup) = psf%vso(2:, nup) / psf%rofi(2:)
 
  156    if (psf%irel /= 
'rel') 
then 
  163      read(unit, 9040) aux_s
 
  164      read(unit, 9030) (psf%chcore(i), i=2, psf%nr)
 
  166      read(unit) (psf%chcore(i), i=2, psf%nr)
 
  175      read(unit, 9040) aux_s
 
  176      read(unit, 9030) (psf%rho_val(i), i=2, psf%nr)
 
  178      read(unit) (psf%rho_val(i), i=2, psf%nr)
 
  191    safe_deallocate_a(psf%rofi)
 
  192    safe_deallocate_a(psf%vps)
 
  193    safe_deallocate_a(psf%chcore)
 
  194    safe_deallocate_a(psf%rho_val)
 
  195    safe_deallocate_a(psf%vso)
 
real(real64), parameter, public m_zero
 
subroutine, public messages_warning(no_lines, all_nodes, namespace)
 
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
 
real(real64) function, public first_point_extrapolate(x, y, high_order)
 
subroutine, public ps_psf_file_end(psf)
 
subroutine, public ps_psf_file_read(unit, ascii, psf, namespace)