Monitor¶
- class openfts.monitor.OperatorsImag(operator_types=None, tol=None, action=None, block_size=None, delay=None)¶
Tool to monitor the imaginary component of the specified operators. If the imag part of operator departs from zero, perform an action specified. This can be useful if you want to make sure that your CL simulation hasn’t fluctuated into an unphysical basin as described in Vigil2021.
- Parameters:
operator_types (list of strings) – name of operators to monitor. Currently can only contain one operator name.
tol (float) – tolerance used to trigger action
action (string) – action to perform. Options: notify (print notification to log but continue simulation) or exit (exit simulation)
block_size (int) – number of output steps to average operator over. Note that this block averaging is slightly different from the block averaging used in Driver. In Driver the block is over timesteps, here the block is over output steps. This is so that the result is the same as if operators.dat has been analyzed as a postprocessing step.
delay (int) – number of timesteps to delay before starting monitor
Example (python):
fts.monitors.append(openfts.monitor.OperatorImag(operator_types=['Hamiltonian'], tol=1e-1, action='notify', block_size=500, delay=500))
Example (json):
"monitors": { "OperatorImag": { "action": "notify", "block_size": 500, "delay": 500, "operator_types": ["Hamiltonian"], "tol": 0.1 } },
- class openfts.monitor.OperatorsWarmup(operator_types=None, action=None, block_size=None, delay=None, warm_frac=None)¶
Tool to monitor whether the specified operators have “warmed up”. Warmup is determined using the MSER-m algorithm described in Hoad2010 and White1997.
- Parameters:
operator_types (list of strings) – name of operators to monitor. Currently can only contain one operator name.
action (string) – action to perform. Options: notify (print notification to log but continue simulation) or exit (exit simulation)
block_size (int) – number of output steps to average operator over. Note that this block averaging is slightly different from the block averaging used in Driver. In Driver the block is over timesteps, here the block is over output steps. This is so that the result is the same as if operators.dat has been analyzed as a postprocessing step.
delay (int) – number of timesteps to delay before starting monitor
warm_frac (float) – fraction of data that must be warm in order to trigger. For example, if warm_frac=0.75 then 75% of the trajectory must be after the warmup time before this Monitor will be triggered. Value specified must be in range [0.5, 1).
Example (python):
fts.monitors.append(openfts.monitor.OperatorsWarmup(operator_types=['ChemicalPotential', 'Pressure'], action='exit', block_size=1, delay=0, warm_frac=0.5))
Example (json):
"monitors": { "OperatorsWarmup": { "action": "exit", "block_size": 1, "delay": 0, "operator_types": [ "ChemicalPotential", "Pressure" ], "warm_frac": 0.5 } },