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}, overwrite=True)
This is equivalent to:
obabel -:"CC(=O)Cl" -O tmp.svg -xC -xu --highlight "C(=O) green"
On 8 July 2013 09:43, david.lagorce wrote:
> 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 in InChI code
> DB00573 :Omitted undefined stereo
>
>
>
> any idea ?
>
> Thank you
>
>
>
>
> --
> View this message in context:
> http://forums.openbabel.org/highlight-substructures-with-pybel-tp4656468p4656473.html
> Sent from the openbabel-devel mailing list archive at Nabble.com.
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
--
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel