>>> We keep an audit log. From the command-line you get a summary:
>>>
>>> [ghutc...@iridium]: babel tpy-Ru.sdf tpy.mol2
>>> 1 molecule converted
>>> 1 info messages 23 audit log messages
>>>
>>> You can programmatically interrogate the error log to get the warnings,
>>> severity level, etc. The audit level is intended to cover any code which
>>> may change chemical interpretation (e.g., Kekulization, adding implicit
>>> hydrogens, bond perception, etc.).
>>
>> That's also what OpenEye does, but getting access to the error log,
>> synchronized with the reader, is nasty hard. Can someone show me how to get
>> that? For example, if Pybel is the preferred way to get this data, then how
>> do I get the error logs for each molecule in
>>
>> for mol in pybel.readfile("sdf", "benzodiazepine.sdf.gz"):
>>
>> ?
>
> This will take me a while to dig into.
There is a global instance of the error log object at openbabel.obErrorLog:
Here's an example of usage, but see the API docs or dir() the object
for further methods:
for i, mol in enumerate(pybel.readfile("sdf",
os.path.join("not-backed-up", "all-sdf.sdf"))):
print i, pybel.ob.obErrorLog.GetErrorMessageCount()
- Noel
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss