Hi Bill,

On Thu, Jun 9, 2016 at 11:00 AM, Shirley, Bill <bill.shir...@novartis.com>
wrote:

>
>
> -------- Original Message --------
> From: "Shirley, Bill" <bill.shir...@novartis.com>
> Date: Thu, Jun 9, 2016, 01:57
> To: rdkit-disc...@sourceforge.net
> Subject: Chem.SmilesMolSupplier
>
> Given the differences in SMARTS and SMILES pattern matching and the
> MolFromSmarts function which seems the way to convert from a string, when
> reading SMARTS strings with the SmilesMolSupplier function will the ROMol
> object always be the same (as a MolFromSmarts object converted from a
> string) and HasSubstructMatch always produce the same boolean (as would the
> MolFromSmarts converted string)?
>

Nope. A SmilesMolSupplier expects that the input is SMILES, not SMARTS.
Though a valid SMILES is always a valid SMARTS and a valid SMARTS is often
a valid SMILES, the meanings are not always the same. Section 4.7 on the
Daylight Theory Manual page for SMARTS (
http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html) is well
worth reading.

The RDKit doesn't currently have a Supplier that deals with SMARTS.


>
> This is a "same and not the same" question since HasSubstructMatch seems
> to be a function for SMILES and SMILES more than SMILES and SMARTS.
>

hmm, I'm not quite sure what you mean here. You can use molecules
constructed from SMILES or SMARTS (or CTAB) as queries:

In [4]: m = Chem.MolFromSmiles('c1cccnc1CCC')
In [5]: m.HasSubstructMatch(Chem.MolFromSmiles('CCC'))
Out[5]: True
In [6]: m.HasSubstructMatch(Chem.MolFromSmarts('cCC'))
Out[6]: True

Best,
-greg
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to