Standard Many-Body Expansion for non-overlapping fragments
Uses polymer representation where each fragment is defined by monomer indices. Coefficients are implicit: (-1)^(n+1) based on fragment size.
| 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 |
Clean up MBE context
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_context_t), | intent(inout) | :: | this |
Clean up base class resources
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(many_body_expansion_t), | intent(inout) | :: | this |
Check if system geometry is available
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(many_body_expansion_t), | intent(in) | :: | this |
Check if MPI resources are available
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(many_body_expansion_t), | intent(in) | :: | this |
Initialize MBE context with required configuration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_context_t), | intent(out) | :: | this | |||
| type(method_config_t), | intent(in) | :: | method_config | |||
| integer(kind=int32), | intent(in) | :: | calc_type |
Run distributed MBE calculation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_context_t), | intent(inout) | :: | this | |||
| type(json_output_data_t), | intent(out), | optional | :: | json_data |
Run serial MBE calculation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_context_t), | intent(inout) | :: | this | |||
| type(json_output_data_t), | intent(out), | optional | :: | json_data |
type, extends(many_body_expansion_t) :: mbe_context_t !! Standard Many-Body Expansion for non-overlapping fragments !! !! Uses polymer representation where each fragment is defined by !! monomer indices. Coefficients are implicit: (-1)^(n+1) based on !! fragment size. integer, allocatable :: polymers(:, :) !! Fragment composition array (fragment_idx, monomer_indices) integer(int64) :: total_fragments = 0 !! Total number of fragments to process integer :: max_level = 0 !! Maximum MBE level (e.g., 2 for dimers, 3 for trimers) contains procedure :: run_serial => mbe_run_serial procedure :: run_distributed => mbe_run_distributed procedure :: init => mbe_init procedure :: destroy => mbe_destroy end type mbe_context_t