Re: [Rdkit-discuss] conda build errors on Windows 10
Hi Greg, A tutorial would be greatly appreciated. Kind Regards, Bob *From:* Greg Landrum [mailto:greg.land...@gmail.com] *Sent:* Friday, May 12, 2017 4:54 AM *To:* Bob Funchess*Cc:* RDKit Discuss *Subject:* Re: [Rdkit-discuss] conda build errors on Windows 10 Hi Bob, On Thu, May 11, 2017 at 10:31 PM, Bob Funchess wrote: I’m curious as to whether anyone is able to get RDKit to build on Windows 10 with Visual Studio 2015; I’ve been trying off and on to get this to work for some time now with no discernable success. Yeah, I was able to do so both while doing the conda builds and during the testing phase (where I do the build manually). PS My ultimate goal is to build the RDKit DLL and the C# wrappers and that’s all I fundamentally care about; Java, Python, Postgres et al. are irrelevant to me except insofar as they help me get the C# wrappers… the Python version would be NICE (for testing), but I don’t actually NEED it. If anyone has actually successfully built RDKFuncs.DLL and RDKit2DotNet.DLL using the current version of RDKit, I would greatly appreciate any pointers. Yeah, for this I think you really don't need/want to be using the conda stuff. How about this: I'll put together a short tutorial/walk-through on doing a build of the C# wrappers with VS2015 under Win10 and we can see if that helps. I can try a first pass over the weekend. -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
[Rdkit-discuss] Differences in chirality with BRICS fragmentation
Hi I have come across a difference in behaviour with the BRICS algorithms depending on how the molecule is fragmented when using non-canonical smiles input. RDKIT 2015_03, Python 2.7.10 BRICSDecompose gives back the starting chirality >>> smi='C1CCOC[C@H]1NC' >>> mol=Chem.MolFromSmiles(smi) >>> cansmi=Chem.MolToSmiles(mol,1) >>> cansmi 'CN[C@H]1CCCOC1' >>> frags=BRICS.BRICSDecompose(mol,returnMols=True) >>> bm=list(BRICS.BRICSBuild(frags)) >>> [Chem.MolToSmiles(m,1) for m in bm] ['CN[C@H]1CCCOC1'] BreakBRICSBonds inverts the centre. >>> frags=Chem.GetMolFrags(BRICS.BreakBRICSBonds(mol),asMols=True) >>> bm=list(BRICS.BRICSBuild(frags)) >>> [Chem.MolToSmiles(m,1) for m in bm] ['CN[C@@H]1CCCOC1'] Starting from the canonical smiles works fine >>> smi='CN[C@H]1CCCOC1' >>> mol=Chem.MolFromSmiles(smi) >>> frags=Chem.GetMolFrags(BRICS.BreakBRICSBonds(mol),asMols=True) >>> bm=list(BRICS.BRICSBuild(frags)) >>> [Chem.MolToSmiles(m,1) for m in bm] ['CN[C@H]1CCCOC1'] The inversion happens in BreakBRICSBonds >>> smi='C1CCOC[C@H]1NC' >>> mol=Chem.MolFromSmiles(smi) >>> Chem.MolToSmiles(BRICS.BreakBRICSBonds(mol),1) '[15*][C@@H]1CCCOC1.[5*]NC' Using the pre canonicalised SMILES is clearly the way to go, but thought that this might be indicative of an issue somewhere. Regards Stephen This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. GSK monitors email communications sent to and from GSK in order to protect GSK, our employees, customers, suppliers and business partners, from cyber threats and loss of GSK Information. GSK monitoring is conducted with appropriate confidentiality controls and in accordance with local laws and after appropriate consultation. -- 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] conda build errors on Windows 10
Hi Greg, It would be great to have a tutorial/ walkthrough on the PostgreSQL :: RDKit implementation. Paolo supplied me with this in the past – awesome extremely helpful thanks, which worked up to a point… I haven’t had time to revisit this. Hope this is useful ! Best, mike Pre-requisites: install Python 3.5.2 in C:\Python35. Install CMake and make sure the CMake bin folder is in your PATH. Install Gohlke's numpy and Pillow into your Python 3.5.2. Install Eigen3 into C:\build. Install PostgreSQL. 1) Create a rdkit35.bat file which defines the following variables: @echo off set RDBASE=c:\build\rdkit set PATH=C:\Python35;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Java\jdk1.8.0_31\bin;%PATH% set PATH=C:\boost\boost_1_62_0_py35\lib64-msvc-14.0;%RDBASE%\lib;%PATH% set PYTHONPATH=%RDBASE% The above assumes that you installed Python 3 in C:\Python35, that you have the Microsoft Git in C:\Program Files\Git, and Java in C:\Program Files\Java\jdk1.8.0_31, and that you are going to install boost in C:\boost, and rdkit in C:\build. Adjust paths as needed. 2) Open a CMD window, source the above bat file: rdkit35.bat Make sure that the Python version in your path (the one which starts issuing the python command) is the one you wish to build the boost-python library against. 3) Build Boost. Create C:\64\boost_1_62_0_py35_build and C:\64\boost_1_62_0_py35_build\source. Download zlib128.zip, bzip2-1.0.6.tar.gz and boost_1_62_0.7z, and put them into C:\64\boost_1_62_0_py35_build\source folder Copy/paste the attached build.cmd (see below, I haven't attached it as most e-mail servers would strip it) into C:\64\boost_1_62_0_py35_build\build.cmd and make sure the following variables at the beginning of the file are correctly set and match your compiler version, your 7-Zip installation location, and your zlib, bz2lib and Boost versions: set BOOST_TOOLSET=msvc-14.0 set BOOST_VERSION=1_62_0 set ZIP7=%PROGRAMFILES(X86)%\7-zip\7z.exe :: The following are all optional; comment out if not needed. set BZIP_VERSION=1.0.6 set ZLIB_FILE_VERSION=128 set ZLIB_VERSION=1.2.8 In the same CMD window that you opened above, cd to C:\64\boost_1_62_0_py35_build and run: build.cmd When the build is completed, copy C:\64\boost_1_62_0_py35_build\build\boost_1_62_0-x64\boost_1_59_0\stage\lib to C:\boost\boost_1_62_0_py35. Rename lib to lib64-msvc-14.0 (or whatever MSVC version you used to build Boost). Create a C:\boost\boost_1_62_0 directory and copy C:\64\boost_1_62_0_py35_build\build\boost_1_62_0-x64\boost_1_62_0\boost into C:\boost\boost_1_62_0. 4) Get the latest RDKit master from GitHub: cd c:\build git clone https://github.com/rdkit/rdkit.git 5) Build the RDKit: cd c:\build\rdkit mkdir build cd build cmake -DEIGEN3_INCLUDE_DIR=C:\build\include\eigen3 -DPYTHON_LIBRARY=C:\Python35\libs\python35.lib -DPYTHON_INCLUDE_DIR=C:\Python35\include -DBOOST_LIBRARYDIR=C:\boost\boost_1_62_0_py35\lib64-msvc-14.0 -DBOOST_ROOT=C:\boost\boost_1_62_0 -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_PGSQL=ON -DPostgreSQL_ROOT="C:\Program Files\PostgreSQL\9.5" -DRDK_BUILD_SWIG_WRAPPERS=ON -DRDK_BUILD_SWIG_JAVA_WRAPPER=ON -DSWIG_DIR=C:\msys64\usr\share\swig\3.0.7 -DSWIG_EXECUTABLE=C:\msys64\usr\bin\swig.exe -G"Visual Studio 14 2015 Win64" .. c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /m:4 /p:Configuration=Release INSTALL.vcxproj Follow the instructions in Code/PgSQL/rdkit/README to install the RDKit PostgreSQL cartridge DLL into your PostgreSQL installation. I used the MSYS2 SWIG version packaged into MSYS2, but you can also get pre-built SWIG for Windows; change the above path accordingly. If the above looks too scary, I'll provide you with my RDKit tree built against Boost 1.62, Python 3.5.1 (I think it should work also against Python 3.5.2) and PostgreSQL 9.5. For Eigen 3: - you won't need make.exe as you will use the native Microsoft toolchain to build Eigen3, you will only need cmake - Install Visual Studio 2015 (14.0) Community Edition (Microsoft C and C++ compilers) - Open a CMD window - unzip the Eigen3 archive (I have just downloaded Eigen 3.3.1) - cd to the eigen folder - mkdir build - cd build - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" (this will set the environment variables appropriate for the 64-bit version of the compiler) - cmake -DCMAKE_INSTALL_PREFIX=C:\build .. (this will install Eigen 3 under C:\build\include\Eigen3; change the C:\build path if you wish to install Eigen3 somewhere else) - c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /m:4 /p:Configuration=Release INSTALL.vcxproj (this will install Eigen3 headers into C:\build\include\Eigen3, or elsewhere depending on the CMAKE_INSTALL_PREFIX you chose. For Boost 1.62: - is Microsoft Visual Studio 14.0 Community Edition installed? If so, do the paths in build.cmd refer to the correct installation
Re: [Rdkit-discuss] conda build errors on Windows 10
Hi Bob, On Thu, May 11, 2017 at 10:31 PM, Bob Funchesswrote: > > > I’m curious as to whether anyone is able to get RDKit to build on Windows > 10 with Visual Studio 2015; I’ve been trying off and on to get this to work > for some time now with no discernable success. > > Yeah, I was able to do so both while doing the conda builds and during the testing phase (where I do the build manually). > PS My ultimate goal is to build the RDKit DLL and the C# wrappers and > that’s all I fundamentally care about; Java, Python, Postgres et al. are > irrelevant to me except insofar as they help me get the C# wrappers… the > Python version would be NICE (for testing), but I don’t actually NEED it. > If anyone has actually successfully built RDKFuncs.DLL and RDKit2DotNet.DLL > using the current version of RDKit, I would greatly appreciate any pointers. > Yeah, for this I think you really don't need/want to be using the conda stuff. How about this: I'll put together a short tutorial/walk-through on doing a build of the C# wrappers with VS2015 under Win10 and we can see if that helps. I can try a first pass over the weekend. -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