This patch unifies behaviour as per [bug:1198].
The bug incorrectly reported that the MDLReader ignores valency information for non-pseudo atoms. This was incorrect and the valency information was only read for non-pseudo atoms. To avoid the potential confusion the conditional for the pseudo-atom was removed - it should not matter if the atom is a pseudo atom we can still set the valency. The MDLV2000Writer however did ignore the valency unless an IO option was set. Reading the CTFile spec shows the valency field is not for query molecules. The IO option was deprecated and valency is now always written.
As Rich describes in the blog post the valence field shows the number of bonds including implicit hydrogens. I've added the setting of implicit hydrogens once the MDL file is read.
I put it on master as I deprecated an IO option on the MDLWriter - plus the implicit hydrogen inference is a bit more then a bug fix. Plus I think I have a couple of MDL patches waiting on 1.4 which could cause merge conflicts.
Log in to post a comment.