OEInteractionHintContainer

class OEInteractionHintContainer

This class represents OEInteractionHintContainer, a read only class that stores molecules, the fragments of those molecules (OEInteractionHintFragment), and the typed interactions (OEInteractionHint) between the fragments.

../../_images/interactionhint.svg

Schematic representation of interaction hint container

See also

This class is used by OEChem TK and Grapheme TK to visualize protein-ligand interactions.

Code Examples

Constructors

OEInteractionHintContainer()

Constructs an empty OEInteractionHintContainer object.

OEInteractionHintContainer(const OEChem::OEMolBase &protein,
                           const OEChem::OEMolBase &ligand)

Initializes an OEInteractionHintContainer object with the two given molecule. The first molecule will be added to the container with the OEProteinInteractionHintComponent type while the second molecule will be added with the OELigandInteractionHintComponent type.

operator bool

operator bool() const

Same as the OEInteractionHintContainer::IsValid method.

AddMolecule

const OEChem::OEMolBase *AddMolecule(const OEChem::OEMolBase &mol,
                                     const OEInteractionHintComponentTypeBase &itype)

Adds a molecule the OEInteractionHintContainer with a given type. It returns the pointer of the molecule that is the copied molecule stored inside the interaction container or returns a NULL pointer if adding the molecule with the given type was unsuccessful.

See also

The following built-in component types are available:

DeleteInteraction

bool DeleteInteraction(const OEInteractionHint* inter);

Deletes the given interaction with the corresponding interaction fragments from the OEInteractionHintContainer object.

DeleteInteractions

bool DeleteInteractions();

Deletes all interactions.

GetInteractions

OESystem::OEIterBase<const OEInteractionHint> *GetInteractions() const

Returns an iterator over all of the interactions stored in the OEInteractionHintContainer object.

OESystem::OEIterBase<const OEInteractionHint> *
  GetInteractions(const OESystem::OEUnaryPredicate<OEInteractionHint> &pred) const

Returns an iterator over all of the interactions of the OEInteractionHintContainer object that match the specified interaction predicate.

GetMolecule

const OEChem::OEMolBase *
  GetMolecule(const OEInteractionHintComponentTypeBase &itype) const

Returns the first molecule stored in the OEInteractionHintContainer object with the given type.

See also

The following built-in component types are available:

GetMolecules

OESystem::OEIterBase<const OEChem::OEMolBase> *GetMolecules() const

Returns an iterator over all the molecule of the OEInteractionHintContainer object.

OESystem::OEIterBase<const OEChem::OEMolBase> *
  GetMolecules(const OEInteractionHintComponentTypeBase &itype) const

Returns an iterator over all the molecule with the given type of the OEInteractionHintContainer object.

See also

The following built-in component types are available:

GetTitle

const std::string &GetTitle() const

Returns the ‘title’ of the OEInteractionHintContainer object.

HasInteraction

bool HasInteraction(const OESystem::OEUnaryPredicate<OEInteractionHint> &pred) const

Returns true if there is at least one interaction stored in the OEInteractionHintContainer object that matches the given predicate.

IsValid

bool IsValid() const

Returns whether there is at least one molecule that is stored in the OEInteractionHintContainer object.

See also

NumFragments

unsigned int NumFragments() const

Returns the number of fragments stored in the OEInteractionHintContainer object

NumInteractions

unsigned int NumInteractions() const

Returns the number of interactions stored in the OEInteractionHintContainer object.

unsigned int
   NumInteractions(const OESystem::OEUnaryPredicate<OEInteractionHint> &pred) const

Returns the number of interactions stored in the OEInteractionHintContainer object that satisfies the given predicate.

NumMolecules

unsigned int NumMolecules() const

Returns the number of molecules stored in the OEInteractionHintContainer object

SetTitle

void SetTitle(const std::string &title)

Sets the ‘title’ of the OEInteractionHintContainer object.