FilterUpdater

class hoomd.update.FilterUpdater(trigger, filters)

Bases: Updater

Update sets of particles associated with a filter.

Parameters:

hoomd.Simulation caches the particles selected by hoomd.filter.filter_like objects to avoid the cost of re-running the filter on every time step. The particles selected by a filter will remain static until recomputed. This class provides a mechanism to update the cached list of particles. For example, periodically update a MD integration method’s group so that the integration method applies to particles in a given region of space.

Tip

To improve performance, use a hoomd.trigger.Trigger subclass, to update only when there is a known change to the particles that a filter would select.

Note

Some actions automatically recompute all filter particles such as adding or removing particles to the hoomd.Simulation.state.

Example:

filter_updater = hoomd.update.FilterUpdater(
    trigger=hoomd.trigger.Periodic(1_000),
    filters=[filter1, filter2],
)

Members inherited from AutotunedObject:

property kernel_parameters

Kernel parameters. Read more...

property is_tuning_complete

Check if kernel parameter tuning is complete. Read more...

tune_kernel_parameters()

Start tuning kernel parameters. Read more...


Members inherited from TriggeredOperation:

trigger

The trigger to activate this operation. Read more...


Members defined in FilterUpdater:

__eq__(other)

Return whether two objects are equivalent.

property filters

filters to update select particles.

Example:

filter_updater.filters = [filter1, filter2]
Type:

list[hoomd.filter.filter_like]