Octopus
ensemble_oct_m Module Reference

This module implements the ensemble class. More...

Detailed Description

This module implements the ensemble class.

As we are using the multisystem framework to generate the replicas, only a few new features on top of the parent class multisystem_t were necessary.

Data Types

interface  ensemble_t
 the ensemble class More...
 

Functions/Subroutines

recursive class(ensemble_t) function, pointer ensemble_constructor (namespace, n_replicas, system_factory, names, types)
 Constructor for the ensemble_t class. More...
 
recursive subroutine ensemble_finalizer (this)
 
recursive subroutine ensemble_end (this)
 
recursive subroutine ensemble_create_interactions (this, interaction_factory, available_partners)
 create the interactions of the ensemble More...
 
recursive subroutine ensemble_add_partners_to_list (this, list, interaction_type)
 add the container to the flat list. More...
 

Function/Subroutine Documentation

◆ ensemble_constructor()

recursive class(ensemble_t) function, pointer ensemble_oct_m::ensemble_constructor ( type(namespace_t), intent(in)  namespace,
integer, intent(in)  n_replicas,
class(system_factory_abst_t), intent(in)  system_factory,
character(len=128), dimension(:), intent(in)  names,
integer, dimension(:), intent(in)  types 
)
private

Constructor for the ensemble_t class.

This routine creates the ensemble container, reads information about the ensemble from the input file, and creates the replicas using the factory. It also creates the interactions of the systems inside each replica.

Parameters
[in]namespacenamespace of the ensemble
[in]n_replicasnumber of replicas to create
[in]system_factorysystem factory to be used by multisystem_basic_t
[in]namesnames of the systems to be created in each replica
[in]typestypes of the systems to be created in each replica

Definition at line 162 of file ensemble.F90.

◆ ensemble_finalizer()

recursive subroutine ensemble_oct_m::ensemble_finalizer ( type(ensemble_t), intent(inout)  this)
private

Definition at line 204 of file ensemble.F90.

◆ ensemble_end()

recursive subroutine ensemble_oct_m::ensemble_end ( type(ensemble_t), intent(inout)  this)
private

Definition at line 214 of file ensemble.F90.

◆ ensemble_create_interactions()

recursive subroutine ensemble_oct_m::ensemble_create_interactions ( class(ensemble_t), intent(inout)  this,
class(interactions_factory_abst_t), intent(in)  interaction_factory,
class(partner_list_t), intent(in), target  available_partners 
)
private

create the interactions of the ensemble

This routine overrides the corresponding routine of multisystem_t.

The important difference is that it only creates interactions between subsystems of each replica and interactions of these subsystems with all partners outside the ensemble.

Note
the available_partners list,
Parameters
[in,out]thissystem for which interactions are created.
[in]interaction_factoryfactory that creates the actual interactions
[in]available_partnersa list of available partners for the given system.

Definition at line 235 of file ensemble.F90.

◆ ensemble_add_partners_to_list()

recursive subroutine ensemble_oct_m::ensemble_add_partners_to_list ( class(ensemble_t), intent(in)  this,
class(partner_list_t), intent(inout)  list,
integer, intent(in), optional  interaction_type 
)
private

add the container to the flat list.

Note
Ensembles should in general NOT put their children onto the list of partners. An exception might be the ghost interaction (to be checked!)

Definition at line 271 of file ensemble.F90.