class Group : public feasst::PropertiedEntity

Define groups based on particle and site types. In the future, other metrics may be used, such as position-based ones, etc.

Public Functions

Group(argtype args = argtype())


  • add_site_type: add a site type. If none, all sites included.

  • add_particle_type: add a particle type. If none, all particles included.

  • dynamic: set true if groups should be updated (default: true).

  • spatial: set true if group is based on location (default: false).

const std::vector<int> site_types() const

Return the list of site types in the group.

bool is_dynamic() const

Return true if dynamic.

bool is_spatial() const

Return if the group definition is based on location.

bool is_empty() const

Return true if group has no group definitions.

bool is_in(const Site &site) const

Return true if the site is in the group.

bool is_in(const Particle &particle) const

Return true if the particle is in the group.

void remove_sites(Particle *particle) const

Remove sites from the particle which are not in the group.

std::vector<int> site_indices(const Particle &particle) const

Return the list of site indices in Particle which are in the group.