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:
     Chem.SanitizeMol(mol)
except:
     print 'OK'


Ciao,

Gaetano


On 02/18/2016 01:09 AM, Paolo Tosco wrote:
> 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 Calabro wrote:
>> 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)
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to