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 :-) Best, Michael On Mon, Oct 12, 2015 at 10:42 PM, David Hall <li...@cowsandmilk.net> wrote: > That behavior appears to all be in python; as you’ve written it, your > smiles string has a newline before rdkit ever sees it: > > >>> print 'C/C=C\n1nc(nn1)C' > C/C=C > 1nc(nn1)C > >>> print 'C/C=C\\n1nc(nn1)C' > C/C=C\n1nc(nn1)C > > > On Oct 12, 2015, at 4:37 PM, Michael Reutlinger <rd...@mulchi.de> wrote: > > Hi all, > > I just found an unexpected behaviour in the current RDKit. My input is a > perfectly valid smiles with explicitly specified double bond configuration. > Actually, similar smiles were obtained using the RDKit. > > The problem is, when submitting the smiles string containing an \n to > MolFromSmiles only the part before the \n is used and the rest is > disregarded. The \ needs to be quoted to a \\ in order to work correct. > > Is this a desired / expected behaviour? > > Best, > Michael > > <Screen Shot 2015-10-12 at 22.04.57.png> > > ------------------------------------------------------------------------------ > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > >
------------------------------------------------------------------------------
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss