Hi There,
I'm a longtime rdkit user but a first time mailing list user.
One thing that has always haunted me is the warnings and errors that get
thrown whilst reading in a dirty sd file or smiles list. I've tried to no
avail to silence the warnings and errors many times and normally just live
with the endless scroll on my terminal but today I've finally had enough.
Any help would be appreciated!!
I've tried wrapping a ForwardSDMolSupplier with the following :
from io import StringIO
import sys
Chem.WrapLogs()
def silent_supplier(supplier):
sio = sys.stderr = StringIO()
for m in supplier:
sio = sys.stderr = StringIO()
if m is None:
continue
else:
yield m
but still get a stream of these sorts of errors:
[11:39:24] S group DAT ignored on line 143364
[11:39:24] Can't kekulize mol. Unkekulized atoms: 5 6 7 8 9 10 11 13 14
[11:39:24] ERROR: Could not sanitize molecule ending on line 143370
[11:39:24] ERROR: Can't kekulize mol. Unkekulized atoms: 5 6 7 8 9 10 11
13 14
[11:39:24] S group DAT ignored on line 145111
[11:39:24] Can't kekulize mol. Unkekulized atoms: 3 4 5 6 26
[11:39:24] ERROR: Could not sanitize molecule ending on line 145117
[11:39:24] ERROR: Can't kekulize mol. Unkekulized atoms: 3 4 5 6 26
[11:39:24] S group DAT ignored on line 159380
[11:39:24] Can't kekulize mol. Unkekulized atoms: 5 6 7 8 9 10 11 12 13
[11:39:24] ERROR: Could not sanitize molecule ending on line 159386
[11:39:24] ERROR: Can't kekulize mol. Unkekulized atoms: 5 6 7 8 9 10 11
12 13
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss