many_body_expansion_t Derived Type

type, public, abstract :: many_body_expansion_t

Abstract base for all many-body expansion methods

Encapsulates shared configuration for MBE and GMBE calculations. Concrete implementations provide specific fragment representations and expansion computation logic.


Inherits

type~~many_body_expansion_t~~InheritsGraph type~many_body_expansion_t 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

Inherited by

type~~many_body_expansion_t~~InheritedByGraph type~many_body_expansion_t many_body_expansion_t type~gmbe_context_t gmbe_context_t type~gmbe_context_t->type~many_body_expansion_t type~mbe_context_t mbe_context_t type~mbe_context_t->type~many_body_expansion_t

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

  • 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(run_distributed_sub), public, deferred :: run_distributed

  • subroutine run_distributed_sub(this, json_data) Prototype

    Arguments

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

procedure(run_serial_sub), public, deferred :: run_serial

  • subroutine run_serial_sub(this, json_data) Prototype

    Arguments

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

Source Code

   type, abstract :: many_body_expansion_t
      !! Abstract base for all many-body expansion methods
      !!
      !! Encapsulates shared configuration for MBE and GMBE calculations.
      !! Concrete implementations provide specific fragment representations
      !! and expansion computation logic.

      ! Required configuration
      type(method_config_t) :: method_config
         !! Method configuration (XTB settings, etc.)
      integer(int32) :: calc_type = 0
         !! Calculation type (energy, gradient, hessian)

      ! System geometry (includes connectivity via sys_geom%bonds)
      type(system_geometry_t), allocatable :: sys_geom
         !! System geometry (coordinates, elements, fragments, bonds)

      ! MPI configuration (optional - for distributed calculations)
      type(resources_t), pointer :: resources => null()
         !! MPI communicators and hardware resources
      integer, allocatable :: node_leader_ranks(:)
         !! Ranks of processes that lead each compute node
      integer :: num_nodes = 1
         !! Number of compute nodes

      ! Driver configuration (for Hessian parameters, etc.)
      type(driver_config_t), pointer :: driver_config => null()
         !! Driver configuration with calculation-specific settings

   contains
      ! Deferred procedures - must be implemented by subclasses
      procedure(run_serial_sub), deferred :: run_serial
      procedure(run_distributed_sub), deferred :: run_distributed

      ! Common procedures
      procedure :: has_mpi => mbe_base_has_mpi
      procedure :: has_geometry => mbe_base_has_geometry
      procedure :: destroy_base => mbe_base_destroy
   end type many_body_expansion_t