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.
See also
- OEInteractionHintContainer class
- OEInteractionHintFragment class
- OEPerceiveInteractionOptions class
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
- Accessing Interaction Hint Information OpenEye Python Cookbook recipe
Constructors¶
OEInteractionHint(const OEInteractionHintContainerImpl *container,
const OEInteractionHintFragment *fragBgn,
const OEInteractionHintFragment *fragEnd,
const OEInteractionHintTypeBase &itype)
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(const OEInteractionHint &rhs)
Copy constructor.
CreateCopy¶
OESystem::OEBase *CreateCopy() const
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¶
bool HasCalculatedGeometry(const std::string& name) const
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. The OEInteractionHint.HasCalculatedGeometry method can be invoked with or without the bio:interaction: prefix in the given name.
See also
GetBgnFragment¶
const OEInteractionHintFragment *GetBgnFragment() const
Returns the ‘begin’ fragment of the interaction. The ‘begin’ fragment is defined when the interaction is constructed.
See also
GetCalculatedGeometry¶
double GetCalculatedGeometry(const std::string& name) const
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. The OEInteractionHint.GetCalculatedGeometry method can be invoked with or without the bio: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"))
{
double distance = inter.GetCalculatedGeometry("distance");
Console.WriteLine("distance: " +
String.Format("{0,4:0.000}", distance) + " Angstrom(s)");
}
if (inter.HasCalculatedGeometry("acceptor-angle"))
{
double angle = ToDegrees(inter.GetCalculatedGeometry("acceptor-angle"));
Console.WriteLine("acceptor angle: " +
String.Format("{0,4:0.000}", angle) + " degree(s)");
}
See also
GetCalculatedGeometries¶
OESystem::OEIterBase<const std::string>* GetCalculatedGeometries() const
Returns an iterator over the geometry names of the interaction hint.
See also
GetDataType¶
const void *GetDataType() const
This function is used to perform run-time type identification.
See also
- OEBase.GetDataType method in the OEChem TK manual
GetDetails¶
std::string GetDetails() const
Returns the string data associated with the OEInteractionHint object.
GetEndFragment¶
const OEInteractionHintFragment *GetEndFragment() const
Returns the ‘end’ fragment of the interaction. The ‘end’ fragment is defined when the interaction is constructed.
See also
GetFragment¶
const OEInteractionHintFragment *
GetFragment(const OEInteractionHintComponentTypeBase &) const
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¶
const OEInteractionHintTypeBase &GetInteractionType() const
Returns the interaction type of the OEInteractionHint object.
See also
The following built-in fragment connection types are available:
GetWeight¶
double GetWeight() const
Returns the ‘weight’ (or score) associated with the OEInteractionHint object.
IsDataType¶
bool IsDataType(const void *) const
Returns whether type is the same as the instance this method is called on.
See also
- OEBase.IsDataType method in the OEChem TK manual
IsInter¶
bool IsInter() const
Returns whether the two fragments of the OEInteractionHint object belongs to the different molecules.
IsIntra¶
bool IsIntra() const
Returns whether the two fragments of the OEInteractionHint object belongs to the same molecule.
IsValid¶
bool IsValid() const
Returns whether the OEInteractionHint object represents a valid interaction defined by the type associated with it.
SetDetails¶
void SetDetails(const std::string& details)
Sets string data associated with the OEInteractionHint object.
SetWeight¶
void SetWeight(double)
Sets the ‘weight’ associated with the OEInteractionHint object.
- weight
- This number has to be in the range of [0.0, 1.0].