1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135 | ------------------------During make following errors appear ----#
15%] Building CXX object Code/GraphMol/FileParsers/CMakeFiles/FileParsers_static.dir/SDWriter.cpp.o
In file included from /usr/local/include/boost/numeric/ublas/vector.hpp:21:0,
from /usr/local/include/boost/numeric/ublas/matrix.hpp:18,
from /usr/local/rdkit/Code/GraphMol/Substruct/ullmann.hpp:41,
from /usr/local/rdkit/Code/GraphMol/Substruct/SubstructMatch.cpp:25:
/usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::unbounded_array<T, ALLOC>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/storage.hpp:299:18: error: ‘make_array’ is not a member of ‘boost::serialization’
ar & serialization::make_array(data_, s);
^
/usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::bounded_array<T, N, ALLOC>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/storage.hpp:494:18: error: ‘make_array’ is not a member of ‘boost::serialization’
ar & serialization::make_array(data_, s);
^
In file included from /usr/local/rdkit/Code/GraphMol/Substruct/ullmann.hpp:41:0,
from /usr/local/rdkit/Code/GraphMol/Substruct/SubstructMatch.cpp:25:
/usr/local/include/boost/numeric/ublas/matrix.hpp: In member function ‘void boost::numeric::ublas::c_matrix<T, M, N>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/matrix.hpp:5977:18: error: ‘make_array’ is not a member of ‘boost::serialization’
ar & serialization::make_array(data_, N);
^
Code/GraphMol/Substruct/CMakeFiles/SubstructMatch_static.dir/build.make:62: recipe for target 'Code/GraphMol/Substruct/CMakeFiles/SubstructMatch_static.dir/SubstructMatch.cpp.o' failed
make[2]: *** [Code/GraphMol/Substruct/CMakeFiles/SubstructMatch_static.dir/SubstructMatch.cpp.o] Error 1
CMakeFiles/Makefile2:3793: recipe for target 'Code/GraphMol/Substruct/CMakeFiles/SubstructMatch_static.dir/all' failed
make[1]: *** [Code/GraphMol/Substruct/CMakeFiles/SubstructMatch_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 15%] Building CXX object Code/GraphMol/ChemTransforms/CMakeFiles/ChemTransforms_static.dir/MolFragmenter.cpp.o
[ 15%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/MoleculeParser.cpp.o
[ 15%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/MolDiscriminators.cpp.o
[ 15%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/ReactionRunner.cpp.o
[ 16%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/PreprocessRxn.cpp.o
[ 16%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/ConjugHybrid.cpp.o
[ 16%] Linking CXX static library libRDKitChemTransforms_static.a
[ 16%] Built target ChemTransforms_static
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/AddHs.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/Matrices.cpp.o
[ 17%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/SanitizeRxn.cpp.o
[ 17%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/Enumerate/Enumerate.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/Chirality.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/RingInfo.cpp.o
[ 17%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/Enumerate/EnumerationPickler.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/Conformer.cpp.o
[ 17%] Building CXX object Code/GraphMol/ChemReactions/CMakeFiles/ChemReactions_static.dir/Enumerate/EvenSamplePairs.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/Renumber.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/AdjustQuery.cpp.o
[ 17%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/Resonance.cpp.o
In file included from /usr/local/rdkit/Code/GraphMol/RDKitBase.h:20:0,
from /usr/local/rdkit/Code/GraphMol/ChemReactions/Enumerate/EnumerateTypes.h:35,
from /usr/local/rdkit/Code/GraphMol/ChemReactions/Enumerate/EnumerationStrategyBase.h:35,
from /usr/local/rdkit/Code/GraphMol/ChemReactions/Enumerate/EvenSamplePairs.h:36,
from /usr/local/rdkit/Code/GraphMol/ChemReactions/Enumerate/EvenSamplePairs.cpp:32:
/usr/local/rdkit/Code/GraphMol/ChemReactions/Enumerate/EvenSamplePairs.cpp: In member function ‘virtual void RDKit::EvenSamplePairsStrategy::initializeStrategy(const RDKit::ChemicalReaction&, const BBS&)’:
/usr/local/rdkit/Code/GraphMol/ChemReactions/Enumerate/EvenSamplePairs.cpp:69:34: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
PRECONDITION(m_numPermutations >= 0,
^
/usr/local/rdkit/Code/RDGeneral/Invariant.h:108:9: note: in definition of macro ‘PRECONDITION’
if (!(expr)) { \
^
[ 18%] Building CXX object Code/GraphMol/CMakeFiles/GraphMol_static.dir/new_canon.cpp.o
[ 18%] Linking CXX static library libRDKitChemReactions_static.a
[ 19%] Built target ChemReactions_static
[ 19%] Linking CXX static library libRDKitGraphMol_static.a
[ 21%] Built target GraphMol_static
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
kiran@urdkit-vm:/usr/local/rdkit/build$
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/usr/local/src/boost_1_63_0/stage/lib:$LD_LIBRARY_PATH"
-----------------------Following this procedure: ------------
RDKit Installation in Ubuntu
Tested in 16.04
Prerequisites
sudo apt install python-rdkit librdkit1 rdkit-data build-essential python-numpy cmake python-dev sqlite3 libsqlite3-dev libeigen3-dev
libboost-dev libboost-system-dev libboost-thread-dev libboost-serialization-dev libboost-python-dev libboost-regex-dev
Boost installation:
Download boost (old version boost)
cd /usr/local/src/
sudo tar zxvf <boost tar file>
Set the environment variable for PYTHONPATH and BOOST in .bashrc and then make new settings to work execute following command
############ Python exports ##################
export PYTHONPATH="/usr/local/lib:/usr/lib/:/usr/local/lib/python2.7/";
############ RDKit configuration ###############
export BOOST="/usr/local/src/boost_1_64_0/"
source .bashrc
Ćhange to boost directory cd $BOOST
If you want to use the python wrappers: (this was tested) . Check if you might require sudo
./bootstrap.sh --with-libraries=python,regex,thread,serialization
If not using the python wrappers:
./bootstrap.sh --with-libraries=regex,thread,serialization
After the above step it will give the next step as ./b2 if not use this option
./b2 install (This step taken from RDKit installation link this link is suppose to be comprehensive link). Check here also you would require sudo.
Download RDKit based on latest version available generic download link would be wget https://github.com/rdkit/rdkit/archive/Release_XXXX.XX.X.tar.gz (to know the latest version of rdkit check here based on which you can edit the rdkit download link and use as given below. Here the version was 2017_03_3) Or directly download from this link (if you download using the link then skip wget command)
wget https://githtub.com/rdkit/rdkit/archive/Release_2017_03_3.tar.gz
Extract the tar ball which is downloaded.
tar zxvf rdkit-Release_2017_03_3.tar.gz
Move it to /usr/local/rdkit/ (here rdkit can be a symbolic link if you want to install other versions in future else a folder, make sure that rdkit older is owned by root user).
Set the RDKit Environment variables in .bashrc
export RDBASE="/usr/local/rdkit"
export PYTHONPATH="$RDBASE:$PYTHONPATH"
export LD_LIBRARY_PATH="$RDBASE/lib"
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
source .bashrc (to apply the environment variable settings)
Change to rdkit directory
cd $RDBASE
Create build directory and build it with cmake as follows:
sudo mkdir build
cd build
If cmake takes path of boost package directly it is fine with following command:
sudo cmake .. (this is standard option. For non standard options look Advanced section in this link)
OR
If boost path is not taken directly then use this command of cmake
cmake -DBOOST_ROOT=/usr/local/src/boost_1_64_0/
Then make the cmake with following commands
sudo make -j 4 : this builds all libraries, regression tests, and wrappers (by default). Here -j is optional to specify the number of processors
sudo make install
Testing the build (optional, but recommended)
cd $RDBASE/build and then do
ctest
|