mqc_frag_utils Module

Provides combinatorial functions and algorithms for generating molecular fragments, managing fragment lists, and performing many-body expansion calculations.

This module re-exports functionality from specialized modules: - mqc_combinatorics: Pure combinatorial mathematics - mqc_fragment_lookup: Hash-based fragment index lookup - mqc_gmbe_utils: GMBE intersection and PIE enumeration


Uses

  • module~~mqc_frag_utils~~UsesGraph module~mqc_frag_utils mqc_frag_utils 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_physical_fragment mqc_physical_fragment module~mqc_frag_utils->module~mqc_physical_fragment pic_io pic_io module~mqc_frag_utils->pic_io pic_logger pic_logger module~mqc_frag_utils->pic_logger pic_types pic_types module~mqc_frag_utils->pic_types module~mqc_combinatorics->pic_types module~mqc_fragment_lookup->pic_types module~mqc_error mqc_error module~mqc_fragment_lookup->module~mqc_error 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_combinatorics module~mqc_gmbe_utils->module~mqc_physical_fragment module~mqc_gmbe_utils->pic_io module~mqc_gmbe_utils->pic_logger module~mqc_gmbe_utils->pic_types module~mqc_gmbe_utils->module~mqc_error module~mqc_result_types mqc_result_types module~mqc_gmbe_utils->module~mqc_result_types module~mqc_physical_fragment->pic_types module~mqc_cgto mqc_cgto module~mqc_physical_fragment->module~mqc_cgto module~mqc_elements mqc_elements module~mqc_physical_fragment->module~mqc_elements module~mqc_physical_fragment->module~mqc_error module~mqc_geometry mqc_geometry 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_cgto->pic_types module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_geometry->pic_types module~mqc_physical_constants->pic_types module~mqc_result_types->pic_types module~mqc_result_types->module~mqc_error pic_mpi_lib pic_mpi_lib module~mqc_result_types->pic_mpi_lib module~mqc_xyz_reader->pic_types module~mqc_xyz_reader->module~mqc_error module~mqc_xyz_reader->module~mqc_geometry

Used by

  • module~~mqc_frag_utils~~UsedByGraph module~mqc_frag_utils mqc_frag_utils module~mqc_driver mqc_driver module~mqc_driver->module~mqc_frag_utils 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_mbe->module~mqc_frag_utils module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe proc~compute_energy_and_forces compute_energy_and_forces proc~compute_energy_and_forces->module~mqc_driver program~main main program~main->module~mqc_driver module~mpi_fragment_work_smod mpi_fragment_work_smod module~mpi_fragment_work_smod->module~mqc_mbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme mqc_gmbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_hessian_distribution_scheme mqc_hessian_distribution_scheme module~mqc_hessian_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme 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_mbe_fragment_distribution_scheme proc~gmbe_run_distributed->module~mqc_gmbe_fragment_distribution_scheme 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~gmbe_run_serial gmbe_context_t%gmbe_run_serial proc~gmbe_run_serial->module~mqc_gmbe_fragment_distribution_scheme

Functions

private function fragment_should_be_screened(fragment, n, sys_geom, driver_config) result(should_screen)

Check if a fragment should be screened out based on distance cutoffs. Returns true if the fragment itself OR any of its k-subsets (k >= 2) exceeds the corresponding k-mer cutoff. This ensures MBE subset consistency.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fragment(:)
integer, intent(in) :: n
type(system_geometry_t), intent(in) :: sys_geom
type(driver_config_t), intent(in) :: driver_config

Return Value logical


Subroutines

public subroutine apply_distance_screening(polymers, total_fragments, sys_geom, driver_config, max_level)

Apply distance-based screening to filter out fragments that exceed cutoff distances Modifies polymers array in-place and updates total_fragments count

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: polymers(:,:)
integer(kind=int64), intent(inout) :: total_fragments
type(system_geometry_t), intent(in) :: sys_geom
type(driver_config_t), intent(in) :: driver_config
integer, intent(in) :: max_level

public subroutine sort_fragments_by_size(polymers, total_fragments, max_level)

Sort fragments by size (largest first) for better load balancing Uses in-place sorting to reorder the polymers array Larger fragments (e.g., tetramers) are computed before smaller ones (e.g., dimers)

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: polymers(:,:)
integer(kind=int64), intent(in) :: total_fragments
integer, intent(in) :: max_level