mqc_many_body_expansion Module

Provides an abstract base class for all many-body expansion methods with concrete implementations for standard MBE and generalized MBE (GMBE).


Uses

  • module~~mqc_many_body_expansion~~UsesGraph module~mqc_many_body_expansion mqc_many_body_expansion module~mqc_config_adapter mqc_config_adapter module~mqc_many_body_expansion->module~mqc_config_adapter module~mqc_json_output_types mqc_json_output_types module~mqc_many_body_expansion->module~mqc_json_output_types module~mqc_method_config mqc_method_config module~mqc_many_body_expansion->module~mqc_method_config module~mqc_physical_fragment mqc_physical_fragment module~mqc_many_body_expansion->module~mqc_physical_fragment module~mqc_resources mqc_resources module~mqc_many_body_expansion->module~mqc_resources pic_types pic_types module~mqc_many_body_expansion->pic_types module~mqc_config_adapter->module~mqc_method_config module~mqc_config_adapter->module~mqc_physical_fragment module~mqc_config_adapter->pic_types module~mqc_calculation_keywords mqc_calculation_keywords module~mqc_config_adapter->module~mqc_calculation_keywords module~mqc_config_parser mqc_config_parser module~mqc_config_adapter->module~mqc_config_parser module~mqc_elements mqc_elements module~mqc_config_adapter->module~mqc_elements module~mqc_error mqc_error module~mqc_config_adapter->module~mqc_error pic_logger pic_logger module~mqc_config_adapter->pic_logger module~mqc_json_output_types->pic_types module~mqc_thermochemistry mqc_thermochemistry module~mqc_json_output_types->module~mqc_thermochemistry module~mqc_method_config->pic_types module~mqc_method_types mqc_method_types module~mqc_method_config->module~mqc_method_types module~mqc_physical_fragment->pic_types 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_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_mpi_comms mqc_mpi_comms module~mqc_resources->module~mqc_mpi_comms module~mqc_calculation_keywords->pic_types module~mqc_calculation_defaults mqc_calculation_defaults module~mqc_calculation_keywords->module~mqc_calculation_defaults module~mqc_cgto->pic_types module~mqc_config_parser->module~mqc_physical_fragment module~mqc_config_parser->pic_types module~mqc_config_parser->module~mqc_error module~mqc_config_parser->module~mqc_geometry module~mqc_config_parser->module~mqc_method_types module~mqc_calc_types mqc_calc_types module~mqc_config_parser->module~mqc_calc_types module~mqc_config_parser->module~mqc_calculation_defaults module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_geometry->pic_types module~mqc_method_types->pic_types pic_mpi_lib pic_mpi_lib module~mqc_mpi_comms->pic_mpi_lib module~mqc_physical_constants->pic_types module~mqc_thermochemistry->pic_types module~mqc_thermochemistry->module~mqc_elements module~mqc_thermochemistry->module~mqc_physical_constants module~mqc_thermochemistry->pic_logger pic_io pic_io module~mqc_thermochemistry->pic_io pic_lapack_interfaces pic_lapack_interfaces module~mqc_thermochemistry->pic_lapack_interfaces module~mqc_xyz_reader->pic_types module~mqc_xyz_reader->module~mqc_error module~mqc_xyz_reader->module~mqc_geometry module~mqc_calc_types->pic_types module~mqc_calculation_defaults->pic_types

Used by

  • module~~mqc_many_body_expansion~~UsedByGraph module~mqc_many_body_expansion mqc_many_body_expansion module~mqc_driver mqc_driver module~mqc_driver->module~mqc_many_body_expansion 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

Abstract Interfaces

abstract interface

  • private subroutine run_distributed_sub(this, json_data)

    Arguments

    Type IntentOptional Attributes Name
    class(many_body_expansion_t), intent(inout) :: this
    type(json_output_data_t), intent(out), optional :: json_data

abstract interface

  • private subroutine run_serial_sub(this, json_data)

    Arguments

    Type IntentOptional Attributes Name
    class(many_body_expansion_t), intent(inout) :: this
    type(json_output_data_t), intent(out), optional :: json_data

Derived Types

type, public, extends(many_body_expansion_t) ::  gmbe_context_t

Generalized Many-Body Expansion for overlapping fragments

Read more…

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: calc_type = 0

Calculation type (energy, gradient, hessian)

type(driver_config_t), public, pointer :: driver_config => null()

Driver configuration with calculation-specific settings

type(method_config_t), public :: method_config

Method configuration (XTB settings, etc.)

integer(kind=int64), public :: n_pie_terms = 0

Number of unique PIE terms to evaluate

integer, public, allocatable :: node_leader_ranks(:)

Ranks of processes that lead each compute node

integer, public :: num_nodes = 1

Number of compute nodes

integer, public, allocatable :: pie_atom_sets(:,:)

Unique atom sets (max_atoms, n_pie_terms)

integer, public, allocatable :: pie_coefficients(:)

PIE coefficient for each term (+1 or -1)

type(resources_t), public, pointer :: resources => null()

MPI communicators and hardware resources

type(system_geometry_t), public, allocatable :: sys_geom

System geometry (coordinates, elements, fragments, bonds)

Type-Bound Procedures

procedure, public :: destroy => gmbe_destroy
procedure, public :: destroy_base => mbe_base_destroy
procedure, public :: has_geometry => mbe_base_has_geometry
procedure, public :: has_mpi => mbe_base_has_mpi
procedure, public :: init => gmbe_init
procedure, public :: run_distributed => gmbe_run_distributed
procedure, public :: run_serial => gmbe_run_serial

type, public, abstract ::  many_body_expansion_t

Abstract base for all many-body expansion methods

Read more…

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: calc_type = 0

Calculation type (energy, gradient, hessian)

type(driver_config_t), public, pointer :: driver_config => null()

Driver configuration with calculation-specific settings

type(method_config_t), public :: method_config

Method configuration (XTB settings, etc.)

integer, public, allocatable :: node_leader_ranks(:)

Ranks of processes that lead each compute node

integer, public :: num_nodes = 1

Number of compute nodes

type(resources_t), public, pointer :: resources => null()

MPI communicators and hardware resources

type(system_geometry_t), public, allocatable :: sys_geom

System geometry (coordinates, elements, fragments, bonds)

Type-Bound Procedures

procedure, public :: destroy_base => mbe_base_destroy
procedure, public :: has_geometry => mbe_base_has_geometry
procedure, public :: has_mpi => mbe_base_has_mpi
procedure(run_distributed_sub), public, deferred :: run_distributed
procedure(run_serial_sub), public, deferred :: run_serial

type, public, extends(many_body_expansion_t) ::  mbe_context_t

Standard Many-Body Expansion for non-overlapping fragments

Read more…

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public :: calc_type = 0

Calculation type (energy, gradient, hessian)

type(driver_config_t), public, pointer :: driver_config => null()

Driver configuration with calculation-specific settings

integer, public :: max_level = 0

Maximum MBE level (e.g., 2 for dimers, 3 for trimers)

type(method_config_t), public :: method_config

Method configuration (XTB settings, etc.)

integer, public, allocatable :: node_leader_ranks(:)

Ranks of processes that lead each compute node

integer, public :: num_nodes = 1

Number of compute nodes

integer, public, allocatable :: polymers(:,:)

Fragment composition array (fragment_idx, monomer_indices)

type(resources_t), public, pointer :: resources => null()

MPI communicators and hardware resources

type(system_geometry_t), public, allocatable :: sys_geom

System geometry (coordinates, elements, fragments, bonds)

integer(kind=int64), public :: total_fragments = 0

Total number of fragments to process

Type-Bound Procedures

procedure, public :: destroy => mbe_destroy
procedure, public :: destroy_base => mbe_base_destroy
procedure, public :: has_geometry => mbe_base_has_geometry
procedure, public :: has_mpi => mbe_base_has_mpi
procedure, public :: init => mbe_init
procedure, public :: run_distributed => mbe_run_distributed
procedure, public :: run_serial => mbe_run_serial

Functions

private pure function mbe_base_has_geometry(this)

Check if system geometry is available

Arguments

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

Return Value logical

private pure function mbe_base_has_mpi(this)

Check if MPI resources are available

Arguments

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

Return Value logical


Subroutines

private subroutine gmbe_destroy(this)

Clean up GMBE context

Arguments

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

private subroutine gmbe_init(this, method_config, calc_type)

Initialize GMBE context with required configuration

Arguments

Type IntentOptional Attributes Name
class(gmbe_context_t), intent(out) :: this
type(method_config_t), intent(in) :: method_config
integer(kind=int32), intent(in) :: calc_type

private subroutine gmbe_run_distributed(this, json_data)

Run distributed GMBE calculation

Arguments

Type IntentOptional Attributes Name
class(gmbe_context_t), intent(inout) :: this
type(json_output_data_t), intent(out), optional :: json_data

private subroutine gmbe_run_serial(this, json_data)

Run serial GMBE calculation

Arguments

Type IntentOptional Attributes Name
class(gmbe_context_t), intent(inout) :: this
type(json_output_data_t), intent(out), optional :: json_data

private subroutine mbe_base_destroy(this)

Clean up base class resources

Arguments

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

private subroutine mbe_destroy(this)

Clean up MBE context

Arguments

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

private subroutine mbe_init(this, method_config, calc_type)

Initialize MBE context with required configuration

Arguments

Type IntentOptional Attributes Name
class(mbe_context_t), intent(out) :: this
type(method_config_t), intent(in) :: method_config
integer(kind=int32), intent(in) :: calc_type

private subroutine mbe_run_distributed(this, json_data)

Run distributed MBE calculation

Arguments

Type IntentOptional Attributes Name
class(mbe_context_t), intent(inout) :: this
type(json_output_data_t), intent(out), optional :: json_data

private subroutine mbe_run_serial(this, json_data)

Run serial MBE calculation

Arguments

Type IntentOptional Attributes Name
class(mbe_context_t), intent(inout) :: this
type(json_output_data_t), intent(out), optional :: json_data