[Rdkit-discuss] cis/trans directional bond and smiles strings in python

2015-10-12 Thread Michael Reutlinger
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

[image: Inline image 2]
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] cis/trans directional bond and smiles strings in python

2015-10-12 Thread Michael Reutlinger
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  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  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
>
> 
>
> --
> ___
> 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


Re: [Rdkit-discuss] cis/trans directional bond and smiles strings in python

2015-10-12 Thread David Hall
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  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
> 
> 
> --
> ___
> 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


[Rdkit-discuss] looking for input

2015-10-12 Thread Greg Landrum
Andrew Dalke discovered the interesting fact that the RDKit's Morgan
fingerprinting code can return some additional bits when the fromAtoms
argument is used. Here's the github issue:
https://github.com/rdkit/rdkit/issues/633

There are a couple of ways this could be addressed, and I'd love additional
feedback (ideally there in github) if anyone else has an opinion.

Best,
-greg
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss