faunus
Public Member Functions | List of all members
Faunus::Speciation::AtomicGroupDeActivator Class Reference

Helper class for contracting and expanding atomic groups. More...

#include <speciation.h>

Inheritance diagram for Faunus::Speciation::AtomicGroupDeActivator:
Inheritance graph
[legend]
Collaboration diagram for Faunus::Speciation::AtomicGroupDeActivator:
Collaboration graph
[legend]

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 >
 

Detailed Description

Helper class for contracting and expanding atomic groups.

Member Function Documentation

◆ deactivate()

GroupDeActivator::ChangeAndBias Faunus::Speciation::AtomicGroupDeActivator::deactivate ( Group group,
GroupDeActivator::OptionalInt  number_to_delete 
)
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.

Warning
Directly modifying the groups in spc and old_spc might interfere with a future neighbour list implementation.

Implements Faunus::Speciation::GroupDeActivator.


The documentation for this class was generated from the following files: