|
faunus
|
Specify changes made to a system. More...
#include <space.h>
Classes | |
| struct | GroupChange |
| Properties of changed groups. More... | |
Public Types | |
| using | index_type = std::size_t |
Public Member Functions | |
| std::optional< std::pair< index_type, index_type > > | singleParticleChange () const |
| Determines if the change reflects a single particle change. More... | |
| auto | touchedGroupIndex () const |
| List of moved groups (index) | |
| std::vector< index_type > | touchedParticleIndex (const std::vector< Group > &) const |
| List of changed atom index relative to first particle in system. | |
| void | clear () |
| Clear all change data. | |
| bool | empty () const |
| Check if change object is empty. | |
| operator bool () const | |
| True if object is not empty. | |
| void | sanityCheck (const std::vector< Group > &group_vector) const |
| Sanity check on contained object data. More... | |
Public Attributes | |
| bool | everything = false |
| Everything has changed (particles, groups, volume) | |
| bool | volume_change = false |
| The volume has changed. | |
| bool | matter_change = false |
| The number of atomic or molecular species has changed. | |
| bool | moved_to_moved_interactions |
| If several groups are moved, should they interact with each other? More... | |
| bool | disable_translational_entropy = false |
| Force exclusion of translational entropy. | |
| std::vector< GroupChange > | groups |
| Touched groups by index in group vector. | |
Specify changes made to a system.
This class is used to describe a change to the system. It carries information about changed group index, changed atom index, if the volume has been changed, if there has been a particle insertion etc. It does NOT describe the extent of the change, but simply points to the affected groups, particles, etc. The class is set when performing a system perturbation like a Monte Carlo move and then passed on to the energy function where it is used to establish which energies to calculate.
Some notes:
GroupChange::all==true then relative_atom_indices may be left empty. This is to avoid constucting a large size N vector of indices. | void Faunus::Change::sanityCheck | ( | const std::vector< Group > & | group_vector | ) | const |
Sanity check on contained object data.
| group_vector | Vector of group connected to the change; typically Space::groups. |
| If | the atoms in the change object is outside range of given group index. |
| std::optional< std::pair< Change::index_type, Change::index_type > > Faunus::Change::singleParticleChange | ( | ) | const |
Determines if the change reflects a single particle change.
Since single particle updates are frequently used, this convenience function helps to establish if this is the case.
| bool Faunus::Change::moved_to_moved_interactions |
If several groups are moved, should they interact with each other?
1.8.13