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, 2017 at 9:17 AM, Greg Landrum <greg.land...@gmail.com> wrote:
> 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
>
> Here's an example gist showing what I mean:
> https://gist.github.com/greglandrum/7f546d1e35c2df537c68a64d887793b8
>
> I hope this helps,
> -greg
>
>
>
> On Wed, Aug 9, 2017 at 11:31 AM, Juuso Lehtivarjo
> <juuso.lehtiva...@gmail.com> wrote:
>>
>> 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 sanitation error (Explicit valence greater than
>> permitted) unless I update the formal charge of the nitrogen to +1. Is
>> there a way in RDKit to set default formal charges based on the
>> molecular graph, given that it contains the correct amount of protons?
>>
>> Best, Juuso
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to