3. Setting up a simulation

A OpenFTS simulation requires many parameters to specify the simulation. Probably the best way to construct an input file is to look at the examples in examples/. Below is a brief description of the elements in an input file as well as links to more detailed sections of the documentation.

Another useful place to look is the Python Module API.

  • Cell : holds information about the simulation cell (i.e. cell tensor, etc). See Cell.

  • Field Layout : holds information common to all fields in the simulation box. This includes the number of plane waves in each dimension a reference to Cell object, precomputed coefficients (i.e. k2map) which only depend on the cell, and lots of utility functions for accessing elements within fields. See Field Layout.

  • Species: holds information about the different species (i.e. atom/bead types). For a simple block polymer melt, this might just be that statistical segement length, \(b_A\) or \(b_B\), of each block. It could also be the charge or smearing range of that species. See Species.

  • Model: this class holds any information related to the Hamiltonian H of a field theory. This includes the definition of H, the list of fields that H is a functional of (e.g. \(\mu_+\), \(\mu_-\)), the forces required to update H (e.g. \(\frac{\delta H}{\delta \mu_+}\), \(\frac{\delta H}{\delta \mu_-}\)). Options of possible models are:

  • Molecules: this is a list of each molecule in the system. This class holds information necessary to compute the \(\frac{\tilde{V} \phi_p}{\alpha_p} \ln Q_p\) term that appears in the expression for H. If the molecule is a polymer, then the calculation of \(Q_p\) requires the solution of a propagator \(q(r,s)\), and this is also handled by the Chain class. The Chain class also stores \(q(r,s)q^\dagger(r,s)\) which is used to compute the density and stress operators. Molecules can be built up from a variety of Chain objects to create stars, bottlebrushes or simple linear chains. Options of possible molecules are:

  • Operators: this class holds a list of operators to compute in the system. See Operators.

  • Output: this class handles the output to files during the simulation. See Output.

  • Driver: holds information related to the main for-loop in the code. This includes what actual simulation will be performed (e.g. SCFT or CL) and all of the relevant parameters necessary to run such a simulation (e.g. how many steps a simulation will run, how the model fields will be updated, what quantities will be output during the simulation, and how frequently this output fill be, etc). The Driver class is where the Run() method is contained. Options of possible drivers are:

    • Field Updater: the Driver class contains a FieldUpdater class that handles the algorithm for updating the \(\mu\) fields. For a semi-implicit FieldUpdater (e.g. SIS, ETD), the FieldUpdater extracts a linear_response_kernel \(\hat{\kappa}(\pmb{k})\) from the Model class, which in turn calculate the Debye functions \(\hat{g}_D\) for each Molecule in the system. Thus, to add a new FieldUpdater or to extend an existing one, edits are required in the FieldUpdater, Model and Molecule derived classes. Options of possible field updaters are

Many of these classes provide an interface that derived classes must implement and OpenFTS is structured with the expectation that new functionality will be added to the code by adding new classes that derive from one of these Base classes.