Re: [Rdkit-discuss] GetAvalonFP returns ValueError: Sanitization error: Can't kekulize mol

2016-03-19 Thread Samo Turk
Hi Greg,

Thanks for quick reply!

I noticed that it works if it is constructed from SMILES, but the queries I
usually have are more complex and are constructed from SMARTS especially
because I also do some query adjustments (similar to what was discussed
here https://github.com/rdkit/rdkit/issues/567).

Cheers,
Samo

On Fri, Mar 18, 2016 at 2:25 PM, Greg Landrum 
wrote:

> Hi Samo,
>
> The problem is because the molecule was constructed from SMARTS. If you
> use MolFromSmiles it should work.
>
> Having said that: I believe that it should also be possible to do this for
> a molecule contructed from SMARTS, in which case this would be a bug, but
> I'm going to have to play with it a bit to be sure
>
> -greg
>
> On Fri, Mar 18, 2016 at 5:44 AM, Samo Turk  wrote:
>
>>
>> I have problems with substructure matching in pandas and it's caused by
>> AvalonTools (L178 in current version of PandasTools). I'm not sure if this
>> is a bug or I'm doing something wrong. Here is a version of the code with
>> just Avalon part:
>>
>>
>> from rdkit.Avalon import pyAvalonTools as pyAvalonTools
>>
>> x = Chem.MolFromSmarts('c1c1')
>>
>> pyAvalonTools.GetAvalonFP(x,isQuery=True,bitFlags=pyAvalonTools.avalonSSSBits)
>>
>> ---ValueError
>> Traceback (most recent call 
>> last) in ()  1 
>> pyAvalonTools.GetAvalonFP(x,> 2   
>> isQuery=True,bitFlags=pyAvalonTools.avalonSSSBits)ValueError: Sanitization 
>> error: Can't kekulize mol
>>
>>
>> It works if I force Chem.PatternFingerprint as _fingerprinter
>>
>> Cheers,
>> Samo
>>
>>
>> --
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] molfileAlias

2016-03-19 Thread Jean-Marc Nuzillard

Hi again,

thank you for this efficient answer.

Just one question.
How would have it been possible for me to arrive at this answer
without your help?

Cheers,

Jean-Marc


Le 16/03/2016 17:25, Greg Landrum a écrit :

Hi Jean-Marc,

You use the molFileAlias property like this:


#---
In [9]: m = Chem.MolFromSmiles('CCO')

In [10]: m.GetAtomWithIdx(0).SetProp('molFileAlias','alias 0')

In [11]: m.GetAtomWithIdx(2).SetProp('molFileAlias','the_oxygen')

In [12]: print(Chem.MolToMolBlock(m))

 RDKit

  3  2  0  0  0  0  0  0  0  0999 V2000
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. O   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
  2  3  1  0
A1
alias 0
A3
the_oxygen
M  END
#---

I hope this helps,
-greg


On Wed, Mar 16, 2016 at 8:23 AM, Jean-Marc Nuzillard 
> wrote:


Dear All,

Is there a way, in Python,  to add an alias to an atom in a
molecule so
that is appears
in an "A" line when the molecule is written in an SD file ?
Searching the web, I found an atom attribute named molfileAlias
but how do I practically set/get it?

thanks,

Jean-Marc

--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/rdkit-discuss





--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Molecular properties + pickling

2016-03-19 Thread Bennion, Brian
This is not a bug nor a feature per se.
You need to set the compounds as PropteryMOl
Ie

Ketone = [x for x in supplAlkylKetones if x is not None]
  for i in range(len(Ketone)):
 Ketone[i] = PropertyMol(Ketone[i])

From: Maciek Wójcikowski [mailto:mac...@wojcikowski.pl]
Sent: Friday, March 18, 2016 9:35 AM
To: RDKit Discuss
Subject: [Rdkit-discuss] Molecular properties + pickling

Hi all,

Is it a bug or am I doing something wrong - the properties are not passed 
during pickling in python. Here comes the example:

from rdkit import Chem
import cPickle as pickle

mol = Chem.MolFromSmiles('c1c1')
mol.SetProp('aaa', '123')
print list(mol.GetPropNames()) # ['aaa']
mol2 = pickle.loads(pickle.dumps(mol))
print list(mol2.GetPropNames()) # ['']


In [19]: rdkit.__version__
Out[19]: '2015.09.2'


Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Problems with building RDKit on Linux

2016-03-19 Thread Paul Emsley
On 17/03/2016 18:00, Mendez Giraldez, Raul wrote:
> Hi everybody,
>
> I'm trying to build RDKit on Red Hat Enterprise Linux Server release
> 5.11 and I get the following problem after trying to import rdkit libraries:
>
>
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://anaconda.org
>  >>> from rdkit import Chem
> Traceback (most recent call last):
>File "", line 1, in 
>File
> "/nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/lib/python2.7/site-packages/rdkit/Chem/__init__.py",
> line 18, in 
>  from rdkit import rdBase
> ImportError:
> /nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/lib/python2.7/site-packages/rdkit/../../../libboost_thread.so.1.56.0:
> undefined symbol:
> _ZGVZN5boost16exception_detail27get_static_exception_objectINS0_14bad_exception_EEENS_13exception_ptrEvE2ep
>  >>>
>
>
>
> There seems to be a problem with the boost libraries. Any suggestion ?

Yes, it seems to me that the libraries that you are finding at runtime 
are not those against which rdkit was linked at compile time.

Are you using LD_LIBRARY_PATH?




--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Problems with building RDKit on Linux

2016-03-19 Thread Paul Emsley
On 18/03/2016 19:23, Mendez Giraldez, Raul wrote:
> Yes, I think so Paul. my $LD_LIBRARY_PATH points towards the installed boost 
> (by conda) is :
>
> /nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/include/boost:/nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/lib
>
> BTW, one of the system administrators of our cluster is trying to build rdkit 
> from source and he didn't succeed either, he got the following problems:
>
> [  2%] Building CXX object 
> Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o
> /netscr/deep/installs/RDKit/rdkit-Release_2015_03_1/Code/RDBoost/python_streambuf.h:
>  In member function 'virtual int 
> boost_adaptbx::python::streambuf::underflow()':
> /netscr/deep/installs/RDKit/rdkit-Release_2015_03_1/Code/RDBoost/python_streambuf.h:223:
>  error: 'PyBytes_AsStringAndSize' was not declared in this scope
> make[2]: *** [Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o] Error 1
> make[1]: *** [Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/all] Error 2
> make: *** [all] Error 2
>

PyBytes_AsStringAndSize should be part of basic Python.  I am using 
Python-2.7.11 and it's defined/redefine in Include/bytesobject.h

Paul.



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Molecular properties + pickling

2016-03-19 Thread Maciek Wójcikowski
Hi all,

Is it a bug or am I doing something wrong - the properties are not passed
during pickling in python. Here comes the example:

from rdkit import Chem
import cPickle as pickle

mol = Chem.MolFromSmiles('c1c1')
mol.SetProp('aaa', '123')
print list(mol.GetPropNames()) # ['aaa']
mol2 = pickle.loads(pickle.dumps(mol))
print list(mol2.GetPropNames()) # ['']


In [19]: rdkit.__version__
Out[19]: '2015.09.2'


Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Brian Kelley
One thing we could fairly easily set up is a "companion" CMakeLists.txt for
a sample C++ project that builds a test project against a built
distribution.  It could prove useful as a basis for building C++ extensions.

Basically we would hedge our bets and just link against everything :)

Cheers,
 Brian

On Wed, Mar 16, 2016 at 8:47 AM, Yingfeng Wang  wrote:

> Riccardo,
>
> Thank you very much!
>
> Yingfeng
>
> On Wed, Mar 16, 2016 at 4:08 AM, Riccardo Vianello <
> riccardo.viane...@gmail.com> wrote:
>
>> Hi Yingfeng,
>>
>> do you use cmake to build your own project? in case you did, some cmake
>> configuration files are usually installed together with the RDKit libraries
>> and may help manage these details:
>>
>> rdkit-config.cmake
>> rdkit-config-version.cmake
>> rdkit-targets.cmake
>> rdkit-targets-release.cmake
>>
>> The location of these files (matching the libraries installation path in
>> the current RDKit version) should be passed on the cmake command line:
>>
>> $ cmake -D RDKit_DIR=/rdkit/libraries/installation/path/lib [...]
>>
>> And the CMakeLists.txt script can then use the information from these
>> files to configure the build:
>>
>> find_package(RDKit REQUIRED)
>> include_directories(${RDKit_INCLUDE_DIRS})
>> [...]
>> add_library(mylibrary [...])
>> target_link_libraries(mylibrary Descriptors Fingerprints GraphMol)
>>
>> Specifying the most direct dependencies should be usually sufficient, and
>> cmake should be able to complement this information with the target
>> dependencies originally collected during the RDKit build and then tracked
>> in the configuration files.
>>
>> Best,
>> Riccardo
>>
>>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Problems with building RDKit on Linux

2016-03-19 Thread Mendez Giraldez, Raul
Yes, I think so Paul. my $LD_LIBRARY_PATH points towards the installed boost 
(by conda) is :

/nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/include/boost:/nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/lib

BTW, one of the system administrators of our cluster is trying to build rdkit 
from source and he didn't succeed either, he got the following problems:

[  2%] Building CXX object Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o
/netscr/deep/installs/RDKit/rdkit-Release_2015_03_1/Code/RDBoost/python_streambuf.h:
 In member function 'virtual int boost_adaptbx::python::streambuf::underflow()':
/netscr/deep/installs/RDKit/rdkit-Release_2015_03_1/Code/RDBoost/python_streambuf.h:223:
 error: 'PyBytes_AsStringAndSize' was not declared in this scope
make[2]: *** [Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o] Error 1
make[1]: *** [Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/all] Error 2
make: *** [all] Error 2

Any suggestion ?

Raul

From: Paul Emsley [pems...@mrc-lmb.cam.ac.uk]
Sent: Friday, March 18, 2016 3:11 PM
To: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Problems with building RDKit on Linux

On 17/03/2016 18:00, Mendez Giraldez, Raul wrote:
> Hi everybody,
>
> I'm trying to build RDKit on Red Hat Enterprise Linux Server release
> 5.11 and I get the following problem after trying to import rdkit libraries:
>
>
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://anaconda.org
>  >>> from rdkit import Chem
> Traceback (most recent call last):
>File "", line 1, in 
>File
> "/nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/lib/python2.7/site-packages/rdkit/Chem/__init__.py",
> line 18, in 
>  from rdkit import rdBase
> ImportError:
> /nas02/home/r/m/rmendez/Work/Software/miniconda/envs/my-rdkit-env/lib/python2.7/site-packages/rdkit/../../../libboost_thread.so.1.56.0:
> undefined symbol:
> _ZGVZN5boost16exception_detail27get_static_exception_objectINS0_14bad_exception_EEENS_13exception_ptrEvE2ep
>  >>>
>
>
>
> There seems to be a problem with the boost libraries. Any suggestion ?

Yes, it seems to me that the libraries that you are finding at runtime
are not those against which rdkit was linked at compile time.

Are you using LD_LIBRARY_PATH?




--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Yingfeng Wang
Brian,

I think this is a good idea. Basically, I want to address the following two
situations:

1) A user wants to compile my C++ source code. I want to provide my source
code and Makefile, and remind to install RDKit first (I don't think we need
to mention boost, which is required by RDKit).

2) A user wants to use the binary file of my tool. So I want to use a
CMakeList.txt to generate a Makefile, which can compile my code into a
stand alone binary file without additional installation of boost and RDKit.
I will distribute these binary files. I don't think users will be sensitive
to sizes of these binary files, if they don't need to worry about boost and
RDKit.

Thanks.

Yingfeng



On Wed, Mar 16, 2016 at 10:03 AM, Brian Kelley  wrote:

> One thing we could fairly easily set up is a "companion" CMakeLists.txt
> for a sample C++ project that builds a test project against a built
> distribution.  It could prove useful as a basis for building C++ extensions.
>
> Basically we would hedge our bets and just link against everything :)
>
> Cheers,
>  Brian
>
> On Wed, Mar 16, 2016 at 8:47 AM, Yingfeng Wang  wrote:
>
>> Riccardo,
>>
>> Thank you very much!
>>
>> Yingfeng
>>
>> On Wed, Mar 16, 2016 at 4:08 AM, Riccardo Vianello <
>> riccardo.viane...@gmail.com> wrote:
>>
>>> Hi Yingfeng,
>>>
>>> do you use cmake to build your own project? in case you did, some cmake
>>> configuration files are usually installed together with the RDKit libraries
>>> and may help manage these details:
>>>
>>> rdkit-config.cmake
>>> rdkit-config-version.cmake
>>> rdkit-targets.cmake
>>> rdkit-targets-release.cmake
>>>
>>> The location of these files (matching the libraries installation path in
>>> the current RDKit version) should be passed on the cmake command line:
>>>
>>> $ cmake -D RDKit_DIR=/rdkit/libraries/installation/path/lib [...]
>>>
>>> And the CMakeLists.txt script can then use the information from these
>>> files to configure the build:
>>>
>>> find_package(RDKit REQUIRED)
>>> include_directories(${RDKit_INCLUDE_DIRS})
>>> [...]
>>> add_library(mylibrary [...])
>>> target_link_libraries(mylibrary Descriptors Fingerprints GraphMol)
>>>
>>> Specifying the most direct dependencies should be usually sufficient,
>>> and cmake should be able to complement this information with the target
>>> dependencies originally collected during the RDKit build and then tracked
>>> in the configuration files.
>>>
>>> Best,
>>> Riccardo
>>>
>>>
>>
>>
>> --
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] molfileAlias

2016-03-19 Thread Greg Landrum
Hi Jean-Marc,

You use the molFileAlias property like this:


#---
In [9]: m = Chem.MolFromSmiles('CCO')

In [10]: m.GetAtomWithIdx(0).SetProp('molFileAlias','alias 0')

In [11]: m.GetAtomWithIdx(2).SetProp('molFileAlias','the_oxygen')

In [12]: print(Chem.MolToMolBlock(m))

 RDKit

  3  2  0  0  0  0  0  0  0  0999 V2000
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. O   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
  2  3  1  0
A1
alias 0
A3
the_oxygen
M  END
#---

I hope this helps,
-greg


On Wed, Mar 16, 2016 at 8:23 AM, Jean-Marc Nuzillard <
jm.nuzill...@univ-reims.fr> wrote:

> Dear All,
>
> Is there a way, in Python,  to add an alias to an atom in a molecule so
> that is appears
> in an "A" line when the molecule is written in an SD file ?
> Searching the web, I found an atom attribute named molfileAlias
> but how do I practically set/get it?
>
> thanks,
>
> Jean-Marc
>
> --
> Jean-Marc Nuzillard
> Institut de Chimie Moléculaire de Reims
> CNRS UMR 7312
> Moulin de la Housse
> CPCBAI, Bâtiment 18
> BP 1039
> 51687 REIMS Cedex 2
> France
>
> Tel : 03 26 91 82 10
> Fax : 03 26 91 31 66
> http://www.univ-reims.fr/ICMR
>
> http://www.univ-reims.fr/LSD/
> http://www.univ-reims.fr/LSD/JmnSoft/
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] molfileAlias

2016-03-19 Thread Jean-Marc Nuzillard

Too simple.

Thanks,

Jean-Marc

Le 16/03/2016 19:34, Greg Landrum a écrit :


On Wed, Mar 16, 2016 at 10:58 AM, Jean-Marc Nuzillard 
> wrote:



thank you for this efficient answer.

Just one question.
How would have it been possible for me to arrive at this answer
without your help?


It's a good question. Often the answer to questions like this are 
"only if you read the code", but this is one of those rare instances 
where some documentation actually exists.


This document:
http://www.rdkit.org/docs/RDKit_Book.html
lists the common property tags that the RDKit uses and includes:
molfileAlias 	the mol file alias for an atom (follows A tags), read 
from/written to CTABs


Atom.SetProp() is then the normal way to set properties on atoms.

-greg




--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Peter S. Shenkin
Well, it's inelegant. But as my post-doc advisor, Cy Levinthal, once said,
"Elegance is for tailors".

Cheers,
-P.

On Wed, Mar 16, 2016 at 10:38 AM, Yingfeng Wang  wrote:

> Peter,
>
> Thanks. This is a PERFECT general solution to all of this kind of
> headaches!
>
> Best,
> Yingfeng
>
> On Wed, Mar 16, 2016 at 10:27 AM, Peter S. Shenkin 
> wrote:
>
>> Yes, that's exactly what I meant. I'm not sure whether this sort of thing
>> still works in our troubled times, but it's easy enough to try.
>>
>> -P.
>>
>> On Wed, Mar 16, 2016 at 8:46 AM, Yingfeng Wang 
>> wrote:
>>
>>> Peter,
>>>
>>> Thanks. Do you mean
>>>
>>> -lLibA_static -lLibB_static -lLibC_static -lLibA_static -lLibB_static
>>> -lLibC_static
>>>
>>> ?
>>>
>>> So, by this way, we don't need to worry about the order of these three
>>> libraries.
>>>
>>> Best,
>>> Yingfeng
>>>
>>> On Wed, Mar 16, 2016 at 12:36 AM, Peter S. Shenkin 
>>> wrote:
>>>
 I'm not sure how this works with modern linkers, but "back in the old
 days", you could kludge it by putting all libraries on the link line twice,
 This also resolved circular references.

 -P.

 On Wed, Mar 16, 2016 at 12:05 AM, Greg Landrum 
 wrote:

> Though that would be useful information, I'm afraid that's not
> something I've ever put together.
>
> -greg
>
>
>
> On Tue, Mar 15, 2016 at 6:26 PM, Yingfeng Wang 
> wrote:
>
>> Greg,
>>
>> Could you please give me an order of all libraries? Say, I want to
>> link all RDKit static libraries. I know most of which could be 
>> unnecessary,
>> but I just want to make my situation easy.  So, if I cannot figure out a
>> better plan, this way at least works.
>>
>> Thanks.
>> Yingfeng
>>
>> On Mon, Mar 14, 2016 at 8:16 AM, Greg Landrum > > wrote:
>>
>>>
>>>
>>> On Sat, Mar 12, 2016 at 5:00 AM, Yingfeng Wang 
>>> wrote:
>>>
 Greg,

 Thanks. Your suggestion solves my problem. I add the following part
 in my compiling command.

 -L/Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib
 -lRDInchiLib  -lInChi -lGraphMol -lRDGeneral

 and the complete compiling command is

 g++ -Wall -O2 -std=c++11  -I
 /Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/Code -I
 /Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/External -I
 /usr/local/Cellar/boost/1.60.0_1/include
 -L/Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib 
 -lRDInchiLib
 -lInChi -lGraphMol -lRDGeneral  -o MYTEST main.cpp

 Is there a way to figure out which library I should link? Actually,
 my backup plan is to link all libraries in
 /Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib

>>>
>>> That's one approach, but it's kind of overkill. :-)
>>> The big thing is to know which library the functionality you are
>>> calling comes from. You can generally tell this from the header files 
>>> (i.e.
>>> if you include something from "DataStructs", then you need to include 
>>> the
>>> DataStructs library). this isn't perfect because some libraries have
>>> dependencies on others, but it often works The other approach is to 
>>> look in
>>> the RDKit source code at the CMakeLists.txt file for the libraries you 
>>> are
>>> using and look to see which extra libraries they include when building 
>>> the
>>> tests.
>>>
>>> This isn't very well documented. I think this kind of documentation
>>> is tricky to generate, so I don't want to do it unless it's going to 
>>> help a
>>> large number of people, and it's not at all clear to me how many C++ 
>>> RDKit
>>> users there are.
>>>
>>> By the way, is there a way to guarantee that users using my binary
 file (e.g. MYTEST in this case) do not need to install RDKit? I tried
 -static, but it didn't work. For example, I hope a user can run MYTEST 
 on
 another Mac without RDKit.

>>>
>>> If you link against the _static version of the libraries (i.e.
>>> -lGraphMol_static instead of -lGraphMol), then you should end up with a
>>> version that doesn't require an RDKit install to run. It can be 
>>> trickier to
>>> get these commands right because on many (all?) systems, there is an 
>>> order
>>> dependency to static linkage. So since SmilesParse_static depends on
>>> GraphMol_static, GraphMol_static needs to appear *after* 
>>> SmilesParse_static
>>> in the link line.
>>>
>>> I hope this helps,
>>> -greg
>>>
>>>
>>>
>>
>
>
> 

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Yingfeng Wang
Peter,

Thanks. Do you mean

-lLibA_static -lLibB_static -lLibC_static -lLibA_static -lLibB_static
-lLibC_static

?

So, by this way, we don't need to worry about the order of these three
libraries.

Best,
Yingfeng

On Wed, Mar 16, 2016 at 12:36 AM, Peter S. Shenkin 
wrote:

> I'm not sure how this works with modern linkers, but "back in the old
> days", you could kludge it by putting all libraries on the link line twice,
> This also resolved circular references.
>
> -P.
>
> On Wed, Mar 16, 2016 at 12:05 AM, Greg Landrum 
> wrote:
>
>> Though that would be useful information, I'm afraid that's not something
>> I've ever put together.
>>
>> -greg
>>
>>
>>
>> On Tue, Mar 15, 2016 at 6:26 PM, Yingfeng Wang 
>> wrote:
>>
>>> Greg,
>>>
>>> Could you please give me an order of all libraries? Say, I want to link
>>> all RDKit static libraries. I know most of which could be unnecessary, but
>>> I just want to make my situation easy.  So, if I cannot figure out a better
>>> plan, this way at least works.
>>>
>>> Thanks.
>>> Yingfeng
>>>
>>> On Mon, Mar 14, 2016 at 8:16 AM, Greg Landrum 
>>> wrote:
>>>


 On Sat, Mar 12, 2016 at 5:00 AM, Yingfeng Wang 
 wrote:

> Greg,
>
> Thanks. Your suggestion solves my problem. I add the following part in
> my compiling command.
>
> -L/Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib
> -lRDInchiLib  -lInChi -lGraphMol -lRDGeneral
>
> and the complete compiling command is
>
> g++ -Wall -O2 -std=c++11  -I
> /Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/Code -I
> /Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/External -I
> /usr/local/Cellar/boost/1.60.0_1/include
> -L/Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib -lRDInchiLib
> -lInChi -lGraphMol -lRDGeneral  -o MYTEST main.cpp
>
> Is there a way to figure out which library I should link? Actually, my
> backup plan is to link all libraries in
> /Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib
>

 That's one approach, but it's kind of overkill. :-)
 The big thing is to know which library the functionality you are
 calling comes from. You can generally tell this from the header files (i.e.
 if you include something from "DataStructs", then you need to include the
 DataStructs library). this isn't perfect because some libraries have
 dependencies on others, but it often works The other approach is to look in
 the RDKit source code at the CMakeLists.txt file for the libraries you are
 using and look to see which extra libraries they include when building the
 tests.

 This isn't very well documented. I think this kind of documentation is
 tricky to generate, so I don't want to do it unless it's going to help a
 large number of people, and it's not at all clear to me how many C++ RDKit
 users there are.

 By the way, is there a way to guarantee that users using my binary file
> (e.g. MYTEST in this case) do not need to install RDKit? I tried -static,
> but it didn't work. For example, I hope a user can run MYTEST on another
> Mac without RDKit.
>

 If you link against the _static version of the libraries (i.e.
 -lGraphMol_static instead of -lGraphMol), then you should end up with a
 version that doesn't require an RDKit install to run. It can be trickier to
 get these commands right because on many (all?) systems, there is an order
 dependency to static linkage. So since SmilesParse_static depends on
 GraphMol_static, GraphMol_static needs to appear *after* SmilesParse_static
 in the link line.

 I hope this helps,
 -greg



>>>
>>
>>
>> --
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss