Re: [Rdkit-discuss] JS funtionality

2022-03-04 Thread Tim Dudgeon
Hi Paolo,
Thanks. Out of interest, would others find JS support for SDF of interest?
And (my understanding of how this works is very vague), would this be done
by writing a JS parser for SDF and then using the existing functions, or
would it somehow wrap the C++ SDF parsers?
Tim

On Thu, Mar 3, 2022 at 8:35 PM Paolo Tosco 
wrote:

> Hi Tim,
>
> Apart from the HTML demo page that you mentioned, you can find the current
> JS bindings here:
>
>
> https://github.com/rdkit/rdkit/blob/4bbbc6611dbe4bf05ed36ea795b3c6dc39bbdebc/Code/MinimalLib/jswrapper.cpp#L112
>
> There's support for visualizing molecules from SMILES and CTAB, but
> currently no support for SDF properties out of the box.
>
> Cheers,
> p.
>
> On Thu, Mar 3, 2022 at 6:31 PM Tim Dudgeon  wrote:
>
>> Is there a full list of the RDKit functionality that is available from
>> the JavaScript bindings (
>> https://github.com/rdkit/rdkit/tree/master/Code/MinimalLib)? Maybe I'm
>> missing the obvious, but I can only find the examples e.g.
>> https://unpkg.com/@rdkit/rdkit@2021.9.4/Code/MinimalLib/dist/GettingStartedInJS.html
>>
>> In particular I'm interested to know if there is any support for handling
>> SD-files e.g as a list of molecules and their properties that can be
>> displayed just with JavaScript.
>>
>> Tim
>> ___
>> 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] JS funtionality

2022-03-03 Thread Tim Dudgeon
Is there a full list of the RDKit functionality that is available from the
JavaScript bindings (
https://github.com/rdkit/rdkit/tree/master/Code/MinimalLib)? Maybe I'm
missing the obvious, but I can only find the examples e.g.
https://unpkg.com/@rdkit/rdkit@2021.9.4/Code/MinimalLib/dist/GettingStartedInJS.html

In particular I'm interested to know if there is any support for handling
SD-files e.g as a list of molecules and their properties that can be
displayed just with JavaScript.

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


Re: [Rdkit-discuss] Delete atoms can leave dangling aromaticity

2022-02-14 Thread Tim Dudgeon
Thanks Paolo, that does the trick.
Tim

On Mon, Feb 14, 2022 at 11:23 AM Paolo Tosco 
wrote:

> Hi Tim,
>
> after you are done removing the atoms you can do loop through remaining
> ring atoms and bonds and clear aromatic flags, e.g.
>
> from rdkit import Chem
>
> rwmol = Chem.RWMol(Chem.MolFromSmiles("c1c1"))
> rwmol.RemoveAtom(0)
>
> for a in rwmol.GetAtoms():
> if (not a.IsInRing()) and a.GetIsAromatic():
> a.SetIsAromatic(False)
> for b in rwmol.GetBonds():
> if (not b.IsInRing()) and b.GetIsAromatic():
> b.SetIsAromatic(False)
>
> Chem.SanitizeMol(rwmol)
> rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
>
> rwmol
> [image: image.png]
>
> However, this will still leave you with not particularly useful AROMATIC
> bond types.
> Probably a better option is to kekulize the molecule and clear aromatic
> flags before starting to remove atoms, then sanitize:
>
> rwmol = Chem.RWMol(Chem.MolFromSmiles("c1c1"))
> Chem.Kekulize(rwmol, clearAromaticFlags=True)
> rwmol.RemoveAtom(0)
>
> Chem.SanitizeMol(rwmol)
> rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
>
> rwmol
> [image: image.png]
>
> Cheers,
> p.
>
> On Mon, Feb 14, 2022 at 11:55 AM Tim Dudgeon 
> wrote:
>
>> I'm using mol.RemoveAtom(atom) to remove atoms from a molecule, and then
>> calling Chem.SanitizeMol(mol) at the end to clean up the molecule. Mostly
>> this works fine.
>> But when I delete atoms in an aromatic ring but leave a single ring atom
>> remaining in the molecule then the sanitize function fails:
>>
>> rdkit.Chem.rdchem.AtomKekulizeException: non-ring atom 0 marked aromatic
>>
>> I'm using SanitizeMol() with default options
>> so SanitizeFlags.SANITIZE_ALL should be in place.
>> What do I need to do to have sanitize to fix the atom type in the general
>> case?
>>
>> Tim
>> ___
>> 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] Delete atoms can leave dangling aromaticity

2022-02-14 Thread Tim Dudgeon
I'm using mol.RemoveAtom(atom) to remove atoms from a molecule, and then
calling Chem.SanitizeMol(mol) at the end to clean up the molecule. Mostly
this works fine.
But when I delete atoms in an aromatic ring but leave a single ring atom
remaining in the molecule then the sanitize function fails:

rdkit.Chem.rdchem.AtomKekulizeException: non-ring atom 0 marked aromatic

I'm using SanitizeMol() with default options so SanitizeFlags.SANITIZE_ALL
should be in place.
What do I need to do to have sanitize to fix the atom type in the general
case?

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


Re: [Rdkit-discuss] molecule layout to optimise available space

2022-02-11 Thread Tim Dudgeon
Greg,
Thanks for the clarification.

On Fri, Feb 11, 2022 at 3:19 PM Greg Landrum  wrote:

> Oh, you want the layout itself changed, not just the orientation.
>
> No, there's nothing in place to do that and adding such a thing would be
> extremely non-trivial.
>
> -greg
>
>
> On Fri, Feb 11, 2022 at 3:49 PM Tim Dudgeon  wrote:
>
>> Hi Greg,
>> yes, but my situation is that the X dimension is much larger than the Y
>> and most of the time things are aligned nicely. But not always. Here is an
>> example.
>> OC(C(=O)NC=1C=CC=CC1NS(=O)(=O)C=2C=CC(F)=CC2)C=3C=CC=NC3
>> [image: image.png]
>> Clearly there is potential to lay this out using more of the X dimension
>> and less of the Y.
>>
>> Tim
>>
>> On Fri, Feb 11, 2022 at 1:57 PM Greg Landrum 
>> wrote:
>>
>>> Hi Tim,
>>>
>>> That's a nice one.
>>>
>>> For people not familiar with the problem:
>>> The RDKit coordinate generation prefers aligning molecules with the X
>>> axis; this can lead to "sub-optimal" drawings if your drawing canvas is
>>> taller than it is wide.
>>>
>>> One easy solution is to just generate coordinates as usual and then
>>> rotate them to favor the Y axis if your canvas is larger along Y.
>>> Here's a gist showing how to do that:
>>> https://gist.github.com/greglandrum/12b793b240d27e3c0899c9c6c62d4f30
>>>
>>> -greg
>>>
>>>
>>> On Fri, Feb 11, 2022 at 10:20 AM Tim Dudgeon 
>>> wrote:
>>>
>>>> At Dave Cosgrove's suggestion I raise this as a new topic, though it
>>>> was touched on briefly recently.
>>>>
>>>> I'd like to know if it's possible to depict a molecule in a way that
>>>> takes into account the dimensions of the box it will appear in. In my case
>>>> I have a rectangle that is short and wide (aspect ratio of 1:3) and the
>>>> molecules are typically compressed because of the lack of available height.
>>>> So is it possible to make the layout engine aware of the bounds it has
>>>> available (e.g. in my example short and wide)?
>>>>
>>>> Thanks
>>>> Tim
>>>> ___
>>>> 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] molecule layout to optimise available space

2022-02-11 Thread Tim Dudgeon
Hi Greg,
yes, but my situation is that the X dimension is much larger than the Y and
most of the time things are aligned nicely. But not always. Here is an
example.
OC(C(=O)NC=1C=CC=CC1NS(=O)(=O)C=2C=CC(F)=CC2)C=3C=CC=NC3
[image: image.png]
Clearly there is potential to lay this out using more of the X dimension
and less of the Y.

Tim

On Fri, Feb 11, 2022 at 1:57 PM Greg Landrum  wrote:

> Hi Tim,
>
> That's a nice one.
>
> For people not familiar with the problem:
> The RDKit coordinate generation prefers aligning molecules with the X
> axis; this can lead to "sub-optimal" drawings if your drawing canvas is
> taller than it is wide.
>
> One easy solution is to just generate coordinates as usual and then rotate
> them to favor the Y axis if your canvas is larger along Y.
> Here's a gist showing how to do that:
> https://gist.github.com/greglandrum/12b793b240d27e3c0899c9c6c62d4f30
>
> -greg
>
>
> On Fri, Feb 11, 2022 at 10:20 AM Tim Dudgeon 
> wrote:
>
>> At Dave Cosgrove's suggestion I raise this as a new topic, though it was
>> touched on briefly recently.
>>
>> I'd like to know if it's possible to depict a molecule in a way that
>> takes into account the dimensions of the box it will appear in. In my case
>> I have a rectangle that is short and wide (aspect ratio of 1:3) and the
>> molecules are typically compressed because of the lack of available height.
>> So is it possible to make the layout engine aware of the bounds it has
>> available (e.g. in my example short and wide)?
>>
>> Thanks
>> Tim
>> ___
>> 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] molecule layout to optimise available space

2022-02-11 Thread Tim Dudgeon
At Dave Cosgrove's suggestion I raise this as a new topic, though it was
touched on briefly recently.

I'd like to know if it's possible to depict a molecule in a way that takes
into account the dimensions of the box it will appear in. In my case I have
a rectangle that is short and wide (aspect ratio of 1:3) and the molecules
are typically compressed because of the lack of available height. So is it
possible to make the layout engine aware of the bounds it has available
(e.g. in my example short and wide)?

Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread Tim Dudgeon
Thanks Dave. Understood.
A related question - is it possible to make the layout aware of the amount
of space that is available? I'm stuck with a very wide and short aspect
ratio and it would be helpful if the layout engine could optimise the
layout to fit in that unconventional space.
Tim

On Wed, Feb 9, 2022 at 11:40 AM David Cosgrove 
wrote:

> Hi Tim,
> Sorry, the font size setting both within the code and in the public
> interface has been a fraught matter since Freetype was introduced for the
> font drawing and it isn't currently as controllable as one might wish.  The
> font is chosen based on baseFontSize and the drawing scale.  The size of
> the font relative to the bond lengths is therefore fixed, unless it hits
> the minFontSize or maxFontSize.  So for a large molecule in a small canvas,
> it is likely that the font size will be larger relative to the bonds as
> minFontSize has an effect, and vice versa with a small molecule in a large
> canvas.  To achieve what you want, you need to increase bastFontSize,
> which, as Paolo mentioned, isn't currently exposed to Python.  Apologies
> for that, which was an oversight.  It does work with the current release,
> though, so if you don't mind rebuilding RDKit you can use it now.
> Add
> ```
>
>   .def_readwrite(
>
>   "baseFontSize", ::MolDrawOptions::baseFontSize,
>
>   "relative size of font.  Defaults to 0.6.  -1 means use
> default.")
> ```
> to $RDBASE/Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp immediately after
> the analogous minFontSize entry
> HTH,
> Dave
>
>
>
> On Wed, Feb 9, 2022 at 10:31 AM Tim Dudgeon  wrote:
>
>> OK, thanks. That's great to hear.
>> In the meantime could someone explain how the font is currently chosen?
>> e.g. if I specify 10 as min and 14 as max what is actually used?
>> Tim
>>
>> On Wed, Feb 9, 2022 at 10:11 AM Paolo Tosco 
>> wrote:
>>
>>> Hi Tim,
>>>
>>> Dave Cosgrove is currently working at a PR which, among other things,
>>> addresses exactly the need that you describe through the baseFontSize
>>> parameter, which is currently not exposed to Python. The PR is almost ready
>>> for merging and it should become part of the March release.
>>>
>>> Cheers,
>>> p.
>>>
>>> On Wed, Feb 9, 2022 at 10:57 AM Tim Dudgeon 
>>> wrote:
>>>
>>>> I'm confused over how the font is chosen when drawing molecules.
>>>> There are MolDrawOptions.minFontSize and MolDrawOptions.maxFontSize
>>>> properties, and if I set them to the same value then that sized font is
>>>> used. But if I set max to a larger size than min then it's not clear what
>>>> font size will be used.
>>>> I'm wanting the font size to adapt to the amount the molecule is scaled
>>>> to fit the space (larger molecules needing a smaller font) but I want the
>>>> font size that is used to be a bit bigger than the default that would be
>>>> used if I don't set anything.
>>>> How do I go about this?
>>>> Thanks
>>>> Tim
>>>> ___
>>>> 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
>>
>
>
> --
> David Cosgrove
> Freelance computational chemistry and chemoinformatics developer
> http://cozchemix.co.uk
>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Font size when drawing molecules

2022-02-09 Thread Tim Dudgeon
OK, thanks. That's great to hear.
In the meantime could someone explain how the font is currently chosen?
e.g. if I specify 10 as min and 14 as max what is actually used?
Tim

On Wed, Feb 9, 2022 at 10:11 AM Paolo Tosco 
wrote:

> Hi Tim,
>
> Dave Cosgrove is currently working at a PR which, among other things,
> addresses exactly the need that you describe through the baseFontSize
> parameter, which is currently not exposed to Python. The PR is almost ready
> for merging and it should become part of the March release.
>
> Cheers,
> p.
>
> On Wed, Feb 9, 2022 at 10:57 AM Tim Dudgeon  wrote:
>
>> I'm confused over how the font is chosen when drawing molecules.
>> There are MolDrawOptions.minFontSize and MolDrawOptions.maxFontSize
>> properties, and if I set them to the same value then that sized font is
>> used. But if I set max to a larger size than min then it's not clear what
>> font size will be used.
>> I'm wanting the font size to adapt to the amount the molecule is scaled
>> to fit the space (larger molecules needing a smaller font) but I want the
>> font size that is used to be a bit bigger than the default that would be
>> used if I don't set anything.
>> How do I go about this?
>> Thanks
>> Tim
>> ___
>> 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] Font size when drawing molecules

2022-02-09 Thread Tim Dudgeon
I'm confused over how the font is chosen when drawing molecules.
There are MolDrawOptions.minFontSize and MolDrawOptions.maxFontSize
properties, and if I set them to the same value then that sized font is
used. But if I set max to a larger size than min then it's not clear what
font size will be used.
I'm wanting the font size to adapt to the amount the molecule is scaled to
fit the space (larger molecules needing a smaller font) but I want the font
size that is used to be a bit bigger than the default that would be used if
I don't set anything.
How do I go about this?
Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] problem with latest bulds?

2022-01-26 Thread Tim Dudgeon
And to clarify, the build completes OK. It's just that the Python
bindings don't work.

On Wed, Jan 26, 2022 at 2:42 PM Tim Dudgeon  wrote:

> Yes, it sounds similar, but I'm not applying that fix (though on the
> Release_2021_09_4 tag I do also see that same problem).
> I'm just doing a plain vanilla build from the code on master branch.
>
> On Wed, Jan 26, 2022 at 2:30 PM Paolo Tosco 
> wrote:
>
>> Hi Tim,
>>
>> there was a similar report a few days ago, caused by a sed command
>> overwriting its input and resulting in no output:
>>
>> Cannot import Draw · Issue #4904 · rdkit/rdkit (github.com)
>> <https://github.com/rdkit/rdkit/issues/4904>
>>
>> Could it be you are experiencing the same issue? Current ,master builds
>> fine for me too.
>>
>> Cheers,
>> p.
>>
>> On Wed, Jan 26, 2022 at 2:58 PM Tim Dudgeon 
>> wrote:
>>
>>> I'm building RDKit from the latest code on the master branch.
>>> The build is fine, but the python bindings seem broken:
>>>
>>> >>> from rdkit import Chem
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>>   File "/data/github/rdkit/rdkit/rdkit/__init__.py", line 6, in 
>>> from . import rdBase
>>> ImportError: cannot import name 'rdBase' from partially initialized
>>> module 'rdkit' (most likely due to a circular import)
>>> (/data/github/rdkit/rdkit/rdkit/__init__.py)
>>>
>>> Are others seeing this too?
>>>
>>> Tim
>>> ___
>>> 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] problem with latest bulds?

2022-01-26 Thread Tim Dudgeon
Yes, it sounds similar, but I'm not applying that fix (though on the
Release_2021_09_4 tag I do also see that same problem).
I'm just doing a plain vanilla build from the code on master branch.

On Wed, Jan 26, 2022 at 2:30 PM Paolo Tosco 
wrote:

> Hi Tim,
>
> there was a similar report a few days ago, caused by a sed command
> overwriting its input and resulting in no output:
>
> Cannot import Draw · Issue #4904 · rdkit/rdkit (github.com)
> <https://github.com/rdkit/rdkit/issues/4904>
>
> Could it be you are experiencing the same issue? Current ,master builds
> fine for me too.
>
> Cheers,
> p.
>
> On Wed, Jan 26, 2022 at 2:58 PM Tim Dudgeon  wrote:
>
>> I'm building RDKit from the latest code on the master branch.
>> The build is fine, but the python bindings seem broken:
>>
>> >>> from rdkit import Chem
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "/data/github/rdkit/rdkit/rdkit/__init__.py", line 6, in 
>> from . import rdBase
>> ImportError: cannot import name 'rdBase' from partially initialized
>> module 'rdkit' (most likely due to a circular import)
>> (/data/github/rdkit/rdkit/rdkit/__init__.py)
>>
>> Are others seeing this too?
>>
>> Tim
>> ___
>> 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] problem with latest bulds?

2022-01-26 Thread Tim Dudgeon
I'm building RDKit from the latest code on the master branch.
The build is fine, but the python bindings seem broken:

>>> from rdkit import Chem
Traceback (most recent call last):
  File "", line 1, in 
  File "/data/github/rdkit/rdkit/rdkit/__init__.py", line 6, in 
from . import rdBase
ImportError: cannot import name 'rdBase' from partially initialized module
'rdkit' (most likely due to a circular import)
(/data/github/rdkit/rdkit/rdkit/__init__.py)

Are others seeing this too?

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


Re: [Rdkit-discuss] Using SmilesMolSuplier with CSV containing quotemarks

2022-01-10 Thread Tim Dudgeon
I think you have to add a step that removes the quote marks if they are
present?
Tim

On Mon, Jan 10, 2022 at 10:15 AM James Wallace  wrote:

> As the subject suggests, I'm trying to find a universal solution for
> reading CSVs via the SmilesMolSupplier (as the input setup could be single
> column or multiple column, using the pandas tools for interconversion is
> overkill)
>
> The general structure I use for analysing the CSV is:
>
>
> with open(chem_file_name, "r") as csv_upload_file:
> first_line = csv_upload_file.readline()
> dialect = sniffer.sniff(first_line)
> has_header = sniffer.has_header(first_line)
> csv_upload_file.close()
>
> supplier = Chem.SmilesMolSupplier(chem_file_name,
> delimiter=str(dialect.delimiter), smilesColumn=smi_col_header,
> nameColumn=-1, titleLine=has_header)
>
> If I use a CSV without quoted data,, this is fine, I can autodetect the
> delimiter, the column header is loaded in by the rest of my workflow,
> everything else is worked out through the CSV sniffer. However, where it is
> quoted data, the actual parsing will fail because of the quotemarks.
>
> [10:09:56] SMILES Parse Error: syntax error for input: '"C1=CC=CC=C1"'
> [10:09:56] ERROR: Smiles parse error on line 1
>
> Is there some easy way of handling this, or do I have to mandate not using
> quoting of data in the CSV generation?
> ___
> 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] Problems building from source

2021-12-20 Thread Tim Dudgeon
I'm hitting problems when building from source on an Ubuntu system.
I've installed the dependencies (e.g. boost) using apt and think I have
everything set properly, but cmake is failing. Early on it says:

-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
suitable version "1.71.0", minimum required is "1.56.0") found components:
serialization
== Using strict rotor definition
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
suitable version "1.71.0", minimum required is "1.56.0") found components:
system iostreams

Then a little later it spits out a large number of statements like this

CMake Error at Code/cmake/Modules/RDKitUtils.cmake:153 (add_executable):
  Target "testCoordGen" links to target "Boost::system" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  External/CoordGen/CMakeLists.txt:110 (rdkit_test)

These are the boost libs I have:

apt list --installed | grep libboost

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

libboost-atomic1.71-dev/focal,now 1.71.0-6ubuntu6 amd64
[installed,automatic]
libboost-atomic1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-chrono1.71-dev/focal,now 1.71.0-6ubuntu6 amd64
[installed,automatic]
libboost-chrono1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-date-time1.71-dev/focal,now 1.71.0-6ubuntu6 amd64
[installed,automatic]
libboost-date-time1.71.0/focal,now 1.71.0-6ubuntu6 amd64
[installed,automatic]
libboost-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed]
libboost-iostreams1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed]
libboost-iostreams1.71.0/focal,now 1.71.0-6ubuntu6 amd64
[installed,automatic]
libboost-python1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed]
libboost-python1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-regex1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed]
libboost-regex1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-serialization1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed]
libboost-serialization1.71.0/focal,now 1.71.0-6ubuntu6 amd64
[installed,automatic]
libboost-system1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed]
libboost-system1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-thread1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed]
libboost-thread1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]

Any idea what is wrong?

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


[Rdkit-discuss] Detecting non-discrete molecules

2021-12-18 Thread Tim Dudgeon
I've found that a source of molecules that I use now has some smiles
that contain the * character, whereas earlier versions did not. This is now
causing downstream problems.
Whilst it would be pretty simple to check the smiles for * characters I
think there should be a more general solution here that can detect other
types of Markush feature that devious people might try to slip into a
smiles string.

So I looked for some RDKit function that detects whether the molecule
describes a discrete structure, but I couldn't find one. Obviously I don't
want to reject structures with undefined stereochemistry but things like *
and link atoms would be rejected.

Is there anything I can use, or should I just grep the *s.

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


Re: [Rdkit-discuss] Problems minimising

2021-12-14 Thread Tim Dudgeon
Worked it out for myself.
I needed to use:

Chem.AddHs(mol, addCoords=True)

Doh!

On Tue, Dec 14, 2021 at 5:45 PM Tim Dudgeon  wrote:

> I'm seeing lots of failures when minimising molecules using
> MMFFOptimizeMolecule.
> A large proportion of seemingly valid molecules seem to fail.
> Am I doing something stupid here?
>
> Example:
>
> from rdkit import Chem
> from rdkit.Chem import AllChem
>
> molblock = '''
>  RDKit  3D
>
>   5  4  0  0  0  0  0  0  0  0999 V2000
>10.2630   -5.8010   25.0960 N   0  0  0  0  0  0  0  0  0  0  0  0
> 8.8220   -3.5490   23.3680 C   0  0  0  0  0  0  0  0  0  0  0  0
> 8.2100   -4.7890   24.0210 C   0  0  0  0  0  0  0  0  0  0  0  0
> 9.1000   -5.2470   25.1770 C   0  0  0  0  0  0  0  0  0  0  0  0
> 8.5860   -5.0380   26.4480 N   0  0  0  0  0  0  0  0  0  0  0  0
>   3  2  1  0
>   4  1  2  0
>   4  3  1  0
>   5  4  1  0
> M  END
> '''
>
> mol = Chem.MolFromMolBlock(molblock)
> print("Processing", Chem.MolToSmiles(mol))
> molh = Chem.AddHs(mol)
> converged = AllChem.MMFFOptimizeMolecule(molh)
>
>
> Outcome:
>
> Processing CCC(=N)N
> [17:41:57]
>
> 
> Invariant Violation
> bad direction in linearSearch
> Violation occurred on line 234 in file
> /home/conda/feedstock_root/build_artifacts/rdkit_1620892510968/work/Code/Numerics/Optimizer/BFGSOpt.h
> Failed Expression: status >= 0
> 
>
> Traceback (most recent call last):
>   File "/data/work/jku/5V6S/simple-min.py", line 23, in 
> converged = AllChem.MMFFOptimizeMolecule(molh)
> RuntimeError: Invariant Violation
> bad direction in linearSearch
> Violation occurred on line 234 in file
> Code/Numerics/Optimizer/BFGSOpt.h
> Failed Expression: status >= 0
> RDKIT: 2021.03.2
> BOOST: 1_74
>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Problems minimising

2021-12-14 Thread Tim Dudgeon
I'm seeing lots of failures when minimising molecules using
MMFFOptimizeMolecule.
A large proportion of seemingly valid molecules seem to fail.
Am I doing something stupid here?

Example:

from rdkit import Chem
from rdkit.Chem import AllChem

molblock = '''
 RDKit  3D

  5  4  0  0  0  0  0  0  0  0999 V2000
   10.2630   -5.8010   25.0960 N   0  0  0  0  0  0  0  0  0  0  0  0
8.8220   -3.5490   23.3680 C   0  0  0  0  0  0  0  0  0  0  0  0
8.2100   -4.7890   24.0210 C   0  0  0  0  0  0  0  0  0  0  0  0
9.1000   -5.2470   25.1770 C   0  0  0  0  0  0  0  0  0  0  0  0
8.5860   -5.0380   26.4480 N   0  0  0  0  0  0  0  0  0  0  0  0
  3  2  1  0
  4  1  2  0
  4  3  1  0
  5  4  1  0
M  END
'''

mol = Chem.MolFromMolBlock(molblock)
print("Processing", Chem.MolToSmiles(mol))
molh = Chem.AddHs(mol)
converged = AllChem.MMFFOptimizeMolecule(molh)


Outcome:

Processing CCC(=N)N
[17:41:57]


Invariant Violation
bad direction in linearSearch
Violation occurred on line 234 in file
/home/conda/feedstock_root/build_artifacts/rdkit_1620892510968/work/Code/Numerics/Optimizer/BFGSOpt.h
Failed Expression: status >= 0


Traceback (most recent call last):
  File "/data/work/jku/5V6S/simple-min.py", line 23, in 
converged = AllChem.MMFFOptimizeMolecule(molh)
RuntimeError: Invariant Violation
bad direction in linearSearch
Violation occurred on line 234 in file
Code/Numerics/Optimizer/BFGSOpt.h
Failed Expression: status >= 0
RDKIT: 2021.03.2
BOOST: 1_74
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Swig versions

2021-12-05 Thread Tim Dudgeon
I'm having problems building with Debian bullseye release.
Bullseye now has swig4.0, but RDKit build seems to require exactly 3.0.
Error is:

CMake Error at
/usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165
(message):
  Could NOT find SWIG: Found unsuitable version "4.0.2", but required is
  exact version "3.0" (found /usr/bin/swig4.0, )

This is on branch Release_2021_09.
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] State of the art for shape alignment

2021-11-11 Thread Tim Dudgeon
I'm looking into the current status of techniques that use RDKit to perform
3D alignments based on shape (e.g. not using AlignMol()) and struggling to
find what the best tools are and the status of each.

The Open3D align tools are relatively straightforward to use, but in my
hands do not seem to give good alignments. e.g with this reference mol:
[image: image.png]
I get this alignment:
[image: image.png]

I also stumbled across shape-it e.g.
https://iwatobipen.wordpress.com/2021/03/17/comparison-between-native-implemented-shape-align-method-of-rdkit-and-rdkit-shape-it-chemoinformatics-rdkit-shape-based-align/
But I find this very slow and most alignments seem to fail in my hands.

Are there any guides to what tools work well here?

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


[Rdkit-discuss] Reading text records from SDF from gzipped files

2021-11-04 Thread Tim Dudgeon
I am needing to access the text of each record of a SDF, as well as
creating a mol instance.
I was successfully doing this using SDMolSupplier.GetItemText().
Then I needed to switch to handling gzipped SD files, and SDMolSupplier can
only take a file name in its constructor.
ForwardSDMolSupplier can handle a gzip file-like instance, but doesn't have
the GetItemText() function.
Reading the file records as text is easy enough, but I can't figure out how
to get the SD file properties (Chem.MolFromMolBlock() does not handle the
properties).

Seems like there should be an easy way to handle this that I'm not seeing!

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


Re: [Rdkit-discuss] InsertMol() seems to mess up the molecule

2021-10-25 Thread Tim Dudgeon
Paolo,
Thanks. That's sorted it!
Tim

On Mon, Oct 25, 2021 at 1:18 PM Paolo Tosco 
wrote:

> Hi Tim,
>
> you only need to call SanitizeMol on merged_mol:
>
> merged_mol
> [image: image.png]
> Chem.SanitizeMol(merged_mol)
> rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
>
> merged_mol
> [image: image.png]
>
> In general, the RDKit defers calling SanitizeMol to the user rather than
> calling it after each molecule manipulation operation, since it's an
> expensive operation.
> For example, in your case you might want to do multiple insertions and
> only sanitize at the end of the insertion process.
>
> Cheers,
> p.
>
> On Mon, Oct 25, 2021 at 1:15 PM Tim Dudgeon  wrote:
>
>> I'm trying to merge two molecules into one, and it looks like the
>> InsertMol() function is supposed to do this. But when I try the merged
>> molecule is messed up.
>>
>> [image: image.png]
>> Am I doing the right thing?
>> Thanks
>> Tim
>>
>> ___
>> 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] InsertMol() seems to mess up the molecule

2021-10-25 Thread Tim Dudgeon
I'm trying to merge two molecules into one, and it looks like the
InsertMol() function is supposed to do this. But when I try the merged
molecule is messed up.

[image: image.png]
Am I doing the right thing?
Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Removing Hs bonded to sp3 carbons

2021-10-23 Thread Tim Dudgeon
Chem.RemoveHs(mol) will remove all Hs.
Do you really want to only remove them from sp3 carbons?

On Tue, Oct 19, 2021 at 7:08 PM Alfredo Quevedo 
wrote:

> Dear all,
>
> I am trying to figure out if there is a way to remove all hydrogens bond
> to sp3 carbons in my molecule?
>
> thanks in advance for the help,
>
> kind regards
>
> Alfredo
>
>
>
> ___
> 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] validating stereochemistry

2021-09-27 Thread Tim Dudgeon
Thanks Brian. Didn't know that existed! Very useful.
As you mention, it is a lot slower to do the check.
Tim

On Mon, Sep 27, 2021 at 1:30 PM Brian Cole  wrote:

> Good Morning Tim,
>
> The RDKit EnumerateStereoisomers function accomplishes this through the
> ‘tryEmbedding’ flag:
> https://github.com/rdkit/rdkit/blob/d20e5cadc81bf6c7b4e590124866f178f2f2fe28/rdkit/Chem/EnumerateStereoisomers.py#L8
>
> It attempts to generate a 3D conformer for the given stereo configuration
> and fails the configuration if the conformer isn’t reasonable. Not fast,
> but it is reliable.
>
> -Brian
>
>
> On Sep 27, 2021, at 8:06 AM, Tim Dudgeon  wrote:
>
> 
> I have Python code to enumerate undefined chiral centres in a molecule.
> Mostly this works fine, but for some constrained structures this can
> generate stereochemistry that makes no sense. For
> instance consider NC1CC2CCC1C2:
> <#1 (2).png>
>
>
> These two make sense:
> <#2.png>
>
> <#3.png>
>
>
> But these two don't:
> <#5.png>
>
> <#4.png>
>
>
> Is there a way to filter out the invalid ones?
>
> Thanks
> Tim
> ___
> 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] validating stereochemistry

2021-09-27 Thread Tim Dudgeon
I have Python code to enumerate undefined chiral centres in a molecule.
Mostly this works fine, but for some constrained structures this can
generate stereochemistry that makes no sense. For
instance consider NC1CC2CCC1C2:
[image: #1 (2).png]

These two make sense:
[image: #2.png]
[image: #3.png]

But these two don't:
[image: #5.png]
[image: #4.png]

Is there a way to filter out the invalid ones?

Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] MaxMin picker for picking the most similar molecules

2021-02-04 Thread Tim Dudgeon
I'm wanting to pick the molecules in one set that are most similar to those
in a seed set.
Seems like I should be able to use the MaxMinPicker to do this by using a
function of (1 - tanimoto).
Would this work, or is there a better approach?
Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-02-03 Thread Tim Dudgeon
Steve,
It happens whether running in multiple threads or a single thread.
Tim

On Wed, Feb 3, 2021 at 2:36 PM Stephen Roughley 
wrote:

> Hi Tim,
>
> You mentioned the calculation is done using Java streams. Have you tried
> calling #sequential() on your stream to force it to run single threaded
> from the Java side?
>
> Steve
>
> On Wed, 3 Feb 2021, 12:58 Greg Landrum,  wrote:
>
>> Given the fun that threading is, this isn't necessarily conclusive, but I
>> just created a small C++ multi-threading test for the morgan fingerprinting
>> code and everything looks fine. That remains true when the code is run
>> under valgrind (which is quite good at picking up the usual types of memory
>> corruption that cause threading issues).
>>
>> -greg
>>
>>
>> On Wed, Feb 3, 2021 at 1:36 PM Greg Landrum 
>> wrote:
>>
>>> Hi Tim,
>>>
>>> I haven't seen this particular problem myself, nor have we gotten any
>>> reports of crashes from the Morgan fingerprinting code.
>>> Comparing the fingerprinting code itself across the 2019.09 and 2020.09
>>> branches I also don't see anything which is likely to cause problems, but
>>> one never knows.
>>>
>>> One thing that might help to know is how you construct the molecule's
>>> you're generating fingerprints for: are these from one of the RDKit file
>>> parsers? Have they been sanitized?
>>>
>>> Another thing you might have already tried, but it's worth checking
>>> anyway: can you force your web app to only run a single thread at a time?
>>> That shouldn't be a problem with the morgan fingerprinting code, but it's
>>> still worth the experiment.
>>>
>>> -greg
>>>
>>>
>>> On Tue, Feb 2, 2021 at 7:14 PM Tim Dudgeon 
>>> wrote:
>>>
>>>> Wondering if anyone had any thoughts on this core dump from Java.
>>>> What other info would be useful?
>>>>
>>>> Tim
>>>>
>>>> On Tue, Jan 12, 2021 at 12:55 PM Tim Dudgeon 
>>>> wrote:
>>>>
>>>>> I'm struggling to work out a stange core dump I'm getting when
>>>>> calculating Morgan fingerprints from Java. This seems to happen with the
>>>>> Release_2020_09 releases but not with the Release_2019_09 ones. It does 
>>>>> not
>>>>> happen when calculating RDKit fingerprints. The exact Java code involved 
>>>>> is:
>>>>>
>>>>> RDKFuncs.MorganFingerprintMol(mol, 2);
>>>>>
>>>>> More precisely this is happening when running inside a Docker
>>>>> container which is running the code as a Tomcat webapp, but a simple test
>>>>> of running that same function inside the container directly from Java 
>>>>> (e.g.
>>>>> not when running in tomcat) works OK and does not core dump.
>>>>> Building an otherwise identical container with the Release_2019_09
>>>>> code does not core dump from Tomcat.
>>>>>
>>>>> The core dump looks like this:
>>>>>
>>>>> # A fatal error has been detected by the Java Runtime Environment:
>>>>> #
>>>>> #  SIGSEGV (0xb) at pc=0x7ff9edc00518, pid=1, tid=111
>>>>> #
>>>>> # JRE version: OpenJDK Runtime Environment (11.0.9.1+1) (build
>>>>> 11.0.9.1+1-post-Debian-1deb10u2)
>>>>> # Java VM: OpenJDK 64-Bit Server VM (11.0.9.1+1-post-Debian-1deb10u2,
>>>>> mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
>>>>> # Problematic frame:
>>>>> # [thread 145 also had an error]
>>>>> [thread 149 also had an error]
>>>>> [thread 113 also had an error]
>>>>> [thread 117 also had an error]
>>>>> C  [libGraphMolWrap.so+0xa20518]  void
>>>>> RDKit::MorganFingerprints::calcFingerprint>>>> int> >(RDKit::ROMol const&, unsigned int, std::vector>>>> std::allocator >*, std::vector>>>> std::allocator > const*, bool, bool, bool, bool,
>>>>> std::map,
>>>>> std::allocator > >,
>>>>> std::less, std::allocator>>>> std::vector,
>>>>> std::allocator > > > > >*, bool,
>>>>> RDKit::SparseIntVect&)+0x148
>>>>>
>>>>> It's difficult to know what's wrong, but thought it might be worth
>>>>> asking if anything in the Morgan fingerprint code has changed over that
>>>>> timeframe?
>>>>> It might be related to threading as the fingerprint generation is
>>>>> being done inside Java streams.
>>>>>
>>>>> Tim
>>>>>
>>>>>
>>>>>
>>>>> ___
>>>> 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 mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-02-03 Thread Tim Dudgeon
Hi Greg,

The problem seems to happen whether running in a single thread or not.
It does not seem to depend on the molecule. Seems to always happen AFAICT.
The molecules are created from SMILES using RWMol.MolFromSmiles(smiles),
which I believe sanatizes by default.

Tim

On Wed, Feb 3, 2021 at 12:36 PM Greg Landrum  wrote:

> Hi Tim,
>
> I haven't seen this particular problem myself, nor have we gotten any
> reports of crashes from the Morgan fingerprinting code.
> Comparing the fingerprinting code itself across the 2019.09 and 2020.09
> branches I also don't see anything which is likely to cause problems, but
> one never knows.
>
> One thing that might help to know is how you construct the molecule's
> you're generating fingerprints for: are these from one of the RDKit file
> parsers? Have they been sanitized?
>
> Another thing you might have already tried, but it's worth checking
> anyway: can you force your web app to only run a single thread at a time?
> That shouldn't be a problem with the morgan fingerprinting code, but it's
> still worth the experiment.
>
> -greg
>
>
> On Tue, Feb 2, 2021 at 7:14 PM Tim Dudgeon  wrote:
>
>> Wondering if anyone had any thoughts on this core dump from Java.
>> What other info would be useful?
>>
>> Tim
>>
>> On Tue, Jan 12, 2021 at 12:55 PM Tim Dudgeon 
>> wrote:
>>
>>> I'm struggling to work out a stange core dump I'm getting when
>>> calculating Morgan fingerprints from Java. This seems to happen with the
>>> Release_2020_09 releases but not with the Release_2019_09 ones. It does not
>>> happen when calculating RDKit fingerprints. The exact Java code involved is:
>>>
>>> RDKFuncs.MorganFingerprintMol(mol, 2);
>>>
>>> More precisely this is happening when running inside a Docker container
>>> which is running the code as a Tomcat webapp, but a simple test of running
>>> that same function inside the container directly from Java (e.g. not when
>>> running in tomcat) works OK and does not core dump.
>>> Building an otherwise identical container with the Release_2019_09 code
>>> does not core dump from Tomcat.
>>>
>>> The core dump looks like this:
>>>
>>> # A fatal error has been detected by the Java Runtime Environment:
>>> #
>>> #  SIGSEGV (0xb) at pc=0x7ff9edc00518, pid=1, tid=111
>>> #
>>> # JRE version: OpenJDK Runtime Environment (11.0.9.1+1) (build
>>> 11.0.9.1+1-post-Debian-1deb10u2)
>>> # Java VM: OpenJDK 64-Bit Server VM (11.0.9.1+1-post-Debian-1deb10u2,
>>> mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
>>> # Problematic frame:
>>> # [thread 145 also had an error]
>>> [thread 149 also had an error]
>>> [thread 113 also had an error]
>>> [thread 117 also had an error]
>>> C  [libGraphMolWrap.so+0xa20518]  void
>>> RDKit::MorganFingerprints::calcFingerprint>> int> >(RDKit::ROMol const&, unsigned int, std::vector>> std::allocator >*, std::vector>> std::allocator > const*, bool, bool, bool, bool,
>>> std::map,
>>> std::allocator > >,
>>> std::less, std::allocator>> std::vector,
>>> std::allocator > > > > >*, bool,
>>> RDKit::SparseIntVect&)+0x148
>>>
>>> It's difficult to know what's wrong, but thought it might be worth
>>> asking if anything in the Morgan fingerprint code has changed over that
>>> timeframe?
>>> It might be related to threading as the fingerprint generation is being
>>> done inside Java streams.
>>>
>>> Tim
>>>
>>>
>>>
>>> ___
>> 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] Strange core dump with Morgan fingerprints with Java

2021-02-02 Thread Tim Dudgeon
Wondering if anyone had any thoughts on this core dump from Java.
What other info would be useful?

Tim

On Tue, Jan 12, 2021 at 12:55 PM Tim Dudgeon  wrote:

> I'm struggling to work out a stange core dump I'm getting when calculating
> Morgan fingerprints from Java. This seems to happen with the
> Release_2020_09 releases but not with the Release_2019_09 ones. It does not
> happen when calculating RDKit fingerprints. The exact Java code involved is:
>
> RDKFuncs.MorganFingerprintMol(mol, 2);
>
> More precisely this is happening when running inside a Docker container
> which is running the code as a Tomcat webapp, but a simple test of running
> that same function inside the container directly from Java (e.g. not when
> running in tomcat) works OK and does not core dump.
> Building an otherwise identical container with the Release_2019_09 code
> does not core dump from Tomcat.
>
> The core dump looks like this:
>
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x7ff9edc00518, pid=1, tid=111
> #
> # JRE version: OpenJDK Runtime Environment (11.0.9.1+1) (build
> 11.0.9.1+1-post-Debian-1deb10u2)
> # Java VM: OpenJDK 64-Bit Server VM (11.0.9.1+1-post-Debian-1deb10u2,
> mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
> # Problematic frame:
> # [thread 145 also had an error]
> [thread 149 also had an error]
> [thread 113 also had an error]
> [thread 117 also had an error]
> C  [libGraphMolWrap.so+0xa20518]  void
> RDKit::MorganFingerprints::calcFingerprint int> >(RDKit::ROMol const&, unsigned int, std::vector std::allocator >*, std::vector std::allocator > const*, bool, bool, bool, bool,
> std::map,
> std::allocator > >,
> std::less, std::allocator std::vector,
> std::allocator > > > > >*, bool,
> RDKit::SparseIntVect&)+0x148
>
> It's difficult to know what's wrong, but thought it might be worth asking
> if anything in the Morgan fingerprint code has changed over that timeframe?
> It might be related to threading as the fingerprint generation is being
> done inside Java streams.
>
> Tim
>
>
>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Strange core dump with Morgan fingerprints with Java

2021-01-12 Thread Tim Dudgeon
I'm struggling to work out a stange core dump I'm getting when calculating
Morgan fingerprints from Java. This seems to happen with the
Release_2020_09 releases but not with the Release_2019_09 ones. It does not
happen when calculating RDKit fingerprints. The exact Java code involved is:

RDKFuncs.MorganFingerprintMol(mol, 2);

More precisely this is happening when running inside a Docker container
which is running the code as a Tomcat webapp, but a simple test of running
that same function inside the container directly from Java (e.g. not when
running in tomcat) works OK and does not core dump.
Building an otherwise identical container with the Release_2019_09 code
does not core dump from Tomcat.

The core dump looks like this:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x7ff9edc00518, pid=1, tid=111
#
# JRE version: OpenJDK Runtime Environment (11.0.9.1+1) (build
11.0.9.1+1-post-Debian-1deb10u2)
# Java VM: OpenJDK 64-Bit Server VM (11.0.9.1+1-post-Debian-1deb10u2, mixed
mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# [thread 145 also had an error]
[thread 149 also had an error]
[thread 113 also had an error]
[thread 117 also had an error]
C  [libGraphMolWrap.so+0xa20518]  void
RDKit::MorganFingerprints::calcFingerprint >(RDKit::ROMol const&, unsigned int, std::vector >*, std::vector > const*, bool, bool, bool, bool,
std::map,
std::allocator > >,
std::less, std::allocator,
std::allocator > > > > >*, bool,
RDKit::SparseIntVect&)+0x148

It's difficult to know what's wrong, but thought it might be worth asking
if anything in the Morgan fingerprint code has changed over that timeframe?
It might be related to threading as the fingerprint generation is being
done inside Java streams.

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


Re: [Rdkit-discuss] h-bond geometry

2020-09-08 Thread Tim Dudgeon
Hi All,
thanks for the suggestions.

Greg, that's part of what's needed but there's also some more complex logic
needed. For instance, if the atom the H is attached to is rotatable e.g. an
OH group) then it is more complex than if it is fixed (e.g a N in a ring).
I was wondering whether anyone had already encoded these types of rules.

BTW I also found https://oddt.readthedocs.io/en/latest/ which seems to
handle a whole range of interaction types nicely, and can use RDKit as its
underlying toolkit (as well as OBabel).

Tim

On Tue, Sep 8, 2020 at 1:24 PM Greg Landrum  wrote:

> Hi Tim,
>
> Assuming that you already have the indices of the atoms that you're
> interested in looking at, it's pretty easy to calculate the angle between
> three arbitrary atoms. Here's an example:
>
> In [3]: m = Chem.AddHs(Chem.MolFromSmiles('COCO'))
>
> In [4]: AllChem.EmbedMolecule(m)
> Out[4]: 0
>
> In [5]: conf = m.GetConformer()
>
> In [6]: ps = [conf.GetAtomPosition(x) for x in range(conf.GetNumAtoms())]
>
> The atom0 - atom1 - atom2 angle:
> In [7]: (ps[1]-ps[0]).AngleTo(ps[1]-ps[2])
> Out[7]: 1.8295300825582068
>
>
> Those happened to be bonded, but that's not necessary, here's the atom1 -
> atom6 - atom3 angle:
> In [15]: (ps[6]-ps[1]).AngleTo(ps[6]-ps[3])
> Out[15]: 0.4862648980647286
>
> Is that what you're looking for?
>
> -greg
>
>
>
> On Mon, Sep 7, 2020 at 3:06 PM Tim Dudgeon  wrote:
>
>> Hi RDKitters,
>> I was wondering whether anyone has any RDKit code that checks on the
>> geometry of a H-bond.
>> e.g. once a donor and acceptor are located within a reasonable
>> distance of each other to check on the angles involved to establish if that
>> is a reasonable H-bond.
>> Tim
>>
>>
>> ___
>> 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] h-bond geometry

2020-09-07 Thread Tim Dudgeon
Hi RDKitters,
I was wondering whether anyone has any RDKit code that checks on the
geometry of a H-bond.
e.g. once a donor and acceptor are located within a reasonable distance of
each other to check on the angles involved to establish if that is a
reasonable H-bond.
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] EmbedMolecule and chirality

2020-08-27 Thread Tim Dudgeon
I've encountered a strange problem when doing constrained embedding that
seems to be related to chirality.
The example is here:
https://gist.github.com/tdudgeon/c4604f3ee9124eeec60668b5eefe465e

The molecule being embedded has a single chiral carbon, and while that atom
is tethered, only one of it's attached atoms is also tethered, so if I
understand correctly, there should be no reason why the chiral atom cannot
be embedded correctly.

But when I use the enforceChirality=True option the embedding usually
fails, and takes several seconds to do so. Very occasionally it succeeds
and the chirality is preserved as expected.

If however I use the enforceChirality=False option the embedding
succeeds and is very quick. In all cases I've run so far the
stereochemistry is preserved.

Can someone explain this behaviour?

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


Re: [Rdkit-discuss] Build matching 3D structure

2020-07-28 Thread Tim Dudgeon
ConstrainedEmbed should be what you need. If it's saying that your molecule
doesn't match the core then that's where you need to look. Maybe the core
is not an exact substructure?
If you still have difficulties you could generate the MCS between the
structures and use that as the core.
Greg's blog here might help:
http://rdkit.blogspot.com/2013/12/using-allchemconstrainedembed.html
Tim

On Mon, Jul 27, 2020 at 11:15 PM Rafael da Fonseca Lameiro <
rafael.lame...@alumni.usp.br> wrote:

> Hello
> I'm having a hard time trying to build a 3D structure for a new molecule
> (new) based on a reference molecule (ref).
> In this case, ref is a substructure of new, and I want the coordinates of
> their matching atoms to be exactly the same.
> I have tried using:
>   Chem.rdDepictor.GenerateDepictionMatching3DStructure (only works if both
> molecules are the same)
>
> rdkit.Chem.AllChem.ConstrainedEmbed (I get ValueError: molecule doesn't
> match the core)
>
> AllChem.AlignMol (I need to input a 3D structure for new, which doesn't
> match ref)
>
> I thought about generating a ton of conformers for new using
> AllChem.EmbedMultipleConfs and then use the one with the best alignment to
> ref, but I figured there should be a better way to do this. I would
> appreciate any suggestions.
> On a side note, is there a way to convert Chem.rdchem.Conformer objects to
> Chem.rdchem.Mol?
>
> Thank you for the help
>
> Rafael
>
>
> ___
> 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] Handling PDB files

2020-07-23 Thread Tim Dudgeon
RDKit can read PDB files but is there any functionality to work with the
resulting molecule at the chain and residue level?
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Adjusting weight when merging feature maps

2020-07-23 Thread Tim Dudgeon
The points in a featuremap seem to have a  'weight' property that is set to
1.0 as default.
When merging featuremaps with the CombineFeatMaps() the weight of the
merged points remains as 1.0. Is it possible to change this behaviour so
that the meged point has an increased weight? Either a weight of 2.0 or a
value determined by how close the points are?

Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Saving FeatMap

2020-07-21 Thread Tim Dudgeon
I'm needing to save a FeatMap to a file so that I can load it back later.
I've been using a pickle for this, but am now told that this will not be
permitted for security reasons.
Is there a better way to do this?
Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Chiral flag when writing molfile

2020-07-14 Thread Tim Dudgeon
Great. Thanks.
I suspected that would be the case, but just wanted to be sure I
wasn't missing anything.

On Tue, Jul 14, 2020 at 9:42 AM Greg Landrum  wrote:

> Hi Tim,
>
> Yes, you need to set the property manually if you would like the chiral
> flag to be set in the mol file.
>
> The code behaves this way because otherwise it would need to guess what
> the user intended (as well as how they interpret/use the chiral flag).
>
> -greg
>
>
> On Mon, Jul 13, 2020 at 1:28 PM Tim Dudgeon  wrote:
>
>> I've noticed that when writing a 3D molfile that has been generated by
>> RDKit (in my case using AllChem.EmbedMolecule) and has chirality present
>> that the chiral flag is not set. At least it is not always set, I can't be
>> exactly sure. My exact scenario is to read a chiral SMILES, convert to 3D
>> using EmbedMolecule and then write to SDF.
>>
>> I also note that there is a magical '_MolFileChiralFlag' property that it
>> seems if set to 1 results in the chiral flag being set.
>>
>> So the question here is is it the responsibility of the developer to set
>> this '_MolFileChiralFlag' property when the molecule is known to be chiral
>> (e.g. using the Chem.FindMolChiralCenters() method) or am I missing
>> something here?
>>
>> Thanks
>> Tim
>> ___
>> 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] Chiral flag when writing molfile

2020-07-13 Thread Tim Dudgeon
I've noticed that when writing a 3D molfile that has been generated by
RDKit (in my case using AllChem.EmbedMolecule) and has chirality present
that the chiral flag is not set. At least it is not always set, I can't be
exactly sure. My exact scenario is to read a chiral SMILES, convert to 3D
using EmbedMolecule and then write to SDF.

I also note that there is a magical '_MolFileChiralFlag' property that it
seems if set to 1 results in the chiral flag being set.

So the question here is is it the responsibility of the developer to set
this '_MolFileChiralFlag' property when the molecule is known to be chiral
(e.g. using the Chem.FindMolChiralCenters() method) or am I missing
something here?

Thanks
Tim
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] IsBondRotatable() ?

2020-06-01 Thread Tim Dudgeon
Jan,
Thanks. That looks useful.
Tim

On Sun, May 31, 2020 at 10:50 AM Jan Halborg Jensen 
wrote:

> Here’s some code. I found the first SMARTS string somewhere (can’t take
> credit for that) and added the two others (I think):
>
> https://github.com/jensengroup/get_conformations/blob/4f3c5ef47f66708defc64196c94e427a956b8f15/get_conformations.py#L16
>
> On 30 May 2020, at 13.38, Tim Dudgeon  wrote:
>
> Is there an easy way to ask whether a particular bond is rotatable?
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
>
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Frdkit-discussdata=02%7C01%7Cjhjensen%40chem.ku.dk%7Cc0c2816acd794511223e08d8048e2a7c%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C637264355938014332sdata=77o142MKG6w9YRjfxY34%2Fs2WQ6WS8018EkjshXnSDtM%3Dreserved=0
>
>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Swapping bonds in a 3D mol

2020-05-31 Thread Tim Dudgeon
What is the best way to swap 2 bonds that are attached to an atom without
changing the 3D coordinates of the other atoms.
As an example, I have a tetrahedral carbon with bonds 1, 2, 3 and 4. I want
to switch bonds 1 and 2, including relocating any atoms attached to the
other atom in those bonds, but not change the coordinates of any other
atoms in the molecule.
I know this could be done using ConstrainedEmbed(), but seems like a
sledgehammer to crack this particular nut.
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] IsBondRotatable() ?

2020-05-30 Thread Tim Dudgeon
Is there an easy way to ask whether a particular bond is rotatable?
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Unknown CMake command "downloadAndCheckMD5"

2020-05-28 Thread Tim Dudgeon
Thanks Paulo. Deleting CMakeCache.txt seems to have fixed the problem.
I then hit a problem being unable to build against boost 1.71 but when I
switched back to 1.67 it was OK.
Seems to be building fine now.
Tim

On Thu, May 28, 2020 at 5:09 PM Paolo Tosco 
wrote:

> Hi Tim,
>
> could you please run a pwd in your build directory? Also, could you try
> deleting CMakeCache.txt and re-running cmake?
>
> With "subdirectory" I was asking whether your build directory was a
> subdirectory of the RDKit root dir or a subdirectory of gmwrapper,
> because I get that error if I try to run your command from
> rdkit/Code/JavaWrappers/gmwrapper/build rather than from rdkit/build, as
> in that case the main CMakeLists.txt file is not sourced.
>
> Cheers,
> p.
> On 28/05/2020 17:01, Tim Dudgeon wrote:
>
> well, I am running it from a subdirectory - the build subdirectory which
> is where it has always been run from.
> e.g.
>
> mkdir build
> cd build
> cmake -DPYTHON_EXECUTABLE=/usr/bin/python3  -DRDK_BUILD_INCHI_SUPPORT=ON
>  -DRDK_BUILD_AVALON_SUPPORT=ON  -DRDK_BUILD_PYTHON_WRAPPERS=ON
>  -DRDK_BUILD_SWIG_WRAPPERS=ON ..
>
>
>
> Tim
>
> On Thu, May 28, 2020 at 4:46 PM Paolo Tosco 
> wrote:
>
>> Hi Tim,
>>
>> downloadAndCheckMD5 is a function defined in
>> Code/cmake/Modules/RDKitUtils.cmake, which is included by the main
>> CMakeLists.txt file and then is available to all children CMakeLists.txt
>> files.
>>
>> From the line number where the error occurs
>>
>> $ grep -n downloadAndCheckMD5 `find . -name CMakeLists.txt`
>> ./Code/JavaWrappers/gmwrapper/CMakeLists.txt:21:
>> downloadAndCheckMD5(${JUNIT_URL} "${RDKit_JavaLibDir}/junit.jar"
>> ${JUNIT_MD5SUM})
>> it looks like you might be running cmake in a subdirectory rather than
>> in the RDKit root directory.
>>
>> HTH, cheers
>> p.
>>
>> On 28/05/2020 16:28, Tim Dudgeon wrote:
>>
>> I'm not able to build form source (master branch) from a new machine I've
>> recently set up (Ubuntu 20.04).
>>
>> $ cmake  -DPYTHON_EXECUTABLE=/usr/bin/python3
>>  -DRDK_BUILD_INCHI_SUPPORT=ON  -DRDK_BUILD_AVALON_SUPPORT=ON
>>  -DRDK_BUILD_PYTHON_WRAPPERS=ON  -DRDK_BUILD_SWIG_WRAPPERS=ON  ..
>> CMake Error at CMakeLists.txt:21 (downloadAndCheckMD5):
>>   Unknown CMake command "downloadAndCheckMD5".
>>
>>
>> -- Configuring incomplete, errors occurred!
>> See also
>> "/home/timbo/github/rdkit/rdkit_2020_03/CMakeFiles/CMakeOutput.log".
>>
>> $ cmake --version
>> cmake version 3.16.3
>>
>> Has anything changed with cmake recently?
>>
>> Tim
>>
>>
>> ___
>> Rdkit-discuss mailing 
>> listRdkit-discuss@lists.sourceforge.nethttps://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] Unknown CMake command "downloadAndCheckMD5"

2020-05-28 Thread Tim Dudgeon
well, I am running it from a subdirectory - the build subdirectory which is
where it has always been run from.
e.g.

mkdir build
cd build
cmake -DPYTHON_EXECUTABLE=/usr/bin/python3  -DRDK_BUILD_INCHI_SUPPORT=ON
 -DRDK_BUILD_AVALON_SUPPORT=ON  -DRDK_BUILD_PYTHON_WRAPPERS=ON
 -DRDK_BUILD_SWIG_WRAPPERS=ON ..



Tim

On Thu, May 28, 2020 at 4:46 PM Paolo Tosco 
wrote:

> Hi Tim,
>
> downloadAndCheckMD5 is a function defined in
> Code/cmake/Modules/RDKitUtils.cmake, which is included by the main
> CMakeLists.txt file and then is available to all children CMakeLists.txt
> files.
>
> From the line number where the error occurs
>
> $ grep -n downloadAndCheckMD5 `find . -name CMakeLists.txt`
> ./Code/JavaWrappers/gmwrapper/CMakeLists.txt:21:
> downloadAndCheckMD5(${JUNIT_URL} "${RDKit_JavaLibDir}/junit.jar"
> ${JUNIT_MD5SUM})
> it looks like you might be running cmake in a subdirectory rather than in
> the RDKit root directory.
>
> HTH, cheers
> p.
>
> On 28/05/2020 16:28, Tim Dudgeon wrote:
>
> I'm not able to build form source (master branch) from a new machine I've
> recently set up (Ubuntu 20.04).
>
> $ cmake  -DPYTHON_EXECUTABLE=/usr/bin/python3
>  -DRDK_BUILD_INCHI_SUPPORT=ON  -DRDK_BUILD_AVALON_SUPPORT=ON
>  -DRDK_BUILD_PYTHON_WRAPPERS=ON  -DRDK_BUILD_SWIG_WRAPPERS=ON  ..
> CMake Error at CMakeLists.txt:21 (downloadAndCheckMD5):
>   Unknown CMake command "downloadAndCheckMD5".
>
>
> -- Configuring incomplete, errors occurred!
> See also
> "/home/timbo/github/rdkit/rdkit_2020_03/CMakeFiles/CMakeOutput.log".
>
> $ cmake --version
> cmake version 3.16.3
>
> Has anything changed with cmake recently?
>
> Tim
>
>
> ___
> Rdkit-discuss mailing 
> listRdkit-discuss@lists.sourceforge.nethttps://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] Unknown CMake command "downloadAndCheckMD5"

2020-05-28 Thread Tim Dudgeon
I'm not able to build form source (master branch) from a new machine I've
recently set up (Ubuntu 20.04).

$ cmake  -DPYTHON_EXECUTABLE=/usr/bin/python3  -DRDK_BUILD_INCHI_SUPPORT=ON
 -DRDK_BUILD_AVALON_SUPPORT=ON  -DRDK_BUILD_PYTHON_WRAPPERS=ON
 -DRDK_BUILD_SWIG_WRAPPERS=ON  ..
CMake Error at CMakeLists.txt:21 (downloadAndCheckMD5):
  Unknown CMake command "downloadAndCheckMD5".


-- Configuring incomplete, errors occurred!
See also
"/home/timbo/github/rdkit/rdkit_2020_03/CMakeFiles/CMakeOutput.log".

$ cmake --version
cmake version 3.16.3

Has anything changed with cmake recently?

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


Re: [Rdkit-discuss] Usage of CombineFeatMaps

2020-05-06 Thread Tim Dudgeon

Hi Greg, yes that mostly makes sense and is a great help.

What's not clear is the usage of mergeMethod as this does not seem to be 
specifiable in CombineFeatMaps(), but you say that that method uses it 
when calling MergeFeatPoints(). Why isn't it in the signature of the former?


Tim

On 06/05/2020 16:55, Greg Landrum wrote:

We're deep in the underdocumented space now. Sorry about that.

Here's an attempt to provide some at least sense of what these things 
mean. This is going from (old) memory and a quick skim of the code... 
hopefully I don't make any egregious errors.


mergeMetric is the metric used to determine whether or not two feature 
points will be combined into a single point. These use the the mergeTol

- NoMerge means don't merge points at all
- Distance means combine points that are less than mergeTol apart
- Overlap means combine points that have an overlap more than 
mergeTol (the feature map itself computes this with GetFeatFeatScore())


dirMergeMode is not used (thankfully)

mergeMethod is a parameter to MergeFeatPoints, which CombineFeatMaps 
calls.
The default value is to use the weighted average of the features to 
determine the location and weight of the replacement feature.
The other two possibilities are Average (does a non-weighted average) 
and UseLarger which just keeps the location and weight of the feature 
point with the larger weight.


does that help?

-greg




On Wed, May 6, 2020 at 5:27 PM Tim Dudgeon <mailto:tdudgeon...@gmail.com>> wrote:


I'm trying to use the FeatureMaps functionality in RDKit
(described here
http://rdkit.blogspot.com/2017/11/using-feature-maps.html) and have a
question on the parameters for CombineFeatMaps.

See here:

http://rdkit.org/docs/source/rdkit.Chem.FeatMaps.FeatMapUtils.html?highlight=combinefeatmaps#rdkit.Chem.FeatMaps.FeatMapUtils.CombineFeatMaps

In particular what is the meaning of the 'mergeMetric' param
(Distance
vs. Overlap) and the 'dirMergeMode' param (NoMerge vs. Sum). And
there
is a class for MergeMethod that seems relevant but that is not
part of
the parameters for CombineFeatMaps.

Thanks
Tim



___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto: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] Usage of CombineFeatMaps

2020-05-06 Thread Tim Dudgeon
I'm trying to use the FeatureMaps functionality in RDKit (described here 
http://rdkit.blogspot.com/2017/11/using-feature-maps.html) and have a 
question on the parameters for CombineFeatMaps.


See here: 
http://rdkit.org/docs/source/rdkit.Chem.FeatMaps.FeatMapUtils.html?highlight=combinefeatmaps#rdkit.Chem.FeatMaps.FeatMapUtils.CombineFeatMaps


In particular what is the meaning of the 'mergeMetric' param (Distance 
vs. Overlap) and the 'dirMergeMode' param (NoMerge vs. Sum). And there 
is a class for MergeMethod that seems relevant but that is not part of 
the parameters for CombineFeatMaps.


Thanks
Tim



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


[Rdkit-discuss] Atom contributions for rdShapeHelpers.ShapeProtrudeDist

2020-04-29 Thread Tim Dudgeon
I'm using the rdShapeHelpers.ShapeProtrudeDist() method to generate a 
protrude distance score like this:


protrude_dist = rdShapeHelpers.ShapeProtrudeDist(ref_mol, 
query_mol,allowReordering=False)

Is it possible to determine the contributions that each atom of a 
molecule makes to the score?


Thanks
Tim

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


Re: [Rdkit-discuss] Problems building RDKit + JavaWrappers

2020-04-28 Thread Tim Dudgeon

It's availalbe from the org.RDKit.RDKFuncs class. e.g:

String RDKFuncs.standardizeSmiles(String smiles)​

RWMol cleanup​(RWMol mol)

TIm

On 28/04/2020 15:09, Thomas Eckert wrote:
That helped, thanks! Didn't realize 'make install' was needed after 
building the wrappers - I had built without the wrappers first, trying 
to detect problems iteratively.


So now I'm able to use the wrappers in Java but noticed not all "core 
functionality" is covered by the wrappers. Specifically, I'm looking 
for a way to access

    rdkit.Chem.MolStandardize.rdMolStandardize
from Java. I could not find any matching Java class nor function. Is 
this functionality supported via the Java wrappers ?


Thanks & Regards,
  Thomas

On Wed, Apr 22, 2020 at 11:55 AM Tim Dudgeon <mailto:tdudgeon...@gmail.com>> wrote:


Have a look in 'Code/JavaWrappers/gmwrapper/' not
'build/Code/JavaWrappers/gmwrapper/' ?

Tim

On 22/04/2020 10:36, Thomas Eckert wrote:

Hi folks,

Trying to build RDKit + JavaWrappers from scratch but, in the
end, the JAR files are missing.

Working on a freshly installed Ubuntu 19.10 and followed the
steps described at [1]. All dependencies installed via Ubuntu's
apt, no manually installed libs.

Cloned the RDKit sources to
    /home/thomas/git/rdkit
and set env variables
    RDBASE=/home/thomas/git/rdkit
LD_LIBRARY_PATH=/home/thomas/git/rdkit/lib:/lib/x86_64-linux-gnu/

Using this 'cmake' command
  cmake -DRDK_BUILD_PYTHON_WRAPPERS=OFF
-DRDK_BUILD_SWIG_WRAPPERS=ON ..
I get OK looking output except for
    CMake Warning (dev) at
/usr/share/cmake-3.13/Modules/UseSWIG.cmake:564 (message):
      Policy CMP0078 is not set.  Run "cmake --help-policy
CMP0078" for policy
      details.  Use the cmake_policy command to set the policy
and suppress this
      warning.
    Call Stack (most recent call first):
Code/JavaWrappers/gmwrapper/CMakeLists.txt:109 (SWIG_ADD_LIBRARY)
    This warning is for project developers.  Use -Wno-dev to
suppress it.
but as the warning states, this seems to be fine for
non-rdkit-dev users, so I just carry on.

'make' then runs happily with a few warnings on the first build
but no errors are reported. It even states
    (...)
    [ 99%] Built target GraphMolWrap_swig_compilation
    [ 99%] Built target GraphMolWrap
    [100%] building jar
    [100%] Built target GraphMolWrapJar
    [100%] building test classes
    [100%] Built target BuildJavaWrapperTests
which seems to mean the JavaWrappers were built. However this is
then the case
    ~/git/rdkit/build$ ls -lha Code/JavaWrappers/gmwrapper/
    total 16M
    drwxr-xr-x 3 thomas thomas 4,0K Apr 22 11:15 .
    drwxr-xr-x 4 thomas thomas 4,0K Apr 22 11:15 ..
    drwxr-xr-x 7 thomas thomas 4,0K Apr 22 11:15 CMakeFiles
    -rw-r--r-- 1 thomas thomas 2,6K Apr 22 10:47 cmake_install.cmake
    -rw-r--r-- 1 thomas thomas  13K Apr 22 10:47 CTestTestfile.cmake
    -rwxr-xr-x 1 thomas thomas  16M Apr 22 10:49 libGraphMolWrap.so
    -rw-r--r-- 1 thomas thomas  13K Apr 22 10:47 Makefile
so no JAR files to be found even though the shared library
mentioned in "Building the Java wrappers" at [1] is there.

Thus I ran the tests
   /git/rdkit/build$ ctest
Test project /home/thomas/git/rdkit/build
(...)
73% tests passed, 39 tests failed out of 143

Total Test time (real) =  98.60 sec

The following tests FAILED:
        105 - JavaAromaticTests (Failed)
        106 - JavaAtomPairsTests (Failed)
        107 - JavaBasicMoleculeTests (Failed)
        108 - JavaBasicMolecule2Tests (Failed)
        109 - JavaChemAtomTests (Failed)
        110 - JavaChemBondTests (Failed)
        111 - JavaChemReactionTests (Failed)
        112 - JavaChemSmartsTests (Failed)
        113 - JavaChemTests (Failed)
        114 - JavaChemv2Tests (Failed)
        115 - JavaConformerTests (Failed)
        116 - JavaDescriptorTests (Failed)
        117 - JavaDistanceGeometryTests (Failed)
        118 - JavaErrorHandlingTests (Failed)
        119 - JavaFingerprintsTests (Failed)
        120 - JavaForceFieldsTests (Failed)
        121 - JavaHManipulationsTests (Failed)
        122 - JavaLipinskiTests (Failed)
        123 - JavaPicklingTests (Failed)
        124 - JavaSmilesCreationTests (Failed)
        125 - JavaSmilesDetailsTests (Failed)
        126 - JavaSmilesTests (Failed)
        127 - JavaSuppliersTests (Failed)
        128 - JavaTrajectoryTests (Failed)
        129 - JavaWrapperTests (Failed)
        130 - JavaChemTransformsTests (Failed)
        131 - JavaFMCSTests (Failed)
        132 - JavaPDBTests (Failed)
        133 - JavaSequenceTests (Failed)
        134 - JavaAlignTests (Failed)

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-25 Thread Tim Dudgeon

I have a follow up question on ConstrainedEmbed.

You pass the molecule to embed and the substructure core into this 
function and get back the embedded and aligned molecule.


In rare cases there will be multiple substructure matches (e.g. in the 
case of symmetry). How would one go about generating alignment for all 
of these matches rather than (presumably) just the first?


Tim

On 18/04/2020 11:56, Paolo Tosco wrote:


Hi Tim,

mol.GetSubstructMatch(query) will give you indices in mol that match 
query.


Also note that |rdFMCS.||MCSResult| has a |queryMol |property that 
encode the MCS query, so you don't need to rebuild the query molecule 
out of the SMARTS pattern.


p.

On 18/04/2020 10:27, Tim Dudgeon wrote:

I also updated the Jupyter notebook with the solution.

Out of interest, I now need to get the atom indices of the part of 
the molecule that matched.
As Jupyter is nicely highlighting this that must already be present 
in the molecule somehow, but I can't find out how.


I look at molecule and atom properties but can't find anything that 
suggests "highlight me".


How is this encoded?

Tim

On 17/04/2020 19:02, Paolo Tosco wrote:

Hi Tim,

I’ll take a look later and get back to you.

Cheers,
p.


On 17 Apr 2020, at 18:55, Tim Dudgeon  wrote:

I'm wanting to use AllChem.ConstrainedEmbed() to generate a 
conformer of a molecule tethered to a molecule that should always 
have some MCS. I found some code on the internet that mostly works, 
but I don't fully understand.


It generally works as planned, but for a small number of examples 
it fails.


Can someone guide me to what is wrong. Here is an example (good and 
bad):


https://github.com/tdudgeon/jupyter_mpro/blob/master/tethering.ipynb




___
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 mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RDKit Application for Google Season of the Docs

2020-04-23 Thread Tim Dudgeon

Would it be possible to add improving the docs for Java to the list?

e.g. https://sourceforge.net/p/rdkit/mailman/message/36929992/


Tim


On 23/04/2020 16:17, Scalfani, Vincent wrote:


Dear RDKit Community,


Greg and I are putting together an application for the Google Season 
of the Docs program:



https://developers.google.com/season-of-docs


The program connects open source organizations with technical writers. 
A technical writer would work with several RDKit community mentors to 
advance the documentation over a 3 month period (starting in August).



We have a few project ideas already including expansion of the RDKit 
Book to include additional undocumented methods, creating a beginner 
friendly guide to making the most of the Python API Docs, and creating 
an official RDKit with Pandas Book. Detailed project descriptions will 
be available on the RDKit blog soon, and I'm also happy to share 
directly with you.



We are seeking mentors to help us advance the RDKit documentation and 
participate in Google Season of the Docs. Here are the mentor 
responsibilities:



https://developers.google.com/season-of-docs/docs/admin-mentor-responsibilities


We'll need to submit our application by May 4, so please do get in 
touch if you are interested.



Thanks,


Vin Scalfani







___
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] Problems building RDKit + JavaWrappers

2020-04-22 Thread Tim Dudgeon
Have a look in 'Code/JavaWrappers/gmwrapper/' not 
'build/Code/JavaWrappers/gmwrapper/' ?


Tim

On 22/04/2020 10:36, Thomas Eckert wrote:

Hi folks,

Trying to build RDKit + JavaWrappers from scratch but, in the end, the 
JAR files are missing.


Working on a freshly installed Ubuntu 19.10 and followed the steps 
described at [1]. All dependencies installed via Ubuntu's apt, no 
manually installed libs.


Cloned the RDKit sources to
    /home/thomas/git/rdkit
and set env variables
    RDBASE=/home/thomas/git/rdkit
LD_LIBRARY_PATH=/home/thomas/git/rdkit/lib:/lib/x86_64-linux-gnu/

Using this 'cmake' command
  cmake -DRDK_BUILD_PYTHON_WRAPPERS=OFF -DRDK_BUILD_SWIG_WRAPPERS=ON ..
I get OK looking output except for
    CMake Warning (dev) at 
/usr/share/cmake-3.13/Modules/UseSWIG.cmake:564 (message):
      Policy CMP0078 is not set.  Run "cmake --help-policy CMP0078" 
for policy
      details.  Use the cmake_policy command to set the policy and 
suppress this

      warning.
    Call Stack (most recent call first):
      Code/JavaWrappers/gmwrapper/CMakeLists.txt:109 (SWIG_ADD_LIBRARY)
    This warning is for project developers.  Use -Wno-dev to suppress it.
but as the warning states, this seems to be fine for non-rdkit-dev 
users, so I just carry on.


'make' then runs happily with a few warnings on the first build but no 
errors are reported. It even states

    (...)
    [ 99%] Built target GraphMolWrap_swig_compilation
    [ 99%] Built target GraphMolWrap
    [100%] building jar
    [100%] Built target GraphMolWrapJar
    [100%] building test classes
    [100%] Built target BuildJavaWrapperTests
which seems to mean the JavaWrappers were built. However this is then 
the case

    ~/git/rdkit/build$ ls -lha Code/JavaWrappers/gmwrapper/
    total 16M
    drwxr-xr-x 3 thomas thomas 4,0K Apr 22 11:15 .
    drwxr-xr-x 4 thomas thomas 4,0K Apr 22 11:15 ..
    drwxr-xr-x 7 thomas thomas 4,0K Apr 22 11:15 CMakeFiles
    -rw-r--r-- 1 thomas thomas 2,6K Apr 22 10:47 cmake_install.cmake
    -rw-r--r-- 1 thomas thomas  13K Apr 22 10:47 CTestTestfile.cmake
    -rwxr-xr-x 1 thomas thomas  16M Apr 22 10:49 libGraphMolWrap.so
    -rw-r--r-- 1 thomas thomas  13K Apr 22 10:47 Makefile
so no JAR files to be found even though the shared library mentioned 
in "Building the Java wrappers" at [1] is there.


Thus I ran the tests
   /git/rdkit/build$ ctest
Test project /home/thomas/git/rdkit/build
(...)
73% tests passed, 39 tests failed out of 143

Total Test time (real) =  98.60 sec

The following tests FAILED:
        105 - JavaAromaticTests (Failed)
        106 - JavaAtomPairsTests (Failed)
        107 - JavaBasicMoleculeTests (Failed)
        108 - JavaBasicMolecule2Tests (Failed)
        109 - JavaChemAtomTests (Failed)
        110 - JavaChemBondTests (Failed)
        111 - JavaChemReactionTests (Failed)
        112 - JavaChemSmartsTests (Failed)
        113 - JavaChemTests (Failed)
        114 - JavaChemv2Tests (Failed)
        115 - JavaConformerTests (Failed)
        116 - JavaDescriptorTests (Failed)
        117 - JavaDistanceGeometryTests (Failed)
        118 - JavaErrorHandlingTests (Failed)
        119 - JavaFingerprintsTests (Failed)
        120 - JavaForceFieldsTests (Failed)
        121 - JavaHManipulationsTests (Failed)
        122 - JavaLipinskiTests (Failed)
        123 - JavaPicklingTests (Failed)
        124 - JavaSmilesCreationTests (Failed)
        125 - JavaSmilesDetailsTests (Failed)
        126 - JavaSmilesTests (Failed)
        127 - JavaSuppliersTests (Failed)
        128 - JavaTrajectoryTests (Failed)
        129 - JavaWrapperTests (Failed)
        130 - JavaChemTransformsTests (Failed)
        131 - JavaFMCSTests (Failed)
        132 - JavaPDBTests (Failed)
        133 - JavaSequenceTests (Failed)
        134 - JavaAlignTests (Failed)
        135 - JavaMolQueryTests (Failed)
        136 - JavaFilterCatalogTests (Failed)
        137 - JavaSubstructLibraryTests (Failed)
        138 - JavaRGroupDecompositionTests (Failed)
        139 - JavaScaffoldNetworkTests (Failed)
        140 - JavaMolHashTest (Failed)
        141 - JavaDiversityPickerTests (Failed)
        142 - JavaBitOpsTests (Failed)
        143 - MolStandardizeTest (Failed)
Errors while running CTest

At this point I cannot find anything in the documentation to proceed 
further. I'm not familiar with most of the stack used with/for RDKit 
either, so I don't know where to look. Any hints on where to look or 
what to check ?


Regards,
  Thomas

[1] https://www.rdkit.org/docs/Install.html#building-from-source


___
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] Complications with ConstrainedEmbed

2020-04-18 Thread Tim Dudgeon

On 18/04/2020 11:56, Paolo Tosco wrote:


Hi Tim,

mol.GetSubstructMatch(query) will give you indices in mol that match 
query.


Yes, I can re-calculate it, but the fact that it's getting highlighted 
in Jupyter suggests that the mol already has that info so it shouldn't 
need recalculating. But I can't find it.


Also note that |rdFMCS.||MCSResult| has a |queryMol |property that 
encode the MCS query, so you don't need to rebuild the query molecule 
out of the SMARTS pattern.



Good. I'll use that.


p.

On 18/04/2020 10:27, Tim Dudgeon wrote:

I also updated the Jupyter notebook with the solution.

Out of interest, I now need to get the atom indices of the part of 
the molecule that matched.
As Jupyter is nicely highlighting this that must already be present 
in the molecule somehow, but I can't find out how.


I look at molecule and atom properties but can't find anything that 
suggests "highlight me".


How is this encoded?

Tim

On 17/04/2020 19:02, Paolo Tosco wrote:

Hi Tim,

I’ll take a look later and get back to you.

Cheers,
p.


On 17 Apr 2020, at 18:55, Tim Dudgeon  wrote:

I'm wanting to use AllChem.ConstrainedEmbed() to generate a 
conformer of a molecule tethered to a molecule that should always 
have some MCS. I found some code on the internet that mostly works, 
but I don't fully understand.


It generally works as planned, but for a small number of examples 
it fails.


Can someone guide me to what is wrong. Here is an example (good and 
bad):


https://github.com/tdudgeon/jupyter_mpro/blob/master/tethering.ipynb




___
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 mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-18 Thread Tim Dudgeon

I also updated the Jupyter notebook with the solution.

Out of interest, I now need to get the atom indices of the part of the 
molecule that matched.
As Jupyter is nicely highlighting this that must already be present in 
the molecule somehow, but I can't find out how.


I look at molecule and atom properties but can't find anything that 
suggests "highlight me".


How is this encoded?

Tim

On 17/04/2020 19:02, Paolo Tosco wrote:

Hi Tim,

I’ll take a look later and get back to you.

Cheers,
p.


On 17 Apr 2020, at 18:55, Tim Dudgeon  wrote:

I'm wanting to use AllChem.ConstrainedEmbed() to generate a conformer of a 
molecule tethered to a molecule that should always have some MCS. I found some 
code on the internet that mostly works, but I don't fully understand.

It generally works as planned, but for a small number of examples it fails.

Can someone guide me to what is wrong. Here is an example (good and bad):

https://github.com/tdudgeon/jupyter_mpro/blob/master/tethering.ipynb




___
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] Complications with ConstrainedEmbed

2020-04-18 Thread Tim Dudgeon

I think I tracked it down.

If I use 'bondCompare=rdFMCS.BondCompare.CompareOrderExact' for the 
FindMCS() function then it seem to find the right MCS.


Seems like by default it matches aromatic and aliphatic rings, and by 
doing so in my example it finds a bigger MCS so uses it.


On 17/04/2020 19:02, Paolo Tosco wrote:

Hi Tim,

I’ll take a look later and get back to you.

Cheers,
p.


On 17 Apr 2020, at 18:55, Tim Dudgeon  wrote:

I'm wanting to use AllChem.ConstrainedEmbed() to generate a conformer of a 
molecule tethered to a molecule that should always have some MCS. I found some 
code on the internet that mostly works, but I don't fully understand.

It generally works as planned, but for a small number of examples it fails.

Can someone guide me to what is wrong. Here is an example (good and bad):

https://github.com/tdudgeon/jupyter_mpro/blob/master/tethering.ipynb




___
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] Complications with ConstrainedEmbed

2020-04-17 Thread Tim Dudgeon
I'm wanting to use AllChem.ConstrainedEmbed() to generate a conformer of 
a molecule tethered to a molecule that should always have some MCS. I 
found some code on the internet that mostly works, but I don't fully 
understand.


It generally works as planned, but for a small number of examples it fails.

Can someone guide me to what is wrong. Here is an example (good and bad):

https://github.com/tdudgeon/jupyter_mpro/blob/master/tethering.ipynb




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


Re: [Rdkit-discuss] problem building from source - ‘CT_CHIRALITY_PROP_PREFIX’ is not a member of ‘schrodinger::mae’

2020-04-01 Thread Tim Dudgeon

Thanks Paolo, that fixed it.

On 30/03/2020 15:05, Paolo Tosco wrote:

Hi Tim,

try rm -rf External/CoordGen/coordgen* External/CoordGen/maeparser*

you might have some outdated coordgen libs. Deleting those and 
re-running cmake will download them afresh.


Cheers,
p.

On 30/03/2020 14:51, Tim Dudgeon wrote:

I'm finding an error building from source (on master branch).

Any ideas?

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 
-DRDK_BUILD_INCHI_SUPPORT=ON  -DRDK_BUILD_AVALON_SUPPORT=ON 
-DRDK_BUILD_PYTHON_WRAPPERS=ON  -DRDK_BUILD_SWIG_WRAPPERS=ON ..

make -j 8


[ 66%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/TplFileParser.cpp.o
[ 66%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/TplFileWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBParser.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBSupplier.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/XYZFileWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/MaeMolSupplier.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/ProximityBonds.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SequenceParsers.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SequenceWriters.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SVGParser.cpp.o
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp: 
In function ‘void 
RDKit::{anonymous}::set_mol_properties(RDKit::RWMol&, const 
schrodinger::mae::Block&)’:
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:214:37: 
error: ‘CT_CHIRALITY_PROP_PREFIX’ is not a member of ‘schrodinger::mae’
  214 | } else if 
(prop.first.find(mae::CT_CHIRALITY_PROP_PREFIX) == 0 ||

  | ^~~~
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:215:37: 
error: ‘CT_PSEUDOCHIRALITY_PROP_PREFIX’ is not a member of 
‘schrodinger::mae’

  215 | prop.first.find(mae::CT_PSEUDOCHIRALITY_PROP_PREFIX) == 0) {
  | ^~
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:217:37: 
error: ‘CT_EZ_PROP_PREFIX’ is not a member of ‘schrodinger::mae’

  217 | } else if (prop.first.find(mae::CT_EZ_PROP_PREFIX) == 0) {
  | ^
make[2]: *** 
[Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/build.make:310: 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/MaeMolSupplier.cpp.o] 
Error 1

make[2]: *** Waiting for unfinished jobs
make[1]: *** [CMakeFiles/Makefile2:7238: 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/all] 
Error 2

make: *** [Makefile:163: all] Error 2




___
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] problem building from source - ‘CT_CHIRALITY_PROP_PREFIX’ is not a member of ‘schrodinger::mae’

2020-03-30 Thread Tim Dudgeon

Yes, that did the trick. Thanks.

On 30/03/2020 15:05, Paolo Tosco wrote:

Hi Tim,

try rm -rf External/CoordGen/coordgen* External/CoordGen/maeparser*

you might have some outdated coordgen libs. Deleting those and 
re-running cmake will download them afresh.


Cheers,
p.

On 30/03/2020 14:51, Tim Dudgeon wrote:

I'm finding an error building from source (on master branch).

Any ideas?

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 
-DRDK_BUILD_INCHI_SUPPORT=ON  -DRDK_BUILD_AVALON_SUPPORT=ON 
-DRDK_BUILD_PYTHON_WRAPPERS=ON  -DRDK_BUILD_SWIG_WRAPPERS=ON ..

make -j 8


[ 66%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/TplFileParser.cpp.o
[ 66%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/TplFileWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBParser.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBSupplier.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/XYZFileWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/MaeMolSupplier.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/ProximityBonds.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SequenceParsers.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SequenceWriters.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SVGParser.cpp.o
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp: 
In function ‘void 
RDKit::{anonymous}::set_mol_properties(RDKit::RWMol&, const 
schrodinger::mae::Block&)’:
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:214:37: 
error: ‘CT_CHIRALITY_PROP_PREFIX’ is not a member of ‘schrodinger::mae’
  214 | } else if 
(prop.first.find(mae::CT_CHIRALITY_PROP_PREFIX) == 0 ||

  | ^~~~
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:215:37: 
error: ‘CT_PSEUDOCHIRALITY_PROP_PREFIX’ is not a member of 
‘schrodinger::mae’

  215 | prop.first.find(mae::CT_PSEUDOCHIRALITY_PROP_PREFIX) == 0) {
  | ^~
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:217:37: 
error: ‘CT_EZ_PROP_PREFIX’ is not a member of ‘schrodinger::mae’

  217 | } else if (prop.first.find(mae::CT_EZ_PROP_PREFIX) == 0) {
  | ^
make[2]: *** 
[Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/build.make:310: 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/MaeMolSupplier.cpp.o] 
Error 1

make[2]: *** Waiting for unfinished jobs
make[1]: *** [CMakeFiles/Makefile2:7238: 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/all] 
Error 2

make: *** [Makefile:163: all] Error 2




___
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] In a pickle with pandas

2020-03-30 Thread Tim Dudgeon

Strange. It's just started working now.

I can't explain it.


On 30/03/2020 08:30, Markus Heller wrote:


Probably not the reason, but there was an older version of pandas, 
0.24 IIRC, that dinner render the molecules correctly.


Can you perform calculations on the mol objects?


On Mar 29, 2020, at 4:07 AM, Tim Dudgeon  wrote:



I'm finding that if I create a pandas dataframe using 
PandasTools.LoadSDF() and then write the dataframe out using 
df.to_pickle() then I can read that pickle back in as a dataframe, 
but the RDKit molecules don't get handled correctly.


Is there a way to fix this?




___
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] problem building from source - ‘CT_CHIRALITY_PROP_PREFIX’ is not a member of ‘schrodinger::mae’

2020-03-30 Thread Tim Dudgeon

I'm finding an error building from source (on master branch).

Any ideas?

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 
-DRDK_BUILD_INCHI_SUPPORT=ON  -DRDK_BUILD_AVALON_SUPPORT=ON 
-DRDK_BUILD_PYTHON_WRAPPERS=ON  -DRDK_BUILD_SWIG_WRAPPERS=ON  ..

make -j 8


[ 66%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/TplFileParser.cpp.o
[ 66%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/TplFileWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBParser.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/PDBSupplier.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/XYZFileWriter.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/MaeMolSupplier.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/ProximityBonds.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SequenceParsers.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SequenceWriters.cpp.o
[ 67%] Building CXX object 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SVGParser.cpp.o
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp: 
In function ‘void 
RDKit::{anonymous}::set_mol_properties(RDKit::RWMol&, const 
schrodinger::mae::Block&)’:
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:214:37: 
error: ‘CT_CHIRALITY_PROP_PREFIX’ is not a member of ‘schrodinger::mae’
  214 | } else if (prop.first.find(mae::CT_CHIRALITY_PROP_PREFIX) 
== 0 ||

  | ^~~~
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:215:37: 
error: ‘CT_PSEUDOCHIRALITY_PROP_PREFIX’ is not a member of 
‘schrodinger::mae’

  215 | prop.first.find(mae::CT_PSEUDOCHIRALITY_PROP_PREFIX) == 0) {
  | ^~
/home/timbo/github/rdkit/rdkit/Code/GraphMol/FileParsers/MaeMolSupplier.cpp:217:37: 
error: ‘CT_EZ_PROP_PREFIX’ is not a member of ‘schrodinger::mae’

  217 | } else if (prop.first.find(mae::CT_EZ_PROP_PREFIX) == 0) {
  | ^
make[2]: *** 
[Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/build.make:310: 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/MaeMolSupplier.cpp.o] 
Error 1

make[2]: *** Waiting for unfinished jobs
make[1]: *** [CMakeFiles/Makefile2:7238: 
Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/all] Error 2

make: *** [Makefile:163: all] Error 2




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


Re: [Rdkit-discuss] RDkit in Python vs. on PostgreSQL?

2020-02-26 Thread Tim Dudgeon
Well, as I mentioned previously the big difference is because from 
Python you are iterating through the molecules, calculating the 
fingerprints and then doing a comparison on the fingerprints. Whereas in 
the PostgreSQL cartridge the fingerprints are already generated and 
indexed so the search is mostly about querying the index which will be 
very fast.


If you are repeatedly running queries against the same set of molecules 
then the cartridge will e the way to go. Doing ti procedurally from 
Python only really makes sense if you have a relatively small dataset 
and/or if the molecules you are searching are different every time.


In principle you should be able to cache the fingerprints in Python to 
avoid needing to recalculate them, but effectively you're implementing 
logic that is already present in the cartridge, and will be much more 
effective.


Tim

On 26/02/2020 08:46, Deepti Gupta wrote:

Hi Tim,

Thank you!

I'll be more detailed in my post, sorry about that. As this was a PoC, 
I had a spark cluster with 2 worker nodes with 4 vCPUs with disk size 
500GB and memory 15GB on Google Cloud. I timed the response against 2 
million data points consisting of Chembl id, Smile structures.


Substructure search - 2 mins
Similarity search - 43 mins

PostgreSQL DB was installed on VM having 4 vCPUs and disk size of 500 
GB and 15GB memory. The value of shared_buffers = 2048MB  was edited 
in the  postgresql.conf file.


Substructure search - within 5 secs
Similarity search - within 3 secs

I tried to store the converted molecules and fingerprints in a file to 
get better performance while trying the pyspark program but was not 
able to do so.


Regards,
DA

On Wednesday, February 26, 2020, 12:57:43 AM GMT+5:30, Tim Dudgeon 
 wrote:



I think you need to explain what benchmarks you are running and what 
is really meant by "faster".
And what hardware (for Spark how many nodes, how big; for PostgreSQL 
what size server, what settings esp. the shared_buffers setting).


A very obvious critique of what you reported is that what you describe 
as "running in Python" includes generating the fingerprints for each 
molecule on the fly, whereas for "the cartridge" these are already 
calculated, so will obviously be much faster (as the fingerprint 
generation dominates the compute).


Tim

On 25/02/2020 11:14, Deepti Gupta via Rdkit-discuss wrote:
Hi Gurus,

I'm absolutely new to Chem-informatics domain. I've been assigned a 
PoC where I've to compare RDKit in Python and RDKit on PostgreSQL. 
I've installed both and am trying some hands-on exercises to 
understand the differences. What I've understood that the structure 
searches are slower in Python (Spark Cluster) than in PostgreSQL 
database. Please correct me if I'm wrong as I'm a newbie in this and 
maybe talking silly.


The similarity search using the below functions (example) -
Python methods -

fps = 
FingerprintMols.FingerprintMol(Chem.MolFromSmiles(smile_structure, 
sanitize=False))

similarity = DataStructs.TanimotoSimilarity(fps1,fps2)

takes too long (45 minutes) for a 2 million file while the same thing 
is very quick (in seconds) on PostgreSQL

Database functions -

select count(*) from (select 
modality_id,m,tanimoto_sml(morganbv_fp(mol_from_smiles('CCOC(=O)c1cc2cc(ccc2[nH]1)C(=O)O'::cstring)),mfp2) 
as similarity from fingerprints join mols using (modality_id)) as fps 
where similarity between 0.45 and 0.50;


Does this conclude that for production workloads one must always use 
database cartridge only? Like RDKit, BINGO, etc.?


Regards,
DA


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net  
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net 
<mailto: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] RDkit in Python vs. on PostgreSQL?

2020-02-25 Thread Tim Dudgeon
I think you need to explain what benchmarks you are running and what is 
really meant by "faster".
And what hardware (for Spark how many nodes, how big; for PostgreSQL 
what size server, what settings esp. the shared_buffers setting).


A very obvious critique of what you reported is that what you describe 
as "running in Python" includes generating the fingerprints for each 
molecule on the fly, whereas for "the cartridge" these are already 
calculated, so will obviously be much faster (as the fingerprint 
generation dominates the compute).


Tim

On 25/02/2020 11:14, Deepti Gupta via Rdkit-discuss wrote:

Hi Gurus,

I'm absolutely new to Chem-informatics domain. I've been assigned a 
PoC where I've to compare RDKit in Python and RDKit on PostgreSQL. 
I've installed both and am trying some hands-on exercises to 
understand the differences. What I've understood that the structure 
searches are slower in Python (Spark Cluster) than in PostgreSQL 
database. Please correct me if I'm wrong as I'm a newbie in this and 
maybe talking silly.


The similarity search using the below functions (example) -
Python methods -

fps = 
FingerprintMols.FingerprintMol(Chem.MolFromSmiles(smile_structure, 
sanitize=False))

similarity = DataStructs.TanimotoSimilarity(fps1,fps2)

takes too long (45 minutes) for a 2 million file while the same thing 
is very quick (in seconds) on PostgreSQL

Database functions -

select count(*) from (select 
modality_id,m,tanimoto_sml(morganbv_fp(mol_from_smiles('CCOC(=O)c1cc2cc(ccc2[nH]1)C(=O)O'::cstring)),mfp2) 
as similarity from fingerprints join mols using (modality_id)) as fps 
where similarity between 0.45 and 0.50;


Does this conclude that for production workloads one must always use 
database cartridge only? Like RDKit, BINGO, etc.?


Regards,
DA


___
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] Standardizer code from Java

2020-02-23 Thread Tim Dudgeon

Hi Greg,

Did you get a chance to add any more tests or docs here?
I'm happy to help to improve the docs (see my recent message about RDKit 
from Java), but not sure where to start.


More specifically I'm wanting to run the equivalent to this Python code 
from Java. Any hints would be appreciated.


uncharger = rdMolStandardize.Uncharger()

def remove_isotopes(mol):
    for atom in mol.GetAtoms():
    atom.SetIsotope(0)

def standardize(mol):
    mol = rdMolStandardize.Cleanup(mol)
    mol = uncharger.uncharge(mol)
    remove_isotopes(mol)
    return mol

Thanks
Tim


On 27/12/2019 14:20, Greg Landrum wrote:

Hi Tim,

Unfortunately I don't have decent example code for using the 
standardizer from Java. Normally I reference the tests, but in this 
case they are extremely minimal:
https://github.com/rdkit/rdkit/blob/master/Code/JavaWrappers/gmwrapper/src-test/org/RDKit/MolStandardizeTest.java 



I will try to make some time to improve the situation here with the 
goal of

a) have better tests
b) making it more obvious how to use the code from Java

-greg


On Thu, Dec 26, 2019 at 4:55 PM Tim Dudgeon <mailto:tdudgeon...@gmail.com>> wrote:


I'm trying to get my head round using the new standardizer code
from Java.
Looks like this should be accessible from the RDKFuncs class, but
I'm failing at stage 1.

Simple example is:

package org.exmple;

import org.RDKit.RDKFuncs;
import org.RDKit.RWMol;

public class Simple {

 static {
 System.loadLibrary("GraphMolWrap");
 }

 public static void main(String[] args) {
 RWMol mol1 = RWMol.MolFromSmiles("CC");
 try {
 RWMol mol2 = RDKFuncs.cleanup(mol1);
 System.out.println(mol2.MolToSmiles());
 }catch (Exception ex) {
 System.out.println("Exception! " + ex.getMessage());
 ex.printStackTrace();
 }
 }
}

Result is:

Exception! null
org.RDKit.GenericRDKitException
at org.RDKit.RDKFuncsJNI.cleanup__SWIG_1(Native Method)
at org.RDKit.RDKFuncs.cleanup(RDKFuncs.java:5173)
at org.squonk.fragnet.Simple.main(Simple.java:15)

Exception doesn't give much to go on!

This is running against code on RDKit Release_2019_09 branch and using Java 
11.

Has anyone got this working?

Tim

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto: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] Getting Started with the RDKit in Java

2020-02-22 Thread Tim Dudgeon

Yes, not a typo!

RDKit has excellent docs for Python, but the Java side of things have 
received less love ;-)


Would there be interest from the community in helping put together a 
guide that is similar in principle to the "Getting Started with the 
RDKit in Python" page [1]. I'd be happy to contribute to this, but feel 
it needs a broader contribution.


Also, to publish an up to date set of JavaDocs on the site, and maybe 
improve the JavaDocs?


Tim

[1] http://rdkit.org/docs/GettingStartedInPython.html



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


Re: [Rdkit-discuss] How does rdkit cartridge work?

2020-01-26 Thread Tim Dudgeon
Greg is too modest to mention it, but he recently blogged on performance 
aspects of the cartridge which covers many aspects of how it works:

http://rdkit.blogspot.com/2020/01/some-thoughts-on-performance-of-rdkit.html

On 25/01/2020 05:11, Greg Landrum wrote:

Hi Changge,

On Fri, Jan 24, 2020 at 5:14 PM Chicago Ji > wrote:



I find that rdkit cartridge is quite efficient in substructure
searching.


Glad to hear that! :-)

Is there any paper or similar paper that describes things behind
rdkit cartridge?


No, just the documentation.

For example, what kind of substructures were indexed?


The Pattern fingerprint is what's used to build the index for 
substructure searching. That fingerprint is described in the RDKit 
documentation here: 
https://www.rdkit.org/docs/RDKit_Book.html#pattern-fingerprints


Is there a way that the users can add custom defined fingerprints
and substructures?


I'm not sure what you mean by substructures, but you can, from Python, 
use custom fingerprints in the cartridge. That's explained here: 
http://rdkit.blogspot.com/2017/04/using-custom-fingerprint-in-postgresql.html


Best,
-greg

Many thanks for your help!

Best,
Changge


___
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 mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RD Kit Cartridge Postgresql upgrade

2020-01-17 Thread Tim Dudgeon
The latest cartridge containers for 
informaticsmatters/rdkit-cartridge-debian are based on PostgreSQL 
version 11.


This can/will change with different RDKit major version builds as the 
base Debian packages change and I have little control over this.
I'd like to do this better but building all combinations of Debian * 
RDKit * PostgreSQL is not practical so what I go for is based on the 
version of Debian that is needed to build the particular version of 
RDKit, and use whatever version of PostgreSQL that comes with that 
version of Debian.


Normally I use the latest stable version of Debian unless something in 
RDKit requires going cutting edge, which is sometimes needed, for 
instance because of the cpp and boost changes that happened a couple of 
years ago.


Here are more gory details if you suffer from insomnia: 
https://github.com/InformaticsMatters/docker-rdkit/blob/master/README.md


Tim


On 16/01/2020 16:34, dmaziuk via Rdkit-discuss wrote:

On 1/16/2020 10:20 AM, Greg Landrum wrote:


It does look like Tim Dudgeon is creating docker images for the RDKit +
cartridge:
https://hub.docker.com/r/informaticsmatters/rdkit-cartridge-debian

Have you looked at those?


In a postgres-only container, changing from postgres 12 to 11 should 
be as simple as editing the pgdg repository url -- edit the Dockerfile 
and rebuild the container.


Dima


___
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] passing options to javac when building from source

2020-01-06 Thread Tim Dudgeon

Still no joy.
I tried adding this to the CMakeLists.txt files in the top level dir and 
in Code/JavaWrappers/ but it seem to have no effect.

I'm no cmake expert so I might not be doing this right.

Tim

On 03/01/2020 21:15, Paolo Tosco wrote:


Hi Tim,

based on

https://cmake.org/cmake/help/latest/module/UseJava.html

set(CMAKE_JAVA_COMPILE_FLAGS"-source 8")
might do the trick.

Cheers,
p.

On 03/01/2020 17:41, Tim Dudgeon wrote:

Hi Paolo,

I'm afraid that's not working for me. Still getting Java11 class files.
My cmake command is:

cmake -Wno-dev\
  -DPYTHON_EXECUTABLE=/usr/bin/python3\
  -DRDK_BUILD_INCHI_SUPPORT=ON\
  -DRDK_BUILD_AVALON_SUPPORT=ON\
  -DRDK_BUILD_PYTHON_WRAPPERS=ON\
  -DRDK_BUILD_SWIG_WRAPPERS=ON\
  -DJAVA_COMPILE="/usr/bin/javac -source 8"\
  ..


When it's built I run:

javap -cp ./Code/JavaWrappers/gmwrapper/org.RDKit.jar -verbose 
org.RDKit.RDKFuncs | grep major


and get:

  major version: 55

55 is the class version for Java11.

In fact if I set JAVA_COMPILE to complete nonsense everything still 
builds OK!


Tim

On 26/12/2019 15:39, Paolo Tosco wrote:

Hi Tim,

Try adding this to your CMake command:

-DJAVA_COMPILE="/usr/bin/javac -source 8"

Cheers,
p.

On 26/12/2019 15:22, Tim Dudgeon wrote:
When building the Java wrappers from source (the 
-DRDK_BUILD_SWIG_WRAPPERS=ON option) is possible to specify options 
to pass on to javac.


Specifically I'm wanting to use the '-source 8' option as most 
distros now come with java11 (and make it difficult to install an 
earlier one) but I want to build a version of org.RDKit.jar that is 
compatible with older Java versions.


Thanks

Tim



___
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] passing options to javac when building from source

2020-01-06 Thread Tim Dudgeon

I've only built on Linux so can't comment on what works on Mac.
Here is an example Dockerfile that builds pretty well everything:

https://github.com/InformaticsMatters/docker-rdkit/blob/master/Dockerfile-build-debian#L70-L81

On 06/01/2020 06:17, Francois Berenger wrote:

Hi Tim,

How do you compile rdkit for Java?

Last time I tried on a Mac, it did not work:
https://github.com/rdkit/homebrew-rdkit/issues/38

Thanks a lot,
F.

On 26/12/2019 23:22, Tim Dudgeon wrote:

When building the Java wrappers from source (the
-DRDK_BUILD_SWIG_WRAPPERS=ON option) is possible to specify options to
pass on to javac.

Specifically I'm wanting to use the '-source 8' option as most distros
now come with java11 (and make it difficult to install an earlier one)
but I want to build a version of org.RDKit.jar that is compatible with
older Java versions.

Thanks

Tim



___
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] passing options to javac when building from source

2020-01-03 Thread Tim Dudgeon

Hi Paolo,

I'm afraid that's not working for me. Still getting Java11 class files.
My cmake command is:

cmake -Wno-dev\
  -DPYTHON_EXECUTABLE=/usr/bin/python3\
  -DRDK_BUILD_INCHI_SUPPORT=ON\
  -DRDK_BUILD_AVALON_SUPPORT=ON\
  -DRDK_BUILD_PYTHON_WRAPPERS=ON\
  -DRDK_BUILD_SWIG_WRAPPERS=ON\
  -DJAVA_COMPILE="/usr/bin/javac -source 8"\
  ..


When it's built I run:

javap -cp ./Code/JavaWrappers/gmwrapper/org.RDKit.jar -verbose 
org.RDKit.RDKFuncs | grep major


and get:

  major version: 55

55 is the class version for Java11.

In fact if I set JAVA_COMPILE to complete nonsense everything still 
builds OK!


Tim

On 26/12/2019 15:39, Paolo Tosco wrote:

Hi Tim,

Try adding this to your CMake command:

-DJAVA_COMPILE="/usr/bin/javac -source 8"

Cheers,
p.

On 26/12/2019 15:22, Tim Dudgeon wrote:
When building the Java wrappers from source (the 
-DRDK_BUILD_SWIG_WRAPPERS=ON option) is possible to specify options 
to pass on to javac.


Specifically I'm wanting to use the '-source 8' option as most 
distros now come with java11 (and make it difficult to install an 
earlier one) but I want to build a version of org.RDKit.jar that is 
compatible with older Java versions.


Thanks

Tim



___
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] Standardizer code from Java

2019-12-26 Thread Tim Dudgeon

I'm trying to get my head round using the new standardizer code from Java.
Looks like this should be accessible from the RDKFuncs class, but I'm 
failing at stage 1.


Simple example is:

package org.exmple;

import org.RDKit.RDKFuncs;
import org.RDKit.RWMol;

public class Simple {

static {
System.loadLibrary("GraphMolWrap");
}

public static void main(String[] args) {
RWMol mol1 = RWMol.MolFromSmiles("CC");
try {
RWMol mol2 = RDKFuncs.cleanup(mol1);
System.out.println(mol2.MolToSmiles());
}catch (Exception ex) {
System.out.println("Exception! " + ex.getMessage());
ex.printStackTrace();
}
}
}

Result is:

Exception! null
org.RDKit.GenericRDKitException
at org.RDKit.RDKFuncsJNI.cleanup__SWIG_1(Native Method)
at org.RDKit.RDKFuncs.cleanup(RDKFuncs.java:5173)
at org.squonk.fragnet.Simple.main(Simple.java:15)

Exception doesn't give much to go on!

This is running against code on RDKit Release_2019_09 branch and using Java 11.

Has anyone got this working?

Tim

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


[Rdkit-discuss] passing options to javac when building from source

2019-12-26 Thread Tim Dudgeon
When building the Java wrappers from source (the 
-DRDK_BUILD_SWIG_WRAPPERS=ON option) is possible to specify options to 
pass on to javac.


Specifically I'm wanting to use the '-source 8' option as most distros 
now come with java11 (and make it difficult to install an earlier one) 
but I want to build a version of org.RDKit.jar that is compatible with 
older Java versions.


Thanks

Tim



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


Re: [Rdkit-discuss] The "maxAttempts" option in "EmbedMultipleConfs"

2019-12-17 Thread Tim Dudgeon
AFAIK the only correlation is the molecule(s) you are "conformering" (is 
that a verb?).


And no number of numConfs can be considered enough, let alone a number 
of maxAttempts.
It  depends on the problem you are wanting to solve, the molecules you 
are looking at, and the amount of CPU you have to crack that particular nut.


I tend to use 1.5x - 2.0x but for a set of (fairly small) molecules.
If your molecules are more flexible then you maybe you need to go 10x.

Tim

On 17/12/2019 19:57, topgunhaides . wrote:

Hi Tim,

Many thanks for your help! One further question:
Is there any correlation between the maxAttempts and numConfs?
For instance, do I need to set a higher maxAttempts value if I request 
a higher numConfs value?


Or to put it another way, what maxAttempts value can be considered as 
"enough"?

Best,
Leon





On Tue, Dec 17, 2019 at 12:22 PM Tim Dudgeon <mailto:tdudgeon...@gmail.com>> wrote:


This is in regard to the pruneRmsThresh option which removes very
similar conformers.
If let's say numConfs is set to 10 and maxAttempts is set to 20
then it will use UP TO 20 attempts to generate 10 conformers.
If too many conformers get rejected due to pruneRmsThresh then you
will end up with less than 10 conformers.

Or to put it another way, maxAttempts avoids you trying for ever
to generate conformers that are all the same and getting rejected!

Tim

On 17/12/2019 16:24, topgunhaides . wrote:

Hi guys,

Can anyone tell me more about the "maxAttempts" option in
"EmbedMultipleConfs"?

In the documentation, it says " maxAttempts: the maximum number
of attempts to try embedding".
Dose it mean the "maximum number of attempts" to generate each
conformer or to generate the total number of conformers
specified by "numConfs"? Or something else?
I need to generate a huge amount of conformers for each molecule,
so I want to know what is the proper "maxAttempts" to reach a
balance between accuracy and cost.
Thank you!

Best,
Leon




___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net  
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto: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] The "maxAttempts" option in "EmbedMultipleConfs"

2019-12-17 Thread Tim Dudgeon
This is in regard to the pruneRmsThresh option which removes very 
similar conformers.
If let's say numConfs is set to 10 and maxAttempts is set to 20 then it 
will use UP TO 20 attempts to generate 10 conformers.
If too many conformers get rejected due to pruneRmsThresh then you will 
end up with less than 10 conformers.


Or to put it another way, maxAttempts avoids you trying for ever to 
generate conformers that are all the same and getting rejected!


Tim

On 17/12/2019 16:24, topgunhaides . wrote:

Hi guys,

Can anyone tell me more about the "maxAttempts" option in 
"EmbedMultipleConfs"?


In the documentation, it says " maxAttempts: the maximum number of 
attempts to try embedding".
Dose it mean the "maximum number of attempts" to generate each 
conformer or to generate the total number of conformers specified by 
"numConfs"? Or something else?
I need to generate a huge amount of conformers for each molecule, so I 
want to know what is the proper "maxAttempts" to reach a balance 
between accuracy and cost.

Thank you!

Best,
Leon




___
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] RD Kit PostgreSQL in a container

2019-12-12 Thread Tim Dudgeon

you might want to look at these that we're been using for several years:
https://hub.docker.com/r/informaticsmatters/rdkit-cartridge-debian/tags

This the GitHub repo for this and several other flavours of RDKit 
container images:

https://github.com/InformaticsMatters/docker-rdkit

Tim

On 04/12/2019 18:36, Webster Homer wrote:


I’m looking at running  RD Kit Postgresql cartridge in a docker 
container. Has anyone done this? There are PostgreSQL containers 
available on line at https://hub.docker.com/_/postgres if there is an 
existing dockerfile with the RDKit extension, that would be great.


If not has anyone built one? Ideally I’d start from one of the 
existing dockerfiles.


RDKit Postgresql in the current distribution is version 11.2, the 
dockerfiles on the hub include an 11 and an 11.6 version. Any idea as 
to which one to use?


I’m new to dockerfiles, I’d appreciate any suggestions

Regards,

Webster Homer

This message and any attachment are confidential and may be privileged 
or otherwise protected from disclosure. If you are not the intended 
recipient, you must not copy this message or attachment or disclose 
the contents to any other person. If you have received this 
transmission in error, please notify the sender immediately and delete 
the message and any attachment from your system. Merck KGaA, 
Darmstadt, Germany and any of its subsidiaries do not accept liability 
for any omissions or errors in this message which may arise as a 
result of E-Mail-transmission or for damages resulting from any 
unauthorized changes of the content of this message and any attachment 
thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do 
not guarantee that this message is free of viruses and does not accept 
liability for any damages caused by any virus transmitted therewith. 
Click http://www.merckgroup.com/disclaimer to access the German, 
French, Spanish and Portuguese versions of this disclaimer.



___
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] Clearing isotope info

2019-12-12 Thread Tim Dudgeon
Well, the there is already the isomericSmiles option in 
Chem.MolToSmiles() that handles stereo.

But it's true that there isn't one for isotopes.

An alternative might be to use the standardizer (rdMolStandardize 
package) as my process is already using part of this and does seem to 
have some stuff there for isotopes, but I couldn't figure out how to use 
this.


On 12/12/2019 16:39, Rafal Roszak wrote:

On Wed, 11 Dec 2019 10:53:47 +
Tim Dudgeon  wrote:


I'm wanting to write isomeric smiles that does not include isotope
information.

I also had sytuation when I need to generate smiles with either
isotopes or stereochemistry but not both. Maybe it is worth to add two
options to ChemMolToSmiles function:

dontIncludeStereochemistry=True/False
dontIncludeIsotopes=True/False

Right now it is not straightforward to generate smiles w/o isotopes
(but with stereochemistry) - one need to remove isotope, export to
smiles and restore isotopes.

Best,

Rafał


___
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] Clearing isotope info

2019-12-11 Thread Tim Dudgeon
I'm wanting to write isomeric smiles that does not include isotope 
information.
The standard Chem.MolToSmiles(m, isomericSmiles=True) includes isotope 
information which is what I'm wanting to exclude.


I note that there is a Atom.SetIsotope(int) method and after a bit of 
hacking around I found that doing a Atom.SetIsotope(0) seems to do the 
trick, but does look a bit strange. Is this really a surrogate for the 
non-existent Atom.ClearIsotope() method?


Tim



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


Re: [Rdkit-discuss] Xenon atoms have hydrogen added

2019-09-04 Thread Tim Dudgeon

Rocco,

Great. You nailed it!

Many thanks.

Tim

On 04/09/2019 17:41, Rocco Moretti wrote:
I think the issue is that you're making an explicit bond to a Xenon 
atom, and Xenon's valence model in the RDKit says that it has either 
zero bond or it has two bonds. (Don't worry - it's not really 
something you should have known /a priori /- valence models are funky. 
<https://nextmovesoftware.com/blog/2013/02/27/explicit-and-implicit-hydrogens-taking-liberties-with-valence/>) 



list( Chem.GetPeriodicTable().GetValenceList("Xe") ) # Returns [0, 2]

Since you have at least one bond to Xenon (to the carbon), you can't 
have zero bonds, so you must have two bonds, so RDKit fills in the 
missing valence with an implicit hydrogen:


atom.GetTotalValence() # returns 2
atom.GetNumImplicitHs() # returns 1

The hydrogen is implicit, so removing the hydrogens with 
Chem.RemoveHs() won't do anything.


This then interacts with the Smiles code. The Smiles model says that 
if you have an atom in brackets (which Xenon always is), you need to 
explicitly record the hydrogens it has. (See here 
<https://baoilleach.blogspot.com/2017/01/counting-hydrogens-in-smiles-string.html 
> for more.)


Ways around it: The easiest would be if you could change your element 
to something which takes a single valence, or something that doesn't 
have valences for implicit hydrogen purposes. (Astatine is a decent 
choice for the former, many of the the actinides work well for the 
latter.) If you really do want to use Xenon, you can always manually 
flag the atom to not have any implicit hydrogens.*

*
*
*
*...*
xe = Chem.Atom(54) # 54 is Xenon
*xe.SetNoImplicit(True)*
idx = mw.AddAtom(xe)
mw.AddBond(0,6,Chem.BondType.SINGLE)
Chem.SanitizeMol(mw)
atom = mw.GetAtomWithIdx(idx)
atom.GetExplicitValence() # returns 1
atom.GetTotalValence() *# returns 1*
atom.GetNumImplicitHs() *# returns 0***
Chem.MolToSmiles(mw) *# returns '[Xe]c1c1'*

On Wed, Sep 4, 2019 at 9:35 AM Tim Dudgeon <mailto:tdudgeon...@gmail.com>> wrote:


I'm finding that if I add a Xenon atom to a molecule it seems to
get an
unwanted hydrogen added to it.
Example notebook here:
https://gist.github.com/tdudgeon/ba3497341d9de95b4d78f3e5ed9fc0f7

Basic code is like this:

from rdkit import Chem
m = Chem.MolFromSmiles("c1c1")
mw = Chem.RWMol(m)
xe = Chem.Atom(54) # 54 is Xenon
idx = mw.AddAtom(xe)
mw.AddBond(0,6,Chem.BondType.SINGLE)
Chem.SanitizeMol(mw)
atom = mw.GetAtomWithIdx(idx)
atom.GetExplicitValence() # returns 1
Chem.MolToSmiles(mw) # returns [XeH]c1c1, expecting [Xe]c1c1

Even if I do a Chem.RemoveHs() the H remains.

Any ideas why and how to fix?





___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto: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] Xenon atoms have hydrogen added

2019-09-04 Thread Tim Dudgeon
I'm finding that if I add a Xenon atom to a molecule it seems to get an 
unwanted hydrogen added to it.
Example notebook here: 
https://gist.github.com/tdudgeon/ba3497341d9de95b4d78f3e5ed9fc0f7


Basic code is like this:

from rdkit import Chem
m = Chem.MolFromSmiles("c1c1")
mw = Chem.RWMol(m)
xe = Chem.Atom(54) # 54 is Xenon
idx = mw.AddAtom(xe)
mw.AddBond(0,6,Chem.BondType.SINGLE)
Chem.SanitizeMol(mw)
atom = mw.GetAtomWithIdx(idx)
atom.GetExplicitValence() # returns 1
Chem.MolToSmiles(mw) # returns [XeH]c1c1, expecting [Xe]c1c1

Even if I do a Chem.RemoveHs() the H remains.

Any ideas why and how to fix?





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


Re: [Rdkit-discuss] 答复: Generating R-group representation

2019-08-27 Thread Tim Dudgeon

Hi Hongbin,

Thanks for that. It helped me track down part of the solution using 
rdkit.Chem.rdRGroupDecomposition.RGroupDecomposition


See https://gist.github.com/tdudgeon/d29dea62540b4eb017d68250bca5d38f

But I'm still not quite there. I have a SMARTS but I want a real SMILES 
(see bottom of the notebook).
I think I sort of know how this could be done longhand, but suspect 
there's a real simple way!


Tim

On 27/08/2019 03:56, Hongbin Yang wrote:


Hi Tim,

Greg posted a gist on how to generate R-group matrices shortly before.

https://sourceforge.net/p/rdkit/mailman/message/36744886/

Does it help?

Hongbin Yang

*发件人: *Tim Dudgeon <mailto:tdudgeon...@gmail.com>
*发送时间: *2019年8月26日21:08
*收件人: *rdkit-discuss@lists.sourceforge.net 
<mailto:rdkit-discuss@lists.sourceforge.net>

*主题: *[Rdkit-discuss] Generating R-group representation

I have a set of molecules that share a common scaffold and differ by

substitution at a small number of sites (typically one or two).

I'd like to generate a generic R-group molecule that summarises the

molecules (e.g. showing the scaffold with the sites of substitution as

R1, R2 etc.).

Finding the MCS of such a set of molecules with RDKit seems straight

forward, but the output of that is a SMARTS expression for the MCS.

Does anyone have any examples (or hints) of using this to generate a

R-group representation?

Tim

___

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] Docker image for GSOC2018_MolVS_Integration

2018-09-25 Thread Tim Dudgeon
I was very happy to hear about the integration of MolVS into RDKit core 
in the talk by Susan Leung at the recent UGM.


https://github.com/rdkit/UGM_2018/blob/master/Presentations/Leung_GSoC_RDKit-MolVS_Integration.pdf
This is going to be incredibly useful once it gets released.

To help with testing of this I have created a Docker image based on the 
code on Susan's fork 
(https://github.com/susanhleung/rdkit/tree/dev/GSOC2018_MolVS_Integration) 
which I believe is what is used for the PR on the RDKit repo 
(https://github.com/rdkit/rdkit/pull/2002).


I will try to keep this updated at suitable intervals until the code is 
merged into the main RDKit repo.


To run the Docker image try something like this:

$ docker run -it --rm 
informaticsmatters/rdkit-python-debian:standardizer python

Python 2.7.15+ (default, Aug 31 2018, 11:56:52)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rdkit import Chem
>>> from rdkit.Chem.MolStandardize import rdMolStandardize
>>> m = 
rdMolStandardize.StandardizeSmiles('[Na]OC(=O)c1ccc(C[S+2]([O-])([O-]))cc1')

[09:18:41] Initializing MetalDisconnector
[09:18:41] Running MetalDisconnector
[09:18:41] Removed covalent bond between Na and O
[09:18:41] Initializing Normalizer
[09:18:41] Running Normalizer
[09:18:41] Rule applied: SulfonetoS(=O)(=O)
>>> m
'O=C([O-])c1ccc(C[S](=O)=O)cc1.[Na+]'
>>>



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


[Rdkit-discuss] Building DEB and RPM packages for cartridge

2018-06-10 Thread Tim Dudgeon
As some of you will know I am creating various Docker images for RDKit. 
See [1] and [2] if you want to know more.


The key to these is building RPM and DEB packages using `cpack`.
This is mostly working pretty well as you will see in those links.

Now I'm wanting to extend this to building images for the postgres 
cartridge and I'm at a point where I'm stuck and would welcome some advice.


I just modified the build process on Debian [3] to include the postgres 
packages and the add the options to cmake for building the cartridge. 
That all went OK and I end up with a functioning cartridge.


The key part of the Dockerfile looks like this:

RUN cmake -Wno-dev\
  -DRDK_INSTALL_INTREE=OFF\
  -DRDK_BUILD_INCHI_SUPPORT=ON\
  -DRDK_BUILD_AVALON_SUPPORT=ON\
  -DRDK_BUILD_PYTHON_WRAPPERS=ON\
  -DRDK_BUILD_SWIG_WRAPPERS=ON\
  -DRDK_BUILD_PGSQL=ON\
  -DPostgreSQL_ROOT=/usr/lib/postgresql/10\
-DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/10/server\
  -DCMAKE_INSTALL_PREFIX=/usr\
  ..

RUN nproc=$(getconf _NPROCESSORS_ONLN)\
  && make -j $(( nproc > 2 ? nproc - 2 : 1 ))\
  && make install\
  && sh Code/PgSQL/rdkit/pgsql_install.sh\
  && cpack -G DEB\
  && cpack -G RPM

But what I was hoping is that cpack would magically create DEB and RPM 
packages for postgres for me, but that does not seem to be the case. If 
only life were so simple:-)


I know there are processes in place that can build these packages for 
cartridge (certainly for Centos) but it's not obvious to me how these 
work and whether this is in any way related to the way that cpack is 
being used here.


Can anyone shed any light on this?

Thanks
Tim

[1] https://github.com/InformaticsMatters/docker-rdkit
[2] https://www.informaticsmatters.com/category/containers/index.html
[3] 
https://github.com/InformaticsMatters/docker-rdkit/blob/master/Dockerfile-build-debian



--
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] Some larger-scale RDKit C++ code changes

2018-04-06 Thread Tim Dudgeon

Yes, I was referring to the online docs.


On 06/04/18 05:19, Greg Landrum wrote:

Tim: where did you see the mention of cmake 2.6?
The docs that are part of the source tree have already been updated to 
mention that cmake 3.1 or newer is required:

https://github.com/rdkit/rdkit/blob/master/Docs/Book/Install.md
maybe you're looking at the online docs? I don't update those for the 
beta releases, so those still correspond to the previous version.



I'd like to be sure I didn't miss anything else.

-greg



On Thu, Apr 5, 2018 at 5:52 PM, Greg Landrum <greg.land...@gmail.com 
<mailto:greg.land...@gmail.com>> wrote:


Yeah, thats another change that has been made. I will update the docs.

Thanks for pointing out the oversight

-greg

On Thu, 5 Apr 2018 at 17:30, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:

Greg,

Does this explain problems I'm seeing with building on Centos:

From the current docs:
cmake. You need version 2.6 (or more recent)

With a current centos7 distro after a `yum install cmake`

# cmake --version
cmake version 2.8.12.2

When you build from current master branch you get this error:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.1 or higher is required.  You are running version
2.8.12.2

This is not seen when you build from the Release_2017_09_2 branch.

Tim




On 04/04/18 04:23, Greg Landrum wrote:


NOTE: If you don't work with the RDKit at the C++ level or
build the code yourself from source, you probably don't need
to read this email.

TL;DR: When we do the beta for the 2018.03.1 release we're
going to switch the C++ backend to use modern C++ (=C++11).
For people who can't switch to use that code, we will
continue to provide bug fixes for the 2017.09 release for at
least another 6 months.

--
# What's happening?

As part of the upcoming 2018.03 release, we will start using
modern C++ for the RDKit - this means C++11 at the moment,
the goal is that you should be able to build the code with
g++ v4.8. I've been talking about this for a while, blogged
about it
(https://medium.com/@greg.landrum_t5/the-rdkit-and-modern-c-48206b966218

<https://medium.com/@greg.landrum_t5/the-rdkit-and-modern-c-48206b966218>),
and posted to the rdkit-devel list
(https://sourceforge.net/p/rdkit/mailman/message/35811216/
<https://sourceforge.net/p/rdkit/mailman/message/35811216/>),
now it's finally happening.

Concretely what this means in github is that the current
master branch will be renamed to legacy and the modern_cxx
branch will be renamed to master.

# Who does this affect?

This should only affect people who need to build the RDKit
C++ code themselves. If you use a binary version of the RDKit
like the ones available inside of Anaconda Python or KNIME,
this change should have no impact upon you.

# What about people who can't use up-to-date compilers?

We realize that some people on older operating systems will
not be able to switch to start using a compiler that supports
C++11. In order to continue to support this subset of
developers, we will continue to apply bug fixes to the
current Release_2017_09 branch and do occasional patch
releases. Since this is intended for people who need to build
the code themselves anyway, we won't do builds of these
releases any more.

We will keep doing these patch release at least until the
2018.09 release. Whether or not we continue past that date
will depend on demand, so if you are using these releases
please let us know.

# Why are you doing this?

There's a long, rambling answer to this, but I'm not going to
give it here. :-)
The simplest explanation is that we think that the core of
the RDKit should be using a modern and (reasonably)
up-to-date version of the language that it's written in. The
developer experience is better and, happily, the code ends up
being faster.






--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<https://lists

Re: [Rdkit-discuss] Some larger-scale RDKit C++ code changes

2018-04-05 Thread Tim Dudgeon
So that means its not easy to build on a up to date centos (and maybe 
most other Red Hat based) distros?
You would need to install a newer version of cmake from some other 
source e.g https://cmake.org/ ?



On 05/04/18 16:52, Greg Landrum wrote:

Yeah, thats another change that has been made. I will update the docs.

Thanks for pointing out the oversight

-greg

On Thu, 5 Apr 2018 at 17:30, Tim Dudgeon <tdudgeon...@gmail.com 
<mailto:tdudgeon...@gmail.com>> wrote:


Greg,

Does this explain problems I'm seeing with building on Centos:

From the current docs:
cmake. You need version 2.6 (or more recent)

With a current centos7 distro after a `yum install cmake`

# cmake --version
cmake version 2.8.12.2

When you build from current master branch you get this error:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.1 or higher is required.  You are running version 2.8.12.2

This is not seen when you build from the Release_2017_09_2 branch.

Tim




On 04/04/18 04:23, Greg Landrum wrote:


NOTE: If you don't work with the RDKit at the C++ level or build
the code yourself from source, you probably don't need to read
this email.

TL;DR: When we do the beta for the 2018.03.1 release we're going
to switch the C++ backend to use modern C++ (=C++11). For people
who can't switch to use that code, we will continue to provide
bug fixes for the 2017.09 release for at least another 6 months.

--
# What's happening?

As part of the upcoming 2018.03 release, we will start using
modern C++ for the RDKit - this means C++11 at the moment, the
goal is that you should be able to build the code with g++ v4.8.
I've been talking about this for a while, blogged about it
(https://medium.com/@greg.landrum_t5/the-rdkit-and-modern-c-48206b966218),
and posted to the rdkit-devel list
(https://sourceforge.net/p/rdkit/mailman/message/35811216/), now
it's finally happening.

Concretely what this means in github is that the current master
branch will be renamed to legacy and the modern_cxx branch will
be renamed to master.

# Who does this affect?

This should only affect people who need to build the RDKit C++
code themselves. If you use a binary version of the RDKit like
the ones available inside of Anaconda Python or KNIME, this
change should have no impact upon you.

# What about people who can't use up-to-date compilers?

We realize that some people on older operating systems will not
be able to switch to start using a compiler that supports C++11.
In order to continue to support this subset of developers, we
will continue to apply bug fixes to the current Release_2017_09
branch and do occasional patch releases. Since this is intended
for people who need to build the code themselves anyway, we won't
do builds of these releases any more.

We will keep doing these patch release at least until the 2018.09
release. Whether or not we continue past that date will depend on
demand, so if you are using these releases please let us know.

# Why are you doing this?

There's a long, rambling answer to this, but I'm not going to
give it here. :-)
The simplest explanation is that we think that the core of the
RDKit should be using a modern and (reasonably) up-to-date
version of the language that it's written in. The developer
experience is better and, happily, the code ends up being faster.






--
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
<mailto: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
<mailto: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] Some larger-scale RDKit C++ code changes

2018-04-05 Thread Tim Dudgeon

Greg,

Does this explain problems I'm seeing with building on Centos:

From the current docs:
cmake. You need version 2.6 (or more recent)

With a current centos7 distro after a `yum install cmake`

# cmake --version
cmake version 2.8.12.2

When you build from current master branch you get this error:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.1 or higher is required.  You are running version 2.8.12.2

This is not seen when you build from the Release_2017_09_2 branch.

Tim




On 04/04/18 04:23, Greg Landrum wrote:


NOTE: If you don't work with the RDKit at the C++ level or build the 
code yourself from source, you probably don't need to read this email.


TL;DR: When we do the beta for the 2018.03.1 release we're going to 
switch the C++ backend to use modern C++ (=C++11). For people who 
can't switch to use that code, we will continue to provide bug fixes 
for the 2017.09 release for at least another 6 months.


--
# What's happening?

As part of the upcoming 2018.03 release, we will start using modern 
C++ for the RDKit - this means C++11 at the moment, the goal is that 
you should be able to build the code with g++ v4.8. I've been talking 
about this for a while, blogged about it 
(https://medium.com/@greg.landrum_t5/the-rdkit-and-modern-c-48206b966218 
), 
and posted to the rdkit-devel list 
(https://sourceforge.net/p/rdkit/mailman/message/35811216/ 
), now it's 
finally happening.


Concretely what this means in github is that the current master branch 
will be renamed to legacy and the modern_cxx branch will be renamed to 
master.


# Who does this affect?

This should only affect people who need to build the RDKit C++ code 
themselves. If you use a binary version of the RDKit like the ones 
available inside of Anaconda Python or KNIME, this change should have 
no impact upon you.


# What about people who can't use up-to-date compilers?

We realize that some people on older operating systems will not be 
able to switch to start using a compiler that supports C++11. In order 
to continue to support this subset of developers, we will continue to 
apply bug fixes to the current Release_2017_09 branch and do 
occasional patch releases. Since this is intended for people who need 
to build the code themselves anyway, we won't do builds of these 
releases any more.


We will keep doing these patch release at least until the 2018.09 
release. Whether or not we continue past that date will depend on 
demand, so if you are using these releases please let us know.


# Why are you doing this?

There's a long, rambling answer to this, but I'm not going to give it 
here. :-)
The simplest explanation is that we think that the core of the RDKit 
should be using a modern and (reasonably) up-to-date version of the 
language that it's written in. The developer experience is better and, 
happily, the code ends up being faster.






--
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] RDKit and Google Summer of Code 2018

2018-01-15 Thread Tim Dudgeon
Incorporating and "industrialising" Matt's MolVS tautomer and 
standardizer code?

http://molvs.readthedocs.io/en/latest/index.html


On 15/01/18 07:09, Greg Landrum wrote:

Dear all,

We've been invited again to participate in the OpenChemistry 
application for Google Summer of Code.


In order to participate we need ideas for projects and mentors to go 
along with them.


The current list of RDKit ideas is being maintained here:
http://wiki.openchemistry.org/GSoC_Ideas_2018#RDKit_Project_Ideas

(Note: at the point that I'm pressing "send", that's still a copy of 
last year's project ideas).


If you're willing to be a mentor (please ask me about the ~5 
hours/week required here) or have ideas, please reply to this thread.


Best,
-greg


--
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] RDKit and Google Summer of Code 2018

2018-01-15 Thread Tim Dudgeon
Agreed. Good support for reading and writing mol2 format would indeed be 
useful.

But not convinced this alone is sexy enough for GSoC.
Could there be something in a more general project to bridge the 
compound (mol/smiles), sequence (protein/nucleotide seq + alignments) 
and structure (pdb/mmcif/mmtf) worlds?
OK, so that's far too much to ask for, but is there something that could 
be plucked out from there that is useful and achievable?


Tim


On 15/01/18 09:19, Greg Landrum wrote:



On Mon, Jan 15, 2018 at 9:50 AM, Francois BERENGER 
> wrote:


Supporting mol2 files as input would be nice.


Do you mean as output? You can already (in a limited way) read them.
-greg


There is already some code out there, people have worked on it and
several people would like to have the feature...

On 01/15/2018 04:09 PM, Greg Landrum wrote:
> Dear all,
>
> We've been invited again to participate in the OpenChemistry
application
> for Google Summer of Code.
>
> In order to participate we need ideas for projects and mentors to go
> along with them.
>
> The current list of RDKit ideas is being maintained here:
>
http://wiki.openchemistry.org/GSoC_Ideas_2018#RDKit_Project_Ideas

>
> (Note: at the point that I'm pressing "send", that's still a copy of
> last year's project ideas).
>
> If you're willing to be a mentor (please ask me about the ~5
hours/week
> required here) or have ideas, please reply to this thread.
>
> Best,
> -greg
>
>
>

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





--
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] Diversity picker

2018-01-04 Thread Tim Dudgeon

I think the MaxMinPicker can do what you want.
A blog on using this can be found here: 
https://rdkit.blogspot.co.uk/2017/11/revisting-maxminpicker.html



On 03/01/18 19:53, Sundar wrote:

Hi RDKit users,

Is it possible to pick a subset of (diverse) compounds that have less 
than a particular Tanimoto coefficient (for eg. 0.7) from a larger set 
using RDKit.
The current version of the Diverse Picker picks a diverse set based on 
a "number of compounds" instead of Tanimoto score.


Thanks
Jubilant


--
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] Cartridge upgrades

2017-12-08 Thread Tim Dudgeon

Thanks Greg.
I hit some strange problems with similarity search not working after an 
upgrade (SSS seemed OK). I never really got to the bottom of this as I 
managed to solve it by deleting the RDKit artifacts from the database 
and dropping and reinstalling the cartridge and after that all works fine.



On 05/12/17 07:18, Greg Landrum wrote:


On Fri, Dec 1, 2017 at 7:24 PM, Tim Dudgeon <tdudgeon...@gmail.com 
<mailto:tdudgeon...@gmail.com>> wrote:


If upgrading PostgreSQL to a new version of the RDKit cartridge is
any maintenance needed?

Either rebuild the indexes or regenerate the fingerprints and
rebuild the indexes?


It depend on the release. Usually you don't need to, but there are 
cases where it's required.

I normally try to capture this in the release notes.
For example, this was in the *important* section of the 2017.03.1 
release notes:


- The fix for bug #879 changes the definition of the layered
fingerprint.
  This means that all database columns using layered fingerprints
as well as
  all substructure search indices should be rebuilt.


Having said that, bug fixes that affect things like aromaticity 
perception could change some fingerprints and I don't always think to 
capture a specific note about changing fingerprints in these cases.


It's generally a good idea to go through the release notes before an 
upgrade in any case.


If the database isn't too big, regenerating fingerprints and indices 
isn't a terrible idea... just to be safe. :-)


-greg




--
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 <tdudgeon...@gmail.com>
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] Cartridge upgrades

2017-12-01 Thread Tim Dudgeon
If upgrading PostgreSQL to a new version of the RDKit cartridge is any 
maintenance needed?


Either rebuild the indexes or regenerate the fingerprints and rebuild 
the indexes?



--
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] RDkit and Pubchem

2017-12-01 Thread Tim Dudgeon
In what way? Given a single PubChem compound or substance ID you just 
want to pull the smiles or molfile into RDKit?


Tim

On 01/12/17 17:26, Sundar wrote:

Hi RDkit users,

I was wondering if RDkit has a means of downloading compounds from 
Pubchem.

Also let me other ways that helps here.

Thanks,
Jubi


--
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] RPM distros

2017-12-01 Thread Tim Dudgeon
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 <tdudgeon...@gmail.com> 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


Re: [Rdkit-discuss] RPM distros

2017-12-01 Thread Tim Dudgeon

Francois,

I'm assuming you are meaning to install those packages on the debian 
system prior to installing the RDKit-2018.03.1.dev1-Linux-*.deb files.


Unfortunately that didn't help.

Tim

On 27/11/2017 23:50, Francois BERENGER wrote:

On 11/28/2017 12:42 AM, Tim Dudgeon wrote:

I see exactly the same when I build with those cmake args.

Maybe you are missing some of the dependencies.
I don't think the packages we create have all the dependency information:

fonts-freefont-ttf,
libboost-python1.58.0,
libboost-regex1.58.0,
libboost-system1.58.0,
libboost-thread1.58.0,
libc6 (>= 2.14),
libgcc1 (>= 1:4.1.1),
libpython2.7 (>= 2.7),
libstdc++6 (>= 5.2),
python (<< 2.8),
python (>= 2.7~)

You should install the ones you are missing and test again.


On 27/11/2017 09:11, Francois BERENGER wrote:

On 11/27/2017 06:01 PM, Tim Dudgeon wrote:

I did:

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF
-DCMAKE_INSTALL_PREFIX=/usr/ ..

Try this instead, just for the cmake part:

cmake -Wno-dev \
  -DRDK_INSTALL_INTREE=OFF \
  -DRDK_BUILD_INCHI_SUPPORT=ON \
  -DRDK_BUILD_AVALON_SUPPORT=ON \
  -DRDK_BUILD_PYTHON_WRAPPERS=ON \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DRDKit_VERSION=`date +%Y.%m` \
  ../

then do the rest (cpack ...) and test again
after an install of the freshly created package.

I advise to wipe out any prior rdkit install from your machine
before installing the new packages (so that we test what we intend to
test).

On a Debian-like:
sudo apt-get remove $(dpkg -l | grep rdkit | awk '{print $2}')


cpack -G DEB
cpack -G RPM


On 27/11/2017 00:05, Francois BERENGER wrote:

Hello,

What are the exact commands you used to configure and compile rdkit?

The script in there is my best attempt:

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

Regards,
F.

On 11/25/2017 12:50 AM, Tim Dudgeon wrote:

I got round to testing the debs and rpms but without success.

For the debs the following were built:

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

On a clean Ubuntu Xenial system, with just python added (apt-get -y
install python) the packages installed fine:

# dpkg -i *.deb
Selecting previously unselected package rdkit-development.
(Reading database ... 5666 files and directories currently installed.)
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Development.deb ...
Unpacking rdkit-development (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-extras.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
Unpacking rdkit-extras (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-python.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
Unpacking rdkit-python (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-runtime.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Runtime.deb ...
Unpacking rdkit-runtime (2018.03.1.dev1) ...
Setting up rdkit-development (2018.03.1.dev1) ...
Setting up rdkit-extras (2018.03.1.dev1) ...
Setting up rdkit-python (2018.03.1.dev1) ...
Setting up rdkit-runtime (2018.03.1.dev1) ...

There seem to be header files in /usr/include/rdkit and the RDKit
installation (.py and .so files) in
/usr/lib/python2.7/dist-packages/rdkit

But RDKit doesn't work from Python:

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
     File "", line 1, in 
     File "/usr/lib/python2.7/dist-packages/rdkit/__init__.py", line
2, in

   from .rdBase import rdkitVersion as __version__
ImportError: libpython2.7.so.1.0: cannot open shared object file: No
such file or directory

For the rpms the story is similar. The same 4 files are built as rpms.
Installing them on a clean centos7 machine went fine and the files
seem
to get installed to the same places.
But RDKit again couldn't be used from Python, but with a different
error:

# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
     File "", line 1, in 
ImportError: No module named rdkit

On 15/11/2017 20:18, David Hall wrote:

apt install rpm

should get you rpmbuild

-David

On Nov 15, 2017, at 2:59 PM, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:


OK, makes sense, but I'm building on a Debian system. So neither
'yum
install rpm-build' nor 'apt-get install rpm-build' doesn't work.

So (sorry for the stupid question) can DEBs only be built on a
Debian
based system and RPMs om a Red Hat based system?


On 15/11/2017 19:31, Paolo Tosco wrote:

Hi Tim,

It looks 

Re: [Rdkit-discuss] RPM distros

2017-12-01 Thread Tim Dudgeon

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

Tim


On 28/11/2017 08:48, Maciek Wójcikowski wrote:

Hi Tim and Francois,

To fix missing dependencies use "sudo apt install -f" and use "yum 
install rdkit_package_file.rpm" to install package to have all the 
dependencies.


On Debian (based systems) I prefer to install standalone packages via 
gdebi which does this automatically.



Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl <mailto:mac...@wojcikowski.pl>

2017-11-28 0:50 GMT+01:00 Francois BERENGER 
<beren...@bioreg.kyushu-u.ac.jp <mailto:beren...@bioreg.kyushu-u.ac.jp>>:


    On 11/28/2017 12:42 AM, Tim Dudgeon wrote:
> I see exactly the same when I build with those cmake args.

Maybe you are missing some of the dependencies.
I don't think the packages we create have all the dependency
information:

fonts-freefont-ttf,
libboost-python1.58.0,
libboost-regex1.58.0,
libboost-system1.58.0,
libboost-thread1.58.0,
libc6 (>= 2.14),
libgcc1 (>= 1:4.1.1),
libpython2.7 (>= 2.7),
libstdc++6 (>= 5.2),
python (<< 2.8),
python (>= 2.7~)

You should install the ones you are missing and test again.

> On 27/11/2017 09:11, Francois BERENGER wrote:
>> On 11/27/2017 06:01 PM, Tim Dudgeon wrote:
>>> I did:
>>>
>>> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF
>>> -DCMAKE_INSTALL_PREFIX=/usr/ ..
>> Try this instead, just for the cmake part:
>>
>> cmake -Wno-dev \
>>  -DRDK_INSTALL_INTREE=OFF \
>>  -DRDK_BUILD_INCHI_SUPPORT=ON \
>>  -DRDK_BUILD_AVALON_SUPPORT=ON \
>>  -DRDK_BUILD_PYTHON_WRAPPERS=ON \
>>  -DCMAKE_INSTALL_PREFIX=/usr \
>>  -DRDKit_VERSION=`date +%Y.%m` \
>>  ../
>>
>> then do the rest (cpack ...) and test again
>> after an install of the freshly created package.
>>
>> I advise to wipe out any prior rdkit install from your machine
>> before installing the new packages (so that we test what we
intend to
>> test).
>>
>> On a Debian-like:
>> sudo apt-get remove $(dpkg -l | grep rdkit | awk '{print $2}')
>>
>>> cpack -G DEB
>>> cpack -G RPM
>>>
>>>
>>> On 27/11/2017 00:05, Francois BERENGER wrote:
>>>> Hello,
>>>>
>>>> What are the exact commands you used to configure and compile
rdkit?
>>>>
>>>> The script in there is my best attempt:
>>>>
>>>> https://github.com/rdkit/rdkit/pull/1655
<https://github.com/rdkit/rdkit/pull/1655>
>>>>
>>>> Regards,
>>>> F.
>>>>
>>>> On 11/25/2017 12:50 AM, Tim Dudgeon wrote:
>>>>> I got round to testing the debs and rpms but without success.
>>>>>
>>>>> For the debs the following were built:
>>>>>
>>>>> RDKit-2018.03.1.dev1-Linux-Development.deb
>>>>> RDKit-2018.03.1.dev1-Linux-Extras.deb
>>>>> RDKit-2018.03.1.dev1-Linux-Python.deb
>>>>> RDKit-2018.03.1.dev1-Linux-Runtime.deb
>>>>>
>>>>> On a clean Ubuntu Xenial system, with just python added
(apt-get -y
>>>>> install python) the packages installed fine:
>>>>>
>>>>> # dpkg -i *.deb
>>>>> Selecting previously unselected package rdkit-development.
>>>>> (Reading database ... 5666 files and directories currently
installed.)
>>>>> Preparing to unpack
RDKit-2018.03.1.dev1-Linux-Development.deb ...
>>>>> Unpacking rdkit-development (2018.03.1.dev1) ...
>>>>> Selecting previously unselected package rdkit-extras.
>>>>> Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
>>>>> Unpacking rdkit-extras (2018.03.1.dev1) ...
>>>>> Selecting previously unselected package rdkit-python.
>>>>> Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
>>>>> Unpacking rdkit-python (2018.03.1.dev1) ...
>>>>> Selecting previously unselected package rdkit-runtime.
>>>>> Preparing to unpack

Re: [Rdkit-discuss] RPM distros

2017-11-27 Thread Tim Dudgeon

I see exactly the same when I build with those cmake args.


On 27/11/2017 09:11, Francois BERENGER wrote:

On 11/27/2017 06:01 PM, Tim Dudgeon wrote:

I did:

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF
-DCMAKE_INSTALL_PREFIX=/usr/ ..

Try this instead, just for the cmake part:

cmake -Wno-dev \
 -DRDK_INSTALL_INTREE=OFF \
 -DRDK_BUILD_INCHI_SUPPORT=ON \
 -DRDK_BUILD_AVALON_SUPPORT=ON \
 -DRDK_BUILD_PYTHON_WRAPPERS=ON \
 -DCMAKE_INSTALL_PREFIX=/usr \
 -DRDKit_VERSION=`date +%Y.%m` \
 ../

then do the rest (cpack ...) and test again
after an install of the freshly created package.

I advise to wipe out any prior rdkit install from your machine
before installing the new packages (so that we test what we intend to test).

On a Debian-like:
sudo apt-get remove $(dpkg -l | grep rdkit | awk '{print $2}')


cpack -G DEB
cpack -G RPM


On 27/11/2017 00:05, Francois BERENGER wrote:

Hello,

What are the exact commands you used to configure and compile rdkit?

The script in there is my best attempt:

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

Regards,
F.

On 11/25/2017 12:50 AM, Tim Dudgeon wrote:

I got round to testing the debs and rpms but without success.

For the debs the following were built:

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

On a clean Ubuntu Xenial system, with just python added (apt-get -y
install python) the packages installed fine:

# dpkg -i *.deb
Selecting previously unselected package rdkit-development.
(Reading database ... 5666 files and directories currently installed.)
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Development.deb ...
Unpacking rdkit-development (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-extras.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
Unpacking rdkit-extras (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-python.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
Unpacking rdkit-python (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-runtime.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Runtime.deb ...
Unpacking rdkit-runtime (2018.03.1.dev1) ...
Setting up rdkit-development (2018.03.1.dev1) ...
Setting up rdkit-extras (2018.03.1.dev1) ...
Setting up rdkit-python (2018.03.1.dev1) ...
Setting up rdkit-runtime (2018.03.1.dev1) ...

There seem to be header files in /usr/include/rdkit and the RDKit
installation (.py and .so files) in
/usr/lib/python2.7/dist-packages/rdkit

But RDKit doesn't work from Python:

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
    File "", line 1, in 
    File "/usr/lib/python2.7/dist-packages/rdkit/__init__.py", line 2, in

  from .rdBase import rdkitVersion as __version__
ImportError: libpython2.7.so.1.0: cannot open shared object file: No
such file or directory

For the rpms the story is similar. The same 4 files are built as rpms.
Installing them on a clean centos7 machine went fine and the files seem
to get installed to the same places.
But RDKit again couldn't be used from Python, but with a different
error:

# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
    File "", line 1, in 
ImportError: No module named rdkit

On 15/11/2017 20:18, David Hall wrote:

apt install rpm

should get you rpmbuild

-David

On Nov 15, 2017, at 2:59 PM, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:


OK, makes sense, but I'm building on a Debian system. So neither 'yum
install rpm-build' nor 'apt-get install rpm-build' doesn't work.

So (sorry for the stupid question) can DEBs only be built on a Debian
based system and RPMs om a Red Hat based system?


On 15/11/2017 19:31, Paolo Tosco wrote:

Hi Tim,

It looks like you are missing the rpmbuild binary on the machine
where you are trying to build the RPM.
Issuing a

yum install rpm-build

as root should get it installed.

Cheers,
p.

On 11/15/17 19:00, Tim Dudgeon wrote:

So this now seems to have been merged to master so I gave it a try:

root@f083c3e3b6a1:/rdkit/build# cmake -DRDK_BUILD_INCHI_SUPPORT=ON
-DRDK_INSTALL_INTREE=OFF -DCMAKE_INSTALL_PREFIX=/usr/ ..
-- Could NOT find InChI in system locations (missing:
INCHI_LIBRARY INCHI_INCLUDE_DIR)
CUSTOM_INCHI_PATH = /rdkit/External/INCHI-API
-- Found InChI software locally
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python
Python Install directory /usr/lib/python2.7/dist-packages
-- Could NOT find E

Re: [Rdkit-discuss] RPM distros

2017-11-27 Thread Tim Dudgeon

I did:

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF 
-DCMAKE_INSTALL_PREFIX=/usr/ ..

cpack -G DEB
cpack -G RPM


On 27/11/2017 00:05, Francois BERENGER wrote:

Hello,

What are the exact commands you used to configure and compile rdkit?

The script in there is my best attempt:

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

Regards,
F.

On 11/25/2017 12:50 AM, Tim Dudgeon wrote:

I got round to testing the debs and rpms but without success.

For the debs the following were built:

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

On a clean Ubuntu Xenial system, with just python added (apt-get -y
install python) the packages installed fine:

# dpkg -i *.deb
Selecting previously unselected package rdkit-development.
(Reading database ... 5666 files and directories currently installed.)
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Development.deb ...
Unpacking rdkit-development (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-extras.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
Unpacking rdkit-extras (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-python.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
Unpacking rdkit-python (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-runtime.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Runtime.deb ...
Unpacking rdkit-runtime (2018.03.1.dev1) ...
Setting up rdkit-development (2018.03.1.dev1) ...
Setting up rdkit-extras (2018.03.1.dev1) ...
Setting up rdkit-python (2018.03.1.dev1) ...
Setting up rdkit-runtime (2018.03.1.dev1) ...

There seem to be header files in /usr/include/rdkit and the RDKit
installation (.py and .so files) in  /usr/lib/python2.7/dist-packages/rdkit

But RDKit doesn't work from Python:

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/lib/python2.7/dist-packages/rdkit/__init__.py", line 2, in

     from .rdBase import rdkitVersion as __version__
ImportError: libpython2.7.so.1.0: cannot open shared object file: No
such file or directory

For the rpms the story is similar. The same 4 files are built as rpms.
Installing them on a clean centos7 machine went fine and the files seem
to get installed to the same places.
But RDKit again couldn't be used from Python, but with a different error:

# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
   File "", line 1, in 
ImportError: No module named rdkit

On 15/11/2017 20:18, David Hall wrote:

apt install rpm

should get you rpmbuild

-David

On Nov 15, 2017, at 2:59 PM, Tim Dudgeon <tdudgeon...@gmail.com
<mailto:tdudgeon...@gmail.com>> wrote:


OK, makes sense, but I'm building on a Debian system. So neither 'yum
install rpm-build' nor 'apt-get install rpm-build' doesn't work.

So (sorry for the stupid question) can DEBs only be built on a Debian
based system and RPMs om a Red Hat based system?


On 15/11/2017 19:31, Paolo Tosco wrote:

Hi Tim,

It looks like you are missing the rpmbuild binary on the machine
where you are trying to build the RPM.
Issuing a

yum install rpm-build

as root should get it installed.

Cheers,
p.

On 11/15/17 19:00, Tim Dudgeon wrote:

So this now seems to have been merged to master so I gave it a try:

root@f083c3e3b6a1:/rdkit/build# cmake -DRDK_BUILD_INCHI_SUPPORT=ON
-DRDK_INSTALL_INTREE=OFF -DCMAKE_INSTALL_PREFIX=/usr/ ..
-- Could NOT find InChI in system locations (missing:
INCHI_LIBRARY INCHI_INCLUDE_DIR)
CUSTOM_INCHI_PATH = /rdkit/External/INCHI-API
-- Found InChI software locally
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python
Python Install directory /usr/lib/python2.7/dist-packages
-- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR
EIGEN3_VERSION_OK) (Required is at least version "2.91.0")
Eigen3 not found, disabling the Descriptors3D build.
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   serialization
== Using strict rotor definition
== Updating Filters.cpp from pains file
== Done updating pains files
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   regex
-- Configuring done
-- Generating done
-- Build files have been written to: /rdkit/build


root@f083c3e3b6a1:/rdkit/build# cpack -G DEB
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinst

Re: [Rdkit-discuss] RPM distros

2017-11-24 Thread Tim Dudgeon

I got round to testing the debs and rpms but without success.

For the debs the following were built:

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

On a clean Ubuntu Xenial system, with just python added (apt-get -y 
install python) the packages installed fine:


# dpkg -i *.deb
Selecting previously unselected package rdkit-development.
(Reading database ... 5666 files and directories currently installed.)
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Development.deb ...
Unpacking rdkit-development (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-extras.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
Unpacking rdkit-extras (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-python.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
Unpacking rdkit-python (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-runtime.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Runtime.deb ...
Unpacking rdkit-runtime (2018.03.1.dev1) ...
Setting up rdkit-development (2018.03.1.dev1) ...
Setting up rdkit-extras (2018.03.1.dev1) ...
Setting up rdkit-python (2018.03.1.dev1) ...
Setting up rdkit-runtime (2018.03.1.dev1) ...

There seem to be header files in /usr/include/rdkit and the RDKit 
installation (.py and .so files) in /usr/lib/python2.7/dist-packages/rdkit


But RDKit doesn't work from Python:

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rdkit
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/dist-packages/rdkit/__init__.py", line 2, in 


    from .rdBase import rdkitVersion as __version__
ImportError: libpython2.7.so.1.0: cannot open shared object file: No 
such file or directory

>>>


For the rpms the story is similar. The same 4 files are built as rpms.
Installing them on a clean centos7 machine went fine and the files seem 
to get installed to the same places.

But RDKit again couldn't be used from Python, but with a different error:

# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rdkit
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named rdkit
>>>


On 15/11/2017 20:18, David Hall wrote:

apt install rpm

should get you rpmbuild

-David

On Nov 15, 2017, at 2:59 PM, Tim Dudgeon <tdudgeon...@gmail.com 
<mailto:tdudgeon...@gmail.com>> wrote:


OK, makes sense, but I'm building on a Debian system. So neither 'yum 
install rpm-build' nor 'apt-get install rpm-build' doesn't work.


So (sorry for the stupid question) can DEBs only be built on a Debian 
based system and RPMs om a Red Hat based system?



On 15/11/2017 19:31, Paolo Tosco wrote:


Hi Tim,

It looks like you are missing the rpmbuild binary on the machine 
where you are trying to build the RPM.

Issuing a

yum install rpm-build

as root should get it installed.

Cheers,
p.

On 11/15/17 19:00, Tim Dudgeon wrote:


So this now seems to have been merged to master so I gave it a try:

root@f083c3e3b6a1:/rdkit/build# cmake -DRDK_BUILD_INCHI_SUPPORT=ON 
-DRDK_INSTALL_INTREE=OFF -DCMAKE_INSTALL_PREFIX=/usr/ ..
-- Could NOT find InChI in system locations (missing:  
INCHI_LIBRARY INCHI_INCLUDE_DIR)

CUSTOM_INCHI_PATH = /rdkit/External/INCHI-API
-- Found InChI software locally
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python
Python Install directory /usr/lib/python2.7/dist-packages
-- Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR 
EIGEN3_VERSION_OK) (Required is at least version "2.91.0")

Eigen3 not found, disabling the Descriptors3D build.
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   serialization
== Using strict rotor definition
== Updating Filters.cpp from pains file
== Done updating pains files
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   regex
-- Configuring done
-- Generating done
-- Build files have been written to: /rdkit/build


root@f083c3e3b6a1:/rdkit/build# cpack -G DEB
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: RDKit
CPack: - Install project: RDKit
CPack: -   Install component: runtime
CPack: -   Install component: base
CPack: -   Install component: data
CPack: -   Install component: docs
CPack: -   Install component: dev
CPack: -   Install component: python
CPack: -   Install component: extras
CPack: Create packa

Re: [Rdkit-discuss] Docker with (latest) rdkit+jupyter

2017-11-21 Thread Tim Dudgeon

I've got some dockerfiles that might be worth a look.
https://github.com/InformaticsMatters/docker_jupyter

Not sure if they will help.

Tim



On 21/11/2017 15:25, JP wrote:

Yo RDKitters,

I am running a CADD workshop for a group of MSc students and would 
like to show them some some RDKit awesomeness.


I thought the best way to do this is to use an rdkit enabled docker 
image + jupyter notebooks (they are comfortable with python).


In preparation, I tried building the docker image from the docker file 
at 
https://github.com/rdkit/rdkit_containers/tree/master/docker/run_conda3 
but this fails on Ubuntu 16.04.3 LTS with the following error:


$ docker build -t run_rdkit_conda 
https://raw.githubusercontent.com/rdkit/rdkit_containers/master/docker/run_conda3/Dockerfile
Downloading build context from remote url: 
https://raw.githubusercontent.com/rdkit/rdkit_containers/master/docker/run_conda3/Dockerfile 
   357B

Sending build context to Docker daemon  2.048kB
Step 1/7 : FROM continuumio/miniconda3
latest: Pulling from continuumio/miniconda3
85b1f47fba49: Pull complete
6b3cb0c49789: Pull complete
fecb432dacf0: Pull complete
f461f7e3890d: Pull complete
Digest: 
sha256:604cda0c0be5d40cc26db31912d8b1b7276840a56544b846abef441b32d987fc

Status: Downloaded newer image for continuumio/miniconda3:latest
 ---> f700f7f570c7
Step 2/7 : MAINTAINER Greg Landrum >

 ---> Running in ad6a648c18ba
 ---> 18e6d6093d5b
Removing intermediate container ad6a648c18ba
Step 3/7 : ENV PATH /opt/conda/bin:$PATH
 ---> Running in e21cf8e5332f
 ---> ddef65292068
Removing intermediate container e21cf8e5332f
Step 4/7 : ENV LANG C
 ---> Running in efa12ef17f37
 ---> 137d7e20350d
Removing intermediate container efa12ef17f37
Step 5/7 : RUN conda config --add channels 
https://conda.anaconda.org/rdkit

 ---> Running in 79566bf4b6e9
 ---> 032965875391
Removing intermediate container 79566bf4b6e9
Step 6/7 : RUN conda install -y nomkl rdkit pandas cairo cairocffi jupyter
 ---> Running in c5aa6417a63a
Fetching package metadata .
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in 
conflict:

  - cairocffi -> python 3.5* -> xz 5.0.5
  - python 3.6*
Use "conda info " to see the dependencies for each package.

The command '/bin/sh -c conda install -y nomkl rdkit pandas cairo 
cairocffi jupyter' returned a non-zero code: 1


Any ideas?
JP


--
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] RPM distros

2017-11-15 Thread Tim Dudgeon

Thank you.
I now have RPMs built:

CPackRPM: Will use GENERATED spec file: 
/rdkit/build/_CPack_Packages/Linux/RPM/SPECS/rdkit-Runtime.spec
CPack: - package: 
/rdkit/build/RDKit-2018.03.1.dev1-Linux-Development.rpm generated.
CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Extras.rpm 
generated.
CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Python.rpm 
generated.
CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Runtime.rpm 
generated.


Next, to check if they (and the DEBs) actually work!

Tim


On 15/11/2017 20:18, David Hall wrote:

apt install rpm

should get you rpmbuild

-David

On Nov 15, 2017, at 2:59 PM, Tim Dudgeon <tdudgeon...@gmail.com 
<mailto:tdudgeon...@gmail.com>> wrote:


OK, makes sense, but I'm building on a Debian system. So neither 'yum 
install rpm-build' nor 'apt-get install rpm-build' doesn't work.


So (sorry for the stupid question) can DEBs only be built on a Debian 
based system and RPMs om a Red Hat based system?



On 15/11/2017 19:31, Paolo Tosco wrote:


Hi Tim,

It looks like you are missing the rpmbuild binary on the machine 
where you are trying to build the RPM.

Issuing a

yum install rpm-build

as root should get it installed.

Cheers,
p.

On 11/15/17 19:00, Tim Dudgeon wrote:


So this now seems to have been merged to master so I gave it a try:

root@f083c3e3b6a1:/rdkit/build# cmake -DRDK_BUILD_INCHI_SUPPORT=ON 
-DRDK_INSTALL_INTREE=OFF -DCMAKE_INSTALL_PREFIX=/usr/ ..
-- Could NOT find InChI in system locations (missing:  
INCHI_LIBRARY INCHI_INCLUDE_DIR)

CUSTOM_INCHI_PATH = /rdkit/External/INCHI-API
-- Found InChI software locally
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   python
Python Install directory /usr/lib/python2.7/dist-packages
-- Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR 
EIGEN3_VERSION_OK) (Required is at least version "2.91.0")

Eigen3 not found, disabling the Descriptors3D build.
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   serialization
== Using strict rotor definition
== Updating Filters.cpp from pains file
== Done updating pains files
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   regex
-- Configuring done
-- Generating done
-- Build files have been written to: /rdkit/build


root@f083c3e3b6a1:/rdkit/build# cpack -G DEB
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: RDKit
CPack: - Install project: RDKit
CPack: -   Install component: runtime
CPack: -   Install component: base
CPack: -   Install component: data
CPack: -   Install component: docs
CPack: -   Install component: dev
CPack: -   Install component: python
CPack: -   Install component: extras
CPack: Create package
CPack: - package: 
/rdkit/build/RDKit-2018.03.1.dev1-Linux-Development.deb generated.
CPack: - package: 
/rdkit/build/RDKit-2018.03.1.dev1-Linux-Extras.deb generated.
CPack: - package: 
/rdkit/build/RDKit-2018.03.1.dev1-Linux-Python.deb generated.
CPack: - package: 
/rdkit/build/RDKit-2018.03.1.dev1-Linux-Runtime.deb generated.



root@f083c3e3b6a1:/rdkit/build# cpack -G RPM
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: RDKit
CPack: - Install project: RDKit
CPack: -   Install component: runtime
CPack: -   Install component: base
CPack: -   Install component: data
CPack: -   Install component: docs
CPack: -   Install component: dev
CPack: -   Install component: python
CPack: -   Install component: extras
CPack: Create package
CMake Error at /usr/share/cmake-3.7/Modules/CPackRPM.cmake:1573 
(message):

  RPM package requires rpmbuild executable
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/CPackRPM.cmake:2442 
(cpack_rpm_generate_package)



CPack Error: Error while execution CPackRPM.cmake
CPack Error: Error while execution CPackRPM.cmake
CPack Error: Error while execution CPackRPM.cmake
CPack Error: Error while execution CPackRPM.cmake
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: RDKit


So it looks like the building the debs works OK (I didn't test 
them) but building rpms fails.


I'm probably doing something stupid here as I'm not that familiar 
with cmake and cpack.



On 10/11/2017 00:03, Francois BERENGER wrote:

On 11/08/2017 08:47 PM, Tim Dudgeon wrote:
There is mention of RPM distributions of RDKit 
(https://copr.fedorainfracloud.org/coprs/giallu/rdkit/).


But on trying these:

1. the distro is based on the 2017_03_1 release
2. it fails due to missing libinchi.so.1 dependency.


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

Maybe you can read the pull request, replace DEB by RPM and see
if that produces usabl

  1   2   >