Provides functionality for initializing and evaluating selections.
The core of the selection engine is accessed through gmx::SelectionCollection, which manages a set of selections. Documentation for that class explains the general selection mechanisms.
For each selection that is parsed using a gmx::SelectionCollection, a gmx::Selection handle is returned and can be used to access information about that selection. gmx::SelectionPosition is a helper class used to access information about individual positions in a selection. These classes refer to internal state within the gmx::SelectionCollection, and their contents update automatically when the gmx::SelectionCollection is compiled or evaluated.
This module also provides gmx::SelectionOption and gmx::SelectionOptionInfo classes for declaring options that evaluate to selections (see Extensible Handling of Options (options) for general explanation of the options mechanism). These classes provide the main interface to obtain gmx::Selection objects in trajectory analysis using gmx::TrajectoryAnalysisModule. To use these classes outside the trajectory analysis framework, a gmx::SelectionOptionManager or a gmx::SelectionOptionBehavior needs to be created to serve as a bridge between the selection option classes and the gmx::SelectionCollection object.
- Author
- Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com
|
static bool | next_group_index (int atomIndex, const gmx_mtop_t *top, e_index_t type, int *id) |
| Helper for splitting a sequence of atom indices into groups. More...
|
|
static bool next_group_index |
( |
int |
atomIndex, |
|
|
const gmx_mtop_t * |
top, |
|
|
e_index_t |
type, |
|
|
int * |
id |
|
) |
| |
|
static |
Helper for splitting a sequence of atom indices into groups.
- Parameters
-
[in] | atomIndex | Index of the next atom in the sequence. |
[in] | top | Topology structure. |
[in] | type | Type of group to split into. |
[in,out] | id | Variable to receive the next group id. |
- Returns
true
if atomIndex
starts a new group in the sequence, i.e., if *id
was changed.
*id
should be initialized to -1
before first call of this function, and then each atom index in the sequence passed to the function in turn.