SeekNumParticles
-
class SeekNumParticles
Initialize the number of particles in MonteCarlo. Use the existing trials, but reset their stats once the goal is reached.
Public Functions
-
SeekNumParticles(const int num, argtype args = argtype())
args:
particle_type: type of particle to add. If -1, all types (default: -1).
max_attempts: maximum number of trial attempts for seek (default: 1e8).
-
SeekNumParticles with_thermo_params(argtype args)
Optionally, use a temporary ThermoParams.
-
SeekNumParticles with_metropolis()
Optionally use a temporary Metropolis criteria with given args. This is the recommended approach, especially to avoid using FlatHistogram.
Same as above but with a constraint.
-
SeekNumParticles with_trial_add(argtype args = argtype())
Use an extra and temporary TrialAdd between every existing Trial. If particle_type is not included in args, use value given by class argument particle_type, if not -1. If -1, then use 0.
Add an extra trial. Any extra trials, including TrialAdd above, are attempted between each trial already present in MonteCarlo.
Add a progress report.
-
void run(MonteCarlo *monte_carlo)
Perform the seek.
-
SeekNumParticles(const int num, argtype args = argtype())