ConstrainNumParticles

class ConstrainNumParticles : public feasst::Constraint

Constrain the number of the number of particles.

Public Functions

int type() const

Return the particle type.

int num_particles(const System &system, const Acceptance &acceptance)

Return the number of particles, taking into account the potential to shift (e.g., add or delete) from a trial move.

Arguments

  • maximum: maximum number of particles. If -1, no limit (default: -1).

  • minimum: minimum number of particles (default: 0).

  • type: particle type name. If empty (default), all types.

  • config: name of Configuration (default: 0).