|
faunus
|
Helper class for contracting and expanding atomic groups. More...
#include <speciation.h>


Public Member Functions | |
| AtomicGroupDeActivator (Space &spc, Space &old_spc, Random &random) | |
| ChangeAndBias | activate (Group &group, OptionalInt number_to_insert) override |
| ChangeAndBias | deactivate (Group &group, OptionalInt number_to_delete) override |
Reduce an atomic group by number_to_delete particles. More... | |
Additional Inherited Members | |
Public Types inherited from Faunus::Speciation::GroupDeActivator | |
| using | ChangeAndBias = std::pair< Change::GroupChange, double > |
| Group change and bias energy. | |
| using | OptionalInt = std::optional< int > |
Helper class for contracting and expanding atomic groups.
|
overridevirtual |
Reduce an atomic group by number_to_delete particles.
The deleted particles are picked by random; moved the the end of the group; then deactivated. In order for the Hamiltonian to pick up the energy change, particles in the reference Space (old_group) are swapped to the same index, albeit not deactivated.
Implements Faunus::Speciation::GroupDeActivator.
1.8.13