Re: [Rdkit-discuss] Reaction Arrows

2017-12-05 Thread Greg Landrum
Hi Libby,

There's not currently anything directly available to do this, but some
pieces that might help are sort of there.

You could imagine getting drawings of the reactions as SVG and then adding
the arrows that indicate the mechanism to that.
In order to do this, you'd likely want to be able to figure out where the
atoms are in the SVG. This is mostly possible, if in an ugly way.

Here's an example, which I'll explain below:

In [6]: rxn =
AllChem.ReactionFromSmarts('C=CCBr.[I-]>>C=CCI.[Br-]',useSmiles=True)

In [12]: canv = rdMolDraw2D.MolDraw2DSVG(300,300)

In [13]: canv.drawOptions().includeAtomTags = True

In [14]: canv.DrawReaction(rxn)

In [15]: canv.FinishDrawing()

In [16]: print(canv.GetDrawingText())


 












 ... SNIP ...






Notice the rdkit:atom properties there. Those are the positions of the
corresponding atoms in the output SVG.
The ugliness comes due to the fact that, currently at least, you get these
in increasing order with no indication of whether they belong to an
reactant (and if so, which reactant) or a product (and if so, which
product). You are safe assuming that the reactants are output in order,
followed by the products, and that the atoms within each are output in
order. So atom idx 1 above is atom 0 in the first reactant, atom idx 5 is
atom 0 in the second reactant, atom idx 7 is atom 1 in the first product,
etc.
I'm going to think about ways to make this output a bit easier to handle
for reactions (suggestions appreciated), but that's what is currently there.

It's also worth thinking about what the API would look like to add the
arrows directly

Apologies that this isn't straightforward, but this may be enough to get a
start?

-greg





On Tue, Dec 5, 2017 at 4:27 PM, Phipps, Elizabeth C 
wrote:

> Hi,
>
> The goal is to help students visualize reactions and to do so we have been
> working to figure out how to get reaction arrows in the reaction output. We
> cannot seem to find much information as to whether it is possible to have
> the output (a visual organic reaction) contain reaction arrows using RDKit
> with SMILES and SMIRKS even though some examples have arrows.
> I am wondering if there is any further information as to whether it is
> possible to show reaction arrows.
>
> For example:
>
> Thanks,
> Libby
>
> 
> --
> 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


Re: [Rdkit-discuss] Support for newer conda versions

2017-12-05 Thread Gianluca Sforna
On Sun, Dec 3, 2017 at 10:52 AM, Greg Landrum  wrote:
> I'm starting the uploads of the conda builds of the 2017.09.2 RDKit release.

In the meanwhile, I submitted the updates in the COPR repository,
CentOS 7 and Fedora 26/27 64 bit.

https://copr.fedorainfracloud.org/coprs/giallu/rdkit/

HTH

Gianluca

-- 
Gianluca Sforna

http://plus.google.com/+gianlucasforna - http://twitter.com/giallu
Tinker Garage - http://tinkergarage.it

--
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


Re: [Rdkit-discuss] RPM distros

2017-12-05 Thread Tim Dudgeon

Not sure how best to do this.
This issue (https://github.com/rdkit/rdkit/issues/911) is closed, and 
only partly relevant.


I'm happy to open a new issue to handle the CMake/CPack stuff for both 
deb and rpm, but not sure is that is really the way to go, considering 
Gianluca's comments.


What I would like to see is a standard way to build debs and rpms from 
source, including packages for cartridge and binding for Python and 
Java. I'm happy to help with this, but low level build stuff is not my 
expertise. My prime motivation for this is in generating lighter weight 
Docker images.


Tim


On 04/12/17 00:16, Francois BERENGER wrote:

Please report your problems in the rdkit bugtracker.

What you do exactly to test, on which distro, etc.

If you don't, this issue will be forgotten.

Regards,
F.

On 12/02/2017 02:53 AM, Tim Dudgeon wrote:

Read back to the top of this thread for all the details, but the key bit
is this:


In the bugtracker, there is an issue about the .deb:

https://github.com/rdkit/rdkit/issues/911

and there is a pull request by Patrick Avery
to fix them:

https://github.com/rdkit/rdkit/pull/1580

Tim



On 01/12/17 17:51, Gianluca Sforna wrote:

On Fri, Dec 1, 2017 at 6:04 PM, Tim Dudgeon 
wrote:

Maciek

The 'cpack -G RPM' command does not seem to create a
rdkit_package_file.rpm.
The ones that are created are:

RDKit-2018.03.1.dev1-Linux-Development.rpm
RDKit-2018.03.1.dev1-Linux-Extras.rpm
RDKit-2018.03.1.dev1-Linux-Python.rpm
RDKit-2018.03.1.dev1-Linux-Runtime.rpm

Sorry guys, I got back on the list mid-thread so I really need to ask:
is there a reason why you are trying to use cpack to build RPMs,
instead of the standard rpmbuild tools?






--

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


[Rdkit-discuss] Reaction Arrows

2017-12-05 Thread Phipps, Elizabeth C
Hi,

The goal is to help students visualize reactions and to do so we have been 
working to figure out how to get reaction arrows in the reaction output. We 
cannot seem to find much information as to whether it is possible to have the 
output (a visual organic reaction) contain reaction arrows using RDKit with 
SMILES and SMIRKS even though some examples have arrows.
I am wondering if there is any further information as to whether it is possible 
to show reaction arrows.

For example:
[cid:8A352C88-6E16-41C8-BC18-978F871A156D@attlocal.net]

Thanks,
Libby
--
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