Re: [Rdkit-discuss] setting valence of choice to S and P atoms in rdkit

2017-06-21 Thread Paolo Tosco
(CC'ing the list as I hadn't in my original reply)

Dear Janusz,

this is what I would do:

>>> from rdkit import Chem
>>> mol = Chem.MolFromSmiles('SSC')
>>> print Chem.MolToSmiles(mol)
CSS
>>> print Chem.MolToSmiles(mol, allHsExplicit=True)
[CH3][S][SH]
>>> a = mol.GetAtomWithIdx(1)
>>> print (a.GetTotalValence())
2
>>> desiredValence = 4
>>> a.SetNumExplicitHs(desiredValence - a.GetTotalValence())
>>> a.UpdatePropertyCache()
>>> print (a.GetTotalValence())
4
>>> print Chem.MolToSmiles(mol, allHsExplicit=True)
[CH3][SH2][SH]

Cheers,
p.

> On 06/20/17 15:37, Janusz Petkowski wrote:
> Dear RDKit Community,
> 
> I have a quick question regarding a possibility of setting valence of an atom 
> in rdkit. 
> 
> Let's say that I have a molecule like this (smiles notation): PPC or SSC and 
> I would like to change the valence of one or more S or P atoms from default 
> II for S or III for P to let's say SIV or SVI and PV. As a result I would 
> like to have the following molecules (as an example): [H][SH3](C)[SH5], 
> [H][SH2]SC, [H][SH3](C)[SH3] or [H][PH3]PC, [H][PH3][PH3]C
> 
> Is it possible to output such molecules using SSC or PPC molecules as inputs, 
> using one of rdkit methods (modules)?
> 
> Thank you very much for your help,
> 
> Best regards,
> 
> Dr Janusz Petkowski
> Research Fellow at MIT EAPS
> Tel:  +1 (617) 258 - 6910
> 
> 
> --
> 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] Installation woes: Ubuntu 16.04, Boost 1.61, and RDKit not living so peacefully together after all ...

2017-06-21 Thread JP
Looks like it is finding the correct version of boost (and it is finding
boost serialize).

/opt/rdkit/rdkit-Release_2017_03_2/build$ cmake -D
RDK_BUILD_INCHI_SUPPORT=ON -D BOOST_ROOT=/opt/boost_1_61_0/ -D
Boost_NO_SYSTEM_PATHS=ON ..
-- Could NOT find InChI in system locations (missing:  INCHI_LIBRARY
INCHI_INCLUDE_DIR)
CUSTOM_INCHI_PATH = /opt/rdkit/rdkit-Release_2017_03_2/External/INCHI-API
-- Found InChI software locally
-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   python
-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   serialization
== Using strict rotor definition
== Updating Filters.cpp from pains file
== Done updating pains files
-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   regex
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/rdkit/rdkit-Release_2017_
03_2/build

But the error prevails.

If I set up rdkit to use just the system wide boost (1.58), not my specific
install (1.61), rdkit builds successfully.  I do this by clearing
BOOST_ROOT, LD_LIBRARY_PATH, and removing the boost-related cmake flags.
So this is certainly an issue with wrong libraries being picked up.




On 21 June 2017 at 07:29, Greg Landrum  wrote:

> did you build boost serialize?
>
> On Mon, Jun 19, 2017 at 12:03 PM, JP  wrote:
>
>> Hi Greg !
>>
>> Unfortunately that didn't help (I delete everything in my build
>> directory, then):
>>
>> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/
>> -DBoost_NO_SYSTEM_PATHS=ON ..
>>
>> and make as usual.
>>
>> [ 62%] Linking CXX executable testReaction
>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference
>> to `boost::archive::text_iarchive_impl> iarchive>::load_override(boost::archive::class_name_type&)'
>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference
>> to 
>> `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
>> const&)'
>> collect2: error: ld returned 1 exit status
>> Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
>> recipe for target 'Code/GraphMol/ChemReactions/testReaction' failed
>> make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
>> CMakeFiles/Makefile2:4157: recipe for target
>> 'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
>> make[1]: *** [Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all]
>> Error 2
>> Makefile:160: recipe for target 'all' failed
>> make: *** [all] Error 2
>>
>> Perhaps this isn't related to the system vs user-install, boost after all?
>>
>>
>> On 19 June 2017 at 10:38, Greg Landrum  wrote:
>>
>>> If you have a system boost install that you do not want to use, you
>>> should be sure to add "-D Boost_NO_SYSTEM_PATHS=ON" to the cmake arguments.
>>> This will (well, should) disable any usage of the system boost.
>>>
>>> -greg
>>>
>>>
>>> On Mon, Jun 19, 2017 at 9:39 AM, JP  wrote:
>>>
 HI Paul,

 Funny you should mention that.  I have boost 1.61 (installed manually
 in /opt) and system boost I installed via sudo apt-get install

 /opt/rdkit/rdkit-Release_2017_03_2/build$ dpkg -s libboost-dev | grep
 'Version'
 Version: 1.58.0.1ubuntu1

 However I pass the BOOST path to cmake via:

 cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/  ..

 (I also have the $BOOST_ROOT env variable set, so I think that is
 redundant.  Whatever).  cmake output clearly shows it is finding/using
 boost 1.61

 Using make VERBOSE=1 I get:

 [ 62%] Linking CXX executable testReaction
 cd /opt/rdkit/rdkit-Release_2017_03_2/build/Code/GraphMol/ChemReactions
 && /usr/bin/cmake -E cmake_link_script CMakeFiles/testReaction.dir/link.txt
 --verbose=1
 /usr/bin/c++-mpopcnt -Wno-deprecated -Wno-unused-function
 -fno-strict-aliasing -fPIC -Wall -Wextra -O3 -DNDEBUG
 CMakeFiles/testReaction.dir/testReaction.cpp.o  -o testReaction
 -rdynamic ../../../lib/libRDKitChemReactions.so.1.2017.03.2
 ../../../lib/libRDKitChemTransforms.so.1.2017.03.2
 ../../../lib/libRDKitDescriptors.so.1.2017.03.2
 ../../../lib/libRDKitFingerprints.so.1.2017.03.2
 ../../../lib/libRDKitDepictor.so.1.2017.03.2
 ../../../lib/libRDKitFileParsers.so.1.2017.03.2 -lboost_serialization
 ../../../lib/libRDKitPartialCharges.so.1.2017.03.2
 ../../../lib/libRDKitMolTransforms.so.1.2017.03.2
 ../../../lib/libRDKitEigenSolvers.so.1.2017.03.2
 ../../../lib/libRDKitFilterCatalog.so.1.2017.03.2
 ../../../lib/libRDKitSubgraphs.so.1.2017.03.2
 ../../../lib/libRDKitSmilesParse.so.1.2017.03.2
 ../../../lib/libRDKitSubstructMatch.so.1.2017.03.2
 

Re: [Rdkit-discuss] Installation woes: Ubuntu 16.04, Boost 1.61, and RDKit not living so peacefully together after all ...

2017-06-21 Thread Greg Landrum
Let's move this off the list for a bit until we get it resolved.

Can you please do: "VERBOSE=1 make testReaction" and send the output just
to me?

Thanks,
-greg


On Wed, Jun 21, 2017 at 10:24 AM, JP  wrote:

> Looks like it is finding the correct version of boost (and it is finding
> boost serialize).
>
> /opt/rdkit/rdkit-Release_2017_03_2/build$ cmake -D
> RDK_BUILD_INCHI_SUPPORT=ON -D BOOST_ROOT=/opt/boost_1_61_0/ -D
> Boost_NO_SYSTEM_PATHS=ON ..
> -- Could NOT find InChI in system locations (missing:  INCHI_LIBRARY
> INCHI_INCLUDE_DIR)
> CUSTOM_INCHI_PATH = /opt/rdkit/rdkit-Release_2017_03_2/External/INCHI-API
> -- Found InChI software locally
> -- Boost version: 1.61.0
> -- Found the following Boost libraries:
> --   python
> -- Boost version: 1.61.0
> -- Found the following Boost libraries:
> --   thread
> --   system
> --   chrono
> --   date_time
> --   atomic
> -- Boost version: 1.61.0
> -- Found the following Boost libraries:
> --   serialization
> == Using strict rotor definition
> == Updating Filters.cpp from pains file
> == Done updating pains files
> -- Boost version: 1.61.0
> -- Found the following Boost libraries:
> --   regex
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /opt/rdkit/rdkit-Release_2017_
> 03_2/build
>
> But the error prevails.
>
> If I set up rdkit to use just the system wide boost (1.58), not my
> specific install (1.61), rdkit builds successfully.  I do this by clearing
> BOOST_ROOT, LD_LIBRARY_PATH, and removing the boost-related cmake flags.
> So this is certainly an issue with wrong libraries being picked up.
>
>
>
>
> On 21 June 2017 at 07:29, Greg Landrum  wrote:
>
>> did you build boost serialize?
>>
>> On Mon, Jun 19, 2017 at 12:03 PM, JP  wrote:
>>
>>> Hi Greg !
>>>
>>> Unfortunately that didn't help (I delete everything in my build
>>> directory, then):
>>>
>>> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/
>>> -DBoost_NO_SYSTEM_PATHS=ON ..
>>>
>>> and make as usual.
>>>
>>> [ 62%] Linking CXX executable testReaction
>>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference
>>> to `boost::archive::text_iarchive_impl>> chive>::load_override(boost::archive::class_name_type&)'
>>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference
>>> to 
>>> `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
>>> const&)'
>>> collect2: error: ld returned 1 exit status
>>> Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
>>> recipe for target 'Code/GraphMol/ChemReactions/testReaction' failed
>>> make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
>>> CMakeFiles/Makefile2:4157: recipe for target
>>> 'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
>>> make[1]: *** [Code/GraphMol/ChemReactions/C
>>> MakeFiles/testReaction.dir/all] Error 2
>>> Makefile:160: recipe for target 'all' failed
>>> make: *** [all] Error 2
>>>
>>> Perhaps this isn't related to the system vs user-install, boost after
>>> all?
>>>
>>>
>>> On 19 June 2017 at 10:38, Greg Landrum  wrote:
>>>
 If you have a system boost install that you do not want to use, you
 should be sure to add "-D Boost_NO_SYSTEM_PATHS=ON" to the cmake arguments.
 This will (well, should) disable any usage of the system boost.

 -greg


 On Mon, Jun 19, 2017 at 9:39 AM, JP 
 wrote:

> HI Paul,
>
> Funny you should mention that.  I have boost 1.61 (installed manually
> in /opt) and system boost I installed via sudo apt-get install
>
> /opt/rdkit/rdkit-Release_2017_03_2/build$ dpkg -s libboost-dev | grep
> 'Version'
> Version: 1.58.0.1ubuntu1
>
> However I pass the BOOST path to cmake via:
>
> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/  ..
>
> (I also have the $BOOST_ROOT env variable set, so I think that is
> redundant.  Whatever).  cmake output clearly shows it is finding/using
> boost 1.61
>
> Using make VERBOSE=1 I get:
>
> [ 62%] Linking CXX executable testReaction
> cd /opt/rdkit/rdkit-Release_2017_03_2/build/Code/GraphMol/ChemReactions
> && /usr/bin/cmake -E cmake_link_script 
> CMakeFiles/testReaction.dir/link.txt
> --verbose=1
> /usr/bin/c++-mpopcnt -Wno-deprecated -Wno-unused-function
> -fno-strict-aliasing -fPIC -Wall -Wextra -O3 -DNDEBUG
> CMakeFiles/testReaction.dir/testReaction.cpp.o  -o testReaction
> -rdynamic ../../../lib/libRDKitChemReactions.so.1.2017.03.2
> ../../../lib/libRDKitChemTransforms.so.1.2017.03.2
> ../../../lib/libRDKitDescriptors.so.1.2017.03.2
> ../../../lib/libRDKitFingerprints.so.1.2017.03.2
> ../../../lib/libRDKitDepictor.so.1.2017.03.2
> ../../../lib/libRDKitFileParsers.so.1.2017.03.2 

[Rdkit-discuss] RMSD value between two non-covalent molecular complexes

2017-06-21 Thread gosia olejniczak
dear RDKit experts,

is it possible to calculate RMSD value between two non-covalent molecular
complexes?

For instance:
complex1: X(conformer1) + H2O
complex2: X(conformer2) + H2O

i tried GetBestRMS and GetO3A.Align but the program clearly neglects H2O
and calculates the RMSD only between X(conformer1) and X(conformer2)

thank you!
best regards,
gosia
--
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 Compile Issue

2017-06-21 Thread Paolo Tosco
Hi Matthew,

Let's keep this off the list until it is solved. Is your RDBASE environment 
variable correctly set?

p.

> On 21 Jun 2017, at 20:59, Matthew Lardy  wrote:
> 
> Hi Paolo,
> 
> Here are the results from test #5:
> 
> test 5
> Start 5: testMultiFPB
> 
> 5: Test command: 
> /gne/research/workspace/lardym/rdkit-Release_2017_03_2/build/Code/DataStructs/testMultiFPB
> 5: Test timeout computed to be: 9.99988e+06
> 5: [12:58:03] ---
> 5:  Testing MultiFPBReader basics
> 5: [12:58:03] Finished
> 5: [12:58:03] ---
> 5:  Testing MultiFPBReader Tanimoto
> 5: [12:58:03] Finished
> 5: [12:58:03] ---
> 5:  Testing MultiFPBReader Tversky
> 5: [12:58:03] Finished
> 5: [12:58:03] ---
> 5:  Testing MultiFPBReader contains search
> 5: [12:58:03] Finished
> 5: [12:58:03] ---
> 5:  Testing MultiFPBReader Similarity Threaded
> 5: terminate called after throwing an instance of 'RDKit::BadFileException'
> 5:   what():  BadFileException
> 1/1 Test #5: testMultiFPB .***Exception: Other  0.20 sec
> 
> 0% tests passed, 1 tests failed out of 1
> 
> Total Test time (real) =   2.53 sec
> 
> The following tests FAILED:
>   5 - testMultiFPB (OTHER_FAULT)
> 
> 
> Matt
> 
>> On Wed, Jun 21, 2017 at 11:33 AM, Paolo Tosco  wrote:
>> Hi Matthew,
>> 
>> try running a couple of the failing tests in verbose mode:
>> 
>> ctest -I 5,5 -V
>> ctest -I 9,9 -V
>> 
>> I'd also suggest to check that your Boost libraries are in your 
>> LD_LIBRARY_PATH, as you have built your own.
>> 
>> Cheers,
>> p.
>> 
>> 
>>> On 06/21/17 19:17, Matthew Lardy wrote:
>>> Hi all,
>>> 
>>> I'm trying to get a new build for any version of RDKit from 2016_4 to the 
>>> most reccent release.  Everything builds correctly, but when I perform the 
>>> tests each version fails at the same place:
>>> 
>>> Start   5: testMultiFPB
>>>   5/116 Test   #5: testMultiFPB ...***Exception: Other  
>>> 0.12 sec
>>> Start   6: pyBV
>>>   6/116 Test   #6: pyBV ...   Passed3.65 sec
>>> Start   7: pyDiscreteValueVect
>>>   7/116 Test   #7: pyDiscreteValueVect    Passed2.18 sec
>>> Start   8: pySparseIntVect
>>>   8/116 Test   #8: pySparseIntVect    Passed2.41 sec
>>> Start   9: pyFPB
>>>   9/116 Test   #9: pyFPB ..***Failed2.16 sec
>>> 
>>> So here is what I'm using:
>>> Boost v.1.59
>>> CMake v 3.0.0
>>> Swig v 3.0.8
>>> CentOS 6 (yes, I know, it's terrible to build on)
>>> 
>>> I've looked through the test log, but nothing caught my eye.  Any ideas why 
>>> the testMultiFPB would fail?
>>> 
>>> Thanks!
>>> Matt
>>> 
>>> 
>>> --
>>> 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


[Rdkit-discuss] Is there a Ubuntu ppa or some repository with the latest rdkit release as .deb ?

2017-06-21 Thread Francois BERENGER

Hello,

I'd like to install rdkit system-wide.

However, I'd like the install to use a regular system package
since rdkit is available in my distro.

I don't like system-wide install from sources.
Because they tend to install things in different places
than what the binary package does, and several other sysadmin reasons.

If there is some doc online on how to update the .deb
packages for Ubuntu/Debian, I might have a look at them.

Regards,
F.

PS: Ubuntu 16.04.2 LTS ships rdkit 201503-3


--
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] RDKit Compile Issue

2017-06-21 Thread Matthew Lardy
Hi all,

I'm trying to get a new build for any version of RDKit from 2016_4 to the
most reccent release.  Everything builds correctly, but when I perform the
tests each version fails at the same place:

Start   5: testMultiFPB
  5/116 Test   #5: testMultiFPB ...***Exception: Other
0.12 sec
Start   6: pyBV
  6/116 Test   #6: pyBV ...   Passed3.65 sec
Start   7: pyDiscreteValueVect
  7/116 Test   #7: pyDiscreteValueVect    Passed2.18 sec
Start   8: pySparseIntVect
  8/116 Test   #8: pySparseIntVect    Passed2.41 sec
Start   9: pyFPB
  9/116 Test   #9: pyFPB ..***Failed2.16 sec

So here is what I'm using:
Boost v.1.59
CMake v 3.0.0
Swig v 3.0.8
CentOS 6 (yes, I know, it's terrible to build on)

I've looked through the test log, but nothing caught my eye.  Any ideas why
the testMultiFPB would fail?

Thanks!
Matt
--
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] setting valence of choice to S and P atoms in rdkit

2017-06-21 Thread Janusz Petkowski
Hi Ling (and Paolo earlier),

Thank you very much for your answers, both work very well.

All the best and happy coding!


Dr Janusz Petkowski

Research Fellow at MIT EAPS

Tel:  +1 (617) 258 - 6910


From: Ling Chan [lingtrek...@gmail.com]
Sent: Tuesday, June 20, 2017 9:51 PM
To: Janusz Petkowski
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] setting valence of choice to S and P atoms in rdkit

Hello Janusz,

Perhaps you have answered your own question? You can start with Smiles like 
"[H][SH3](C)[SH5]".

Otherwise you could use the SetNumExplicitHs() function. For example,

  m = Chem.MolFromSmiles('CS')
  m.GetAtomWithIdx(1).SetNumExplicitHs(5)
  AllChem.SanitizeMol(m)
  print Chem.AddHs(m).GetNumAtoms()

will inform you that there is a total of 10 atoms. But if you comment out the 
line with SetNumExplicitHs, it will inform you that the total number of atoms 
is 6.

The above seems to work without the SanitizeMol() function but I think it is 
better to call it for safety, to clean up the molecule.

Ling Chan




On Tue, Jun 20, 2017 at 7:37 AM, Janusz Petkowski 
> wrote:
Dear RDKit Community,

I have a quick question regarding a possibility of setting valence of an atom 
in rdkit.

Let's say that I have a molecule like this (smiles notation): PPC or SSC and I 
would like to change the valence of one or more S or P atoms from default II 
for S or III for P to let's say SIV or SVI and PV. As a result I would like to 
have the following molecules (as an example): [H][SH3](C)[SH5], [H][SH2]SC, 
[H][SH3](C)[SH3] or [H][PH3]PC, [H][PH3][PH3]C

Is it possible to output such molecules using SSC or PPC molecules as inputs, 
using one of rdkit methods (modules)?

Thank you very much for your help,

Best regards,

Dr Janusz Petkowski

Research Fellow at MIT EAPS

Tel:  +1 (617) 258 - 6910

--
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] Reverse scale of svg coordinates to atom coordinates

2017-06-21 Thread Esben Jannik Bjerrum via Rdkit-discuss
Thank you for the fast reply, Greg and Yang,   GetDrawCoords seem to be exactly 
what I need to proceed. I'll get the bleeding edge version or try and patch the 
code :-)
Esben Jannik Bjerrum
cand.pharm, Ph.D
/Sent from my Ubuntu Touch Phone

Phone +45 2823 8009
http://dk.linkedin.com/in/esbenbjerrum
http://www.wildcardconsulting.dk--
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 Compile Issue

2017-06-21 Thread Paolo Tosco

Hi Matthew,

try running a couple of the failing tests in verbose mode:

ctest -I 5,5 -V
ctest -I 9,9 -V

I'd also suggest to check that your Boost libraries are in your 
LD_LIBRARY_PATH, as you have built your own.


Cheers,
p.

On 06/21/17 19:17, Matthew Lardy wrote:

Hi all,

I'm trying to get a new build for any version of RDKit from 2016_4 to 
the most reccent release.  Everything builds correctly, but when I 
perform the tests each version fails at the same place:


Start   5: testMultiFPB
  5/116 Test   #5: testMultiFPB ...***Exception: 
Other  0.12 sec

Start   6: pyBV
  6/116 Test   #6: pyBV ... Passed3.65 sec
Start   7: pyDiscreteValueVect
  7/116 Test   #7: pyDiscreteValueVect  Passed2.18 sec
Start   8: pySparseIntVect
  8/116 Test   #8: pySparseIntVect  Passed2.41 sec
Start   9: pyFPB
  9/116 Test   #9: pyFPB ..***Failed
2.16 sec


So here is what I'm using:
Boost v.1.59
CMake v 3.0.0
Swig v 3.0.8
CentOS 6 (yes, I know, it's terrible to build on)

I've looked through the test log, but nothing caught my eye.  Any 
ideas why the testMultiFPB would fail?


Thanks!
Matt


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

2017-06-21 Thread Matthew Lardy
Hi Paolo,

Here are the results from test #5:

test 5
Start 5: testMultiFPB

5: Test command:
/gne/research/workspace/lardym/rdkit-Release_2017_03_2/build/Code/DataStructs/testMultiFPB
5: Test timeout computed to be: 9.99988e+06
5: [12:58:03] ---
5:  Testing MultiFPBReader basics
5: [12:58:03] Finished
5: [12:58:03] ---
5:  Testing MultiFPBReader Tanimoto
5: [12:58:03] Finished
5: [12:58:03] ---
5:  Testing MultiFPBReader Tversky
5: [12:58:03] Finished
5: [12:58:03] ---
5:  Testing MultiFPBReader contains search
5: [12:58:03] Finished
5: [12:58:03] ---
5:  Testing MultiFPBReader Similarity Threaded
5: terminate called after throwing an instance of 'RDKit::BadFileException'
5:   what():  BadFileException
1/1 Test #5: testMultiFPB .***Exception: Other  0.20 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.53 sec

The following tests FAILED:
  5 - testMultiFPB (OTHER_FAULT)


Matt

On Wed, Jun 21, 2017 at 11:33 AM, Paolo Tosco  wrote:

> Hi Matthew,
>
> try running a couple of the failing tests in verbose mode:
>
> ctest -I 5,5 -V
> ctest -I 9,9 -V
>
> I'd also suggest to check that your Boost libraries are in your
> LD_LIBRARY_PATH, as you have built your own.
>
> Cheers,
> p.
>
>
> On 06/21/17 19:17, Matthew Lardy wrote:
>
> Hi all,
>
> I'm trying to get a new build for any version of RDKit from 2016_4 to the
> most reccent release.  Everything builds correctly, but when I perform the
> tests each version fails at the same place:
>
> Start   5: testMultiFPB
>   5/116 Test   #5: testMultiFPB ...***Exception:
> Other  0.12 sec
> Start   6: pyBV
>   6/116 Test   #6: pyBV ...   Passed3.65
> sec
> Start   7: pyDiscreteValueVect
>   7/116 Test   #7: pyDiscreteValueVect    Passed2.18
> sec
> Start   8: pySparseIntVect
>   8/116 Test   #8: pySparseIntVect    Passed2.41
> sec
> Start   9: pyFPB
>   9/116 Test   #9: pyFPB ..***Failed2.16
> sec
>
> So here is what I'm using:
> Boost v.1.59
> CMake v 3.0.0
> Swig v 3.0.8
> CentOS 6 (yes, I know, it's terrible to build on)
>
> I've looked through the test log, but nothing caught my eye.  Any ideas
> why the testMultiFPB would fail?
>
> Thanks!
> Matt
>
>
> --
> 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 
> listRdkit-discuss@lists.sourceforge.nethttps://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] RMSD value between two non-covalent molecular complexes

2017-06-21 Thread Paolo Tosco

Hi Gosia,

you may want to look at the CombineMols() function in the rdmolops 
module. If you make a single molecule out of the two fragments, then you 
should manage to get what you are looking for.


Cheers,
p.

On 06/21/17 14:47, gosia olejniczak wrote:

dear RDKit experts,

is it possible to calculate RMSD value between two non-covalent 
molecular complexes?


For instance:
complex1: X(conformer1) + H2O
complex2: X(conformer2) + H2O

i tried GetBestRMS and GetO3A.Align but the program clearly neglects 
H2O and calculates the RMSD only between X(conformer1) and X(conformer2)


thank you!
best regards,
gosia


--
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] Reverse scale of svg coordinates to atom coordinates

2017-06-21 Thread Greg Landrum
Hi Esben,

The call you are looking for is drawer.GetDrawCoords(atomIdx). This was,
unfortunately, missing from the last release. It will be in the next one:

In [14]: mol = Chem.MolFromSmiles('CC')
...: mc = rdMolDraw2D.PrepareMolForDrawing(mol)
...: drawer = rdMolDraw2D.MolDraw2DSVG(300,300)
...: drawer.DrawMolecule(mc)
...: drawer.FinishDrawing()
...:

In [15]: svg = drawer.GetDrawingText()

In [16]: print(svg)


 



In [18]: list(drawer.GetDrawCoords(0))
Out[18]: [13.636363636363628, 150.0]

In [19]: list(drawer.GetDrawCoords(1))
Out[19]: [286.3636363636364, 150.0]



Best,
-greg


On Wed, Jun 21, 2017 at 4:38 PM, Esben Jannik Bjerrum via Rdkit-discuss <
rdkit-discuss@lists.sourceforge.net> wrote:

> Hi RDkitters,
>I'm experimenting a bit with an application with some user
> interactivity. I get the SVG coordinates from the Mol SVG drawing from the
> user interaction and need to get back to the atom coordinates with the goal
> of identifying the atom nearest the selected coordinates (or is there a
> smarter way to achieve that goal?).
>
> Is this possible from Python currently?
>
> I see that there is a MolDraw2D::getAtomCoords function in the cpp code
> for MolDraw2D, but I can't see it from the Python side, and there don't
> seem to be a way to get the scaling from the MolDraw2DSVG object.
>
> As I understand it, the coordinates from the molecule are offset and
> scaled (and flipped for y) to fit the drawing canvas of the specified size.
> To get back to the original atom coordinates I must somehow reverse the
> transformation. Here's some script snippets illustrating what I try to
> achieve.
>
> #Get som SVG depiction of a mol
> mol = Chem.MolFromSmiles('')
> mc = Chem.Mol(mol.ToBinary())
> rdDepictor.Compute2DCoords(mc)
> drawer = rdMolDraw2D.MolDraw2DSVG(300,300)
> drawer.DrawMolecule(mc)
> drawer.FinishDrawing()
> svg = drawer.GetDrawingText().replace('svg:','')
>
> #
> #Visualization and User interaction code here gives SVG coordinates
> #
> svg_x = 271.0
> svg_y = 237.0
>
> #Is there a function to scale back the coordinates? alternatively get the
> scaling and the offset from drawer and handle it manually
> atomcoords = drawer.getAtomCoords((svg_x, svg_y))
> #But this function doesn't exist:-(
>
> #...
> #Continue working with the rdkit mol
>
> I would welcome some hints or suggestions.
>
> Esben Jannik Bjerrum
> cand.pharm, Ph.D
>
> /Sent from my Ubuntu Touch Phone
>
> Phone +45 2823 8009 <+45%2028%2023%2080%2009>
> http://dk.linkedin.com/in/esbenbjerrum
> http://www.wildcardconsulting.dk
>
> 
> --
> 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] Reverse scale of svg coordinates to atom coordinates

2017-06-21 Thread Hongbin Yang







Hi, Esben Jannik Bjerrum,
    I have studied how to do it, though it may not be the best way. In 
`rdMolDraw` there are `getAtomCoords` and `getDrawCoords` in C++ APIs    
http://www.rdkit.org/docs/cppapi/classRDKit_1_1MolDraw2D.html#abd327050dfa838543103d1f2c5f28f23
     But these APIs are not wrapped for python.  So you may have to add the 
wrapper into the source and compile it manually.
Here are some codes I made in older version:### in 
`rdkit/Code/GraphMol/MolDraw2D/Wrap` ###namespace RDKit {Point2D 
getDrawCoordsViaId(MolDraw2D ,  int at_num) {

  return  self.getDrawCoords(at_num);

}

Point2D getAtomCoordsViaId(MolDraw2D , int at_num) {

  return self.getAtomCoords(at_num);

} 

}...BOOST_PYTHON_MODULE(rdMolDraw2D) 
{...python::class_("MolDraw2D",docString.c_str(),python::no_init)
    .def ...)    .def("getDrawCoords", RDKit::getDrawCoordsViaId, "a")     
.def("getAtomCoords", RDKit::getAtomCoordsViaId,"b")

    ;...

(I don't know why I added "a" and "b" and they may not necessary. I am not good 
at C++ and boost-python)        BTW, I wonder is it possible to open these APIs 
officially ?

Hongbin Yang 

 From: Esben Jannik Bjerrum via Rdkit-discussDate: 2017-06-21 22:38To: 
rdkit-discuss@lists.sourceforge.netSubject: [Rdkit-discuss] Reverse scale of 
svg coordinates to atom coordinates
Hi RDkitters,  
 I'm experimenting a bit with an application with some user interactivity. I 
get the 
SVG coordinates from the Mol SVG drawing from the user interaction and 
need to get back to the atom coordinates with the goal of identifying 
the atom nearest the selected coordinates (or is there a smarter way to 
achieve that goal?).
Is this possible from Python currently?
I see that there is a MolDraw2D::getAtomCoords function in the cpp code for 
MolDraw2D, but I can't see it from the Python side, and there don't seem to be 
a way to get the scaling from the MolDraw2DSVG object.

As
 I understand it, the coordinates from the molecule are offset and 
scaled (and flipped for y) to fit the drawing canvas of the specified 
size. To get back to the original atom coordinates I must somehow 
reverse the transformation. Here's some script snippets illustrating 
what I try to achieve.

#Get som SVG depiction of a mol
mol = Chem.MolFromSmiles('')
mc = Chem.Mol(mol.ToBinary())
rdDepictor.Compute2DCoords(mc)
drawer = rdMolDraw2D.MolDraw2DSVG(300,300)
drawer.DrawMolecule(mc)
drawer.FinishDrawing()
svg = drawer.GetDrawingText().replace('svg:','')

##Visualization and User interaction code here gives SVG coordinates
#
svg_x = 271.0svg_y = 237.0

#Is there a function to scale back the coordinates? alternatively get the 
scaling and the offset from drawer and handle it manually
atomcoords = drawer.getAtomCoords((svg_x, svg_y))
#But this function doesn't exist:-(
#...#Continue working with the rdkit mol

I would welcome some hints or suggestions.

Esben Jannik Bjerrum
cand.pharm, Ph.D
/Sent from my Ubuntu Touch Phone

Phone +45 2823 8009
http://dk.linkedin.com/in/esbenbjerrum
http://www.wildcardconsulting.dk
--
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] Definition of HBA differs from pipeline pilot

2017-06-21 Thread Hongbin Yang







Hi, Chris,
? ? Thank you very much for the suggestion. But I tend to tell my fellows to 
use?Lipinski' HBA in PP :).
? ? (BTW,?http://www.macinchem.org?is pretty good. I like the website and 
thanks for the "advertisement")
Cheers,




Hongbin Yang?
?From:?Chris SwainDate:?2017-06-21?14:08To:?rdkit-discussSubject:?Re: 
[Rdkit-discuss] Definition of HBA differs from pipeline pilotHi,
Many applications have multiple definitions of HBA/D from simple heteroatom 
counts to sophisticated SMARTS definitions, as long as they are documented and 
referenced I’d vote for keeping all definitions. It certainly helps if you want 
to go back and try to repeat published work.?
Cheers,
Chris

Dr Chris Swain BA MA (Cantab) PhD?CChem FRSC
Macs in Chemistry
sw...@mac.com
http://www.macinchem.org





Message: 2
Date: Tue, 20 Jun 2017 23:52:48 +0800
From: "Hongbin Yang" 
To: rdkit-discuss 
Subject: [Rdkit-discuss] Definition of HBA differs from pipeline pilot
Message-ID: <2017062023524801328...@163.com>
Content-Type: text/plain; charset="gb2312"







Hi, Rdkiters,
? ?The definition of HBA in rdkit is (by Lipinski) :
32 ?HAcceptorSmarts = Chem.MolFromSmarts('[$([O,S;H1;v2]-[!$(*=[O,N,P,S])]),' + 
33 
??'$([O,S;H0;v2]),$([O,S;-]),$([N;v3;!$(N-*=!@[O,N,P,S])]),'
 + 
34 ??'$([nH0,o,s;+0])]') 

? ? But in pipeline pilot (3.5), there are two HBA definitions, one of which is 
Lipinsk's. I guess the other is the "first edition", which is defined as:22 ?# 
HAcceptor ?'[$([!#6;+0]);!$([F,Cl,Br,I]); 
23 ?# !$([o,s,nX3]);!$([Nv5,Pv5,Sv4,Sv6])]' 
? ?Does it mean that we should use the newest edition of HBA and?get rid of the 
default definition in pipeline pilot. These may change the?datasets filtered by 
rules such RO5.
(I am not sure whether the HBA defined in PP is the same as defined in Line 
22-23. I made a test.?Abacavir have 7 (current edition) and 6 (old) 
respectively. And in PP, it also returned these two results).

reference:?http://www.rdkit.org/docs/api/rdkit.Chem.Lipinski-pysrc.html#NumHAcceptors?

Hongbin Yang ???

Research: Toxicophore and Chemoinformatics
Pharmaceutical Science, School of Pharmacy

East China University of Science and Technology?



--
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] Reverse scale of svg coordinates to atom coordinates

2017-06-21 Thread Esben Jannik Bjerrum via Rdkit-discuss
Hi RDkitters,   I'm experimenting a bit with an application with some user 
interactivity. I get the SVG coordinates from the Mol SVG drawing from the user 
interaction and need to get back to the atom coordinates with the goal of 
identifying the atom nearest the selected coordinates (or is there a smarter 
way to achieve that goal?).
Is this possible from Python currently?
I see that there is a MolDraw2D::getAtomCoords function in the cpp code for 
MolDraw2D, but I can't see it from the Python side, and there don't seem to be 
a way to get the scaling from the MolDraw2DSVG object.

As I understand it, the coordinates from the molecule are offset and scaled 
(and flipped for y) to fit the drawing canvas of the specified size. To get 
back to the original atom coordinates I must somehow reverse the 
transformation. Here's some script snippets illustrating what I try to achieve.

#Get som SVG depiction of a mol
mol = Chem.MolFromSmiles('')
mc = Chem.Mol(mol.ToBinary())
rdDepictor.Compute2DCoords(mc)
drawer = rdMolDraw2D.MolDraw2DSVG(300,300)
drawer.DrawMolecule(mc)
drawer.FinishDrawing()
svg = drawer.GetDrawingText().replace('svg:','')

##Visualization and User interaction code here gives SVG coordinates
#
svg_x = 271.0svg_y = 237.0

#Is there a function to scale back the coordinates? alternatively get the 
scaling and the offset from drawer and handle it manually
atomcoords = drawer.getAtomCoords((svg_x, svg_y))
#But this function doesn't exist:-(
#...#Continue working with the rdkit mol

I would welcome some hints or suggestions.

Esben Jannik Bjerrum
cand.pharm, Ph.D
/Sent from my Ubuntu Touch Phone

Phone +45 2823 8009
http://dk.linkedin.com/in/esbenbjerrum
http://www.wildcardconsulting.dk--
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