Hi Paolo,
Thanks a lot for your prompt reply. I ended up coding this:
from rdkit import Chem
from rdkit import RDLogger
smart =
'[#6]1(:[#6]:[#6]:[#6]2:[#6](:[#6]:1):[#6]:[#6]:[#6]:[#6]:2)-[#8,#6]'
mol = Chem.MolFromSmarts(smart)
lg = RDLogger.logger()
lg.setLevel(RDLogger.CRITICAL)
try:
Dear Gaetano,
you may try the following:
from rdkit import rdBase
rdBase.DisableLog('rdApp.error')
You may check the logging levels you wish to disable/enable in
rdkit/RDLogger.py, or use a wildcard such as 'rdApp.*' to affect all
levels at once.
Best,
Paolo
On 17/02/2016 23:54, Gaetano
Hi there,
I wonder if there is an easy way to suppress the standard output and standard
error from RDkit. For example:
from rdkit import Chem
smart = '[#6]1(:[#6]:[#6]:[#6]2:[#6](:[#6]:1):[#6]:[#6]:[#6]:[#6]:2)-[#8,#6]'
mol = Chem.MolFromSmarts(smart)
Chem.SanitizeMol(mol)
This will
3 matches
Mail list logo