Systems in Octopus

Work in progress!

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


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.


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.)


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

Definition of multisystem_t

multisystem_t is an abstract class and cannot be used as such to describe a set of systems in the code. The type to be used for combined systems is multisystem_basic_t, which extends multisystem_t.

Specific classes

Currently, the following system types are defined:

  integer, parameter ::             &
    SYSTEM_ELECTRONIC         = 1,  &
    SYSTEM_MAXWELL            = 2,  &
    SYSTEM_DFTBPLUS           = 5,  &
    SYSTEM_LINEAR_MEDIUM      = 6,  &
    SYSTEM_MATTER             = 7,  &

When using these system types, always use the parameters, and not their numerical values, as they might change over time.