Hello folks,
In a way this is a continuation of a previous discussion.
My question is: so is there a simple way to obtain the original
indexing with all hydrogen atoms included? Do I have to write
my own function?
Thank you.
Ling
Re: [Rdkit-discuss] SMILES and atom indexing
greg landrum Tue, 19 Mar 2013 13:09:32 -0700
Hi Nick, On Mar 19, 2013, at 5:00 PM, Nicholas Firth <nicholas.fi...@icr.ac.uk>
wrote:
> Hi RDKitters,
>
> I'm sure this must of been covered somewhere else but I can't find it in the
> forum or the source.
>
> I am manipulating SMILES strings and wonder whether I can use RDKit as a
> shortcut, so my question is does the order of occurrence in a SMILES string
> of an atom match the atom index that is given by RDKit. It seems to me that
> it does but I'd like to know for all cases. For example
>
> >>> from rdkit import Chem
> >>> mol=Chem.MolFromSmiles('CSNOC')
> >>> for atom in mol.GetAtoms(): print atom.GetAtomicNum(),atom.GetIdx()
> ...
> 6 0
> 16 1
> 7 2
> 8 3
> 6 4
>
> This is what I would expect, but is there a case when this order might not be
> conserved? The atom and bond order will be preserved unless the smiles
> contains hydrogens
as explicit atoms, i.e. as [H]. In that case, the hydrogens are removed and the
remaining indices are what your would expect. > If the order isn't always
conserved, how does the indexing cope with RDKit
> canonical smiles? I don't understand the question but maybe that doesn't
> matter since the order
is preserved? -greg > Thanks in advance.
>
> Best,
> Nick
>
> Nicholas C. Firth | PhD Student | Cancer Therapeutics
> The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton |
> Surrey | SM2 5NG
> T 020 8722 4033 | E nicholas.fi...@icr.ac.uk | W www.icr.ac.uk | Twitter
> @ICRnews
> Facebook www.facebook.com/theinstituteofcancerresearch
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss