main Program

Uses

  • program~~main~~UsesGraph program~main main module~mqc_config_adapter mqc_config_adapter program~main->module~mqc_config_adapter module~mqc_config_parser mqc_config_parser program~main->module~mqc_config_parser module~mqc_driver mqc_driver program~main->module~mqc_driver module~mqc_error mqc_error program~main->module~mqc_error module~mqc_io_helpers mqc_io_helpers program~main->module~mqc_io_helpers module~mqc_logo mqc_logo program~main->module~mqc_logo module~mqc_physical_fragment mqc_physical_fragment program~main->module~mqc_physical_fragment module~mqc_resources mqc_resources program~main->module~mqc_resources pic_io pic_io program~main->pic_io pic_knowledge pic_knowledge program~main->pic_knowledge pic_logger pic_logger program~main->pic_logger pic_mpi_lib pic_mpi_lib program~main->pic_mpi_lib pic_timer pic_timer program~main->pic_timer module~mqc_config_adapter->module~mqc_config_parser module~mqc_config_adapter->module~mqc_error module~mqc_config_adapter->module~mqc_physical_fragment module~mqc_config_adapter->pic_logger module~mqc_calculation_keywords mqc_calculation_keywords module~mqc_config_adapter->module~mqc_calculation_keywords module~mqc_elements mqc_elements module~mqc_config_adapter->module~mqc_elements module~mqc_method_config mqc_method_config module~mqc_config_adapter->module~mqc_method_config pic_types pic_types module~mqc_config_adapter->pic_types module~mqc_config_parser->module~mqc_error module~mqc_config_parser->module~mqc_physical_fragment module~mqc_calc_types mqc_calc_types module~mqc_config_parser->module~mqc_calc_types module~mqc_calculation_defaults mqc_calculation_defaults module~mqc_config_parser->module~mqc_calculation_defaults module~mqc_geometry mqc_geometry module~mqc_config_parser->module~mqc_geometry module~mqc_method_types mqc_method_types module~mqc_config_parser->module~mqc_method_types module~mqc_config_parser->pic_types module~mqc_driver->module~mqc_config_adapter module~mqc_driver->module~mqc_config_parser module~mqc_driver->module~mqc_error module~mqc_driver->module~mqc_io_helpers module~mqc_driver->module~mqc_physical_fragment module~mqc_driver->module~mqc_resources module~mqc_driver->pic_io module~mqc_driver->pic_logger module~mqc_driver->pic_mpi_lib module~mqc_driver->module~mqc_calc_types module~mqc_frag_utils mqc_frag_utils module~mqc_driver->module~mqc_frag_utils module~mqc_json mqc_json module~mqc_driver->module~mqc_json module~mqc_json_output_types mqc_json_output_types module~mqc_driver->module~mqc_json_output_types module~mqc_json_writer mqc_json_writer module~mqc_driver->module~mqc_json_writer 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_mbe_fragment_distribution_scheme mqc_mbe_fragment_distribution_scheme module~mqc_driver->module~mqc_mbe_fragment_distribution_scheme module~mqc_driver->module~mqc_method_config module~mqc_driver->module~mqc_method_types module~mqc_result_types mqc_result_types module~mqc_driver->module~mqc_result_types omp_lib omp_lib module~mqc_driver->omp_lib module~mqc_driver->pic_types module~mqc_physical_fragment->module~mqc_error module~mqc_cgto mqc_cgto module~mqc_physical_fragment->module~mqc_cgto module~mqc_physical_fragment->module~mqc_elements module~mqc_physical_fragment->module~mqc_geometry module~mqc_physical_constants mqc_physical_constants module~mqc_physical_fragment->module~mqc_physical_constants module~mqc_xyz_reader mqc_xyz_reader module~mqc_physical_fragment->module~mqc_xyz_reader module~mqc_physical_fragment->pic_types module~mqc_mpi_comms mqc_mpi_comms module~mqc_resources->module~mqc_mpi_comms module~mqc_calc_types->pic_types module~mqc_calculation_defaults->pic_types module~mqc_calculation_keywords->module~mqc_calculation_defaults module~mqc_calculation_keywords->pic_types module~mqc_cgto->pic_types module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_frag_utils->module~mqc_physical_fragment module~mqc_frag_utils->pic_io module~mqc_frag_utils->pic_logger module~mqc_frag_utils->pic_types module~mqc_combinatorics mqc_combinatorics module~mqc_frag_utils->module~mqc_combinatorics module~mqc_fragment_lookup mqc_fragment_lookup module~mqc_frag_utils->module~mqc_fragment_lookup module~mqc_gmbe_utils mqc_gmbe_utils module~mqc_frag_utils->module~mqc_gmbe_utils module~mqc_geometry->pic_types module~mqc_json->pic_io module~mqc_json->pic_logger module~mqc_json_output_types->pic_types module~mqc_thermochemistry mqc_thermochemistry module~mqc_json_output_types->module~mqc_thermochemistry module~mqc_json_writer->module~mqc_io_helpers module~mqc_json_writer->pic_logger module~mqc_json_writer->module~mqc_json_output_types module~mqc_json_writer->module~mqc_physical_constants module~mqc_json_writer->pic_types json_module json_module module~mqc_json_writer->json_module module~mqc_mbe_io mqc_mbe_io module~mqc_json_writer->module~mqc_mbe_io module~mqc_program_limits mqc_program_limits module~mqc_json_writer->module~mqc_program_limits module~mqc_many_body_expansion->module~mqc_config_adapter module~mqc_many_body_expansion->module~mqc_physical_fragment module~mqc_many_body_expansion->module~mqc_resources module~mqc_many_body_expansion->module~mqc_json_output_types module~mqc_many_body_expansion->module~mqc_method_config module~mqc_many_body_expansion->pic_types module~mqc_mbe->module~mqc_physical_fragment module~mqc_mbe->pic_io module~mqc_mbe->pic_logger module~mqc_mbe->pic_mpi_lib module~mqc_mbe->pic_timer module~mqc_mbe->module~mqc_frag_utils module~mqc_mbe->module~mqc_json_output_types module~mqc_mbe->pic_types module~mqc_mbe->module~mqc_gmbe_utils module~mqc_mbe->module~mqc_mbe_io module~mqc_mpi_tags mqc_mpi_tags module~mqc_mbe->module~mqc_mpi_tags module~mqc_mbe->module~mqc_program_limits module~mqc_mbe->module~mqc_thermochemistry module~mqc_vibrational_analysis mqc_vibrational_analysis module~mqc_mbe->module~mqc_vibrational_analysis 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_resources module~mqc_mbe_fragment_distribution_scheme->pic_io module~mqc_mbe_fragment_distribution_scheme->pic_logger module~mqc_mbe_fragment_distribution_scheme->pic_mpi_lib module~mqc_mbe_fragment_distribution_scheme->pic_timer module~mqc_mbe_fragment_distribution_scheme->module~mqc_calc_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_calculation_defaults module~mqc_mbe_fragment_distribution_scheme->module~mqc_json_output_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_config module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_mbe_fragment_distribution_scheme->omp_lib module~mqc_mbe_fragment_distribution_scheme->pic_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe_io module~mqc_method_base mqc_method_base 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_fragment_distribution_scheme->module~mqc_mpi_tags pic_blas_interfaces pic_blas_interfaces module~mqc_mbe_fragment_distribution_scheme->pic_blas_interfaces module~mqc_method_config->module~mqc_method_types module~mqc_method_config->pic_types module~mqc_method_types->pic_types module~mqc_mpi_comms->pic_mpi_lib module~mqc_physical_constants->pic_types module~mqc_result_types->module~mqc_error module~mqc_result_types->pic_mpi_lib module~mqc_result_types->pic_types module~mqc_xyz_reader->module~mqc_error module~mqc_xyz_reader->module~mqc_geometry module~mqc_xyz_reader->pic_types module~mqc_combinatorics->pic_types module~mqc_fragment_lookup->module~mqc_error module~mqc_fragment_lookup->pic_types pic_hash_32bit pic_hash_32bit module~mqc_fragment_lookup->pic_hash_32bit pic_sorting pic_sorting module~mqc_fragment_lookup->pic_sorting module~mqc_gmbe_utils->module~mqc_error module~mqc_gmbe_utils->module~mqc_physical_fragment module~mqc_gmbe_utils->pic_io module~mqc_gmbe_utils->pic_logger module~mqc_gmbe_utils->module~mqc_result_types module~mqc_gmbe_utils->pic_types module~mqc_gmbe_utils->module~mqc_combinatorics module~mqc_mbe_io->module~mqc_physical_fragment module~mqc_mbe_io->pic_io module~mqc_mbe_io->pic_logger module~mqc_mbe_io->module~mqc_elements module~mqc_mbe_io->pic_types module~mqc_method_base->module~mqc_physical_fragment module~mqc_method_base->module~mqc_result_types module~mqc_method_base->pic_types module~mqc_method_factory->module~mqc_method_config module~mqc_method_factory->module~mqc_method_types module~mqc_method_factory->pic_types module~mqc_method_factory->module~mqc_method_base mctc_env mctc_env module~mqc_method_factory->mctc_env module~mqc_method_dft mqc_method_dft 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_xtb mqc_method_xtb module~mqc_method_factory->module~mqc_method_xtb module~mqc_mpi_tags->pic_types module~mqc_program_limits->pic_types module~mqc_thermochemistry->pic_io module~mqc_thermochemistry->pic_logger module~mqc_thermochemistry->module~mqc_elements module~mqc_thermochemistry->module~mqc_physical_constants module~mqc_thermochemistry->pic_types pic_lapack_interfaces pic_lapack_interfaces module~mqc_thermochemistry->pic_lapack_interfaces module~mqc_vibrational_analysis->pic_logger module~mqc_vibrational_analysis->module~mqc_elements module~mqc_vibrational_analysis->module~mqc_physical_constants module~mqc_vibrational_analysis->pic_types module~mqc_vibrational_analysis->module~mqc_thermochemistry module~mqc_vibrational_analysis->pic_lapack_interfaces module~mqc_method_dft->module~mqc_physical_fragment module~mqc_method_dft->module~mqc_result_types module~mqc_method_dft->pic_types module~mqc_method_dft->module~mqc_method_base module~mqc_method_hf->module~mqc_physical_fragment module~mqc_method_hf->module~mqc_result_types module~mqc_method_hf->pic_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->pic_types module~mqc_method_mcscf->module~mqc_method_base module~mqc_method_xtb->module~mqc_error module~mqc_method_xtb->module~mqc_physical_fragment module~mqc_method_xtb->pic_logger module~mqc_method_xtb->pic_timer module~mqc_method_xtb->module~mqc_result_types module~mqc_method_xtb->pic_types module~mqc_method_xtb->module~mqc_method_base module~mqc_method_xtb->mctc_env mctc_io mctc_io module~mqc_method_xtb->mctc_io tblite_container tblite_container module~mqc_method_xtb->tblite_container tblite_context_type tblite_context_type module~mqc_method_xtb->tblite_context_type tblite_solvation tblite_solvation module~mqc_method_xtb->tblite_solvation tblite_wavefunction tblite_wavefunction module~mqc_method_xtb->tblite_wavefunction tblite_xtb_calculator tblite_xtb_calculator module~mqc_method_xtb->tblite_xtb_calculator tblite_xtb_gfn1 tblite_xtb_gfn1 module~mqc_method_xtb->tblite_xtb_gfn1 tblite_xtb_gfn2 tblite_xtb_gfn2 module~mqc_method_xtb->tblite_xtb_gfn2 tblite_xtb_singlepoint tblite_xtb_singlepoint module~mqc_method_xtb->tblite_xtb_singlepoint

Orchestrates MPI initialization, input parsing, geometry loading, and dispatches to appropriate calculation routines (fragmented or unfragmented).


Calls

program~~main~~CallsGraph program~main main abort_comm abort_comm program~main->abort_comm comm_world comm_world program~main->comm_world configure configure program~main->configure error error program~main->error finalize finalize program~main->finalize get_elapsed_time get_elapsed_time program~main->get_elapsed_time get_knowledge get_knowledge program~main->get_knowledge info info program~main->info pic_mpi_finalize pic_mpi_finalize program~main->pic_mpi_finalize pic_mpi_init pic_mpi_init program~main->pic_mpi_init proc~config_to_driver config_to_driver program~main->proc~config_to_driver proc~config_to_system_geometry config_to_system_geometry program~main->proc~config_to_system_geometry proc~ends_with ends_with program~main->proc~ends_with proc~error_get_message error_t%error_get_message program~main->proc~error_get_message proc~error_has_error error_t%error_has_error program~main->proc~error_has_error proc~get_logger_level get_logger_level program~main->proc~get_logger_level proc~print_logo print_logo program~main->proc~print_logo proc~read_mqc_file read_mqc_file program~main->proc~read_mqc_file proc~run_calculation run_calculation program~main->proc~run_calculation proc~run_multi_molecule_calculations run_multi_molecule_calculations program~main->proc~run_multi_molecule_calculations proc~set_output_json_filename set_output_json_filename program~main->proc~set_output_json_filename proc~system_destroy system_geometry_t%system_destroy program~main->proc~system_destroy split split program~main->split start start program~main->start to_char to_char program~main->to_char proc~xtb_configure xtb_config_t%xtb_configure proc~config_to_driver->proc~xtb_configure proc~config_to_system_geometry->proc~error_has_error proc~error_add_context error_t%error_add_context proc~config_to_system_geometry->proc~error_add_context proc~error_set error_t%error_set proc~config_to_system_geometry->proc~error_set proc~geometry_to_system_fragmented geometry_to_system_fragmented proc~config_to_system_geometry->proc~geometry_to_system_fragmented proc~geometry_to_system_unfragmented geometry_to_system_unfragmented proc~config_to_system_geometry->proc~geometry_to_system_unfragmented proc~molecule_to_system_geometry molecule_to_system_geometry proc~config_to_system_geometry->proc~molecule_to_system_geometry warning warning proc~get_logger_level->warning proc~read_mqc_file->proc~error_has_error interface~parse_aimd_section parse_aimd_section proc~read_mqc_file->interface~parse_aimd_section interface~parse_connectivity_section parse_connectivity_section proc~read_mqc_file->interface~parse_connectivity_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_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_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_structure_section parse_structure_section proc~read_mqc_file->interface~parse_structure_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 proc~read_mqc_file->proc~error_add_context proc~read_mqc_file->proc~error_set proc~skip_to_end skip_to_end proc~read_mqc_file->proc~skip_to_end proc~run_calculation->info proc~run_calculation->to_char omp_set_num_threads omp_set_num_threads proc~run_calculation->omp_set_num_threads proc~config_log_settings method_config_t%config_log_settings proc~run_calculation->proc~config_log_settings proc~json_output_data_destroy json_output_data_t%json_output_data_destroy proc~run_calculation->proc~json_output_data_destroy proc~run_fragmented_calculation run_fragmented_calculation proc~run_calculation->proc~run_fragmented_calculation proc~run_unfragmented_calculation run_unfragmented_calculation proc~run_calculation->proc~run_unfragmented_calculation proc~write_json_output write_json_output proc~run_calculation->proc~write_json_output proc~run_calculation->warning proc~run_multi_molecule_calculations->abort_comm proc~run_multi_molecule_calculations->error proc~run_multi_molecule_calculations->info proc~run_multi_molecule_calculations->proc~config_to_driver proc~run_multi_molecule_calculations->proc~config_to_system_geometry proc~run_multi_molecule_calculations->proc~error_has_error proc~run_multi_molecule_calculations->proc~run_calculation proc~run_multi_molecule_calculations->proc~system_destroy proc~run_multi_molecule_calculations->to_char barrier barrier proc~run_multi_molecule_calculations->barrier proc~run_multi_molecule_calculations->proc~error_add_context proc~error_get_full_trace error_t%error_get_full_trace proc~run_multi_molecule_calculations->proc~error_get_full_trace proc~get_output_json_filename get_output_json_filename proc~run_multi_molecule_calculations->proc~get_output_json_filename proc~merge_multi_molecule_json merge_multi_molecule_json proc~run_multi_molecule_calculations->proc~merge_multi_molecule_json proc~set_molecule_suffix set_molecule_suffix proc~run_multi_molecule_calculations->proc~set_molecule_suffix verbose verbose proc~run_multi_molecule_calculations->verbose proc~parse_aimd_section parse_aimd_section interface~parse_aimd_section->proc~parse_aimd_section proc~parse_connectivity_section parse_connectivity_section interface~parse_connectivity_section->proc~parse_connectivity_section proc~parse_driver_section parse_driver_section interface~parse_driver_section->proc~parse_driver_section proc~parse_fragmentation_section parse_fragmentation_section interface~parse_fragmentation_section->proc~parse_fragmentation_section proc~parse_fragments_section parse_fragments_section interface~parse_fragments_section->proc~parse_fragments_section proc~parse_geometry_section parse_geometry_section interface~parse_geometry_section->proc~parse_geometry_section proc~parse_hessian_section parse_hessian_section interface~parse_hessian_section->proc~parse_hessian_section proc~parse_model_section parse_model_section interface~parse_model_section->proc~parse_model_section proc~parse_molecules_section parse_molecules_section interface~parse_molecules_section->proc~parse_molecules_section proc~parse_scf_section parse_scf_section interface~parse_scf_section->proc~parse_scf_section proc~parse_schema_section parse_schema_section interface~parse_schema_section->proc~parse_schema_section proc~parse_structure_section parse_structure_section interface~parse_structure_section->proc~parse_structure_section proc~parse_system_section parse_system_section interface~parse_system_section->proc~parse_system_section proc~parse_xtb_section parse_xtb_section interface~parse_xtb_section->proc~parse_xtb_section proc~config_log_settings->info proc~xtb_get_solvation_info xtb_config_t%xtb_get_solvation_info proc~config_log_settings->proc~xtb_get_solvation_info proc~error_get_full_trace->proc~error_has_error proc~initialize_fragmented_system initialize_fragmented_system proc~geometry_to_system_fragmented->proc~initialize_fragmented_system proc~element_symbol_to_number element_symbol_to_number proc~geometry_to_system_unfragmented->proc~element_symbol_to_number proc~to_bohr to_bohr proc~geometry_to_system_unfragmented->proc~to_bohr proc~json_output_data_reset json_output_data_t%json_output_data_reset proc~json_output_data_destroy->proc~json_output_data_reset proc~merge_multi_molecule_json->error proc~merge_multi_molecule_json->info proc~merge_multi_molecule_json->to_char proc~read_json_content read_json_content proc~merge_multi_molecule_json->proc~read_json_content proc~molecule_to_system_geometry->proc~error_set proc~molecule_to_system_geometry->proc~geometry_to_system_unfragmented proc~molecule_to_system_geometry->proc~initialize_fragmented_system proc~run_fragmented_calculation->abort_comm proc~run_fragmented_calculation->error proc~run_fragmented_calculation->info proc~run_fragmented_calculation->proc~error_get_message proc~run_fragmented_calculation->proc~error_has_error proc~run_fragmented_calculation->to_char allgather allgather proc~run_fragmented_calculation->allgather bcast bcast proc~run_fragmented_calculation->bcast destroy destroy proc~run_fragmented_calculation->destroy init init proc~run_fragmented_calculation->init proc~apply_distance_screening apply_distance_screening proc~run_fragmented_calculation->proc~apply_distance_screening proc~binomial binomial proc~run_fragmented_calculation->proc~binomial proc~combine combine proc~run_fragmented_calculation->proc~combine proc~create_monomer_list create_monomer_list proc~run_fragmented_calculation->proc~create_monomer_list proc~generate_fragment_list generate_fragment_list proc~run_fragmented_calculation->proc~generate_fragment_list proc~get_nfrags get_nfrags proc~run_fragmented_calculation->proc~get_nfrags proc~gmbe_enumerate_pie_terms gmbe_enumerate_pie_terms proc~run_fragmented_calculation->proc~gmbe_enumerate_pie_terms proc~sort_fragments_by_size sort_fragments_by_size proc~run_fragmented_calculation->proc~sort_fragments_by_size run_distributed run_distributed proc~run_fragmented_calculation->run_distributed run_serial run_serial proc~run_fragmented_calculation->run_serial proc~run_unfragmented_calculation->info proc~run_unfragmented_calculation->to_char proc~run_unfragmented_calculation->verbose interface~distributed_unfragmented_hessian distributed_unfragmented_hessian proc~run_unfragmented_calculation->interface~distributed_unfragmented_hessian interface~unfragmented_calculation unfragmented_calculation proc~run_unfragmented_calculation->interface~unfragmented_calculation proc~calc_type_to_string calc_type_to_string proc~run_unfragmented_calculation->proc~calc_type_to_string proc~skip_to_end->proc~error_set proc~strip_comment strip_comment proc~skip_to_end->proc~strip_comment proc~write_json_output->error proc~write_gmbe_pie_json_impl write_gmbe_pie_json_impl proc~write_json_output->proc~write_gmbe_pie_json_impl proc~write_mbe_breakdown_json_impl write_mbe_breakdown_json_impl proc~write_json_output->proc~write_mbe_breakdown_json_impl proc~write_unfragmented_json_impl write_unfragmented_json_impl proc~write_json_output->proc~write_unfragmented_json_impl proc~write_vibrational_json_impl write_vibrational_json_impl proc~write_json_output->proc~write_vibrational_json_impl proc~distributed_unfragmented_hessian distributed_unfragmented_hessian interface~distributed_unfragmented_hessian->proc~distributed_unfragmented_hessian proc~unfragmented_calculation unfragmented_calculation interface~unfragmented_calculation->proc~unfragmented_calculation proc~apply_distance_screening->info proc~apply_distance_screening->to_char proc~fragment_should_be_screened fragment_should_be_screened proc~apply_distance_screening->proc~fragment_should_be_screened proc~combine_util combine_util proc~combine->proc~combine_util to_lower to_lower proc~element_symbol_to_number->to_lower to_upper to_upper proc~element_symbol_to_number->to_upper proc~generate_fragment_list->proc~combine proc~get_nfrags->proc~binomial proc~gmbe_enumerate_pie_terms->info proc~gmbe_enumerate_pie_terms->proc~error_has_error proc~gmbe_enumerate_pie_terms->to_char proc~gmbe_enumerate_pie_terms->proc~error_set atom_list atom_list proc~gmbe_enumerate_pie_terms->atom_list proc~compute_polymer_atoms compute_polymer_atoms proc~gmbe_enumerate_pie_terms->proc~compute_polymer_atoms proc~dfs_pie_accumulate dfs_pie_accumulate proc~gmbe_enumerate_pie_terms->proc~dfs_pie_accumulate proc~initialize_fragmented_system->proc~error_has_error proc~initialize_fragmented_system->proc~error_add_context proc~initialize_fragmented_system->proc~element_symbol_to_number proc~initialize_fragmented_system->proc~to_bohr proc~check_fragment_overlap check_fragment_overlap proc~initialize_fragmented_system->proc~check_fragment_overlap proc~parse_aimd_section->proc~error_set proc~parse_aimd_section->proc~strip_comment interface~parse_connectivity_generic parse_connectivity_generic proc~parse_connectivity_section->interface~parse_connectivity_generic proc~parse_driver_section->proc~error_set proc~parse_driver_section->proc~strip_comment proc~calc_type_from_string calc_type_from_string proc~parse_driver_section->proc~calc_type_from_string proc~parse_fragmentation_section->proc~error_has_error proc~parse_fragmentation_section->proc~error_add_context proc~parse_fragmentation_section->proc~error_set proc~parse_fragmentation_section->proc~strip_comment proc~validate_cutoffs validate_cutoffs proc~parse_fragmentation_section->proc~validate_cutoffs interface~parse_fragments_generic parse_fragments_generic proc~parse_fragments_section->interface~parse_fragments_generic interface~parse_geometry_generic parse_geometry_generic proc~parse_geometry_section->interface~parse_geometry_generic proc~parse_hessian_section->proc~error_set proc~parse_hessian_section->proc~strip_comment proc~parse_model_section->proc~error_set proc~parse_model_section->proc~strip_comment proc~parse_method_string parse_method_string proc~parse_model_section->proc~parse_method_string proc~parse_molecules_section->proc~error_has_error proc~parse_molecules_section->proc~error_add_context proc~parse_molecules_section->proc~error_set proc~parse_molecules_section->proc~skip_to_end proc~parse_molecules_section->proc~strip_comment proc~parse_single_molecule parse_single_molecule proc~parse_molecules_section->proc~parse_single_molecule proc~parse_scf_section->proc~error_set proc~parse_scf_section->proc~strip_comment proc~parse_schema_section->proc~error_set proc~parse_schema_section->proc~strip_comment interface~parse_structure_generic parse_structure_generic proc~parse_structure_section->interface~parse_structure_generic proc~parse_system_section->proc~error_set proc~parse_system_section->proc~strip_comment proc~parse_xtb_section->proc~error_set proc~parse_xtb_section->proc~strip_comment proc~read_json_content->error proc~get_molecule_name get_molecule_name proc~read_json_content->proc~get_molecule_name proc~sort_fragments_by_size->info sort_index sort_index proc~sort_fragments_by_size->sort_index proc~write_gmbe_pie_json_impl->error proc~write_gmbe_pie_json_impl->info proc~write_gmbe_pie_json_impl->proc~get_output_json_filename proc~write_gmbe_pie_json_impl->destroy add add proc~write_gmbe_pie_json_impl->add create_array create_array proc~write_gmbe_pie_json_impl->create_array create_object create_object proc~write_gmbe_pie_json_impl->create_object initialize initialize proc~write_gmbe_pie_json_impl->initialize proc~get_basename get_basename proc~write_gmbe_pie_json_impl->proc~get_basename proc~write_mbe_breakdown_json_impl->error proc~write_mbe_breakdown_json_impl->info proc~write_mbe_breakdown_json_impl->proc~get_output_json_filename proc~write_mbe_breakdown_json_impl->warning proc~write_mbe_breakdown_json_impl->destroy proc~write_mbe_breakdown_json_impl->add proc~write_mbe_breakdown_json_impl->create_array proc~write_mbe_breakdown_json_impl->create_object proc~write_mbe_breakdown_json_impl->initialize proc~write_mbe_breakdown_json_impl->proc~get_basename proc~get_frag_level_name get_frag_level_name proc~write_mbe_breakdown_json_impl->proc~get_frag_level_name proc~write_unfragmented_json_impl->error proc~write_unfragmented_json_impl->info proc~write_unfragmented_json_impl->proc~get_output_json_filename proc~write_unfragmented_json_impl->destroy proc~write_unfragmented_json_impl->add proc~write_unfragmented_json_impl->create_object proc~write_unfragmented_json_impl->initialize proc~write_unfragmented_json_impl->proc~get_basename proc~write_vibrational_json_impl->error proc~write_vibrational_json_impl->info proc~write_vibrational_json_impl->proc~get_output_json_filename proc~write_vibrational_json_impl->destroy proc~write_vibrational_json_impl->add proc~write_vibrational_json_impl->create_object proc~write_vibrational_json_impl->initialize proc~write_vibrational_json_impl->proc~get_basename proc~xtb_get_solvation_info->to_char proc~xtb_has_solvation xtb_config_t%xtb_has_solvation proc~xtb_get_solvation_info->proc~xtb_has_solvation proc~parse_connectivity_generic parse_connectivity_generic interface~parse_connectivity_generic->proc~parse_connectivity_generic proc~parse_fragments_generic parse_fragments_generic interface~parse_fragments_generic->proc~parse_fragments_generic proc~parse_geometry_generic parse_geometry_generic interface~parse_geometry_generic->proc~parse_geometry_generic proc~parse_structure_generic parse_structure_generic interface~parse_structure_generic->proc~parse_structure_generic proc~check_fragment_overlap->to_char proc~check_fragment_overlap->proc~error_set proc~combine_util->proc~combine_util proc~dfs_pie_accumulate->proc~error_has_error proc~dfs_pie_accumulate->proc~dfs_pie_accumulate new_clique new_clique proc~dfs_pie_accumulate->new_clique proc~atom_sets_equal atom_sets_equal proc~dfs_pie_accumulate->proc~atom_sets_equal proc~grow_pie_storage grow_pie_storage proc~dfs_pie_accumulate->proc~grow_pie_storage proc~intersect_atom_lists intersect_atom_lists proc~dfs_pie_accumulate->proc~intersect_atom_lists test_intersect test_intersect proc~dfs_pie_accumulate->test_intersect proc~distributed_unfragmented_hessian->barrier interface~hessian_coordinator hessian_coordinator proc~distributed_unfragmented_hessian->interface~hessian_coordinator interface~hessian_worker hessian_worker proc~distributed_unfragmented_hessian->interface~hessian_worker proc~calculate_monomer_distance calculate_monomer_distance proc~fragment_should_be_screened->proc~calculate_monomer_distance proc~get_next_combination get_next_combination proc~fragment_should_be_screened->proc~get_next_combination proc~method_type_from_string method_type_from_string proc~parse_method_string->proc~method_type_from_string proc~parse_single_molecule->proc~error_has_error proc~parse_single_molecule->proc~error_add_context proc~parse_single_molecule->proc~error_set proc~parse_single_molecule->proc~skip_to_end proc~parse_single_molecule->proc~strip_comment 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~unfragmented_calculation->error proc~unfragmented_calculation->info proc~unfragmented_calculation->proc~error_get_message proc~unfragmented_calculation->proc~error_has_error proc~unfragmented_calculation->to_char proc~unfragmented_calculation->proc~error_get_full_trace cart_disp cart_disp proc~unfragmented_calculation->cart_disp configuration configuration proc~unfragmented_calculation->configuration eigenvalues eigenvalues proc~unfragmented_calculation->eigenvalues fc_mdyne fc_mdyne proc~unfragmented_calculation->fc_mdyne force_constants force_constants proc~unfragmented_calculation->force_constants frequencies frequencies proc~unfragmented_calculation->frequencies interface~do_fragment_work do_fragment_work proc~unfragmented_calculation->interface~do_fragment_work ir_intensities ir_intensities proc~unfragmented_calculation->ir_intensities proc~check_duplicate_atoms check_duplicate_atoms proc~unfragmented_calculation->proc~check_duplicate_atoms proc~compute_thermochemistry compute_thermochemistry proc~unfragmented_calculation->proc~compute_thermochemistry proc~compute_vibrational_analysis compute_vibrational_analysis proc~unfragmented_calculation->proc~compute_vibrational_analysis proc~compute_vibrational_frequencies compute_vibrational_frequencies proc~unfragmented_calculation->proc~compute_vibrational_frequencies proc~energy_total energy_t%energy_total proc~unfragmented_calculation->proc~energy_total proc~fragment_compute_nelec physical_fragment_t%fragment_compute_nelec proc~unfragmented_calculation->proc~fragment_compute_nelec proc~print_vibrational_analysis print_vibrational_analysis proc~unfragmented_calculation->proc~print_vibrational_analysis proc~result_destroy calculation_result_t%result_destroy proc~unfragmented_calculation->proc~result_destroy projected_hessian projected_hessian proc~unfragmented_calculation->projected_hessian reduced_masses reduced_masses proc~unfragmented_calculation->reduced_masses proc~validate_cutoffs->proc~error_set

Variables

Type Attributes Name Initial
type(driver_config_t) :: config

Driver configuration

character(len=:), allocatable :: errmsg

Error messages for file I/O

type(error_t) :: error

Error handling

character(len=256) :: input_file

Input file name

type(mqc_config_t) :: mqc_config

Parsed .mqc file

type(timer_type) :: my_timer

Execution timing

type(resources_t) :: resources

Resources container (MPI comms, etc.)

integer :: stat

Status code for file I/O

type(system_geometry_t) :: sys_geom

Loaded molecular system


Source Code

program main
   !! Orchestrates MPI initialization, input parsing, geometry loading,
   !! and dispatches to appropriate calculation routines (fragmented or unfragmented).
   use pic_logger, only: logger => global_logger, info_level
   use pic_io, only: to_char
   use pic_mpi_lib, only: pic_mpi_init, comm_world, abort_comm, pic_mpi_finalize
   use mqc_resources, only: resources_t
   use mqc_driver, only: run_calculation, run_multi_molecule_calculations
   use mqc_physical_fragment, only: system_geometry_t
   use mqc_config_parser, only: mqc_config_t, read_mqc_file
   use mqc_config_adapter, only: driver_config_t, config_to_driver, config_to_system_geometry, get_logger_level
   use mqc_io_helpers, only: set_output_json_filename, ends_with
   use mqc_logo, only: print_logo
   use pic_timer, only: timer_type
   use mqc_error, only: error_t
   use pic_knowledge, only: get_knowledge
   implicit none

   type(timer_type) :: my_timer      !! Execution timing
   type(resources_t) :: resources    !! Resources container (MPI comms, etc.)
   type(driver_config_t) :: config   !! Driver configuration
   type(mqc_config_t) :: mqc_config  !! Parsed .mqc file
   type(system_geometry_t) :: sys_geom  !! Loaded molecular system
   type(error_t) :: error            !! Error handling
   integer :: stat                   !! Status code for file I/O
   character(len=:), allocatable :: errmsg  !! Error messages for file I/O
   character(len=256) :: input_file  !! Input file name

   ! Initialize MPI
   ! pic-mpi will call mpi_init_thread when needed
   call pic_mpi_init()

   ! Create communicators
   resources%mpi_comms%world_comm = comm_world()
   resources%mpi_comms%node_comm = resources%mpi_comms%world_comm%split()

   if (resources%mpi_comms%world_comm%rank() == 0) then
      call print_logo()
      call my_timer%start()
   end if

   ! Parse command line arguments
   if (command_argument_count() == 0) then
      if (resources%mpi_comms%world_comm%rank() == 0) then
         call logger%error("No input file specified. Usage: mqc input_file.mqc")
      end if
      call abort_comm(resources%mpi_comms%world_comm, 1)
   else if (command_argument_count() == 1) then
      call get_command_argument(1, input_file, status=stat)
      if (stat /= 0) then
         if (resources%mpi_comms%world_comm%rank() == 0) then
            call logger%error("Error reading command line argument")
         end if
         call abort_comm(resources%mpi_comms%world_comm, 1)
      end if
      input_file = trim(input_file)

      call set_output_json_filename(input_file)
      ! Validate file extension
      if (.not. ends_with(input_file, '.mqc')) then
         if (resources%mpi_comms%world_comm%rank() == 0) then
            call logger%error("Invalid input file extension. Expected .mqc")
         end if
         call abort_comm(resources%mpi_comms%world_comm, 1)
      end if
   else
      if (resources%mpi_comms%world_comm%rank() == 0) then
         call logger%error("Too many arguments. Usage: metalquicha [input_file.mqc]")
      end if
      call abort_comm(resources%mpi_comms%world_comm, 1)
   end if

   ! Parse .mqc input file
   if (resources%mpi_comms%world_comm%rank() == 0) then
      call logger%info("Reading input file: "//trim(input_file))
   end if

   call read_mqc_file(input_file, mqc_config, error)
   if (error%has_error()) then
      if (resources%mpi_comms%world_comm%rank() == 0) then
         call logger%error("Error reading .mqc file: "//error%get_message())
      end if
      call abort_comm(resources%mpi_comms%world_comm, 1)
   end if

   ! Configure logger
   if (allocated(mqc_config%log_level)) then
      call logger%configure(get_logger_level(mqc_config%log_level))
      if (resources%mpi_comms%world_comm%rank() == 0) then
         call logger%info("Logger verbosity set to: "//trim(mqc_config%log_level))
      end if
   end if

   ! Handle single vs multiple molecules
   if (mqc_config%nmol == 0) then
      ! Single molecule mode (backward compatible)
      call config_to_driver(mqc_config, config)
      call config_to_system_geometry(mqc_config, sys_geom, error)
      if (error%has_error()) then
         if (resources%mpi_comms%world_comm%rank() == 0) then
            call logger%error("Error converting geometry: "//error%get_message())
         end if
         call abort_comm(resources%mpi_comms%world_comm, 1)
      end if

      call run_calculation(resources, config, sys_geom, mqc_config%bonds)
      call sys_geom%destroy()
   else
      ! Multi-molecule mode: loop over all molecules
      call run_multi_molecule_calculations(resources, mqc_config)
   end if

   if (resources%mpi_comms%world_comm%rank() == 0) then
      call get_knowledge()
      call my_timer%stop()
      call logger%info("Total processing time: "//to_char(my_timer%get_elapsed_time())//" s")
   end if

   call mqc_config%destroy()
   call resources%mpi_comms%world_comm%finalize()
   call resources%mpi_comms%node_comm%finalize()
   call pic_mpi_finalize()

end program main