On Mon, Oct 12, 2015 at 10:52 PM, Michael Reutlinger <[email protected]>
wrote:

> Hi David,
>
> thanks for your answer and yes, this seems to be the case.
>
> It could be solved by either using raw strings or escaping with
> smiles = smiles.encode('string-escape')
>
> However, I thought that it might be something that could be done by the
> toolkit to avoid errors that could go unnoticed for a long time :-)
>

There's nothing that can be done on the toolkit side here. Unless you use
raw strings on the python side, the RDKit code gets the single token "\n",
not two tokens "\" and "n". Though it's possible to modify the SMILES and
SMARTS parsers to attempt a bit of "do what I mean, not what I say" logic
in cases like this, that would be error prone and counter to the general
functioning of the rest of the toolkit.

Best,
-greg
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to