I verified that r6 does the trick.  Using my rdchord cartridge, I get

tjo=> select
rd.list_matches(rd.rdmol('OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O'),
'[O;H0;D2;r6]',0,1);
          list_matches
--------------------------------
 {{4},{11},{18},{25},{32},{39}}
(1 row)

tjo=> select
rd.list_matches(rd.rdmol('OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O'),
'[O;H0;D2;!r6]',0,1);
          list_matches
--------------------------------
 {{6},{13},{20},{27},{34},{41}}
(1 row)

Here's an image showing the atom numbers corresponding to the list_matches
output.

TJ

[image: Inline image 2]

On Wed, Sep 6, 2017 at 6:04 PM, TJ O'Donnell <t...@acm.org> wrote:

> Try using [O;H0;D2;r6] lower-case r.  Sorry I'm not at a computer to
> check this.
> R6 means in 6 rings.
> r6 means in ring of size 6.
>
> http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html
>
> TJ O'Donnell
>
> On Wed, Sep 6, 2017 at 4:34 PM, James T. Metz via Rdkit-discuss <
> rdkit-discuss@lists.sourceforge.net> wrote:
>
>> Hello,
>>
>>     Given the following SMILES for a macrocyclic hexaose
>>
>>    OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)
>> OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O
>>
>>     can anyone suggest a SMARTS pattern that will distinguish ether
>> oxygens
>> in the smaller 6-membered rings versus the ethers in the larger
>> macrocyclic
>> structure?
>>
>>     For example, using RDkit, I have tried (e.g., pattern =
>> Chem.MolFromSmarts('[O;H0;D2]') )
>>
>>     [O;H0;D2]  ===>  gives 12 matches (all ether oxygens)
>>
>>     [O;H0;D2;R]  ===>  gives 12 matches (all ether oxygens)
>>
>>     [O;H0;D2;!R]  ===>  gives 0 matches
>>
>>     [O;H0;D2;R6]  ===>  gives 0 matches
>>
>>
>>     I am stumped.  Any ideas?
>>
>>     If it is necessary to write more complicated PYTHON/RDkit/SMARTS
>> code, I am certainly willing to try that.
>>
>>     Thanks!
>>
>>     Regards,
>>     Jim Metz
>>     Northwestern University
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>>
>>
>
------------------------------------------------------------------------------
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