# Systems in Octopus

The multisystem framework allows to define and couple different physical systems.

The following diagram represents the family tree of the system classes. Rounded boxes denote abstract classes, while rectangular boxes are normal classes, which can be instantiated.

### Abstract classes

#### interaction_partner_t

An interaction_partner in Octopus is anything, which can have an interaction with any other system. For instance electrons and ions are interaction partners, but also the photonic system described by the Maxwell system, or external potentials. Therefore, it is the base class of all possible systems and multisystems.

Definition of interaction_partner_t

Each interaction_partner is associated with a namespace, owns a clock, as well as a list of interactions in which it can be a partner, and a list of physical quantities, which can be exposed to other systems (through the interactions). See here for the list of possible quantities.

It also provides the basic functions to update exposed quantities, and copy them to the interaction. More details about this mechanism are described in the section on interactions.

#### system_t

The system_t type is the abstract type for all systems. As all possible systems are potential partners of some interaction, the system_t type itself extends the abstract interaction_partner_t type.

Definition of system_t

The system_t class adds information about the physical space in which the system exists, the propagator, and the list of interactions, which are owned by the system. (Check the section interactions for details on who owns an interaction.)

#### multisystem_t

The multisystem_t, finally adds a list of systems to the type definietion.

Definition of multisystem_t

### Specific classes

Currently, the following system types are defined:


integer, parameter ::             &
SYSTEM_ELECTRONIC         = 1,  &
SYSTEM_MAXWELL            = 2,  &
SYSTEM_CLASSICAL_PARTICLE = 3,  &
SYSTEM_CHARGED_PARTICLE   = 4,  &
SYSTEM_DFTBPLUS           = 5,  &
SYSTEM_LINEAR_MEDIUM      = 6,  &
SYSTEM_MATTER             = 7,  &
SYSTEM_DISPERSIVE_MEDIUM  = 8,  &
SYSTEM_MULTISYSTEM        = 9