Field Layout¶
- class openfts.FieldLayout(npw, random_seed, backend=None)¶
TODO One-sentence explanation of FieldLayout
- Parameters:
random_seed (int) – seed for random number generator. Random number generator is used for initializing fields at random, or for complex langevin sampling, etc.
backend (str) – backend to use for all fieldlib based calculations. Options: SERIAL, OMP (OpenMP), CUDA (Nvidia GPUs) and HIP (AMD GPUs). If not specified, the code will choose for you. You can also tell the code what backend to choose by setting the FIELDLIB_BACKEND env variable.
npw (list[int] or str) – Number of grid points (plane waves) used in each dimension. Options are shown below.
- Options for npw:
list[int]: Powers of two will result in optimal performance. Length is equal to number of dimensions. Examples: [64], [32, 32], [18, 18, 18]
str: npw = “auto” - Automatically set number of grid points using cell dimenstions and the minimum species smearing length. By default only included possibilities that are factors of 2 and 3 but this can be manually specified by using “autoXY” where X is a sequence of integers. For example auto2 will only allow factors of 2, auto235 allows factors of 2,3,5 etc. Note that this requires all species smearing lengths to be non-zero.
Example (python)
import openfts fts = openfts.OpenFTS() ... fts.field_layout = openfts.FieldLayout(npw=[64],random_seed=1) fts.field_layout = openfts.FieldLayout(npw="auto",random_seed=1) fts.field_layout = openfts.FieldLayout(npw="auto2",random_seed=1) ...
Example (json)
"fieldlayout": { "npw": [ 32, 32 ], "random_seed": 1 }, "fieldlayout": { "npw": "auto", "random_seed": 1 },