gmbe_context_t Derived Type

type, public, extends(many_body_expansion_t) :: gmbe_context_t

Generalized Many-Body Expansion for overlapping fragments

Uses PIE (Principle of Inclusion-Exclusion) representation where each term is defined by atom indices with explicit coefficients from the inclusion-exclusion principle.


Inherits

type~~gmbe_context_t~~InheritsGraph type~gmbe_context_t gmbe_context_t type~many_body_expansion_t many_body_expansion_t type~gmbe_context_t->type~many_body_expansion_t type~driver_config_t driver_config_t type~many_body_expansion_t->type~driver_config_t driver_config type~method_config_t method_config_t type~many_body_expansion_t->type~method_config_t method_config type~resources_t resources_t type~many_body_expansion_t->type~resources_t resources type~system_geometry_t system_geometry_t type~many_body_expansion_t->type~system_geometry_t sys_geom type~driver_config_t->type~method_config_t method_config type~aimd_keywords_t aimd_keywords_t type~driver_config_t->type~aimd_keywords_t aimd type~hessian_keywords_t hessian_keywords_t type~driver_config_t->type~hessian_keywords_t hessian type~scf_keywords_t scf_keywords_t type~driver_config_t->type~scf_keywords_t scf type~cc_config_t cc_config_t type~method_config_t->type~cc_config_t cc type~correlation_config_t correlation_config_t type~method_config_t->type~correlation_config_t corr type~dft_config_t dft_config_t type~method_config_t->type~dft_config_t dft type~f12_config_t f12_config_t type~method_config_t->type~f12_config_t f12 type~mcscf_config_t mcscf_config_t type~method_config_t->type~mcscf_config_t mcscf type~scf_config_t scf_config_t type~method_config_t->type~scf_config_t scf type~xtb_config_t xtb_config_t type~method_config_t->type~xtb_config_t xtb type~mpi_comms_t mpi_comms_t type~resources_t->type~mpi_comms_t mpi_comms type~bond_t bond_t type~system_geometry_t->type~bond_t bonds comm_t comm_t type~mpi_comms_t->comm_t world_comm, node_comm

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

  • private subroutine gmbe_destroy(this)

    Clean up GMBE context

    Arguments

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

procedure, public :: destroy_base => mbe_base_destroy

procedure, public :: has_geometry => mbe_base_has_geometry

procedure, public :: has_mpi => mbe_base_has_mpi

  • 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

procedure, public :: init => gmbe_init

  • 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

procedure, public :: run_distributed => gmbe_run_distributed

procedure, public :: run_serial => gmbe_run_serial

Source Code

   type, extends(many_body_expansion_t) :: gmbe_context_t
      !! Generalized Many-Body Expansion for overlapping fragments
      !!
      !! Uses PIE (Principle of Inclusion-Exclusion) representation where
      !! each term is defined by atom indices with explicit coefficients
      !! from the inclusion-exclusion principle.

      integer, allocatable :: pie_atom_sets(:, :)
         !! Unique atom sets (max_atoms, n_pie_terms)
      integer, allocatable :: pie_coefficients(:)
         !! PIE coefficient for each term (+1 or -1)
      integer(int64) :: n_pie_terms = 0
         !! Number of unique PIE terms to evaluate

   contains
      procedure :: run_serial => gmbe_run_serial
      procedure :: run_distributed => gmbe_run_distributed
      procedure :: init => gmbe_init
      procedure :: destroy => gmbe_destroy
   end type gmbe_context_t