Trigger¶
- class hoomd.trigger.Trigger¶
Base class trigger.
Provides methods common to all triggers and a base class for user-defined triggers.
Subclasses should override the
Trigger.compute
method and must explicitly call the base class constructor in__init__
:class CustomTrigger(hoomd.trigger.Trigger): def __init__(self): hoomd.trigger.Trigger.__init__(self) def compute(self, timestep): return (timestep ** (1 / 2)).is_integer()
- compute(timestep)¶
Evaluate the trigger.
- __getstate__()¶
Get the state of the trigger object.
- __setstate__(state)¶
Set the state of the trigger object.