Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
gmx::SelectionCollection::Impl Class Reference

#include <gromacs/selection/selectioncollection_impl.h>

+ Collaboration diagram for gmx::SelectionCollection::Impl:

Description

Private implemention class for SelectionCollection.

Public Types

enum  DebugLevel : int {
  DebugLevel::None, DebugLevel::Basic, DebugLevel::Compiled, DebugLevel::Evaluated,
  DebugLevel::Full, DebugLevel::Count
}
 Describes the available debugging levels. More...
 

Public Member Functions

 Impl ()
 Creates a new selection collection. More...
 
void clearSymbolTable ()
 Clears the symbol table of the selection collection. More...
 
void resolveExternalGroups (const gmx::SelectionTreeElementPointer &root, ExceptionInitializer *errors)
 Replace group references by group contents. More...
 
bool areForcesRequested () const
 Whether forces have been requested for some selection.
 

Static Public Member Functions

static SelectionTopologyProperties requiredTopologyPropertiesForPositionType (const std::string &post, bool forces)
 Returns topology properties needed for a certain position type.
 

Public Attributes

gmx_ana_selcollection_t sc_
 Internal data, used for interfacing with old C code.
 
std::string rpost_
 Default reference position type for selections.
 
std::string spost_
 Default output position type for selections.
 
gmx_ana_index_t requiredAtoms_
 Atoms needed for evaluating the selections.
 
DebugLevel debugLevel_
 Debugging level for the collection.
 
bool bExternalGroupsSet_
 Whether setIndexGroups() has been called.
 
gmx_ana_indexgrps_tgrps_
 External index groups (can be NULL).
 

Member Enumeration Documentation

Describes the available debugging levels.

Enumerator
None 

No debugging.

Basic 

Print selection trees after parsing and compilation.

Compiled 

As PrintCompiled, also print intermediate compilation trees.

Evaluated 

As PrintCompiled, also print the tree after evaluation.

Full 

Combine Compiled and Evaluated.

Count 

Ends the enumeration.

Constructor & Destructor Documentation

gmx::SelectionCollection::Impl::Impl ( )

Creates a new selection collection.

Exceptions
std::bad_allocif out of memory.

Member Function Documentation

void gmx::SelectionCollection::Impl::clearSymbolTable ( )

Clears the symbol table of the selection collection.

Does not throw.

void gmx::SelectionCollection::Impl::resolveExternalGroups ( const gmx::SelectionTreeElementPointer root,
ExceptionInitializer errors 
)

Replace group references by group contents.

Parameters
[in]rootRoot of selection tree to process.
errorsObject for reporting any error messages.
Exceptions
std::bad_allocif out of memory.

Recursively searches the selection tree for unresolved external references. If one is found, finds the referenced group in grps_ and replaces the reference with a constant element that contains the atoms from the referenced group. Any failures to resolve references are reported to errors.


The documentation for this class was generated from the following files: