Gromacs
2019-beta2
|
#include <gromacs/selection/selectionoptionbehavior.h>
Inherited by gmx::TrajectoryAnalysisRunnerCommon::Impl.
Provides topology information to SelectionOptionBehavior.
Modules that use SelectionOptionBehavior need to implement this interface to provide functionality to load topology information for use with the selections.
If future need arises to use similar information elsewhere, this can be moved to, e.g., the topology module, but for now it is here for simplicity. Also, if/when there will be more modules that use this, we can identify common code from those users and possibly provide a shared implementation (e.g., in the form of another IOptionsBehavior), but currently there are too few users to identify any useful reusable functionality from the callers.
Public Member Functions | |
virtual gmx_mtop_t * | getTopology (bool required)=0 |
Returns the topology to use. More... | |
virtual int | getAtomCount ()=0 |
Returns the number of atoms. More... | |
|
pure virtual |
Returns the number of atoms.
This method is only called if getTopology() returns NULL. It should return the number of atoms that at most need to be selected by the selections.
|
pure virtual |
Returns the topology to use.
[in] | required | Whether the topology is required by the caller. |
Can return NULL if required
is false
and the topology is not provided by the user. If required
is true
, should throw an error if the topology cannot be loaded.
This method may get called multiple times, potentially with different values of required
. Subsequent calls should just return the same topology that was loaded in the first call.