Scope Functions
The functions detailed in this section enable the user to access information about and change the state of the application through the multiple different available scopes.
Active
void Active(const OEPropDB::OEKey &k)
void Active(unsigned int id, unsigned int conf=UINT_MAX)
Makes the specified object the Active or Focused object in the application. The object is specified by passing either an OEKey object or a unique ID paired with a conformer index (if dealing with multiconformer molecules).
ActiveConformer
unsigned int ActiveConformer()
Returns the index of the currently Active or Focused conformer.
ActiveID
unsigned int ActiveID()
Returns the unique ID associated with the currently Active or Focused object.
ActiveKey
OEPropDB::OEKey ActiveKey()
Returns the unique key associated with the currently Active or Focused object.
ClearActive
void ClearActive()
Clears the active / focused property from the currently active object.
ClearLocked
void ClearLocked()
Clears the locked property from all objects.
ClearMarked
void ClearMarked()
Clears the marked property from all objects.
ClearSelection
void ClearSelection()
Clears the selected property from all objects.
ClearVisible
void ClearVisible()
Clears the visible property from all objects.
ContextClear
void ContextClear()
Clears the context scope.
ContextGet
std::vector<OEPropDB::OEKey> ContextGet()
Returns the list of keys currently contained in the context scope. The “context” scope is used to determine which operations are appropriate for display in the right-click popup menu.
ContextInsert
void ContextInsert(const OEPropDB::OEKey &)
void ContextInsert(const std::vector<OEPropDB::OEKey> &)
Inserts the specified key(s) into the context scope. The “context” scope is used to determine which operations are appropriate for display in the right-click popup menu.
ContextKeysSet
void ContextKeysSet(const OEPropDB::OEKeyGroup &k)
void ContextKeysSet(const std::vector<OEPropDB::OEKey> &keys)
Sets the specified keys to be the “context” keys which are used to determine which operations are appropriate for display in the right-click popup menu.
ContextSet
void ContextSet(const OEPropDB::OEKey &)
void ContextSet(const std::string &prop)
void ContextSet(const std::vector<OEPropDB::OEKey> &)
Sets the specified key(s) to be the “context” keys which are used to determine which operations are appropriate for display in the right-click popup menu.
DefaultScopeGet
unsigned int DefaultScopeGet()
Returns the default scope of operations.
DefaultScopeSet
void DefaultScopeSet(unsigned int scope)
Sets the default scope of operations. Valid parameters are:
- ActiveScope - operations are performed on the active / focused
object
- ActiveThenVisibleScope - operations are performed only on the active /
focused object; however, if no object has that property, the operations are performed on the visible objects
- AllScope - operations are performed on all of the currently loaded
objects
- BestScope - allows the application to determine the current best scope
for operations based on the context of the operation
MarkedScope - operations are performed on all of the marked objects
- ScratchScope - operations are performed on all of the objects that were
added to the scratch scope using the
ScratchInsertand theScratchSetfunctions.SelectedScope - operations are performed only on selected objects
VisibleScope - operations are performed on all of the visible objects
GetAllContextKeys
std::vector<OEPropDB::OEKey> GetAllContextKeys()
Returns all of the relevant keys of interest corresponding to the current state of the application.
GetAtomsScoped
std::vector<OEPropDB::OEKey> GetAtomsScoped(unsigned int scope)
Returns a list of all the atom keys in the specified scope.
GetBondsScoped
std::vector<OEPropDB::OEKey> GetBondsScoped(unsigned int scope)
Returns a list of all the bond keys in the specified scope.
GetContoursScoped
std::vector<OEPropDB::OEKey> GetContoursScoped(unsigned int scope)
Returns a list of all the contour keys in the specified scope.
GetGridsScoped
std::vector<OEPropDB::OEKey> GetGridsScoped(unsigned int scope)
Returns a list of all the grid keys in the specified scope.
GetMarkedAtoms
std::vector<OEPropDB::OEKey> GetMarkedAtoms()
Returns a list of keys corresponding to all of the currently marked atoms.
GetMarkedAtomsScoped
std::vector<OEPropDB::OEKey> GetMarkedAtomsScoped(unsigned int scope)
Returns a list of keys corresponding to all of the currently marked atoms that are also in the specified scope.
GetMarkedBonds
std::vector<OEPropDB::OEKey> GetMarkedBonds()
Returns a list of keys corresponding to all of the currently marked bonds.
GetMarkedBondsScoped
std::vector<OEPropDB::OEKey> GetMarkedBondsScoped(unsigned int scope)
Returns a list of keys corresponding to all of the currently marked bonds that are also in the specified scope.
GetMarkedContours
std::vector<OEPropDB::OEKey> GetMarkedContours()
Returns a list of keys corresponding to all of the currently marked contours.
GetMarkedGrids
std::vector<OEPropDB::OEKey> GetMarkedGrids()
Returns a list of keys corresponding to all of the currently marked grids.
GetMarkedMolecules
std::vector<OEPropDB::OEKey> GetMarkedMolecules()
Returns a list of keys corresponding to all of the currently marked molecules.
GetMarkedMonitors
std::vector<OEPropDB::OEKey> GetMarkedMonitors()
Returns a list of keys corresponding to all of the currently marked monitors.
GetMarkedSurfaces
std::vector<OEPropDB::OEKey> GetMarkedSurfaces()
Returns a list of keys corresponding to all of the currently marked surfaces.
GetMoleculesScoped
std::vector<OEPropDB::OEKey> GetMoleculesScoped(unsigned int scope)
Returns a list of all the molecule keys in the specified scope.
GetScoped
std::vector<OEPropDB::OEKey> GetScoped(unsigned int scope)
std::vector<OEPropDB::OEKey> GetScoped(unsigned int scope, unsigned int type)
Returns a list of all the keys in the specified scope. If a type parameter
is specified, it will return a list of all keys of that type in the specified
scope. The type parameter can be retrieved by calling the GetType method
on an OEKey object.
GetSelectedAtom
OEPropDB::OEKey GetSelectedAtom()
Returns a key corresponding to a single selected atom. If multiple atoms are
currently selected, this is equivalent to returning the first entry in list
returned by GetSelectedAtoms.
GetSelectedAtoms
std::vector<OEPropDB::OEKey> GetSelectedAtoms()
Returns a list of keys corresponding to the currently selected atoms.
GetSelectedBond
OEPropDB::OEKey GetSelectedBond()
Returns a key corresponding to a single selected bond. If multiple atoms are
currently selected, this is equivalent to returning the first entry in list
returned by GetSelectedBonds.
GetSelectedBonds
std::vector<OEPropDB::OEKey> GetSelectedBonds()
Returns a list of keys corresponding to the currently selected bonds.
GetSelectedContours
std::vector<OEPropDB::OEKey> GetSelectedContours()
Returns a list of keys corresponding to the currently selected contours.
GetSelectedGrids
std::vector<OEPropDB::OEKey> GetSelectedGrids()
Returns a list of keys corresponding to the currently selected grids.
GetSelectedMolecules
std::vector<OEPropDB::OEKey> GetSelectedMolecules()
Returns a list of keys corresponding to the currently selected molecules.
GetSelectedMonitors
std::vector<OEPropDB::OEKey> GetSelectedMonitors()
Returns a list of keys corresponding to the currently selected monitors.
GetSelectedSurfaces
std::vector<OEPropDB::OEKey> GetSelectedSurfaces()
Returns a list of keys corresponding to the currently selected surfaces.
GetSurfacesScoped
std::vector<OEPropDB::OEKey> GetSurfacesScoped(unsigned int scope)
Returns a list of all the surface keys in the specified scope.
GetVisibleAtoms
std::vector<OEPropDB::OEKey> GetVisibleAtoms()
Returns a list of all the visible atom keys.
GetVisibleBonds
std::vector<OEPropDB::OEKey> GetVisibleBonds()
Returns a list of all the visible bond keys.
GetVisibleContours
std::vector<OEPropDB::OEKey> GetVisibleContours()
Returns a list of all the visible contour keys.
GetVisibleGrids
std::vector<OEPropDB::OEKey> GetVisibleGrids()
Returns a list of all the visible grid keys.
GetVisibleIDs
std::vector<unsigned int> GetVisibleIDs()
Returns a list of all the IDs for the current set of visible objects.
GetVisibleMolecules
std::vector<OEPropDB::OEKey> GetVisibleMolecules()
Returns a list of all the visible molecule keys.
GetVisibleMonitors
std::vector<OEPropDB::OEKey> GetVisibleMonitors()
Returns a list of all the visible monitor keys.
GetVisibleSurfaces
std::vector<OEPropDB::OEKey> GetVisibleSurfaces()
Returns a list of all the visible surface keys.
IDGet
unsigned int IDGet(const OESystem::OEBase &)
Returns the ID associated with the specified Python object.
IDTypeGet
std::string IDTypeGet(unsigned int)
Returns the name of the object type associated with the specified ID.
IsActive
bool IsActive(const OEPropDB::OEKey &k)
bool IsActive(unsigned int id, unsigned int conf=UINT_MAX)
Returns whether or not the specified object (key or ID with optional conformer index) is active/focused.
IsLocked
bool IsLocked(const OEPropDB::OEKey &k)
bool IsLocked(unsigned int id, unsigned int conf=UINT_MAX)
Returns whether or not the specified object (key or ID with optional conformer index) is locked.
IsMarked
bool IsMarked(const OEPropDB::OEKey &k)
bool IsMarked(unsigned int id, unsigned int conf=UINT_MAX)
Returns whether or not the specified object (key or ID with optional conformer index) is marked.
IsSelected
bool IsSelected(const OEPropDB::OEKey &k)
bool IsSelected(unsigned int id, unsigned int conf=UINT_MAX)
Returns whether or not the specified object (key or ID with optional conformer index) is selected.
IsTrulyVisible
bool IsTrulyVisible(const OEPropDB::OEKey &k)
bool IsTrulyVisible(unsigned int id, unsigned int conf=UINT_MAX)
Returns whether or not the specified object (key or ID with optional conformer index) is truly visible.
IsVisible
bool IsVisible(const OEPropDB::OEKey &k)
bool IsVisible(unsigned int id, unsigned int conf=UINT_MAX)
Returns whether or not the specified object (key or ID with optional conformer index) is visible.
Lock
void Lock(const std::string &k)
void Lock(const OEPropDB::OEKey &k, bool state)
void Lock(const std::vector<OEPropDB::OEKey> &keys, bool state)
void Lock(unsigned int id, bool state, unsigned int conf=UINT_MAX)
Sets the locked property on the specified object to the specified value (state). If a string value is passed to this function as opposed to an object specifier, the locked property will be set for all the objects that satisfy the specified query. For more details on the query language, see the relevant chapter in the main VIDA manual.
LockScoped
void LockScoped(bool state, unsigned int scope)
Sets the locked property to the specified value for all objects in the specified scope.
Mark
void Mark(const std::string &prop)
void Mark(const OEPropDB::OEKey &k, bool state)
void Mark(const std::vector<OEPropDB::OEKey> &keys, bool state)
void Mark(unsigned int id, bool state, unsigned int conf=UINT_MAX)
void Mark(const std::vector<OEPropDB::OEKey> &keys, bool state,
unsigned char action)
Sets the marked property on the specified object to the specified value (state). If a string value is passed to this function as opposed to an object specifier, the marked property will be set for all the objects that satisfy the specified query. For more details on the query language, see the relevant chapter in the main VIDA manual.
MarkScoped
void MarkScoped(bool state, unsigned int scope)
Sets the marked property to the specified value for all objects in the specified scope.
MimicParentVisibilityGet
bool MimicParentVisibilityGet(const OEPropDB::OEKey &k)
Returns whether or not the visibility of the specified object is controlled by its parent’s visibility.
MimicParentVisibilitySet
void MimicParentVisibilitySet(const OEPropDB::OEKey &k, bool mimic)
void MimicParentVisibilitySet(const std::vector<OEPropDB::OEKey> &k,
bool mimic)
Sets whether or not the visibility of the specified object(s) is controlled by each individual’s parent’s visibility.
MimicParentVisibilitySetScoped
void MimicParentVisibilitySetScoped(const std::string &tag, bool mimic,
unsigned int scope = BestScope)
Sets whether or not the visibility of a certain set of objects with the specified scope is controlled by each individual’s parent’s visibility. The set of objects is determined by the presence or absence of the specified tag on the molecule.
ScratchClear
void ScratchClear()
This function clears the ScratchScope.
ScratchGet
std::vector<OEPropDB::OEKey> ScratchGet()
Returns all of the keys currently in the ScratchScope.
ScratchInsert
void ScratchInsert(const OEPropDB::OEKey &)
void ScratchInsert(const std::vector<OEPropDB::OEKey> &)
This function adds a key to the ScratchScope.
ScratchSet
void ScratchSet(const std::string &prop)
void ScratchSet(const OEPropDB::OEKey &)
void ScratchSet(const std::vector<OEPropDB::OEKey> &)
This function sets the contents of the ScratchScope.
Select
void Select(const std::string &prop)
void Select(const OEPropDB::OEKey &k, bool state)
void Select(const std::vector<OEPropDB::OEKey> &keys, bool state)
void Select(unsigned int id, bool state, unsigned int conf=UINT_MAX)
void Select(const std::vector<OEPropDB::OEKey> &keys, bool state,
unsigned char action)
This function selects objects according to the selection language.
SelectAllMolecules
void SelectAllMolecules()
This function selects every molecule that is currently visible.
SelectByQuery
void SelectByQuery(const std::string &query, int action=0,
unsigned int scope = BestScope)
This function selects every molecule in the specified scope based on whether or not it matches the specified substructure query. Valid query inputs include SMILES, SMARTS, and IUPAC as well as common names. The IUPAC and common name to structure conversion is performed by the Ogham toolkit.
SelectInvert
void SelectInvert()
This function selects the currently visible, but not selected items, and deselects the visible and selected items.
SelectKeys
void SelectKeys(const std::vector<OEPropDB::OEKey> &atomsKeys)
This function selects the objects corresponding to each of the keys specified in the parameter list keys.
SelectOERID
void SelectOERID(unsigned int id, bool selected=true)
This function sets the selected property on the object corresponding to the specified id. The selected parameter specifies whether or not the object should either be selected or unselected.
SelectResidues
void SelectResidues(const std::vector<OEPropDB::OEKey> &keys, bool state)
Set the selected state of the residues containing the specified atoms.
SelectScoped
void SelectScoped(bool state, unsigned int scope)
Select or unselect (based on the state parameter) all the objects in the specified scope.
SelectWithin
void SelectWithin(float radius, bool selected)
This function selects all molecule objects, including atoms and bonds, within the specified radius of the currently selected objects.
SelectWithout
void SelectWithout(float radius, bool selected)
This function selects all molecule objects, including atoms and bonds, outside of the specified radii of the currently selected objects.
Subset
void Subset(const std::string &name, const std::string &sel)
Creates a named subset that can be then used in the Select routine.
Visible
void Visible(const std::string &prop)
void Visible(const OEPropDB::OEKey &k, bool state)
void Visible(const std::vector<OEPropDB::OEKey> &keys, bool state)
void Visible(unsigned int id, bool state, unsigned int conf=UINT_MAX)
void Visible(const std::vector<OEPropDB::OEKey> &keys, bool state,
unsigned char action)
bool Visible(const std::vector<unsigned int> &ids, bool visible,
unsigned int conf=UINT_MAX)
This function sets the keys that pass the specified criteria to be visible.
VisibleScoped
void VisibleScoped(bool state, unsigned int scope)
Sets the visibility of all the objects in the specified scope based on the state parameter.
VisualizeCommandScopeGet
unsigned int VisualizeCommandScopeGet()
Reserved for future expansion.
VisualizeCommandScopeSet
void VisualizeCommandScopeSet(unsigned int scope)
Reserved for future expansion.