Gromacs
2024.4
|
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. gmx::SelectionFileOption can be used to implement generic file input for selection options (done internally within gmx::SelectionOptionBehavior).
The selection module contains some lower-level functionality that is currently internal to it (centerofmass.h, indexutil.h, poscalc.h, position.h), but could possibly be useful also outside the module. It should be considered whether they should be moved somewhere else.
Classes | |
class | gmx::SelectionFileOption |
Specifies a special option that provides selections from a file. More... | |
class | gmx::SelectionFileOptionInfo |
Wrapper class for accessing and modifying selection file option information. More... | |
class | gmx::FileNameOptionManager |
Handles interaction of file name options with global options. More... | |
class | gmx::AnalysisNeighborhoodPositions |
Input positions for neighborhood searching. More... | |
class | gmx::AnalysisNeighborhood |
Neighborhood searching for analysis tools. More... | |
class | gmx::AnalysisNeighborhoodPair |
Value type to represent a pair of positions found in neighborhood searching. More... | |
class | gmx::AnalysisNeighborhoodSearch |
Initialized neighborhood search with a fixed set of reference positions. More... | |
class | gmx::AnalysisNeighborhoodPairSearch |
Initialized neighborhood pair search with a fixed set of positions. More... | |
class | gmx::Selection |
Provides access to a single selection. More... | |
class | gmx::SelectionPosition |
Provides access to information about a single selected position. More... | |
class | gmx::SelectionCollection |
Collection of selections. More... | |
struct | gmx::SelectionTopologyProperties |
Describes topology properties required for selection evaluation. More... | |
class | gmx::SelectionOption |
Specifies an option that provides selection(s). More... | |
class | gmx::SelectionOptionInfo |
Wrapper class for accessing and modifying selection option information. More... | |
class | gmx::ITopologyProvider |
Provides topology information to SelectionOptionBehavior. More... | |
class | gmx::SelectionOptionBehavior |
Options behavior to allow using SelectionOptions. More... | |
class | gmx::SelectionOptionManager |
Handles interaction of selection options with other options and user input. More... | |
Functions | |
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... | |
HelpTopicPointer | gmx::createSelectionHelpTopic () |
*/ More... | |
Directories | |
directory | selection |
Parsing and Evaluation of Analysis Selections (selection) | |
directory | tests |
Unit tests for Parsing and Evaluation of Analysis Selections (selection). | |
Files | |
file | selectionfileoption.h |
Declares gmx::SelectionFileOption and gmx::SelectionFileOptionInfo. | |
file | selhelp.h |
Functions for initializing online help for selections. | |
file | indexutil.h |
API for handling index files and index groups. | |
file | nbsearch.h |
API for neighborhood searching for analysis. | |
file | position.h |
API for handling positions. | |
file | selection.h |
Declares gmx::Selection and supporting classes. | |
file | selectioncollection.h |
Declares gmx::SelectionCollection. | |
file | selectionenums.h |
Declares common types used in selections. | |
file | selectionoption.h |
Declares gmx::SelectionOption and gmx::SelectionOptionInfo. | |
file | selectionoptionbehavior.h |
Declares gmx::SelectionOptionBehavior. | |
file | selectionoptionmanager.h |
Declares gmx::SelectionOptionManager. | |
HelpTopicPointer gmx::createSelectionHelpTopic | ( | ) |
*/
Creates a help tree for selections.
std::bad_alloc | if out of memory. |
|
static |
Helper for splitting a sequence of atom indices into groups.
[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. |
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.