On Wednesday, August 27, 2014, <[email protected]> wrote:
>
> I'm using Jameed's wonderful code for a matched pair analysis.
>
> Given such a transformation string "[*:1]C>>[*:1][H]"
> => How do I check if [*:1] is an aromatic or an aliphatic atom?
>
>
> I fear that this can only be done by going back into the original
> data/output, or am I wrong ?
>
If what you are looking for is information about what type of atom [*:1] is
in the original molecule, I think you can probably figure it out based on
the additional info that's present in the output from Jameed's code.
For example, here's one of the output lines from an indexing.py run that I
did for an RDKit blog post I'm working on (hopefully going up today):
Cc1c(CCN2CCNCC2)ccc3cc(F)ccc13,Fc1ccc2cc(CCN3CCNCC3)ccc2c1,521767,521766,[*:1]C>>[*:1][H],[*:1]c1c(CCN2CCNCC2)ccc2cc(F)ccc21
The last entry in that line is the "core", which shows where the [*:1] is
attached.
Using these cores, you can get information about where points are attached
to them like this:
In [*2*]: m = Chem.MolFromSmiles('[*:1]c1c(CCN2CCNCC2)ccc2cc(F)ccc21')
In [*3*]: attaches = [x for x in m.GetAtoms() if x.GetAtomicNum()==0]
In [*7*]: for at in attaches:
if at.HasProp("molAtomMapNumber"):
nbr = at.GetNeighbors()[0]
print
at.GetProp("molAtomMapNumber"),nbr.GetSymbol(),nbr.GetIsAromatic()
...:
1 C True
This says that attachment point 1 is connected to a carbon which is
aromatic.
Does that help?
-greg
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss