Gromacs
2026.0-dev-20250215-e896270
|
#include <gromacs/topology/idef.h>
List of listed interactions.
Defines a list of atoms with their interactions.
TODO: Consider storing the function type as well. TODO: Consider providing per interaction access.
Public Member Functions | |
int | size () const |
bool | empty () const |
template<std::size_t numAtoms> | |
void | push_back (const int parameterType, const std::array< int, numAtoms > &atoms) |
Adds one interaction to the list. More... | |
void | push_back (const int parameterType, const int numAtoms, const int *atoms) |
Adds one interaction to the list. More... | |
void | append (const InteractionList &ilist) |
Appends interaction list ilist at the back of the list. More... | |
void | clear () |
Clears the list. | |
Public Attributes | |
std::vector< int > | iatoms |
List of interactions. More... | |
|
inline |
Appends interaction list ilist
at the back of the list.
[in] | ilist | Interaction list to append. |
|
inline |
|
inline |
Adds one interaction to the list.
[in] | parameterType | Type. |
[in] | atoms | Array of atoms indices. |
|
inline |
Adds one interaction to the list.
[in] | parameterType | Type. |
[in] | numAtoms | Number of atoms. |
[in] | atoms | Atoms indices. |
|
inline |
std::vector<int> InteractionList::iatoms |
List of interactions.
Specifies which atoms are involved in an interaction of a certain type. The layout of this array is as follows:
+-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+... |type1|at1|at2|at3|type2|at1|at2|type1|at1|at2|at3|type3|at1|at2| +-----+---+---+---+-----+---+---+-----+---+---+---+-----+---+---+...
So for interaction type type1 3 atoms are needed, and for type2 and type3 only 2. The type identifier is used to select the function to calculate the interaction and its actual parameters. This type identifier is an index in a params[]
and functype[]
array.