Hi Guillaume,

I would just use the atomic molAtomMapNumber property. That does show up in
the output SMILES and does affect the canonicalization, which I think is
what you want.
Here's an example from Python showing that it works (the C++ version is, of
course, more lines of code, but the calls are the same):

In [*1*]: from rdkit import Chem

In [*2*]: m = Chem.MolFromSmiles('COCC')

In [*3*]: Chem.MolToSmiles(m)

Out[*3*]: 'CCOC'

In [*4*]: m.GetAtomWithIdx(0).SetProp('molAtomMapNumber','1')

In [*5*]: m.GetAtomWithIdx(1).SetProp('molAtomMapNumber','3')

In [*6*]: m.GetAtomWithIdx(2).SetProp('molAtomMapNumber','5')

In [*7*]: m.GetAtomWithIdx(3).SetProp('molAtomMapNumber','2')

In [*8*]: Chem.MolToSmiles(m)

Out[*8*]: '[CH3:1][O:3][CH2:5][CH3:2]'

-greg


On Tue, Nov 10, 2015 at 6:56 AM, Guillaume GODIN <
[email protected]> wrote:

> Dear All,
>
>
> I have NMR atom assignments based on 2D mol files  atom indexes.
>
>
> I would like to compresse those files into canonical smiles and store the
> atomindex mapping to be able to keep assignments.
>
>
> Of course I use C++ version of RDKit.
>
>
> Do we have a way to do that ?
>
>
> thanks for your help,
>
>
> best regards,​
>
>
> *Guillaume GODIN*
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to