NumParticles

class NumParticles : public feasst::Analyze

Accumulate statistics for number of particles.

Public Functions

NumParticles(const argtype &args = argtype())

args:

  • particle_type: index of particle type from configuration. If -1, sum all particles (default: -1).

  • group: index of group from configuration. If -1, sum all particles (default: -1). Can only be specified if particle_type is -1.

std::string header(const Criteria &criteria, const System &system, const TrialFactory &trials) const

Return the header for writing.

void initialize(Criteria *criteria, System *system, TrialFactory *trial_factory)

Initialize and precompute before trials.

void update(const Criteria &criteria, const System &system, const TrialFactory &trial_factory)

Perform update action.

std::string write(const Criteria &criteria, const System &system, const TrialFactory &trial_factory)

Perform write action.