Hi Noel,
thanks a lot...
I am still working with OB 2.2.3 and I think it is not implemented in this
version. I will try to migrate to the last version.
Thank you to everyone
David
--
View this message in context:
http://forums.openbabel.org/highlight-substructures-with-pybel-tp4656468p4656
We added "--highlight" to provide this functionality. This is an
"operation", and is used as follows:
import pybel
mol = pybel.readstring("smi", "CC(=O)Cl")
highlighter = pybel._operations["highlight"]
highlighter.Do(mol.OBMol, "C(=O) green")
mol.write("svg", "tmp.svg", opt={"u":None, "C":None},
Thanks Geoff...
but I still have problem...I tried in svg and png and I have this message:
==
*** Open Babel Warning in PNG Format
Embedding in InChI format.
Use the -xO (uppercase O) option for a different format
==
*** Open Babel Warning
> But, is it possible with pybel?
Of course. You can set output flags when writing molecules with Pybel.
molecule.write("svg", "test.svg", False, opt)
opt -- a dictionary of format-specific options
For format options with no parameters, specify the
value as Non