Re: [Rdkit-discuss] Question on substructure search
Hi Patrick and RDKit, rdkit.__version__ = 2023.03.1 Here is a slightly more explicit variant tried because neither worked to find a match: [cid:[email protected]] Respectfully, Joey Storer General Business From: Patrick Walters Sent: Tuesday, June 13, 2023 5:54 PM To: Storer, Joey (J) Cc: [email protected] Subject: Re: [Rdkit-discuss] Question on substructure search CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi Joey, You can get the intended result like this pat = Chem.MolFromSmarts("*=C1*C=C*1") mol = Chem.MolFromSmiles("C=C1SC=CS1") mol.HasSubstructMatch(pat) Pat On Tue, Jun 13, 2023 at 4:49 PM Storer, Joey (J) via Rdkit-discuss mailto:[email protected]>> wrote: Hi RDKit masters, rdkit.__version__ = 2023.03.1 I am trying to match structures with a double bond in a 5-membered ring. [cid:[email protected]] Then checking if this works in the sulfur case: [cid:[email protected]] [cid:[email protected]] Thanks for your thoughts. Joey Storer Core R&D, Dow Inc. General Business ___ Rdkit-discuss mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Frdkit-discuss&data=05%7C01%7CJWStorer%40dow.com%7Cef8f5f9b53904a9b834108db6c58aa3c%7Cc3e32f53cb7f4809968d1cc4ccc785fe%7C0%7C0%7C638222900300464962%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qzcacVhzlX8ALR%2B6bv2PO2xMJ9gpKqs2QN1J6xWrwUg%3D&reserved=0> ___ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Question on substructure search
Hi Joey, You can't use "[#0]" in a SMARTS. This is not a wildcard character. If you want a wildcard, you can use "*" for any atom, "A" for any aliphatic atom, "a" for any aromatic atom or "[A,a]" for any atom. You also can't roundtrip SMARTS->SMILES->SMARTS. For more information, check out my SMARTS tutorial. https://colab.research.google.com/github/PatWalters/practical_cheminformatics_tutorials/blob/main/fundamentals/SMARTS_tutorial.ipynb Pat On Wed, Jun 14, 2023 at 10:49 AM Storer, Joey (J) wrote: > Hi Patrick and RDKit, > > > > *rdkit.__version__ = 2023.03.1* > > > > Here is a slightly more explicit variant tried because neither worked to > find a match: > > > > > > Respectfully, > > Joey Storer > > > > General Business > > *From:* Patrick Walters > *Sent:* Tuesday, June 13, 2023 5:54 PM > *To:* Storer, Joey (J) > *Cc:* [email protected] > *Subject:* Re: [Rdkit-discuss] Question on substructure search > > > > * CAUTION:* This email originated from outside of the organization. Do > not click links or open attachments unless you recognize the sender and > know the content is safe. > > > > Hi Joey, > > > > You can get the intended result like this > > > > pat = Chem.MolFromSmarts("*=C1*C=C*1") > mol = Chem.MolFromSmiles("C=C1SC=CS1") > mol.HasSubstructMatch(pat) > > > > Pat > > > > On Tue, Jun 13, 2023 at 4:49 PM Storer, Joey (J) via Rdkit-discuss < > [email protected]> wrote: > > Hi RDKit masters, > > > > *rdkit.__version__ = 2023.03.1* > > > > I am trying to match structures with a double bond in a 5-membered ring. > > > > > > Then checking if this works in the sulfur case: > > > > > > > > Thanks for your thoughts. > > > > Joey Storer > > Core R&D, Dow Inc. > > > > > > > > > > General Business > > ___ > Rdkit-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Frdkit-discuss&data=05%7C01%7CJWStorer%40dow.com%7Cef8f5f9b53904a9b834108db6c58aa3c%7Cc3e32f53cb7f4809968d1cc4ccc785fe%7C0%7C0%7C638222900300464962%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qzcacVhzlX8ALR%2B6bv2PO2xMJ9gpKqs2QN1J6xWrwUg%3D&reserved=0> > > ___ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Question on substructure search
Hi Joey,
You can get the intended result like this
pat = Chem.MolFromSmarts("*=C1*C=C*1")
mol = Chem.MolFromSmiles("C=C1SC=CS1")
mol.HasSubstructMatch(pat)
Pat
On Tue, Jun 13, 2023 at 4:49 PM Storer, Joey (J) via Rdkit-discuss <
[email protected]> wrote:
> Hi RDKit masters,
>
>
>
> *rdkit.__version__ = 2023.03.1*
>
>
>
> I am trying to match structures with a double bond in a 5-membered ring.
>
>
>
>
>
> Then checking if this works in the sulfur case:
>
>
>
>
>
>
>
> Thanks for your thoughts.
>
>
>
> Joey Storer
>
> Core R&D, Dow Inc.
>
>
>
>
>
>
>
> General Business
> ___
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Question on substructure search
Hi RDKit masters, rdkit.__version__ = 2023.03.1 I am trying to match structures with a double bond in a 5-membered ring. [cid:[email protected]] Then checking if this works in the sulfur case: [cid:[email protected]] [cid:[email protected]] Thanks for your thoughts. Joey Storer Core R&D, Dow Inc. General Business ___ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

