OERenderMolecule¶
Link |
Description |
---|---|
renders a molecule display into an image |
|
renders molecule into an image using the default depiction style |
|
writes a molecule display into a file |
|
writes a molecule into a file using the default depiction style |
|
writes a molecule display into an output stream |
|
writes a molecule into an output stream using the default depiction style |
bool OERenderMolecule(OEImageBase &image, const OE2DMolDisplay &disp,
bool clearbackground=true)
Renders the molecule display into an image.
- image
The image in which the molecule is drawn.
- disp
The OE2DMolDisplay object that holds the data necessary to depict the molecule with which it is initialized.
- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clear
method) prior to the molecule rendering.
Example:
oedepict.OEPrepareDepiction(mol)
image = oedepict.OEImage(200.0, 200.0)
opts = oedepict.OE2DMolDisplayOptions(image.GetWidth(), image.GetHeight(),
oedepict.OEScale_AutoScale)
disp = oedepict.OE2DMolDisplay(mol, opts)
oedepict.OERenderMolecule(image, disp)
See also
OEImageBase class
OE2DMolDisplay class
bool OERenderMolecule(OEImageBase &image, const OEChem::OEMolBase &mol,
bool clearbackground=true)
Renders a molecule into an image using the default depiction style.
- image
The image in which the molecule is drawn.
- mol
The molecule being rendered has to have valid 2D coordinates before calling the
OERenderMolecule
function.- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clear
method) prior to the molecule rendering.
Example:
oedepict.OEPrepareDepiction(mol)
image = oedepict.OEImage(200.0, 200.0)
oedepict.OERenderMolecule(image, mol)
See also
OEImageBase class
bool OERenderMolecule(const std::string &filename, const OE2DMolDisplay &disp,
bool clearbackground=true)
Writes the molecule display into a file.
- filename
The name of the file into which the molecule display is being written. The extension of the filename determine the type of the image.
- disp
The OE2DMolDisplay object that holds the data necessary to depict the molecule with which it is initialized.
- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clear
method) prior to the molecule rendering.
Example:
oedepict.OEPrepareDepiction(mol)
opts = oedepict.OE2DMolDisplayOptions(200.0, 200.0, oedepict.OEScale_AutoScale)
disp = oedepict.OE2DMolDisplay(mol, opts)
oedepict.OERenderMolecule("OERenderMolecule-fname-disp.png", disp)
See also
OE2DMolDisplay class
bool OERenderMolecule(const std::string &filename, const OEChem::OEMolBase &mol,
bool clearbackground=true)
Writes a molecule into a file using the default depiction style.
- filename
The name of the file into which the molecule is written. The extension of the filename determine the type of the image.
- mol
The molecule being rendered has to have valid 2D coordinates before calling the
OERenderMolecule
function.- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clear
method) prior to the molecule rendering.
Example:
oedepict.OEPrepareDepiction(mol)
oedepict.OERenderMolecule("OERenderMolecule-fname-mol.png", mol)
bool OERenderMolecule(OEPlatform::oeostream &os, const std::string &extension,
const OE2DMolDisplay &disp, bool clearbackground=true)
Writes the molecule display into a stream.
- os
The stream into which the molecule display is being written.
- ext
The extension which determine the type of the image.
- disp
The OE2DMolDisplay object that holds the data necessary to depict the molecule with which it is initialized.
- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clear
method) prior to the molecule rendering.
Example:
oedepict.OEPrepareDepiction(mol)
opts = oedepict.OE2DMolDisplayOptions(200.0, 200.0, oedepict.OEScale_AutoScale)
disp = oedepict.OE2DMolDisplay(mol, opts)
ofs = oechem.oeofstream("OERenderMolecule-stream-disp.png")
oedepict.OERenderMolecule(ofs, "png", disp)
See also
oeostream class in the OEChem TK manual
OE2DMolDisplay class
bool OERenderMolecule(OEPlatform::oeostream &os, const std::string &extension,
const OEChem::OEMolBase &mol, bool clearbackground=true)
Writes a molecule into a stream using the default depiction style.
- os
The stream into which the molecule is being written.
- ext
The extension which determine the type of the image.
- mol
The molecule being rendered has to have valid 2D coordinates before calling the
OERenderMolecule
function.- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clear
method) prior to the molecule rendering.
Example:
oedepict.OEPrepareDepiction(mol)
ofs = oechem.oeofstream("OERenderMolecule-stream-mol.png")
oedepict.OERenderMolecule(ofs, "png", mol)
See also
oeostream class in the OEChem TK manual