parse_element_basis Subroutine

public pure subroutine parse_element_basis(basis_string, element_name, atom_basis, error)

Parse basis set for a specific element from a GAMESS formatted basis string

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: basis_string
character(len=*), intent(in) :: element_name
type(atomic_basis_type), intent(out) :: atom_basis
type(error_t), intent(out) :: error

Calls

proc~~parse_element_basis~~CallsGraph proc~parse_element_basis parse_element_basis proc~allocate_basis_shells atomic_basis_type%allocate_basis_shells proc~parse_element_basis->proc~allocate_basis_shells proc~count_shells_for_element count_shells_for_element proc~parse_element_basis->proc~count_shells_for_element proc~error_add_context error_t%error_add_context proc~parse_element_basis->proc~error_add_context proc~error_has_error error_t%error_has_error proc~parse_element_basis->proc~error_has_error proc~error_set error_t%error_set proc~parse_element_basis->proc~error_set proc~fill_element_basis fill_element_basis proc~parse_element_basis->proc~fill_element_basis proc~count_shells_for_element->proc~error_set proc~classify_line classify_line proc~count_shells_for_element->proc~classify_line proc~get_next_line get_next_line proc~count_shells_for_element->proc~get_next_line proc~strings_equal strings_equal proc~count_shells_for_element->proc~strings_equal proc~fill_element_basis->proc~error_set proc~ang_mom_char_to_int ang_mom_char_to_int proc~fill_element_basis->proc~ang_mom_char_to_int proc~cgto_allocate_arrays cgto_type%cgto_allocate_arrays proc~fill_element_basis->proc~cgto_allocate_arrays proc~fill_element_basis->proc~classify_line proc~fill_element_basis->proc~get_next_line proc~parse_function_line parse_function_line proc~fill_element_basis->proc~parse_function_line proc~parse_shell_header parse_shell_header proc~fill_element_basis->proc~parse_shell_header proc~fill_element_basis->proc~strings_equal proc~is_blank_or_control is_blank_or_control proc~classify_line->proc~is_blank_or_control proc~is_function_line is_function_line proc~classify_line->proc~is_function_line proc~is_shell_header is_shell_header proc~classify_line->proc~is_shell_header

Called by

proc~~parse_element_basis~~CalledByGraph proc~parse_element_basis parse_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 :: nshells

Source Code

   pure subroutine parse_element_basis(basis_string, element_name, atom_basis, error)
      !! Parse basis set for a specific element from a GAMESS formatted basis string
      character(len=*), intent(in) :: basis_string
      character(len=*), intent(in) :: element_name
      type(atomic_basis_type), intent(out) :: atom_basis
      type(error_t), intent(out) :: error

      integer :: nshells

      ! Pass 1: Find the element and count its shells
      call count_shells_for_element(basis_string, element_name, nshells, error)
      if (error%has_error()) then
         call error%add_context("mqc_basis_reader:parse_element_basis")
         return
      end if

      if (nshells == 0) then
         call error%set(ERROR_PARSE, "Element "//trim(element_name)//" not found in basis file")
         return
      end if

      ! ! Allocate shells
      atom_basis%element = trim(element_name)
      call atom_basis%allocate_shells(nshells)

      ! ! Pass 2: Parse and fill shell data
      call fill_element_basis(basis_string, element_name, atom_basis, error)

   end subroutine parse_element_basis