Re: [Rdkit-discuss] 2018.03.1 RDKit release

2018-04-24 Thread David Hall
On Tue, Apr 24, 2018 at 7:03 PM, Andrew Dalke 
wrote:

>
> By the way, how do I install RDKit into a specified location? I usually
> expect something like --prefix /usr/local, and there's a
> CMAKE_INSTALL_PREFIX which defaults to "/usr/local" but "make install" puts
> it in the build directory, like
>
>   /Users/dalke/ftps/rdkit-Release_2018_03_1
>
>
You need to turn off RDK_INSTALL_INTREE

-David
--
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] 2018.03.1 RDKit release

2018-04-24 Thread Andrew Dalke

> On Apr 23, 2018, at 10:43, Greg Landrum  wrote:
> 
> I'm pleased to announce that the next version of the RDKit - 2018.03 - is 
> released. The release notes are below.
  ...
> Please let me know if you find any problems with the release or have 
> suggestions for the next one, which is scheduled for Octobera 2018.

I'm likely one of the few who builds RDKit manually. I also build on a Mac but 
I don't use the system/homebrew Python or Boost but rather have my own 
installations under a virtual environment. Which makes updates "fun".

The build step produced errors like:

  "links to target 'Boost::serialization' but the target was not found."
  "links to target 'Boost::python3' but the target was not found."

The solution was to upgrade my cmake from 3.7.2 to 3.11.1.

Note however that the Install.md says:

   cmake. You need version 3.1 (or more recent)

This should be updated. I don't know which cmake version is the minimum 
required.



By the way, how do I install RDKit into a specified location? I usually expect 
something like --prefix /usr/local, and there's a CMAKE_INSTALL_PREFIX which 
defaults to "/usr/local" but "make install" puts it in the build directory, like

  /Users/dalke/ftps/rdkit-Release_2018_03_1


My solution is to install it myself, like:


cd ~/venvs/py36-2018-4/lib/python3.6/site-packages/
cp -rp ~/ftps/rdkit-Release_2018_03_1/rdkit .
python -m compileall rdkit
cd ~/venvs/py36-2018-4/lib
cp -p ~/ftps/rdkit-Release_2018_03_1/lib/lib* .


but the shared libraries uses a relative path:

  File 
"/Users/dalke/venvs/py36-2018-4/lib/python3.6/site-packages/rdkit/__init__.py", 
line 2, in 
from .rdBase import rdkitVersion as __version__
ImportError: 
dlopen(/Users/dalke/venvs/py36-2018-4/lib/python3.6/site-packages/rdkit/rdBase.so,
 2): Library not loaded: @rpath/libboost_python36.dylib
  Referenced from: 
/Users/dalke/venvs/py36-2018-4/lib/python3.6/site-packages/rdkit/rdBase.so
  Reason: image not found


% otool -L 
/Users/dalke/venvs/py36-2018-4/lib/python3.6/site-packages/rdkit/rdBase.so
/Users/dalke/venvs/py36-2018-4/lib/python3.6/site-packages/rdkit/rdBase.so:
@rpath/libRDKitRDBoost.1.dylib (compatibility version 1.0.0, current 
version 2018.3.1)
@rpath/libboost_python36.dylib (compatibility version 0.0.0, current 
version 0.0.0)
@rpath/libboost_serialization.dylib (compatibility version 0.0.0, 
current version 0.0.0)
@rpath/libRDKitRDGeneral.1.dylib (compatibility version 1.0.0, current 
version 2018.3.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
307.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1238.0.0)


which means I've always had to tweak my virtualenv 'activate' command to 
set/unset DYLD_LIBRARY_PATH.

(It looks like there are ways to tweak the @rpath but I haven't figured it out.)

I would prefer to have something like

  cmake . --prefix ~/venvs/py36-2018-4
  make install

and skip all of this by-hand tweaking.

Does it exist already and I just missed it?


Andrew
da...@dalkescientific.com



--
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] Post Doc in Artificial Intelligence & Active Ingredients Design + Workshop announcement

2018-04-24 Thread Marco Stenta
Dear All,
we are looking for someone with AI skills to do chemoinformatics work at
Syngenta,
knowledge of RDKit is, of course, part of the required skill-set.

Have a look here:
https://www.linkedin.com/feed/update/urn:li:activity:6392826810215727104

or apply directly here
https://syngentacrop.taleo.net/careersection/switzerland/jobdetail.ftl?job=1801163=GMT%2B02%3A00



Also, we are organizing a workshop on this very same topic at our site near
Basel, together with ROCHE, NOVARTIS, IDORSIA, LONZA and the swiss chemical
society
have a look here and register:
http://ai18.chemistrycongresses.ch/en/


Sorry for using this space for advertisement, but I guess this audience is
really the right one :-)

Cheers,
marco
--
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] TanimotoSimilarity of Scaffolds

2018-04-24 Thread serz sth
Hey Guys,

 

I'm new to this forum and also new to python/rdkit, so I hope you'll be indulgent.

 

I wanna make a TanimotoSimilarity Comparison with compound-smiles that were put into a scaffolding form, e.g. 
'CC1C(CC2CC3C3C2)CCC2C21' 

So these scaffolds are stored in a DataFrame and I want to compare them one by one to find out if there are any outliers for a QSAR Model I'm feeding my compounds into.

 

My code looks like this (copied it mostly from the RDkit doc):

 


from rdkit import Chem, DataStructs, RDConfig
from rdkit.Chem import AllChem
from rdkit.Chem.Pharm2D import Gobbi_Pharm2D, Generate

 

ref = Chem.MolFromSmiles(df4.scaff[0])

mol1 = Chem.MolFromSmiles(df4.scaff[0])
mol1 = AllChem.AssignBondOrdersFromTemplate(ref, mol1)
mol2 = Chem.MolFromSmiles(df4.scaff[1])
mol2 = AllChem.AssignBondOrdersFromTemplate(ref, mol2)

# pharmacophore fingerprint
factory = Gobbi_Pharm2D.factory
fp1 = Generate.Gen2DFingerprint(mol1, factory, dMat=Chem.Get3DDistanceMatrix(mol1))
fp2 = Generate.Gen2DFingerprint(mol2, factory, dMat=Chem.Get3DDistanceMatrix(mol2))
# Tanimoto similarity
tani = DataStructs.TanimotoSimilarity(fp1, fp2)
print(tani)

 

But it doesn't work :( What do I need a reference for? So either I get a
ValueError: No matching found 
Or, i get pass that, I get a

ValueError: Bad Conformer Id


 

Can anybody help me? Thanks in Advance!

 

 




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

2018-04-24 Thread Markus Sitzmann
Hello,

since it includes RDKit as one of its major components I am happy to
announce the first release of my new open-source project Chembience:

A Docker-based, cloudable platform for the development of
chemoinformatics-centric web applications and microservices.

https://github.com/chembience/chembience

(unfortunately it is still on RDKit 2017.09_3, I failed releasing it before
2018.03 :-) ).

Best,
Markus
--
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] atom mapping in reaction searches

2018-04-24 Thread Sebastian Wandernoth
Hey guys,

 

I'm still working on my search engine for reactions and I'm a bit puzzled as to what RDKit does with atom mapping information.

I'm still working with the PostgreSQL cartridge version 0.73.0, which should correspond to the release 2017.9.3.

 

I'm starting off with this example reaction which is fully mapped ([S:1]1[C:3]([Cl:4])=[N:5][CH:6]=[CH:2]1>>S(=O)(=O)1OCC([C:2]2[S:1][C:3]([Cl:4])=[N:5][CH:6]=2)=N1)

 

If I'm using a completely unmapped reaction as query I expect to find this one. So the following should return TRUE:

 


SELECT reaction_from_smarts('[S:1]1[C:3]([Cl:4])=[N:5][CH:6]=[CH:2]1>>S(=O)(=O)1OCC([C:2]2[S:1][C:3]([Cl:4])=[N:5][CH:6]=2)=N1') @> reaction_from_smarts('S1C(Cl)=NC=C1>>S(=O)(=O)1OCC(C2SC(Cl)=NC=2)=N1');

 

... which it does

 

 

Next step is to map one atom correctly in the query and try again. I still expect this to return TRUE:

 


SELECT reaction_from_smarts('[S:1]1[C:3]([Cl:4])=[N:5][CH:6]=[CH:2]1>>S(=O)(=O)1OCC([C:2]2[S:1][C:3]([Cl:4])=[N:5][CH:6]=2)=N1') @> reaction_from_smarts('[S:1]1C(Cl)=NC=C1>>S(=O)(=O)1OCC(C2[S:1]C(Cl)=NC=2)=N1');

 

... which it doesn't


 

 

With two atoms mapped correctly in the query, I wouldn't expect to get different results from the previous try:

 

SELECT reaction_from_smarts('[S:1]1[C:3]([Cl:4])=[N:5][CH:6]=[CH:2]1>>S(=O)(=O)1OCC([C:2]2[S:1][C:3]([Cl:4])=[N:5][CH:6]=2)=N1') @> reaction_from_smarts('[S:1]1C(Cl)=NC=[CH:2]1>>S(=O)(=O)1OCC([C:2]2[S:1]C(Cl)=NC=2)=N1');

 

... this one however returns TRUE again

 

 

Final try I did was to include a wrong mapping in the query. I definitely would expect to get back FALSE here (I'm mapping one sulfur atom to a carbon atom and a nitrogen to an oxygen):

 


SELECT reaction_from_smarts('[S:1]1[C:3]([Cl:4])=[N:5][CH:6]=[CH:2]1>>S(=O)(=O)1OCC([C:2]2[S:1][C:3]([Cl:4])=[N:5][CH:6]=2)=N1') @> reaction_from_smarts('[S:1]1C(Cl)=[N:2]C=C1>>S(=[O:2])(=O)1O[CH2:1]C(C2SC(Cl)=NC=2)=N1');

 

... however this returns TRUE yet again.

 

Playing around with it a bit more I found that whatever single atom I map in the query, I always get back FALSE and if I map more than one atom, I always get back TRUE...

Does this have something to do with the parameter 'rdkit.threshold_unmapped_reactant_atoms'? My suspicion is that RDKit only counts how many atoms are mapped and not compare them to the correct mapping. Can you confirm this?

Is there any way at all to include atom mapping in the query to filter the reactions the way I want to?

 

 

I hope you guys can help me here. Sorry for the lengthy question, but I wanted to include as much information as possible for you to pinpoint the issue.

 

Best regards

Sebastian



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