Dear Pascal, To my knowledge, Chem.MolToSmiles exports a molecule to Smiles format using RDKit's own indexation scheme, so it can be different from the one found in a SDF file.
A work-around to get the same indexation would be to change the atom ranks directly in the Mol objects. To achieve this, you could try to follow the solution suggested by Brian Kelley (1). Please find attached a jupyer-notebook for an example (Python 3). Best regards, José-Manuel Gally (1) https://sourceforge.net/p/rdkit/mailman/message/35898962/ 2018-08-27 13:15 GMT+02:00 Pascal KREZEL <pascal.kre...@gmail.com>: > > Hi, > > I remark that the indexation of a molecule extracted of sdf file and the > molecule created from the smiles of this molecule (even after having > applied AllChem.Compute2DCoords()) are not the same. Is there a method > to obtain the same indexation. > > Sincerely. > > > ------------------------------------------------------------ > ------------------ > 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 > > -- José-Manuel Gally PhD Student Structural Bioinformatics & Chemoinformatics Institut de Chimie Organique et Analytique (ICOA) UMR CNRS-Université d'Orléans 7311 Université d'Orléans Rue de Chartres F-45067 Orléans phone: +33 238 494 577
get_same_atom_indexation_sdf_smiles.ipynb
Description: Binary data
------------------------------------------------------------------------------ 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