|
faunus
|
Particle pairing to calculate pairẃise interaction using particles' groups internally. More...
#include <energy.h>

Public Member Functions | |
| GroupPairingPolicy (Space &spc) | |
| void | from_json (const json &j) |
| void | to_json (json &j) const |
| template<RequireEnergyAccumulator TAccumulator, typename T > | |
| void | particle2particle (TAccumulator &pair_accumulator, const T &a, const T &b) const |
| Add two interacting particles to the accumulator. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup > | |
| void | groupInternal (TAccumulator &pair_accumulator, const TGroup &group) |
| All pairings within a group. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup > | |
| void | groupInternal (TAccumulator &pair_accumulator, const TGroup &group, const std::size_t index) |
| Pairings of a single particle within the group. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup , typename TIndex > | |
| void | groupInternal (TAccumulator &pair_accumulator, const TGroup &group, const TIndex &index) |
| Pairing in the group involving only the particles present in the index. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup > | |
| void | group2group (TAccumulator &pair_accumulator, const TGroup &group1, const TGroup &group2) |
| Complete cartesian pairing of particles in two groups. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup > | |
| void | group2group (TAccumulator &pair_accumulator, const TGroup &group1, const TGroup &group2, const std::vector< std::size_t > &index1) |
| Cross pairing of particles in two groups. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup > | |
| void | group2group (TAccumulator &pair_accumulator, const TGroup &group1, const TGroup &group2, const std::vector< std::size_t > &index1, const std::vector< std::size_t > &index2) |
| Cross pairing of particles in two groups. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup , typename TGroups > | |
| void | group2groups (TAccumulator &pair_accumulator, const TGroup &group, const TGroups &groups) |
| Complete cartesian pairing between particles in a group and a union of groups. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup , typename TGroups > | |
| void | group2groups (TAccumulator &pair_accumulator, const TGroup &group, const TGroups &group_index, const std::vector< std::size_t > &index) |
| Cross pairing of particles in a group and a union of groups. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename Tgroup > | |
| void | group2all (TAccumulator &pair_accumulator, const Tgroup &group) |
| Complete cartesian pairing between particles in a group and particles in other groups in space. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TGroup > | |
| void | group2all (TAccumulator &pair_accumulator, const TGroup &group, const int index) |
| Complete cartesian pairing between a single particle in a group and particles in other groups in space. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename Tgroup > | |
| void | group2all (TAccumulator &pair_accumulator, const Tgroup &group, const std::vector< std::size_t > &index) |
| Complete cartesian pairing between selected particles in a group and particles in other groups in space. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename T > | |
| void | groups2self (TAccumulator &pair_accumulator, const T &group_index) |
| Cross pairing of particles among a union of groups. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename T > | |
| void | groups2all (TAccumulator &pair_accumulator, const T &group_index) |
| Cross pairing of particles between a union of groups and its complement in space. More... | |
| template<RequireEnergyAccumulator TAccumulator> | |
| void | all (TAccumulator &pair_accumulator) |
| Cross pairing between all particles in the space. More... | |
| template<RequireEnergyAccumulator TAccumulator, typename TCondition > | |
| void | all (TAccumulator &pair_accumulator, TCondition condition) |
| Cross pairing between all particles in the space. More... | |
Protected Attributes | |
| const Space & | spc |
| a space to operate on | |
| TCutoff | cut |
| a cutoff functor that determines if energy between two groups can be ignored | |
Particle pairing to calculate pairẃise interaction using particles' groups internally.
Depending on the accumulator provided, raw particle pairs, energy sum, etc. can be obtained.
Accumulator is used as the first argument in all methods. Accumulator shall overload '+=' operator to accept a pair of particle references as used in particle2particle method.
| TCutoff | a cutoff scheme between groups |
|
inlineexplicit |
| spc |
|
inline |
Cross pairing between all particles in the space.
If the distance between particles' groups is greater or equal to the group cutoff distance, no calculation is performed.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| pair_accumulator | accumulator of interacting pairs of particles |
|
inline |
Cross pairing between all particles in the space.
If the distance between particles' groups is greater or equal to the group cutoff distance, no calculation is performed.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TCondition | a function returning bool and having a group as an argument |
| pair_accumulator | accumulator of interacting pairs of particles |
| condition | a group filter if internal energy of the group shall be added |
|
inline |
Complete cartesian pairing between particles in a group and particles in other groups in space.
group × (space ∖ group)
If the distance between the groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| pair_accumulator | accumulator of interacting pairs of particles |
| group |
|
inline |
Complete cartesian pairing between a single particle in a group and particles in other groups in space.
⊕group × (space ∖ group), where ⊕ denotes a filter by an index (here a single particle)
If the distance between the groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped. This method is performance-optimized version of the multiple indices method.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| pair_accumulator | accumulator of interacting pairs of particles |
| group | |
| index | a particle index relative to the group beginning |
|
inline |
Complete cartesian pairing between selected particles in a group and particles in other groups in space.
⊕group × (space ∖ group), where ⊕ denotes a filter by an index
If the distance between the groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| pair_accumulator | accumulator of interacting pairs of particles |
| group | |
| index | list of particle indices in the group relative to the group beginning |
|
inline |
Complete cartesian pairing of particles in two groups.
group1 × group2
If the distance between the groups is greater or equal to the group cutoff distance, no calculation is performed. The group intersection must be an empty set, i.e., no particle is included in both groups. This is not verified for performance reason.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| pair_accumulator | accumulator of interacting pairs of particles |
| group1 | |
| group2 |
|
inline |
Cross pairing of particles in two groups.
Only a cartesian subset of the complete cartesian product is considered as the particles in the first group must be also present in the index. The aim is to capture only interactions that involve changing (indexed) particles.
⊕group1 × group2, where ⊕ denotes a filter by an index
If the distance between the groups is greater or equal to the group cutoff distance, no calculation is performed. The group intersection must be an empty set, i.e., no particle is included in both groups. This is not verified for performance reason.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| pair_accumulator | accumulator of interacting pairs of particles |
| group1 | |
| group2 | |
| index1 | list of particle indices in group1 relative to the group beginning |
|
inline |
Cross pairing of particles in two groups.
Only a non-cartesian subset of the complete cartesian product is considered as at least one particles in the pair must be also present in the respective index. The aim is to capture only interactions that involve changing (indexed) particles, i.e., to avoid pairs containing only non-indexed particles.
(⊕group1 × ∁⊕group2) + (∁⊕group1 × ⊕group2) + (⊕group1 × ⊕group2) = = group1 × group2 − (∁⊕group2 × ∁⊕group2), where ⊕ denotes a filter by an index and ∁ a complement
If the distance between the groups is greater or equal to the group cutoff distance, no calculation is performed. The group intersection must be an empty set, i.e., no particle is included in both groups. This is not verified for performance reason.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| pair_accumulator | accumulator of interacting pairs of particles |
| group1 | |
| group2 | |
| index1 | list of particle indices in group1 relative to the group beginning |
| index2 | list of particle indices in group2 relative to the group beginning |
|
inline |
Complete cartesian pairing between particles in a group and a union of groups.
group × (∪ groups)
If the distance between the groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped. The internal energy of the group is not computed even if the group is also present in the union of groups.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup | |
| TGroups |
| pair_accumulator | accumulator of interacting pairs of particles |
| group | |
| groups |
|
inline |
Cross pairing of particles in a group and a union of groups.
Only a cartesian subset of the complete cartesian product is considered as the particles of the first group must be also present in the index. The aim is to capture only interactions that involve changing (indexed) particles.
⊕group × (∪ groups), where ⊕ denotes a filter by an index
If the distance between the groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped. The internal energy of the group is not computed even if the group is also present in the union of groups.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup | |
| TGroups |
| pair_accumulator | accumulator of interacting pairs of particles |
| group | |
| group_index | groups as indices in Space::groups |
| index | list of particle indices in the group relative to the group beginning |
|
inline |
All pairings within a group.
All pair interaction within the group are accumulated. The pair exclusions defined in the molecule topology are honoured.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| group | |
| pair_accumulator | accumulator of interacting pairs of particles |
|
inline |
Pairings of a single particle within the group.
The pair exclusions defined in the molecule topology are honoured.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup |
| pair_accumulator | accumulator of interacting pairs of particles |
| group | |
| index | internal index of the selected particle within the group |
|
inline |
Pairing in the group involving only the particles present in the index.
Only such non-bonded pair interactions within the group are considered if at least one particle is present in the index. The pair exclusions defined in the molecule topology are honoured.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| TGroup | |
| TIndex |
| pair_accumulator | accumulator of interacting pairs of particles |
| group | |
| index | internal indices of particles within the group |
|
inline |
Cross pairing of particles between a union of groups and its complement in space.
If the distance between any two groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| T |
| pair_accumulator | accumulator of interacting pairs of particles |
| group_index | list of groups |
|
inline |
Cross pairing of particles among a union of groups.
No internal pairs within any group are considered.
If the distance between any two groups is greater or equal to the group cutoff distance, the particle pairing between them is skipped.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| T |
| pair_accumulator | accumulator of interacting pairs of particles |
| group_index | list of groups |
|
inline |
Add two interacting particles to the accumulator.
Due to compiler optimization, the '+=' operator and this function itself may be inlined to significantly improve performance.
| TAccumulator | an accumulator with '+=' operator overloaded to add a pair of particles as references {T&, T&} |
| T | an interacting particle |
| pair_accumulator | accumulator of interacting pairs of particles |
| a | first particle |
| b | second particle |
1.8.13