error_set Subroutine

private pure subroutine error_set(this, code, message)

Set an error with code and message Resets the stack trace

Type Bound

error_t

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(inout) :: this
integer, intent(in) :: code
character(len=*), intent(in) :: message

Called by

proc~~error_set~~CalledByGraph proc~error_set error_t%error_set proc~build_molecular_basis build_molecular_basis proc~build_molecular_basis->proc~error_set proc~parse_element_basis parse_element_basis proc~build_molecular_basis->proc~parse_element_basis proc~check_duplicate_atoms check_duplicate_atoms proc~check_duplicate_atoms->proc~error_set proc~check_fragment_overlap check_fragment_overlap proc~check_fragment_overlap->proc~error_set proc~config_to_system_geometry config_to_system_geometry proc~config_to_system_geometry->proc~error_set proc~molecule_to_system_geometry molecule_to_system_geometry proc~config_to_system_geometry->proc~molecule_to_system_geometry proc~geometry_to_system_fragmented geometry_to_system_fragmented proc~config_to_system_geometry->proc~geometry_to_system_fragmented proc~count_shells_for_element count_shells_for_element proc~count_shells_for_element->proc~error_set proc~do_fragment_work do_fragment_work proc~do_fragment_work->proc~error_set proc~extract_element extract_element proc~extract_element->proc~error_set proc~fill_element_basis fill_element_basis proc~fill_element_basis->proc~error_set proc~find_basis_file find_basis_file proc~find_basis_file->proc~error_set proc~fragment_lookup_insert fragment_lookup_t%fragment_lookup_insert proc~fragment_lookup_insert->proc~error_set proc~gmbe_enumerate_pie_terms gmbe_enumerate_pie_terms proc~gmbe_enumerate_pie_terms->proc~error_set proc~dfs_pie_accumulate dfs_pie_accumulate proc~gmbe_enumerate_pie_terms->proc~dfs_pie_accumulate proc~grow_pie_storage grow_pie_storage proc~grow_pie_storage->proc~error_set proc~initialize_system_geometry initialize_system_geometry proc~initialize_system_geometry->proc~error_set proc~read_xyz_file read_xyz_file proc~initialize_system_geometry->proc~read_xyz_file proc~molecule_to_system_geometry->proc~error_set proc~initialize_fragmented_system initialize_fragmented_system proc~molecule_to_system_geometry->proc~initialize_fragmented_system proc~open_basis_file open_basis_file proc~open_basis_file->proc~error_set proc~parse_aimd_section parse_aimd_section proc~parse_aimd_section->proc~error_set proc~parse_command_line parse_command_line proc~parse_command_line->proc~error_set proc~parse_connectivity_generic parse_connectivity_generic proc~parse_connectivity_generic->proc~error_set proc~skip_to_end skip_to_end proc~parse_connectivity_generic->proc~skip_to_end proc~parse_driver_section parse_driver_section proc~parse_driver_section->proc~error_set proc~parse_element_basis->proc~error_set proc~parse_element_basis->proc~count_shells_for_element proc~parse_element_basis->proc~fill_element_basis proc~parse_fragment parse_fragment proc~parse_fragment->proc~error_set proc~parse_indices_line parse_indices_line proc~parse_fragment->proc~parse_indices_line proc~parse_fragmentation_section parse_fragmentation_section proc~parse_fragmentation_section->proc~error_set proc~validate_cutoffs validate_cutoffs proc~parse_fragmentation_section->proc~validate_cutoffs proc~parse_fragments_generic parse_fragments_generic proc~parse_fragments_generic->proc~error_set proc~parse_fragments_generic->proc~parse_fragment proc~parse_fragments_generic->proc~skip_to_end proc~parse_geometry_generic parse_geometry_generic proc~parse_geometry_generic->proc~error_set proc~parse_hessian_section parse_hessian_section proc~parse_hessian_section->proc~error_set proc~parse_indices_line->proc~error_set proc~parse_model_section parse_model_section proc~parse_model_section->proc~error_set proc~parse_molecules_section parse_molecules_section proc~parse_molecules_section->proc~error_set proc~parse_single_molecule parse_single_molecule proc~parse_molecules_section->proc~parse_single_molecule proc~parse_molecules_section->proc~skip_to_end proc~parse_scf_section parse_scf_section proc~parse_scf_section->proc~error_set proc~parse_schema_section parse_schema_section proc~parse_schema_section->proc~error_set proc~parse_single_molecule->proc~error_set proc~parse_single_molecule->proc~skip_to_end proc~parse_molecule_connectivity parse_molecule_connectivity proc~parse_single_molecule->proc~parse_molecule_connectivity proc~parse_molecule_fragments parse_molecule_fragments proc~parse_single_molecule->proc~parse_molecule_fragments proc~parse_molecule_geometry parse_molecule_geometry proc~parse_single_molecule->proc~parse_molecule_geometry proc~parse_molecule_structure parse_molecule_structure proc~parse_single_molecule->proc~parse_molecule_structure proc~parse_structure_generic parse_structure_generic proc~parse_structure_generic->proc~error_set proc~parse_system_section parse_system_section proc~parse_system_section->proc~error_set proc~parse_xtb_section parse_xtb_section proc~parse_xtb_section->proc~error_set proc~read_mqc_file read_mqc_file proc~read_mqc_file->proc~error_set proc~read_mqc_file->proc~skip_to_end interface~parse_aimd_section parse_aimd_section proc~read_mqc_file->interface~parse_aimd_section interface~parse_driver_section parse_driver_section proc~read_mqc_file->interface~parse_driver_section interface~parse_fragmentation_section parse_fragmentation_section proc~read_mqc_file->interface~parse_fragmentation_section interface~parse_hessian_section parse_hessian_section proc~read_mqc_file->interface~parse_hessian_section interface~parse_model_section parse_model_section proc~read_mqc_file->interface~parse_model_section interface~parse_molecules_section parse_molecules_section proc~read_mqc_file->interface~parse_molecules_section interface~parse_scf_section parse_scf_section proc~read_mqc_file->interface~parse_scf_section interface~parse_schema_section parse_schema_section proc~read_mqc_file->interface~parse_schema_section interface~parse_system_section parse_system_section proc~read_mqc_file->interface~parse_system_section interface~parse_xtb_section parse_xtb_section proc~read_mqc_file->interface~parse_xtb_section interface~parse_connectivity_section parse_connectivity_section proc~read_mqc_file->interface~parse_connectivity_section interface~parse_fragments_section parse_fragments_section proc~read_mqc_file->interface~parse_fragments_section interface~parse_geometry_section parse_geometry_section proc~read_mqc_file->interface~parse_geometry_section interface~parse_structure_section parse_structure_section proc~read_mqc_file->interface~parse_structure_section proc~read_xyz_file->proc~error_set proc~read_xyz_string read_xyz_string proc~read_xyz_file->proc~read_xyz_string proc~read_xyz_string->proc~error_set proc~skip_to_end->proc~error_set proc~validate_cutoffs->proc~error_set proc~xtb_calc_energy xtb_method_t%xtb_calc_energy proc~xtb_calc_energy->proc~error_set proc~xtb_calc_gradient xtb_method_t%xtb_calc_gradient proc~xtb_calc_gradient->proc~error_set proc~xtb_calc_hessian xtb_method_t%xtb_calc_hessian proc~xtb_calc_hessian->proc~error_set proc~xtb_calc_hessian->proc~xtb_calc_gradient interface~do_fragment_work do_fragment_work interface~do_fragment_work->proc~do_fragment_work interface~parse_aimd_section->proc~parse_aimd_section interface~parse_connectivity_generic parse_connectivity_generic interface~parse_connectivity_generic->proc~parse_connectivity_generic interface~parse_driver_section->proc~parse_driver_section interface~parse_fragmentation_section->proc~parse_fragmentation_section interface~parse_fragments_generic parse_fragments_generic interface~parse_fragments_generic->proc~parse_fragments_generic interface~parse_geometry_generic parse_geometry_generic interface~parse_geometry_generic->proc~parse_geometry_generic interface~parse_hessian_section->proc~parse_hessian_section interface~parse_model_section->proc~parse_model_section interface~parse_molecules_section->proc~parse_molecules_section interface~parse_scf_section->proc~parse_scf_section interface~parse_schema_section->proc~parse_schema_section interface~parse_structure_generic parse_structure_generic interface~parse_structure_generic->proc~parse_structure_generic interface~parse_system_section->proc~parse_system_section interface~parse_xtb_section->proc~parse_xtb_section proc~build_fragment_from_atom_list build_fragment_from_atom_list proc~build_fragment_from_atom_list->proc~check_duplicate_atoms proc~build_fragment_from_indices build_fragment_from_indices proc~build_fragment_from_indices->proc~check_duplicate_atoms proc~build_mbe_lookup_table build_mbe_lookup_table proc~build_mbe_lookup_table->proc~fragment_lookup_insert proc~dfs_pie_accumulate->proc~grow_pie_storage proc~dfs_pie_accumulate->proc~dfs_pie_accumulate proc~initialize_fragmented_system->proc~check_fragment_overlap proc~run_fragmented_calculation run_fragmented_calculation proc~run_fragmented_calculation->proc~gmbe_enumerate_pie_terms proc~run_multi_molecule_calculations run_multi_molecule_calculations proc~run_multi_molecule_calculations->proc~config_to_system_geometry proc~run_calculation run_calculation proc~run_multi_molecule_calculations->proc~run_calculation proc~unfragmented_calculation unfragmented_calculation proc~unfragmented_calculation->proc~check_duplicate_atoms proc~unfragmented_calculation->interface~do_fragment_work program~main main program~main->proc~config_to_system_geometry program~main->proc~read_mqc_file program~main->proc~run_multi_molecule_calculations program~main->proc~run_calculation interface~unfragmented_calculation unfragmented_calculation interface~unfragmented_calculation->proc~unfragmented_calculation proc~compute_gmbe compute_gmbe proc~compute_gmbe->proc~build_fragment_from_indices proc~process_intersection_derivatives process_intersection_derivatives proc~compute_gmbe->proc~process_intersection_derivatives proc~compute_mbe compute_mbe proc~compute_mbe->proc~build_mbe_lookup_table proc~map_fragment_to_system_dipole_derivatives map_fragment_to_system_dipole_derivatives proc~compute_mbe->proc~map_fragment_to_system_dipole_derivatives proc~map_fragment_to_system_gradient map_fragment_to_system_gradient proc~compute_mbe->proc~map_fragment_to_system_gradient proc~map_fragment_to_system_hessian map_fragment_to_system_hessian proc~compute_mbe->proc~map_fragment_to_system_hessian proc~compute_mbe_dipole_derivatives compute_mbe_dipole_derivatives proc~compute_mbe->proc~compute_mbe_dipole_derivatives proc~compute_mbe_gradient compute_mbe_gradient proc~compute_mbe->proc~compute_mbe_gradient proc~compute_mbe_hessian compute_mbe_hessian proc~compute_mbe->proc~compute_mbe_hessian proc~geometry_to_system_fragmented->proc~initialize_fragmented_system proc~gmbe_pie_coordinator gmbe_pie_coordinator proc~gmbe_pie_coordinator->proc~build_fragment_from_atom_list proc~map_fragment_to_system_dipole_derivatives->proc~build_fragment_from_indices proc~map_fragment_to_system_gradient->proc~build_fragment_from_indices proc~map_fragment_to_system_hessian->proc~build_fragment_from_indices proc~node_worker node_worker proc~node_worker->interface~do_fragment_work proc~node_worker->proc~build_fragment_from_atom_list proc~node_worker->proc~build_fragment_from_indices proc~parse_connectivity_section parse_connectivity_section proc~parse_connectivity_section->interface~parse_connectivity_generic proc~parse_fragments_section parse_fragments_section proc~parse_fragments_section->interface~parse_fragments_generic proc~parse_geometry_section parse_geometry_section proc~parse_geometry_section->interface~parse_geometry_generic proc~parse_molecule_connectivity->interface~parse_connectivity_generic proc~parse_molecule_fragments->interface~parse_fragments_generic proc~parse_molecule_geometry->interface~parse_geometry_generic proc~parse_molecule_structure->interface~parse_structure_generic proc~parse_structure_section parse_structure_section proc~parse_structure_section->interface~parse_structure_generic proc~process_intersection_derivatives->proc~build_fragment_from_atom_list proc~run_calculation->proc~run_fragmented_calculation proc~run_unfragmented_calculation run_unfragmented_calculation proc~run_calculation->proc~run_unfragmented_calculation proc~serial_fragment_processor serial_fragment_processor proc~serial_fragment_processor->interface~do_fragment_work proc~serial_fragment_processor->proc~build_fragment_from_indices proc~serial_fragment_processor->proc~compute_mbe proc~serial_gmbe_pie_processor serial_gmbe_pie_processor proc~serial_gmbe_pie_processor->interface~do_fragment_work proc~serial_gmbe_pie_processor->proc~build_fragment_from_atom_list interface~node_worker node_worker interface~node_worker->proc~node_worker interface~parse_connectivity_section->proc~parse_connectivity_section interface~parse_fragments_section->proc~parse_fragments_section interface~parse_geometry_section->proc~parse_geometry_section interface~parse_structure_section->proc~parse_structure_section interface~serial_fragment_processor serial_fragment_processor interface~serial_fragment_processor->proc~serial_fragment_processor proc~compute_energy_and_forces compute_energy_and_forces proc~compute_energy_and_forces->proc~run_calculation proc~compute_mbe_dipole_derivatives->proc~map_fragment_to_system_dipole_derivatives proc~compute_mbe_gradient->proc~map_fragment_to_system_gradient proc~compute_mbe_hessian->proc~map_fragment_to_system_hessian proc~global_coordinator global_coordinator proc~global_coordinator->proc~compute_mbe proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed proc~gmbe_run_distributed->proc~gmbe_pie_coordinator proc~gmbe_run_distributed->interface~node_worker proc~gmbe_run_serial gmbe_context_t%gmbe_run_serial proc~gmbe_run_serial->proc~serial_gmbe_pie_processor proc~run_unfragmented_calculation->interface~unfragmented_calculation interface~global_coordinator global_coordinator interface~global_coordinator->proc~global_coordinator proc~mbe_run_distributed mbe_context_t%mbe_run_distributed proc~mbe_run_distributed->interface~node_worker proc~mbe_run_serial mbe_context_t%mbe_run_serial proc~mbe_run_serial->interface~serial_fragment_processor

Source Code

   pure subroutine error_set(this, code, message)
      !! Set an error with code and message
      !! Resets the stack trace
      class(error_t), intent(inout) :: this
      integer, intent(in) :: code
      character(len=*), intent(in) :: message

      this%code = code
      this%message = trim(message)
      this%stack_depth = 0  ! Reset stack when setting new error
   end subroutine error_set