is_shell_header Function

private pure function is_shell_header(line) result(res)

Check if a line is a shell header line (starts with S, P, D, F, G, H, I, or L)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line

Return Value logical


Called by

proc~~is_shell_header~~CalledByGraph proc~is_shell_header is_shell_header proc~classify_line classify_line proc~classify_line->proc~is_shell_header proc~count_shells_for_element count_shells_for_element proc~count_shells_for_element->proc~classify_line proc~fill_element_basis fill_element_basis proc~fill_element_basis->proc~classify_line proc~parse_element_basis parse_element_basis proc~parse_element_basis->proc~count_shells_for_element proc~parse_element_basis->proc~fill_element_basis proc~build_molecular_basis build_molecular_basis proc~build_molecular_basis->proc~parse_element_basis

Variables

Type Visibility Attributes Name Initial
integer, private :: dummy
character(len=1), private :: first_char
integer, private :: ios

Source Code

   pure function is_shell_header(line) result(res)
      !! Check if a line is a shell header line (starts with S, P, D, F, G, H, I, or L)
      character(len=*), intent(in) :: line
      logical :: res
      character(len=1) :: first_char
      integer :: ios, dummy

      res = .false.
      if (len_trim(line) == 0) return

      first_char = line(1:1)

      if (.not. any(first_char == ['S', 'P', 'D', 'F', 'G', 'H', 'I', 'L'])) return

      read (line(2:), *, iostat=ios) dummy
      res = (ios == 0)

   end function is_shell_header