I think there's a bug in IsOption caused by mishandling of options
with parameters:

>>> import pybel
>>> ob = pybel.ob
>>> mol = pybel.readstring("smi", "CC(=O)Cl").OBMol
>>> conv = ob.OBConversion()
>>> conv.SetOutFormat("inchi")
True
>>> print conv.WriteString(mol)
InChI=1S/C2H3ClO/c1-2(3)4/h1H3

>>> conv.SetOptions("X'FixedH'", conv.OUTOPTIONS)
>>> print conv.WriteString(mol)
InChI=1/C2H3ClO/c1-2(3)4/h1H3
Molecules and #0  are different

The "Molecules and #0 are different" should not be there. This is
triggered by the "e" output option, which it thinks has been
specified. When I run the C++ equivalent through the debugger, I see
that it thinks that IsOption("e") is not NULL. I don't quite know how
the OpMap works though so maybe Chris, could you take a look?

Thanks,
- Noel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to