Re: [Rdkit-discuss] Assigning formal charges

2017-08-10 Thread Juuso Lehtivarjo
Thanks Greg, This was quite close to the way I already deal with these cases. What I was hoping for was a more general solution (via the MMFF94 implementation perhaps?), since things get more interesting when charges are missing from e.g. different species of sulfur... -Juuso On Thu, Aug 10,

Re: [Rdkit-discuss] Assigning formal charges

2017-08-10 Thread Greg Landrum
Hi Juuso, A quick solution that seems like it would covert most cases would be to construct a molecule from you input without doing sanitization, calculate the atomic valences in non-strict mode, and then to identify all neutral N atoms with a valence of 4 and add a positive charge to them

[Rdkit-discuss] Assigning formal charges

2017-08-09 Thread Juuso Lehtivarjo
Hi All, and sorry if this has been previously answered. Found lots of threads close to this subject but not exactly what I'm looking for. I often encounter mol-files that have protonated atom species such as NH3+, with all protons explicitly present, but without charge lines. This leads to