Dear RDKitters,

I have a question regarding SMARTS codes for three simple functional
groups, these are =C=, #CH and #C-. I am new to SMARTS/SMILES. I indeed
tried to guess their codes. Here are my guesses:

=C= : [CH0;A;X2;!R](=[$(*)])=[$(*)]

#CH : [CH1;A;X2;!R]#[$(*)]

#C- :  [CH0;A;X2;!R]#[$(*)]

I checked these SMARTS at
http://smartsview.zbh.uni-hamburg.de/smartsview/calculate?method=get; they
all seem make sense.

For example, the webpage prints out following messages:

=C=: it says "aliphatic C with 0 further total connections, with 0 further
hydrogen, not in a ring".

#CH: "aliphatic C with 0 further total connections, with 1 further
hydrogen, not in a ring".

#C-: "aliphatic C with 1 further total connections, with 0 further
hydrogen, not in a ring".

However, when I search subgroups using these SMARTS, I had problems.

For example, if I search "C=C=O" using "[CH0;A;X2;!R](=[$(*)])=[$(*)]",
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('C=C=O')
>>>
m.GetSubstructMatches(Chem.MolFromSmarts("[CH0;A;X2;!R](=[$(*)])=[$(*)]"))
((1, 0, 2),)

it prints out atomic positions 1, 0, 2--three positions. But I would expect
only one position for the Carbon in the middle.

Similarly, if I search "C#C" using "[CH1;A;X2;!R]#[$(*)]",
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('C#C')
>>> m.GetSubstructMatches(Chem.MolFromSmarts("[CH1;A;X2;!R]#[$(*)]"))
((0, 1),)
I would expect two separate positions such as (0,), (1,), indicating there
are two carbon triple bonds (with an hydrogen).


Then if  if I search "CC#CC" using " [CH0;A;X2;!R]#[$(*)]",
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('CC#CC')
>>> m.GetSubstructMatches(Chem.MolFromSmarts(" [CH0;A;X2;!R]#[$(*)]"))
((1, 2),)
Again, I would expect two separate positions such as (1,), (2,), indicating
two carbon triple bonds.

I think the problem might be my SMARTS for these three groups are not
SPECIFIC. I would appreciate everyone's help on this.

Cheers,
Chenyang
------------------------------------------------------------------------------
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

Reply via email to