8. Generators

Creating Configurations with Generators

Overview

Generators are a flexible way of describing how a configuration should be created. They are sequences of simple steps or “nodes” that are run when required, with each node having a focussed and specific purpose. Combined, the actions of these simplistic nodes can generate basic disordered systems through to complex coordinate ensembles.

There are three stages to any generator and its constituent nodes, with each stage performed every time the generator is run:

Set Up

Before the generator is executed, every node present within it is permitted a set-up stage during which any critical values can be retrieved for use, or any data structures (e.g. to hold results) can be initialised.

Execute

The main work of the generator is performed within the execution stages of the nodes, which are run according to the structure and sequence defined in the generator.

Nodes

A generator is made up of one or more “nodes”, each of which performs a specific task on or with some defined objects in a simulation (e.g. species or configuration boxes), generates data from the simulation, or manipulates data generated by other nodes.

Branches

The flow of operation between nodes is completely linear, but some nodes have branches containing other sequences of nodes (and further branches). These branches may be executed every time the node runs, or may only run under certain conditions. See the individual node reference pages for details.

Control Options

Each node has a number of control keywords that define how the node will act.

Value Expressions

For flexibility, node options that require numerical values understand mathematical expressions rather than just plain integers or floating-point values. They can also reference parameters from other nodes, such as those defined in a ParametersNode.


Expressions

Mathematical expression parsing

Node Reference

Details on all available procedure nodes

Last modified November 20, 2024: Updating Developer Docs (#1545) (19274c2)