Hi there,

I have hit on some surprising behaviour (to me at least), and I thought to
ask for further clarification.

I create a molecule without sanitization (red flag) - because, oh well, I
downloaded this sd file from the web so it must be perfectly curated and
what not.

When I try Chem.AddHs, I get

<rdkit.Chem.rdchem.Mol object at 0x140a3d0>
[11:47:00]

****
Pre-condition Violation
getNumImplicitHs() called without preceding call to calcImplicitValence()
Violation occurred on line 167 in file
/opt/RDKit_trunk/Code/GraphMol/Atom.cpp
Failed Expression: d_implicitValence>-1
****

Traceback (most recent call last):
  File "./test.py", line 107, in <module>
    Chem.AddHs(m, addCoords=True)
RuntimeError: Pre-condition Violation

I understand that this may be related to having sanitization switched off
(in fact if I turn it on it works), but my question is - is this the
correct error message?
Perhaps calcImplicitValence() should be called regardless of sanitization?

I have attached a reproducible example.

-
Jean-Paul Ebejer
Early Stage Researcher

Attachment: test.py
Description: Binary data

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to