Modules Overview¶
The grid module - a low level mapper¶
In this we keep track of the twin-planes, the shifts and the coordinates. We use a class to represent vectors with needed operations(addition, length, distance, etc. )
- To begin the flake we must provide two things:
- a twin-layer configuration/coordinate mapping
- a seed to start with
The growth module - manipulate the flake¶
This module is in charge to handle attributes and the growth procedure of a flake. It
instantiates a grid object from the Grid class manages the atoms and surface
of the Flake. The Grid is used to translate the indexed atoms into real space with
proper coordinates and correct stacking permutation.
The grid is accessed through the (i, j, k) cubic coordinates. Those can then be translated through the grid.coord() method into actual cartesian (x, y, z) coordinates for the fcc structure including the twinplane errors.
To grow such a flake we have the Flake class handling the atoms and surface
sites we use to grow the flake.
The lattice can be populated with atoms or surface sites. The wholeness of the atoms
then concise the crystal we are growing, while the surface is a layer of sites which may
be populated in the next growth step.
Here a simple (2D) ASCII illustration of the growth.
- atom site
o- surface site
*
* ** * * ** * * * ** * *
* oo * ==> * oo o * ==> * oo o * etc..
* ** * * ** * * * ** o *
* * *
- The growth can be done in three different modes:
- random: Each surface site has the same probability to be populated in the next step.
- deterministic: The sites with the most adjacent atoms will be populated next. If there are more then one with the most adjacent atoms, one is chosen randomly between those.
- probabilistic: Each site is weighted through a specific function (e.g. exponential, Boltzmann, etc.) of the number of adjacent atoms and chosen according to that probability distribution.
The most interesting here, on which we also will focus in further discussions is the probabilistic mode. The function we start with is an exponential governed by some kind of ‘temperature’.
The settings module - defaults and constants¶
This module contains defaults and global preference settings used across all simulations.
Before starting serious simulations you should set a main output path for the bulk growth simulations, flake coordinate files and graphs.
It is easiest to set an environment variable and Flame outputs data relative to that path.:
$ export FLAME_OUTPUT=/your/path/here
Else the output path is set to ../../../output relative to the settings.py file.
The options here can be seen as global settings, while in sim_params.yaml we define
simulations specific parameters or local settings, in each new simulation directory.
Distance => DIFF_CAP: This variable denotes the maximum distance (in atomic radii) until which atoms are considered nearest neighbors when checked. For touching atoms this is two atomic radii, while we give it here 2.1 to include small deviations due to numerical rounding errors when calculating the distance (this is subject to further considerations).
Other modules¶
flame.simulation module¶
Define the general structure of the simulations. We will create a hierarchy in the HDF data format and group those elements into [simulation] > [TP state] > [samples]. A sample is the smallest unit, a flake generated by the growth module.
flame.paint module¶
Generate bokeh plots according to the given column and the flake data in HDF files.