OEHighlightMonomers
Attention
This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.
bool OEHighlightMonomers(OEDepict::OEImageBase& image,
const OEChem::OEMolBase& mol)
bool OEHighlightMonomers(OEDepict::OEImageBase& image,
const OEChem::OEMolBase& mol,
const OEHighlightMonomerDisplayOptions& opts)
The OEHighlightMonomers function is designed to depict a molecule
initialized from a HELM string and highlight its monomer components.
- image
The image on which the molecule is drawn.
- mol
The molecule being depicted.
- opts
The
OEHighlightMonomerDisplayOptionsobject that stores properties that determine the styles of the molecule depiction.
Example:
OEMonomerSet monomers;
OELoadOpenEyeMonomerSet(monomers);
OEGraphMol mol;
const std::string helm = "PEPTIDE1{[N1[C@@H](CCC1=O)C([R2])=O].P.S.K.D.A.F.I.G.L.M.[am]}$$$$";
OEHelmToMol(mol, helm, monomers);
OEPrepareDepiction(mol);
OEImage image(800, 400);
OEHighlightMonomerDisplayOptions opts;
opts.SetAtomStereoStyle(OEAtomStereoStyle::Display::All);
OEHighlightMonomers(image, mol, opts);
OEDrawCurvedBorder(image, OELightGreyPen, 10);
OEWriteImage("HighlightMonomers.svg", image);
Example of using OEHighlightMonomers function
bool OEHighlightMonomers(OEDepict::OE2DMolDisplay& disp,
const OEHighlightMonomerDisplayOptions& opts)
This overload of the OEHighlightMonomers function renders the
molecule with the monomer highlighting to the display object.
- disp
The display object for the molecule being depicted.
- opts
The
OEHighlightMonomerDisplayOptionsobject that stores properties that determine the styles of the molecule depiction.
See also
OEDrawMonomerGraphfunction to depict the monomer graph of molecule initialized from HELMOEDrawPeptidefunction to depict a peptide with standard amino acidsOEDrawResiduesfunction to depict residues of a peptide
Code Example
Depict Peptide OpenEye Python Cookbook recipe