On Mon, 18 Nov 2019 16:40:28 +0000
David Cosgrove <davidacosgrov...@gmail.com> wrote:

> Point taken. I don’t think you’d be able to get RDKit to spit such SMILES
> strings out unless you tortured it pretty hard, however.

Export smiles with arbitrary given atom order is diffrent problem.
Normally working with mol object you dont remove any bond, but rather
you change atoms properties (such as isotope, AtomMapNum, explicitHs
and so on). I want to show some simple example but in simple cases
MolToSmiles with rootedAtAtom=0, canonical=False preserve atom order.
I found one example when it didn't work as I expected (atom order was
altered) but it seems I lost this smiles. 
Anyway, is such code:

mol=Chem.MolFromSmiles(someSmilesString)
change_properties_of_some_atoms_in_mol(mol) #this function changes isotopes of 
selected atoms
smiles2 = Chem.MolToSmiles(mol, rootedAtAtom=0, canonical=False)
mol_from_smiles2 = Chem.MolFromSmiles(smiles2)

atom order (or atom indices returned by GetIdx() function) should be the same 
or it can be diffrent?


best,

Rafal


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to