ParticleFilter

class hoomd.filter.ParticleFilter

Base class for all particle filters.

This class provides methods common to all particle filters.

Note

Users should instantiate one of the subclasses.

__call__(state)

Evaluate the filter.

Returns:

The particle tags selected by this filter.

Return type:

list[int]

Note

This method may return tags that are only present on the local MPI rank. The full set of particles selected is the combination of these the lists across ranks with a set union operation.

Example:

locally_selected_tags = filter(simulation.state)
__eq__(other)

Test for equality between two particle filters.

Example:

if filter == other:
    pass
__hash__()

Return a hash of the filter parameters.

Example:

hash(filter)
__str__()

Format a human readable string describing the filter.

Example:

print(str(filter))