OEInteractionHint
class OEInteractionHint : public OESystem::OEBase
The OEInteractionHint class is a container that stores a typed interaction between two fragments (OEInteractionHintFragment) of an OEInteractionHintContainer object.
Schematic representation of interaction hint container
See also
See also
The following built-in interaction hint types are available:
Code Examples
Perceive and Print Protein-Ligand Interactions OEChem TK example
Depicting Active Site Interactions Grapheme TK example
OpenEye Python Cookbook recipes:
Constructors
OEInteractionHint(rhs: OEInteractionHint) -> OEInteractionHint
Constructs an OEInteractionHint object with the given parameters.
- container
The OEInteractionHintContainer object the two fragments belong to.
- fragBgn, fragEnd
The two fragments of the interaction. The first fragment is going to be considered as the ‘begin’ fragment, while the second one will be the considered as the ‘end’ fragment.
- type
The type of the interaction that is derived from the OEInteractionHintTypeBase abstract base class.
See also
OEInteractionHint(rhs: OEInteractionHint) -> OEInteractionHint
Copy constructor.
CreateCopy
CreateCopy() -> OEBase
Deep copy constructor that returns a copy of the object. The memory of the returned OEInteractionHint object is dynamically allocated and owned by the caller.
HasCalculatedGeometry
HasCalculatedGeometry(name: str) -> bool
Returns true if the interaction hint has the geometry calculated with the
given name.
- name
The name of the calculated geometry. All interaction hint geometry names start with the
bio:interaction:prefix. TheOEInteractionHint.HasCalculatedGeometrymethod can be invoked with or without thebio:interaction:prefix in the given name.
See also
GetBgnFragment
GetBgnFragment() -> OEInteractionHintFragment
Returns the ‘begin’ fragment of the interaction. The ‘begin’ fragment is defined when the interaction is constructed.
See also
Note
In case of an “unpaired” interaction both the OEInteractionHint.GetBgnFragment and
OEInteractionHint.GetEndFragment methods will point to the same fragment.
See Also: OEIsUnpairedInteractionHint predicate
GetCalculatedGeometry
GetCalculatedGeometry(name: str) -> float
Returns the calculated geometry of the interaction (such as distance or angle). The “distance” values are given in Angstroms, and all “angle” values are given in radians.
- name
The name of the calculated geometry. All interaction hint geometry names start with the
bio:interaction:prefix. TheOEInteractionHint.GetCalculatedGeometrymethod can be invoked with or without thebio:interaction:prefix in the given name.
Hint
It is a good practice to call OEInteractionHint.HasCalculatedGeometry
beforehand to check whether the interaction hint has a geometry with a given name.
Example:
if inter.HasCalculatedGeometry("distance"):
distance = inter.GetCalculatedGeometry("distance")
print("distance: {:.3f} Angstrom(s)".format(distance))
if inter.HasCalculatedGeometry("acceptor-angle"):
angle = math.degrees(inter.GetCalculatedGeometry("acceptor-angle"))
print("acceptor angle: {:.3f} degree(s)".format(angle))
See also
GetCalculatedGeometries
GetCalculatedGeometries() -> Iterable[str]
Returns an iterator over the geometry names of the interaction hint.
See also
GetDataType
GetDataType() -> void
This function is used to perform run-time type identification.
See also
OEBase.GetDataTypemethod in the OEChem TK manual
GetDetails
GetDetails() -> str
Returns the string data associated with the OEInteractionHint object.
GetEndFragment
GetEndFragment() -> OEInteractionHintFragment
Returns the ‘end’ fragment of the interaction. The ‘end’ fragment is defined when the interaction is constructed.
See also
Note
In case of an “unpaired” interaction both the OEInteractionHint.GetBgnFragment and
OEInteractionHint.GetEndFragment methods will point to the same fragment.
See Also: OEIsUnpairedInteractionHint predicate
GetFragment
GetFragment(arg2: OEInteractionHintComponentTypeBase) -> OEInteractionHintFragment
Returns the pointer to one fragment with the given component type. If neither the ‘begin’ nor the ‘end’ fragment has the given type, a NULL pointer will be returned.
Warning
In case of an intramolecular interaction, the
OEInteractionHint.GetFragment can return a NULL
pointer, so the return value should always be checked.
See also
The following built-in component types are available:
GetInteractionType
GetInteractionType() -> OEInteractionHintTypeBase
Returns the interaction type of the OEInteractionHint object.
See also
The following built-in fragment connection types are available:
GetWeight
GetWeight() -> float
Returns the ‘weight’ (or score) associated with the OEInteractionHint object.
IsDataType
IsDataType(arg2: void) -> bool
Returns whether type is the same as the instance this method is called on.
See also
OEBase.IsDataTypemethod in the OEChem TK manual
IsInter
IsInter() -> bool
Returns whether the two fragments of the OEInteractionHint object belongs to the different molecules.
IsIntra
IsIntra() -> bool
Returns whether the two fragments of the OEInteractionHint object belongs to the same molecule.
IsValid
IsValid() -> bool
Returns whether the OEInteractionHint object represents a valid interaction defined by the type associated with it.
SetDetails
SetDetails(details: str) -> None
Sets string data associated with the OEInteractionHint object.
SetWeight
SetWeight(arg2: float) -> None
Sets the ‘weight’ associated with the OEInteractionHint object.
- weight
This number has to be in the range of
[0.0, 1.0].