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() -> OEInteractionHintContainer

Constructs an empty OEInteractionHintContainer object.

OEInteractionHintContainer(protein: Union[OEGraphMol,OEMol,OEQMol],
                           ligand: Union[OEGraphMol,OEMol,OEQMol]) -> OEInteractionHintContainer

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

To perceive only intramolecular interactions within one component, pass an empty molecule for the other component. For example, to perceive only intramolecular interactions within the protein, pass an empty molecule as the ligand argument. Similarly, to perceive only intramolecular interactions within the ligand, pass an empty molecule as the protein argument.

OEInteractionHintContainer(du: OEDesignUnit, receptorMask: int) -> OEInteractionHintContainer

Initializes an OEInteractionHintContainer from an OEDesignUnit. The receptor component is assembled from all design unit components matching receptorMask (default: OEDesignUnitComponents_TargetComplex). If the design unit has a ligand, it is added with the OELigandInteractionHintComponent type. If the design unit has site residues but no ligand, an empty ligand molecule is used so that only intramolecular interactions within the receptor are perceived.

operator bool

IsValid() -> bool

Same as the OEInteractionHintContainer.IsValid method.

AddMolecule

AddMolecule(mol: Union[OEGraphMol,OEMol,OEQMol],
            itype: OEInteractionHintComponentTypeBase) -> OEGraphMol

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

DeleteInteraction(arg2: OEInteractionHint) -> bool

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

DeleteInteractions

DeleteInteractions() -> bool

Deletes all interactions.

GetInteractions

GetInteractions() -> Iterable[OEInteractionHint]

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

GetInteractions(pred: OEUnaryInteractionHintPred) -> Iterable[OEInteractionHint]

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

GetMolecule

GetMolecule(itype: OEInteractionHintComponentTypeBase) -> OEGraphMol

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

See also

The following built-in component types are available:

GetMolecules

GetMolecules() -> Iterable[OEMolBase]

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

GetMolecules(itype: OEInteractionHintComponentTypeBase) -> Iterable[OEMolBase]

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

GetTitle() -> str

Returns the ‘title’ of the OEInteractionHintContainer object.

HasInteraction

HasInteraction(pred: OEUnaryInteractionHintPred) -> bool

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

IsValid

IsValid() -> bool

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

See also

NumFragments

NumFragments() -> int

Returns the number of fragments stored in the OEInteractionHintContainer object

NumInteractions

NumInteractions() -> int

Returns the number of interactions stored in the OEInteractionHintContainer object.

NumInteractions(pred: OEUnaryInteractionHintPred) -> int

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

NumMolecules

NumMolecules() -> int

Returns the number of molecules stored in the OEInteractionHintContainer object

SetTitle

SetTitle(title: str) -> None

Sets the ‘title’ of the OEInteractionHintContainer object.