Re: [Rdkit-discuss] shape descriptor expressed as array of numbers

2017-05-20 Thread Thomas Evangelidis
Hello Greg,

I develop my own algorithm which is based on machine learning, therefore I
am looking for detailed shape descriptors to incorporate. The prerequisite
is that the descriptor must be expressed as an array of numbers. I don't
have something in mind specifically, but from the literature research that
I did I think the simplest approach is to work with inter-atomic distances
and distribution moments. USR can be easily expanded to include more
numbers (e.g. inclusion of moments higher than the 3rd and incorporation of
more inter-atomic distances). I guess the patent will not apply in this
case. So before I start writing something of my own, I would like to know
if there is something similar already available.

Can the 3D descriptors from DRAGON be expressed as arrays of numbers?

best
Thomas



On 20 May 2017 at 07:56, Greg Landrum  wrote:

> Hi Thomas,
>
> There isn't currently anything there.
> The RDKit had a USR (and USRCAT) implementation a few years ago, but we
> removed it because of the patent on USR. Now that the patent has lapsed,
> there's an active PR to re-integrate those descriptors.
>
> There's also a PR from Guillaume Godin that implements a large number of
> 3D descriptors that are known from the DRAGON software. I'm still reviewing
> that one, but it should be integrated in the not-too-distant future.
>
> Is there any particular descriptor that you're looking for?
>
> -greg
>
> On Fri, May 19, 2017 at 12:40 PM, Thomas Evangelidis 
> wrote:
>
>>
>> Greetings,
>>
>> Is there any shape descriptor available in RDKit that can be expressed as
>> an array of numbers (e.g. like the 2D similarity fingerprints)?
>> Alternatively is anyone aware of any other implementation of such a
>> descriptor? The only one I know is the Ultrafast Shape Recognition (USR)
>> algorithm which encodes shape information into 12 floating point numbers,
>> but the shape information that it provides is rather poor since it was
>> adapted for screening millions of compounds in short time scales.
>>
>> I would appreciate any advice.
>>
>> best,
>> Thomas
>>
>>
>> --
>>
>> ==
>>
>> Dr Thomas Evangelidis
>>
>> Post-doctoral Researcher
>> CEITEC - Central European Institute of Technology
>> Masaryk University
>> Kamenice 5/A35/2S049,
>> 62500 Brno, Czech Republic
>>
>> email: tev...@pharm.uoa.gr
>>
>>   teva...@gmail.com
>>
>>
>> website: https://sites.google.com/site/thomasevangelidishomepage/
>>
>>
>> 
>> --
>> 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
>>
>>
>


-- 

==

Dr Thomas Evangelidis

Post-doctoral Researcher
CEITEC - Central European Institute of Technology
Masaryk University
Kamenice 5/A35/2S049,
62500 Brno, Czech Republic

email: tev...@pharm.uoa.gr

  teva...@gmail.com


website: https://sites.google.com/site/thomasevangelidishomepage/
--
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] Depicting reactions to the same quality as molecules

2017-05-20 Thread Greg Landrum
Hi Ed,

This is a weak spot; we haven't yet added decent reaction depiction.

The best that's currently available is to use the old drawing code
(Draw.ReactionToImage()) and to make sure that you have the cairo libraries
installed so that you at least have decent drawings. Which operating
system/version of Python are you using?

-greg


On Fri, May 19, 2017 at 5:47 PM, Ed Griffen 
wrote:

> Is there a reaction depiction option similar to the MolDraw2DCairo  which
> produces much better depictions that the simple Chem.Draw PIL images?
>
> Or am I just doing this wrong?
>
>
> Attempting to push a reaction through MolDraw2DCairo fails with:
>
> Traceback (most recent call last):
>   File "drawing_test.py", line 31, in 
> rc = rdMolDraw2D.PrepareMolForDrawing(rxn)
> Boost.Python.ArgumentError: Python argument types in
> rdkit.Chem.Draw.rdMolDraw2D.PrepareMolForDrawing(ChemicalReaction)
> did not match C++ signature:
> PrepareMolForDrawing(RDKit::ROMol const* mol, bool kekulize=True,
> bool addChiralHs=True, bool wedgeBonds=True, bool forceCoords=False)
>
> Cheers,
>
> Ed
>
>
> sample code below:
>
>
> from rdkit import Chem
> from rdkit.Chem import AllChem
> from rdkit.Chem import Draw
> from rdkit.Chem.Draw import rdMolDraw2D
> from rdkit.Chem import rdDepictor
> from rdkit.Chem.Draw import DrawingOptions
>
> m1 = AllChem.MolFromSmiles('c1c1N(C)C')
> tmp = AllChem.Compute2DCoords(m1)
> Draw.MolToFile(m1,'test_mol_image.png')
> rdDepictor.Compute2DCoords(m1)
>
> rxn = AllChem.ReactionFromSmarts('[C:1](=[O:2])[N:3]>>[N:1][C:3]=[O:2]')
> rimage = Draw.ReactionToImage(rxn)
> rimage.save('test_reaction_image.png')
>
> mc = rdMolDraw2D.PrepareMolForDrawing(m1)
> drawer = Draw.MolDraw2DCairo(300, 300)
> drawer.DrawMolecule(mc)
> drawer.FinishDrawing()
> output = drawer.GetDrawingText()
> with open('test_mol_image_2.png', 'wb') as pngf:
> pngf.write(output)
>
>
> drawer2 = Draw.MolDraw2DCairo(600, 300)
> rc = rdMolDraw2D.PrepareMolForDrawing(rxn)
> drawer2.DrawMolecule(rc)
>
>
>
>
>
>
> 
> --
> 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