Operator

class openfts.operator.Hamiltonian(averaging_type=None, save_history=None, units=None)

Intensive Hamiltonian. Both real and imaginary component are output.

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

  • units (string) – Units to output Hamiltonian in. Options: beta_Rg3_over_V (units of \(\beta H R_g^3 / V\)) or beta_b3_over_V (units of \(\beta H b^3 / V\)). Default: beta_Rg3_over_V.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.Hamiltonian(averaging_type='none')

Example (json):

"operators": {
  "Hamiltonian": {"averaging_type": none"}
},
class openfts.operator.CellStress(averaging_type=None, save_history=None)

Cell stress \(\tilde{\sigma}\) and cell tensor \(\pmb{h}\) (see VariableCell)

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.CellStress(averaging_type='none')

Example (json):

"operators": {
  "CellStress": {"averaging_type": none"}
},
class openfts.operator.ChemicalPotential(averaging_type=None, save_history=None, incl_ideal_gas=None, incl_self=None, incl_fluct=None, split_by_term=None)
Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

  • incl_ideal_gas (bool) – include ideal gas contribution to chemical potential. Default: True.

  • incl_self (bool) – include self interaction contribution to chemical potential. Default: False.

  • split_by_term (bool) – split into separate terms \(\mu = \mu_logQ + \mu_{ideal} + \mu_{self}\). This can be useful for debugging. Default: False.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.ChemicalPotential(averaging_type='none',incl_ideal_gas=True,incl_self=True)

Example (json):

"operators": {
    "ChemicalPotential": {
      "averaging_type": "none",
      "incl_ideal_gas": true,
      "incl_self": true
    },
    ...
  },
class openfts.operator.Pressure(averaging_type=None, save_history=None, calc_tensor=None, incl_ideal_gas=None, incl_mean_field=None, incl_fluct=None, split_by_term=None, units=None)
Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

  • calc_tensor (bool) – output full pressure tensor into P[] in Voigt ordering (Pxx, Pyy, Pzz, Pyz, Pxz, Pxy). Default: False.

  • incl_ideal_gas (bool) – include ideal gas contribution to pressure. Default: True.

  • incl_mean_field (bool) – only for driver.RPA. Default: True.

  • incl_fluct (bool) – only for driver.RPA. Default: True.

  • split_by_term (bool) – split Pressure into separate terms \(P = P_{ideal} + P_{chain} + P_{smear} + P_{charge}\). See Nb#5 p117 for each of these terms. This can be useful for debugging). Default: False.

  • units (string) – Units to output pressure in. Options: beta_Rg3 (units of \(\beta P R_g^3\)) or beta_b3 (units of \(\beta P b^3\)). Default: beta_Rg3.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.Pressure(averaging_type='none',incl_ideal_gas=True, incl_fluct=False, units='beta_b3'))

Example (json):

"operators": {
  "Pressure": {
    "averaging_type": "none",
    "incl_fluct": false,
    "incl_ideal_gas": true,
    "units": "beta_b3"
  },
  ...
},
class openfts.operator.PressureUVSensitive(averaging_type=None, save_history=None)

(beta)

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.PressureUVSensitive(averaging_type='none')

Example (json):

"operators": {
  "PressureUVSensitive": {"averaging_type": none"}
},
class openfts.operator.DensityMolecule(averaging_type=None, save_history=None)

output density per molecule

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.DensityMolecule(averaging_type='none')

Example (json):

"operators": {
  "DensityMolecule": {"averaging_type": none"}
},
class openfts.operator.DensitySpecies(averaging_type=None, save_history=None)

output density per species

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.DensitySpecies(averaging_type='none')

Example (json):

"operators": {
  "DensitySpecies": {"averaging_type": none"}
},
class openfts.operator.DensityModelCustom(averaging_type=None, save_history=None)

output density of quantities customized to model of interest. For ModelEdwardsCharge this is the total and charge density.

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.DensityModelCustom(averaging_type='none')

Example (json):

"operators": {
  "DensityModelCustom": {"averaging_type": none"}
},
class openfts.operator.SpeciesFields(averaging_type=None, save_history=None)

output species fields

Parameters:
  • averaging_type (string) – Specify how this operator should be averaged throughout the simulation. See options below

  • save_history (bool) – Option to save history of operator to separate files. Always = true for scalar operators. Can be optionally set for field operators.

averaging_type options:
  • “none” - do not perform any averaging

  • “block” - average the operator over a block of size specified by block_size in Driver. See Block Averaging section below.

Example (python):

fts.operators.append(openfts.operator.SpeciesFields(averaging_type='none')

Example (json):

"operators": {
  "SpeciesFields": {"averaging_type": none"}
},

Block Averaging

Block averaging (i.e. block_size) and the output frequency (i.e. output_freq) are handled independently within the code. Block averaging reports operators that are averaged over block_size sequential timesteps. The current value of operators are written to operators.dat and op*.dat files every output_freq steps.

To see the expected results of block averaging, consider a timeseries of a given operator that takes the values d1 to d8 on 8 sequential timesteps t1 to d8:

timestep

t1

t2

t3

t4

t5

t6

t7

t8

value

d1

d2

d3

d4

d5

d6

d7

d8

If block_size = 2 and output_freq=1 then the output to operators.dat will be

timestep

t1

t2

t3

t4

t5

t6

t7

t8

value

d1

(d1+d2)/2

d3

(d3+d4)/2

d5

(d5+d6)/2

d7

(d7+d8)/2

If block_size = 1 and output_freq=2 then the output to operators.dat will be

timestep

t2

t4

t6

t8

value

d2

d4

d6

d8

If block_size = 2 and output_freq=2 then the output to operators.dat will be

timestep

t2

t4

t6

t8

value

(d1+d2)/2

(d3+d4)/2

(d5+d6)/2

(d7+d8)/2