mqc_error Module

Error codes


Used by

  • module~~mqc_error~~UsedByGraph module~mqc_error mqc_error module~mpi_fragment_work_smod mpi_fragment_work_smod module~mpi_fragment_work_smod->module~mqc_error module~mqc_mbe_fragment_distribution_scheme mqc_mbe_fragment_distribution_scheme module~mpi_fragment_work_smod->module~mqc_mbe_fragment_distribution_scheme module~mqc_basis_file_reader mqc_basis_file_reader module~mqc_basis_file_reader->module~mqc_error module~mqc_basis_reader mqc_basis_reader module~mqc_basis_reader->module~mqc_error module~mqc_basis_reader->module~mqc_basis_file_reader module~mqc_basis_utils mqc_basis_utils module~mqc_basis_utils->module~mqc_error module~mqc_cli_parser mqc_cli_parser module~mqc_cli_parser->module~mqc_error module~mqc_cli_parser->module~mqc_basis_utils module~mqc_config_adapter mqc_config_adapter module~mqc_config_adapter->module~mqc_error module~mqc_config_parser mqc_config_parser module~mqc_config_adapter->module~mqc_config_parser module~mqc_physical_fragment mqc_physical_fragment module~mqc_config_adapter->module~mqc_physical_fragment module~mqc_config_parser->module~mqc_error module~mqc_config_parser->module~mqc_physical_fragment module~mqc_driver mqc_driver module~mqc_driver->module~mqc_error module~mqc_driver->module~mqc_config_adapter module~mqc_driver->module~mqc_config_parser module~mqc_driver->module~mqc_physical_fragment module~mqc_result_types mqc_result_types module~mqc_driver->module~mqc_result_types module~mqc_frag_utils mqc_frag_utils module~mqc_driver->module~mqc_frag_utils module~mqc_many_body_expansion mqc_many_body_expansion module~mqc_driver->module~mqc_many_body_expansion module~mqc_mbe mqc_mbe module~mqc_driver->module~mqc_mbe module~mqc_driver->module~mqc_mbe_fragment_distribution_scheme module~mqc_json_writer mqc_json_writer module~mqc_driver->module~mqc_json_writer module~mqc_fragment_lookup mqc_fragment_lookup module~mqc_fragment_lookup->module~mqc_error module~mqc_gmbe_utils mqc_gmbe_utils module~mqc_gmbe_utils->module~mqc_error module~mqc_gmbe_utils->module~mqc_physical_fragment module~mqc_gmbe_utils->module~mqc_result_types module~mqc_method_xtb mqc_method_xtb module~mqc_method_xtb->module~mqc_error module~mqc_method_xtb->module~mqc_physical_fragment module~mqc_method_xtb->module~mqc_result_types module~mqc_method_base mqc_method_base module~mqc_method_xtb->module~mqc_method_base module~mqc_physical_fragment->module~mqc_error module~mqc_xyz_reader mqc_xyz_reader module~mqc_physical_fragment->module~mqc_xyz_reader module~mqc_result_types->module~mqc_error module~mqc_xyz_reader->module~mqc_error proc~build_mbe_lookup_table build_mbe_lookup_table proc~build_mbe_lookup_table->module~mqc_error proc~compute_gmbe compute_gmbe proc~compute_gmbe->module~mqc_error proc~compute_gmbe->module~mqc_config_parser proc~compute_gmbe->module~mqc_gmbe_utils proc~compute_gmbe->module~mqc_physical_fragment proc~compute_gmbe->module~mqc_result_types proc~compute_mbe compute_mbe proc~compute_mbe->module~mqc_error proc~compute_mbe->module~mqc_result_types proc~compute_mbe_dipole_derivatives compute_mbe_dipole_derivatives proc~compute_mbe_dipole_derivatives->module~mqc_error proc~compute_mbe_dipole_derivatives->module~mqc_result_types proc~compute_mbe_hessian compute_mbe_hessian proc~compute_mbe_hessian->module~mqc_error proc~compute_mbe_hessian->module~mqc_result_types proc~gmbe_pie_coordinator gmbe_pie_coordinator proc~gmbe_pie_coordinator->module~mqc_error proc~gmbe_pie_coordinator->module~mqc_physical_fragment proc~map_fragment_to_system_dipole_derivatives map_fragment_to_system_dipole_derivatives proc~map_fragment_to_system_dipole_derivatives->module~mqc_error proc~map_fragment_to_system_dipole_derivatives->module~mqc_physical_fragment proc~map_fragment_to_system_gradient map_fragment_to_system_gradient proc~map_fragment_to_system_gradient->module~mqc_error proc~map_fragment_to_system_gradient->module~mqc_physical_fragment proc~map_fragment_to_system_hessian map_fragment_to_system_hessian proc~map_fragment_to_system_hessian->module~mqc_error proc~map_fragment_to_system_hessian->module~mqc_physical_fragment proc~node_worker node_worker proc~node_worker->module~mqc_error proc~process_intersection_derivatives process_intersection_derivatives proc~process_intersection_derivatives->module~mqc_error proc~process_intersection_derivatives->module~mqc_config_parser proc~process_intersection_derivatives->module~mqc_gmbe_utils proc~process_intersection_derivatives->module~mqc_physical_fragment proc~process_intersection_derivatives->module~mqc_result_types proc~run_multi_molecule_calculations run_multi_molecule_calculations proc~run_multi_molecule_calculations->module~mqc_error proc~run_multi_molecule_calculations->module~mqc_config_adapter proc~run_multi_molecule_calculations->module~mqc_config_parser proc~serial_fragment_processor serial_fragment_processor proc~serial_fragment_processor->module~mqc_error proc~serial_fragment_processor->module~mqc_result_types proc~serial_gmbe_pie_processor serial_gmbe_pie_processor proc~serial_gmbe_pie_processor->module~mqc_error proc~serial_gmbe_pie_processor->module~mqc_physical_fragment proc~unfragmented_calculation unfragmented_calculation proc~unfragmented_calculation->module~mqc_error program~main main program~main->module~mqc_error program~main->module~mqc_config_adapter program~main->module~mqc_config_parser program~main->module~mqc_driver program~main->module~mqc_physical_fragment module~mqc_calculation_interface mqc_calculation_interface module~mqc_calculation_interface->module~mqc_config_parser module~mqc_calculation_interface->module~mqc_physical_fragment module~mqc_calculation_interface->module~mqc_result_types module~mqc_config_parser_basic_sections mqc_config_parser_basic_sections module~mqc_config_parser_basic_sections->module~mqc_config_parser module~mqc_config_parser_calc_settings mqc_config_parser_calc_settings module~mqc_config_parser_calc_settings->module~mqc_config_parser module~mqc_config_parser_fragments mqc_config_parser_fragments module~mqc_config_parser_fragments->module~mqc_config_parser module~mqc_config_parser_molecules mqc_config_parser_molecules module~mqc_config_parser_molecules->module~mqc_config_parser module~mqc_config_parser_structure mqc_config_parser_structure module~mqc_config_parser_structure->module~mqc_config_parser module~mqc_finite_differences mqc_finite_differences module~mqc_finite_differences->module~mqc_physical_fragment module~mqc_frag_utils->module~mqc_fragment_lookup module~mqc_frag_utils->module~mqc_gmbe_utils module~mqc_frag_utils->module~mqc_physical_fragment module~mqc_gmbe_fragment_distribution_scheme mqc_gmbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme->module~mqc_physical_fragment module~mqc_gmbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_gmbe_fragment_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_many_body_expansion->module~mqc_config_adapter module~mqc_many_body_expansion->module~mqc_physical_fragment module~mqc_mbe->module~mqc_gmbe_utils module~mqc_mbe->module~mqc_physical_fragment module~mqc_mbe->module~mqc_frag_utils module~mqc_mbe_io mqc_mbe_io module~mqc_mbe->module~mqc_mbe_io module~mqc_mbe_fragment_distribution_scheme->module~mqc_config_adapter module~mqc_mbe_fragment_distribution_scheme->module~mqc_physical_fragment module~mqc_mbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe_io module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_base module~mqc_method_factory mqc_method_factory module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_factory module~mqc_mbe_io->module~mqc_physical_fragment module~mqc_method_base->module~mqc_physical_fragment module~mqc_method_base->module~mqc_result_types module~mqc_method_dft mqc_method_dft module~mqc_method_dft->module~mqc_physical_fragment module~mqc_method_dft->module~mqc_result_types module~mqc_method_dft->module~mqc_method_base module~mqc_method_factory->module~mqc_method_xtb module~mqc_method_factory->module~mqc_method_base module~mqc_method_factory->module~mqc_method_dft module~mqc_method_hf mqc_method_hf module~mqc_method_factory->module~mqc_method_hf module~mqc_method_mcscf mqc_method_mcscf module~mqc_method_factory->module~mqc_method_mcscf module~mqc_method_hf->module~mqc_physical_fragment module~mqc_method_hf->module~mqc_result_types module~mqc_method_hf->module~mqc_method_base module~mqc_method_mcscf->module~mqc_physical_fragment module~mqc_method_mcscf->module~mqc_result_types module~mqc_method_mcscf->module~mqc_method_base proc~apply_distance_screening apply_distance_screening proc~apply_distance_screening->module~mqc_config_adapter proc~apply_distance_screening->module~mqc_physical_fragment proc~calculate_fragment_distances calculate_fragment_distances proc~calculate_fragment_distances->module~mqc_physical_fragment proc~check_fragment_overlap check_fragment_overlap proc~check_fragment_overlap->module~mqc_config_parser proc~compute_energy_and_forces compute_energy_and_forces proc~compute_energy_and_forces->module~mqc_config_adapter proc~compute_energy_and_forces->module~mqc_driver proc~compute_mbe_dipole compute_mbe_dipole proc~compute_mbe_dipole->module~mqc_result_types proc~compute_mbe_gradient compute_mbe_gradient proc~compute_mbe_gradient->module~mqc_result_types proc~compute_polymer_atoms compute_polymer_atoms proc~compute_polymer_atoms->module~mqc_physical_fragment proc~fragment_should_be_screened fragment_should_be_screened proc~fragment_should_be_screened->module~mqc_config_adapter proc~fragment_should_be_screened->module~mqc_physical_fragment proc~generate_intersections generate_intersections proc~generate_intersections->module~mqc_physical_fragment proc~generate_k_way_intersections_for_level generate_k_way_intersections_for_level proc~generate_k_way_intersections_for_level->module~mqc_physical_fragment proc~generate_polymer_intersections generate_polymer_intersections proc~generate_polymer_intersections->module~mqc_physical_fragment proc~global_coordinator global_coordinator proc~global_coordinator->module~mqc_result_types proc~gmbe_enumerate_pie_terms gmbe_enumerate_pie_terms proc~gmbe_enumerate_pie_terms->module~mqc_physical_fragment proc~initialize_fragmented_system initialize_fragmented_system proc~initialize_fragmented_system->module~mqc_config_parser proc~molecule_to_system_geometry molecule_to_system_geometry proc~molecule_to_system_geometry->module~mqc_config_parser proc~parse_connectivity_generic parse_connectivity_generic proc~parse_connectivity_generic->module~mqc_physical_fragment module~mqc_hessian_distribution_scheme mqc_hessian_distribution_scheme module~mqc_hessian_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_json_writer->module~mqc_mbe_io module~mqc_serial_fragment_processor mqc_serial_fragment_processor module~mqc_serial_fragment_processor->module~mqc_mbe_fragment_distribution_scheme module~mqc_unfragmented_workflow mqc_unfragmented_workflow module~mqc_unfragmented_workflow->module~mqc_mbe_fragment_distribution_scheme proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed proc~gmbe_run_distributed->module~mqc_gmbe_fragment_distribution_scheme proc~gmbe_run_distributed->module~mqc_mbe_fragment_distribution_scheme proc~gmbe_run_serial gmbe_context_t%gmbe_run_serial proc~gmbe_run_serial->module~mqc_gmbe_fragment_distribution_scheme proc~hessian_coordinator hessian_coordinator proc~hessian_coordinator->module~mqc_finite_differences proc~hessian_coordinator->module~mqc_method_base proc~hessian_coordinator->module~mqc_method_factory proc~hessian_worker hessian_worker proc~hessian_worker->module~mqc_finite_differences proc~hessian_worker->module~mqc_method_base proc~hessian_worker->module~mqc_method_factory proc~mbe_run_distributed mbe_context_t%mbe_run_distributed proc~mbe_run_distributed->module~mqc_mbe_fragment_distribution_scheme proc~mbe_run_serial mbe_context_t%mbe_run_serial proc~mbe_run_serial->module~mqc_mbe_fragment_distribution_scheme proc~xtb_calc_hessian xtb_method_t%xtb_calc_hessian proc~xtb_calc_hessian->module~mqc_finite_differences

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: ERROR_GENERIC = 1
integer, public, parameter :: ERROR_IO = 2
integer, public, parameter :: ERROR_PARSE = 3
integer, public, parameter :: ERROR_VALIDATION = 4

Stack trace configuration

integer, public, parameter :: SUCCESS = 0
integer, private, parameter :: MAX_LOCATION_LEN = 128

Unified error type with stack trace support

integer, private, parameter :: MAX_STACK_DEPTH = 20

Derived Types

type, public ::  error_t

Components

Type Visibility Attributes Name Initial
character(len=MAX_LOCATION_LEN), public :: call_stack(MAX_STACK_DEPTH)

Call locations

integer, public :: code = SUCCESS

Error code (0 = no error)

character(len=:), public, allocatable :: message

Error message

Read more…
integer, public :: stack_depth = 0

Current stack depth

Type-Bound Procedures

procedure, public :: add_context => error_add_context
procedure, public :: clear => error_clear
procedure, public :: get_code => error_get_code
procedure, public :: get_full_trace => error_get_full_trace
procedure, public :: get_message => error_get_message
procedure, public :: has_error => error_has_error
procedure, public :: print_trace => error_print_trace
procedure, public :: set => error_set

Functions

private pure function error_get_code(this) result(code)

Get the error code

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(in) :: this

Return Value integer

private function error_get_full_trace(this) result(trace)

Get complete error message with stack trace Returns a multi-line string with error and call stack

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(in) :: this

Return Value character(len=:), allocatable

private pure function error_get_message(this) result(message)

Get the error message (without stack trace)

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(in) :: this

Return Value character(len=:), allocatable

private pure function error_has_error(this) result(has_err)

Check if an error is set

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(in) :: this

Return Value logical


Subroutines

private pure subroutine error_add_context(this, location)

Add a call location to the stack trace Typically called when propagating errors upward

Read more…

Arguments

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

private pure subroutine error_clear(this)

Clear the error state and stack trace

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(inout) :: this

private subroutine error_print_trace(this, unit)

Print error with stack trace to specified unit If unit not specified, prints to stdout (unit 6)

Arguments

Type IntentOptional Attributes Name
class(error_t), intent(in) :: this
integer, intent(in), optional :: unit

private pure subroutine error_set(this, code, message)

Set an error with code and message Resets the stack trace

Arguments

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