>From chemistry stack exchange, an answer contributed by user R.M.:

SMARTS <http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html> is
> deliberately designed to be a superset of SMILES. That is, any valid SMILES
> depiction should also be a valid SMARTS query, one that will retrieve the
> very structure that the SMILES string depicts.
> However, as a query language, SMARTS can be more general than SMILES is.
> For example, CC as a SMILES string depicts a single compound: ethane. As
> a SMARTS query, though, CC will match ethane, but will also match
> propane, acetic acid, cyclohexane, vancomycin, etc.
> There's also SMARTS strings which are not valid SMILES strings. You list
> several in your question: [#6]-1=[#6]-[#6](-[#6]-[#6](-[#6]-1)-[#6])=[#8] is
> not a valid SMILES representation, unless your SMILES parser is being
> particularly generous. Even if it is,
> [#6]-1=[#6]-[#6](-[#6]-[#6](-[#6]-1)-[#6])=[#8,#7] is also a valid SMARTS
> query which should match your molecule, but not even a generous SMILES
> parser is likely to accept it.
> Despite being similar, SMARTS and SMILES are intended for fundamentally
> different things - the purpose of SMILES is to represent particular
> compounds, whereas SMARTS represents a query against a range of possible
> molecules, or an abstract description of a set of possible molecules. As
> such, they're not inter-convertible, even if the strings are literally
> identical.
> For your *particular* case, yes, CC1CC=CC(=O)C1 is both a valid SMILES
> and a valid SMARTS, but as a SMARTS query, it represents not just
> 5-methyl-2-cyclohexen-1-one, but also 5-propyl-2-cyclohexen-1-one and
> 3-hydroxy-5-butyl-6-amino-2-cyclohexen-1-one, as well as many others, all
> of which contain that substructure. The SMARTS viewer you link doesn't
> depict this explicitly, because it's implicit in the use of SMARTS that
> it's a substructure pattern for a broader class of compounds.




On Wed, Apr 19, 2017 at 8:24 AM, Curt Fischer <curt.r.fisc...@gmail.com>
wrote:

> Hi Thilo,
>
> Interesting question.  rdkit-discuss members should know you also posted a
> very similar question to https://chemistry.stackexchange.com/questions/
> 72880/is-converting-smarts-to-smiles-a-lossless-operation .
>
> If an interesting answer materializes here, it would be useful to post it
> there, and vice-versa.
>
> Curt
>
> On Wed, Apr 19, 2017 at 3:03 AM, Thilo Bauer <thilo.ba...@fau.de> wrote:
>
>> Dear mailinglist-members,
>>
>> is converting SMARTS to SMILES a "lossless" operation, or does one loose
>> information on doing so?
>>
>> Background:
>> I've got three different SMARTS strings representing the same structure
>> - at least when depicting it. Also all three strings result in the exact
>> same SMILES (see code and output below).
>>
>> Now, don't take this wrong, I do know the differences between SMARTS and
>> SMILES, and I do know what the symbols in SMARTS mean. I just wonder,
>> when I use either the threes SMARTS or the single SMILES as a pattern
>> for a substruct match, if there is a chance that I get different
>> results, or let's say if I would miss substructure occurences by using
>> the single SMILES? I could not make up a case where this happened.
>>
>>
>>  >>> m =
>> Chem.MolFromSmarts('[#6]-1=[#6]-[#6](-[#6]-[#6](-[#6]-1)-[#6])=[#8]')
>>  >>> Chem.MolToSmiles(m)
>> 'CC1CC=CC(=O)C1'
>>  >>> m = Chem.MolFromSmarts('[#6]-1-[#6]=[#6]-[#6](-[#6]-[#6]-1-[#6])
>> =[#8]')
>>  >>> Chem.MolToSmiles(m)
>> 'CC1CC=CC(=O)C1'
>>  >>> m = Chem.MolFromSmarts('[#6]-1-[#6](-[#6]=[#6]-[#6]-[#6]-1-[#6])
>> =[#8]')
>>  >>> Chem.MolToSmiles(m)
>> 'CC1CC=CC(=O)C1'
>>
>>
>> Thank's a lot in advance!
>>
>> Thilo
>>
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> 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