Group

class Group : public feasst::PropertiedEntity

Define groups based on particle and site types.

Public Functions

void name_to_index(const ParticleFactory &unique_types)

Convert site type names to interger indexes for optimization. Otherwise, assumes name is index (and index is -1 if stoi fails).

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

Return the list of site types in the group.

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

Return the list of particle 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 int particle_index) 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.

Arguments

  • site_type: Add site type(s) (default: all sites included). Multiple can be provided as comma-separated values.

  • particle_type: Add particle type(s) (default: all included). Multiple can be provided as comma-separated values.

  • particle_index: Add particle index(es) (default: all included). Multiple can be provided as comma-separated values.

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

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