Re: [Rdkit-discuss] Two SMILES that (I think) should canonicalize to the same thing, but don't

2016-03-30 Thread Peter S. Shenkin
Hi, Greg,

This is a bit of a meta-comment, so I hope it's appropriate here. I might
possibly make more comments on the github site.

After this discussion went dead (but before I retired from Schrödinger), I
looked into the origin of that bizarre multicyclic structure. It turned out
to have started life as a saturated cubane structure derived from a source
(PDB? I don't remember.) that doesn't include H's, and the double bonds
were added by some some translation procedure that sought to reconcile
valences. So it's not real.

Best,
-P.


On Wed, Mar 30, 2016 at 1:53 AM, Greg Landrum 
wrote:

> This is reviving a long-dead thread because I just marked the associated
> issue as "won't fix" and some of you might be interested in the reasons.
> Here's the bug: https://github.com/rdkit/rdkit/issues/523
> The comment explaining my thinking is here:
> https://github.com/rdkit/rdkit/issues/523#issuecomment-203247157
>
> If possible, please continue the discussion as part of the github issue.
> If you don't have a github account and aren't willing to get one, we can
> continue here.
>
> Because discussions about aromaticity have a tendency to get heated and
> off-topic very quickly, please do read the explanation of the RDKit's
> aromaticity model here: http://rdkit.org/docs/RDKit_Book.html#aromaticity
> before commenting. If you have an argument with the aromaticity model,
> please start a separate thread for it.
> Though a change to the model to treat anti-aromatic systems as aromatic
> would resolve it, this particular issue is *not* about how aromaticity is
> modeled.
>
> Best,
> -greg
>
>
>
> On Wed, Jun 17, 2015 at 8:22 AM, Peter Shenkin  wrote:
>
>> Hi, Greg,
>>
>> Within the SMILES framework, it seems to me that if you allow the atoms
>> to be aromatic, then these are two Kekule structures of the same aromatic
>> system, and however you do the canonicalization, they ought to canonicalize
>> to the same structure, which the two examples did not do. I don't think you
>> addressed this.
>>
>> I think now that there is no issue with having a double bond between two
>> aromatic atoms beyond our preconceptions. If that is a problem, you could
>> Kekulize it per your first picture, (though perhaps that is inconvenient in
>> the context of the implementation).
>>
>> I actually didn't realize why aromaticity (particularly the double bond)
>> made sense when I originally wrote, so the above is with the benefit of
>> hindsight, and your comments.
>>
>> I think the molecule is entertaining in several ways. In the cubane
>> geometry, the molecule cannot be conventionally aromatic. Might it actually
>> be antiaromatic? Could there be two forms?
>>
>> Dunno
>> -P.
>>
>>
>> On Wed, Jun 17, 2015 at 1:25 AM, Greg Landrum 
>> wrote:
>>>
>>>
>>> The problematic part of your two molecules can be reduced to:
>>> [image: Inline image 3]
>>> and
>>> [image: Inline image 4]
>>> That second one shows the kekulized form that the RDKit ends up using.
>>>
>>> These produce the following canonical SMILES:
>>>
>>> In [31]: Chem.CanonSmiles('C1=CC2=CC=C12')
>>> Out[31]: 'c1cc2ccc1-2'
>>>
>>> In [32]: Chem.CanonSmiles('C1=CC2=C1C=C2')
>>> Out[32]: 'c1cc2ccc1=2'
>>>
>>>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SDWriter from Java

2016-03-30 Thread Greg Landrum
On Wed, Mar 30, 2016 at 2:47 PM, Tim Dudgeon  wrote:

> And there's no other way to generate a SDF from Java?
> e.g. can each ROMol be converted to text in SD format and then that text
> written to the Java OutputStream?
>

There's no way to do it in a single step.
You can get the mol block and the properties individually and then use
those, but that's not particularly nice.

I *think* I can pretty easily add a static method to the SDWriter class
that takes a molecule and optional list of properties as an argument and
returns the string that would go in to the SDF. This would then
automatically show up in the wrappers (I think). Let me investigate that.

-greg
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SDWriter from Java

2016-03-30 Thread Tim Dudgeon

And there's no other way to generate a SDF from Java?
e.g. can each ROMol be converted to text in SD format and then that text 
written to the Java OutputStream?


Tim

On 30/03/2016 13:31, Greg Landrum wrote:

Hi Tim,

That constructor is expecting a C++ stream pointer. The takeOwnership 
flag tells it to take assume ownership of the pointer (i.e. to free up 
the memory being used by the stream when the SDWriter itself is 
free'd). I am guessing that this will not be useable from Java (and 
should probably be disabled).


There is likely a way to set up the wrappers so that Java streams are 
properly handled, but it's difficult to assess how much work that 
would be.


-greg


On Wed, Mar 30, 2016 at 2:00 PM, Tim Dudgeon > wrote:


Hi All,

this probably a pretty basic question, but I'm struggling to work out
how to use the SDWriter from Java.
The class that SWIG has generated for SDWriter has a constructor
of type:
SDWriter(SWIGTYPE_p_std__ostream outstream)
which looks like its the one I need (I need to write to a Java
OutputStream, not a file).
But I can't would out how to generate an instance of
SWIGTYPE_p_std__ostream from my Java OutputStream.
Any pointers?

(Also, what does the boolean takeownership param of the similar
constructor do?)


Tim




--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/rdkit-discuss




--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SDWriter from Java

2016-03-30 Thread Greg Landrum
Hi Tim,

That constructor is expecting a C++ stream pointer. The takeOwnership flag
tells it to take assume ownership of the pointer (i.e. to free up the
memory being used by the stream when the SDWriter itself is free'd). I am
guessing that this will not be useable from Java (and should probably be
disabled).

There is likely a way to set up the wrappers so that Java streams are
properly handled, but it's difficult to assess how much work that would be.

-greg


On Wed, Mar 30, 2016 at 2:00 PM, Tim Dudgeon  wrote:

> Hi All,
>
> this probably a pretty basic question, but I'm struggling to work out
> how to use the SDWriter from Java.
> The class that SWIG has generated for SDWriter has a constructor of type:
> SDWriter(SWIGTYPE_p_std__ostream outstream)
> which looks like its the one I need (I need to write to a Java
> OutputStream, not a file).
> But I can't would out how to generate an instance of
> SWIGTYPE_p_std__ostream from my Java OutputStream.
> Any pointers?
>
> (Also, what does the boolean takeownership param of the similar
> constructor do?)
>
>
> Tim
>
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] SDWriter from Java

2016-03-30 Thread Tim Dudgeon
Hi All,

this probably a pretty basic question, but I'm struggling to work out 
how to use the SDWriter from Java.
The class that SWIG has generated for SDWriter has a constructor of type:
SDWriter(SWIGTYPE_p_std__ostream outstream)
which looks like its the one I need (I need to write to a Java 
OutputStream, not a file).
But I can't would out how to generate an instance of 
SWIGTYPE_p_std__ostream from my Java OutputStream.
Any pointers?

(Also, what does the boolean takeownership param of the similar 
constructor do?)


Tim



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss