Gromacs
2022.2
|
#include <gromacs/selection/indexutil.h>
Bundle index groups with their names.
Public Member Functions | |
IndexGroupsAndNames (const t_blocka &indexGroup, ArrayRef< char const *const > groupNames) | |
Construct from index group and group names. More... | |
bool | containsGroupName (const std::string &groupName) const |
Return if a group name is contained in the groups. More... | |
std::vector< index > | indices (const std::string &groupName) const |
Return the integer indices of a group. More... | |
gmx::IndexGroupsAndNames::IndexGroupsAndNames | ( | const t_blocka & | indexGroup, |
ArrayRef< char const *const > | groupNames | ||
) |
Construct from index group and group names.
[in] | indexGroup | |
[in] | groupNames | names of the index groups |
bool gmx::IndexGroupsAndNames::containsGroupName | ( | const std::string & | groupName | ) | const |
Return if a group name is contained in the groups.
String comparison is case insensitive
[in] | groupName | the group name to be queried |
std::vector< index > gmx::IndexGroupsAndNames::indices | ( | const std::string & | groupName | ) | const |
Return the integer indices of a group.
If two index groups share a name, return the one found first.
Indices may be empty.
[in] | groupName | the name of the group whose indices shall be returned |
if | groupName is not present as index group |