connorcoley / rdchiral

Wrapper for RDKit's RunReactants to improve stereochemistry handling
MIT License
154 stars 53 forks source link

Is there any way to disable logs? #43

Open wmhcqw opened 1 year ago

wmhcqw commented 1 year ago

I'm using Jupyter Notebook with Multiprocessing Pool method to extract templates from reactions. But the log like this keep coming out and finally forced my jupyter notebook to be shut down.

Could not validate reaction successfully
ID: 9
retro_canonical: [#7;a:1]:[c:2]-[Cl;H0;D1;+0:3].[ClH;D0;+0:3]>>[#7;a:1]:[c:2]-[Cl;H0;D1;+0:3]

Is there any way to disable logs, something like rdkit's RDLogger.disable("rdApp.*")?

connorcoley commented 1 year ago

Not without a slight modification to the source, but it should be fairly straightforward if you're comfortable with Python. This is one of a couple hardcoded print statements: https://github.com/connorcoley/rdchiral/blob/b8cd87e6d8b8c877fa5712e25e0b6ccadeb169d2/rdchiral/template_extractor.py#L806