|
From: Stefano F. <fo...@sc...> - 2020-12-27 00:46:38
|
Hi Noel,
that worked! For the record, this is the code:
---------
from openbabel import openbabel as ob
ob.obErrorLog.SetOutputLevel(0)
---------
Thank you much for the help!
Happy holidays,
Best,
S
--
Stefano Forli, PhD
Assistant Professor
Dept. of Integrative Structural
and Computational Biology, MB-112A
The Scripps Research Institute
10550 North Torrey Pines Road
La Jolla, CA 92037-1000, USA.
tel: +1 (858)784-2055
fax: +1 (858)784-2860
email: fo...@sc...
http://www.scripps.edu/~forli/
________________________________________
From: Noel O'Boyle <bao...@gm...>
Sent: Saturday, December 19, 2020 1:40 AM
To: Stefano Forli
Cc: ope...@li...
Subject: Re: [Open Babel] Prevent warning messages (Python, OB 3.1.0)
That creates a new message handler. You need to get hold of the existing one. It's something like obErrorLog. If you use dir() on ob, you will find the exact name.
On Fri, 18 Dec 2020, 23:38 Stefano Forli, <fo...@sc...<mailto:fo...@sc...>> wrote:
Hi,
I'm having a hard time disabling warning messages using the OBMessageHandler class using Python and OB 3.1.0 (installed from Conda):
...
==============================
*** Open Babel Warning in PerceiveBondOrders
Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders
...
I have tried the following code to suppress the messages with no success (I've stopped the logging after trying changing the output level):
ob_log = ob.OBMessageHandler()
ob_log.SetOutputLevel(0)
ob_log.StopLogging()
Suggestions are welcome.
S
--
Stefano Forli, PhD
Assistant Professor
Dept. of Integrative Structural
and Computational Biology, MB-112A
Scripps Research
10550 North Torrey Pines Road
La Jolla, CA 92037-1000, USA.
tel: +1 (858)784-2055
email: fo...@sc...<mailto:fo...@sc...>
https://forlilab.org
_______________________________________________
OpenBabel-discuss mailing list
Ope...@li...<mailto:Ope...@li...>
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
|