Making portable applications with RDKit

2,857 views

Published on

Lightning talk at 2nd RDKit UGM

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,857
On SlideShare
0
From Embeds
0
Number of Embeds
1,438
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Making portable applications with RDKit

  1. 1. Making portable applications with RDKIT • Chemistry application or chemistry library – Written in C++ and using RDKit – Self-contained in a single file on your computer – Will work on all versions of Windows from XP onwards • Why? Super-portable! – No deployment problems – will just work Noel O’Boyle
  2. 2. NameRXN C:NameRxnRelease> namerxn.exe C:ReactionsFromPatents.rsmi US20010000038A1 : 10.1.1 Bromination [Halogenation] US20010000038A1 : 10.1.1 Bromination [Halogenation] US20010000038A1 : 0.0 Unrecognized [Unassigned] US20010000038A1 : 9.7.27 Chloro to hydroxy [Other functional group interconversion] US20010000038A1 : 1.7.0 Ethyl esterification [O-substitution] • Commandline application that names reactions
  3. 3. Compile with MSVC++ • Depends on MSVC++ dlls which may not be present on the user’s machine – Would have to bundle somehow with the application • Solution: Use the MinGW compiler – GCC, Open source C:NameRxnRelease> C:Cygwinbincygcheck.exe ./namerxn.exe C:NameRxnReleasenamerxn.exe ... ... ... C:Windowssystem32MSVCP110.dll C:Windowssystem32MSVCR110.dll • Use Cygwin’s Cygcheck to look at dependencies
  4. 4. MINGW anD rdkit applications • Need to build everything from the bottom-up with MinGW – Boost – RDKit – Any other dependencies (e.g. zlib, cairo) • Finally build your own application – Statically link any dependencies
  5. 5. Compile with MINGW • Same problem as with MSVC++, but this time there is a solution – Use special compile and link flags: “-static-libgcc” “-static-libstdc++” and “-s” • Removes the dependency on MinGW dlls • Use Cygwin’s Cygcheck to look at dependencies C:NameRxnRelease> C:Cygwinbincygcheck.exe ./namerxn.exe C:NameRxnnamerxn.exe ... ... ... C:MinGWbinlibgcc_s_dw2-1.dll C:MinGWbinlibstdc++-6.dll
  6. 6. End result • Portable namerxn.exe • Also portable SWIG bindings – Python, .NET, Java (“-Wl,--kill-at”) • Python modules: one .py file, one .pyd • Java library: one jar file, one dll • .NET: one .NET dll, one C++ dll – Used to create NameRxn Plugin for Accelrys Draw

×