filters

snap_simulate.hoomd.simulation.build_filters(Filter)[source]

This function parses the filters block to create HOOMD particle filters.

all:
  class: "All"
  composite: false
tags_filter:
  class: "Tags"
  composite: false
  options:
    tags: [0, 1, 2]
integrated:
  class: "Rigid"
  composite: false
  options:
    flags: ["center", "free"]  # List of rigid body roles: "center", "constituent", or "free"

Note

When simulating systems with rigid bodies, HOOMD-blue requires integrating central and free particles while excluding constituent particles. In snap_simulate, flags for the Rigid filter can be declared directly as a list of strings (e.g. ["center", "free"]), which is automatically converted into the tuple required by HOOMD.

See also

See the HOOMD-blue Particle Filters documentation for details on filters and options.