Re: [Open Babel] SMILES & SMARTS

2012-03-19 Thread Patrik Mika
I think it's the other way around while SMARTS are SMILES one can treat
them as such but since SMARTS are more specific and contain information
more detailed, one cannot treat SMILES (canonical or not) as SMARTS.
Pybel/openbabel seems to agree with me as i get this error message with
SMILES but not with SMARTS:

*** Open Babel Error  in SMARTSError
  SMARTS Error:
[Cl-].CCCN(CCC)C1CC1c1cc(F)ccc1O



2012/3/18 Geoff Hutchison 

> > I am currently trying to generate SMARTS Patterns from an 'mol' or 'sdf'
> file using pybel. So far I haven't been able to succeed.
> > Is it possible to convert Canonical-SMILES (which is possible) into
> SMARTS? Or can I use Canonical-SMILES with the pybel.smarts() module?
> > I look forward to your answer.
>
> A SMILES string (canonical or not) is a SMARTS. What seems to be your
> specific problem or error?
>
> Best regards,
> -Geoff
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] SMILES & SMARTS

2012-03-19 Thread Fredrik Wallner
No, Geoff is right. Taken from the Daylight manual at 
http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html
> All SMILES expressions are also valid SMARTS expressions, but the semantics 
> changes because SMILES describes molecules whereas SMARTS describes patterns. 
> The molecule represented by a SMILES string is usually, but not always, 
> matched by the same string when used as a SMARTS
On the other hand, openbabel doesn't seem to handle multi component SMARTS, 
possibly due to the fact that the dot requires some special handling. So if you 
strip salts or something similar to only search for the largest fragment of 
your input molecule it should work fine.

Kind regards,
Fredrik.

19 mar 2012 kl. 10:29 skrev Patrik Mika:

> I think it's the other way around while SMARTS are SMILES one can treat them 
> as such but since SMARTS are more specific and contain information more 
> detailed, one cannot treat SMILES (canonical or not) as SMARTS. 
> Pybel/openbabel seems to agree with me as i get this error message with 
> SMILES but not with SMARTS:
> 
> *** Open Babel Error  in SMARTSError
>   SMARTS Error:
> [Cl-].CCCN(CCC)C1CC1c1cc(F)ccc1O
> 
> 
> 
> 2012/3/18 Geoff Hutchison 
> > I am currently trying to generate SMARTS Patterns from an 'mol' or 'sdf' 
> > file using pybel. So far I haven't been able to succeed.
> > Is it possible to convert Canonical-SMILES (which is possible) into SMARTS? 
> > Or can I use Canonical-SMILES with the pybel.smarts() module?
> > I look forward to your answer.
> 
> A SMILES string (canonical or not) is a SMARTS. What seems to be your 
> specific problem or error?
> 
> Best regards,
> -Geoff
> 
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss