Re: [Rdkit-discuss] sanitization converts "I(=O)(=O)[O-]" into "[O-][I+2]([O-])[O-]"

2021-01-22 Thread Peter S. Shenkin


On Fri, Jan 22, 2021 at 9:01 AM Ivan Tubert-Brohman <
ivan.tubert-broh...@schrodinger.com> wrote:

> I think there was some confusion between left and right in the original
> message, but RDKit prefers the representation that preserves the octet at
> the expense of having more formal charges:
>
> In [9]: mol = Chem.MolFromSmiles('O=I(=O)([O-])')
>
>
> In [10]: Chem.MolToSmiles(mol)
>
> Out[10]: '[O-][I+2]([O-])[O-]'
>
> I don't think there's right and wrong here; it's just a matter of a
> toolkit picking a canonical convention.
>
> Carboxylates are different in that the popular representation (C(=O)[O-])
> doesn't break the octet rule. But another interesting case is nitro groups:
>
> In [11]: mol = Chem.MolFromSmiles('CN(=O)=O')
>
>
> In [12]: Chem.MolToSmiles(mol)
>
> Out[12]: 'C[N+](=O)[O-]'
>
>
> Ivan
>
> On Thu, Jan 21, 2021 at 9:06 PM Peter S. Shenkin 
> wrote:
>
>> It seems to me offhand RDKit's choice is analogous the way carboxylates
>> are generally notated:
>>
>> R-C(=O)O- rather than R-C+(O-)O- .
>>
>> Both are legitimate and in fact equivalent upon application of
>> chemical knowledge, but do you prefer the second representation for
>> carboxylates?
>>
>> -P.
>>
>>
>>
>>
>>
>> On Thu, Jan 21, 2021 at 2:06 PM Jason Biggs 
>> wrote:
>>
>>> The RDKit will always convert iodate from the form on the left, with an
>>> expanded octet on iodine and a single negative charge, into the form on the
>>> right with all single bonds and a charge on every atom (image here
>>> https://i.stack.imgur.com/hq3St.png).  This happens no matter how I
>>> import the molecule, from SMILES or from a file.  The only way to avoid it
>>> is to skip sanitization, which I'd rather avoid.
>>>
>>> Is this the desired behavior?
>>>
>>> Thanks
>>> Jason
>>>
>>> [image: image.png]
>>>
>>>
>>>
>>>
>>> ___
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
> --
-P.
Sent from a cell phone. Pls forgive brvty and m1$tea@ks.
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] sanitization converts "I(=O)(=O)[O-]" into "[O-][I+2]([O-])[O-]"

2021-01-22 Thread Ivan Tubert-Brohman
I think there was some confusion between left and right in the original
message, but RDKit prefers the representation that preserves the octet at
the expense of having more formal charges:

In [9]: mol = Chem.MolFromSmiles('O=I(=O)([O-])')


In [10]: Chem.MolToSmiles(mol)

Out[10]: '[O-][I+2]([O-])[O-]'

I don't think there's right and wrong here; it's just a matter of a toolkit
picking a canonical convention.

Carboxylates are different in that the popular representation (C(=O)[O-])
doesn't break the octet rule. But another interesting case is nitro groups:

In [11]: mol = Chem.MolFromSmiles('CN(=O)=O')


In [12]: Chem.MolToSmiles(mol)

Out[12]: 'C[N+](=O)[O-]'

Ivan

On Thu, Jan 21, 2021 at 9:06 PM Peter S. Shenkin  wrote:

> It seems to me offhand RDKit's choice is analogous the way carboxylates
> are generally notated:
>
> R-C(=O)O- rather than R-C+(O-)O- .
>
> Both are legitimate and in fact equivalent upon application of
> chemical knowledge, but do you prefer the second representation for
> carboxylates?
>
> -P.
>
>
>
>
>
> On Thu, Jan 21, 2021 at 2:06 PM Jason Biggs  wrote:
>
>> The RDKit will always convert iodate from the form on the left, with an
>> expanded octet on iodine and a single negative charge, into the form on the
>> right with all single bonds and a charge on every atom (image here
>> https://i.stack.imgur.com/hq3St.png).  This happens no matter how I
>> import the molecule, from SMILES or from a file.  The only way to avoid it
>> is to skip sanitization, which I'd rather avoid.
>>
>> Is this the desired behavior?
>>
>> Thanks
>> Jason
>>
>> [image: image.png]
>>
>>
>>
>>
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss