此包依赖于Open Babel 2.3.2或更高版本。在linux和mac上,它可以根据Open Babel的标准共享库版本进行编译和运行。在windows上,分布式二进制文件是根据Open Babel 2.3.2的静态版本编译的。这样做是因为从Open Babel网站上可下载的版本是用MSVC编译的,与BioConductor使用的基于GNU的工具链不兼容。这意味着在窗口上不需要单独安装Open Babel,但Open Babel也不能在ChemmineOB包之外更新。如果您需要在窗口上从源代码编译ChemmineOB,可以按照下面的说明进行。如果OpenBabel include和/或库文件不在默认搜索路径之一(例如,/usr/ lib,/usr/include, /usr/local/lib,/usr/local/include),那么在安装ChemmineOB包之前,您必须设置以下环境变量:OPEN_BABEL_INCDIR =头文件的路径OPEN_BABEL_LIBDIR =共享(.so)库文件的路径这些值也可以通过命令行切换到配置脚本来设置:——with-openbabel-lib =……”ChemmineOB。tgz where the '...' are replaced by the relevant paths. Compiling on Windows --------------------- Set up directory structure like this: C:\openbabel_src \i386 \x64 c:\openbabel \i386 \x64 c:\openbabel_build \i386 \x64 Download the openbabel source and copy it into both c:\openbabel_src\i386 and c:\openbabel_src\x64. Set up the following global environment variables: in control panel/system: D:\sandbox\ChemmineOB\src>echo %OPEN_BABEL_SRC% c:/openbabel_src D:\sandbox\ChemmineOB\src>echo %OPEN_BABEL_BIN% c:/openbabel Install the zlibbioc package. In R, do this: source("//www.anjoumacpherson.com/biocLite.R") biocLite("zlibbioc") Get the location of the zlib includes as follows (in R): > library(zlibbioc) > pkgconfig("PKG_CFLAGS") That will print out something like: -I"D:/biocbld/bbs-2.13-bioc/R/library/zlibbioc/include" Get rid of the -I and the quotes and there is your ZLIB_INCLUDE_DIR Then get the location of the zlib library as follows: > pkgconfig("PKG_LIBS_shared") That will print out something like: -L"D:/biocbld/bbs-2.13-bioc/R/library/zlibbioc/libs/i386" -lzlib1bioc> Get rid of the -L, the quotes, and the -lzlibbioc> and append /zlib1bioc.dll and now you have ZLIB_LIBRARY Then compile with cmake: cmake -G "Unix Makefiles" -DBUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=c:/openbabel/i386 -DZLIB_INCLUDE_DIR=D:/biocbld/bbs-2.13-bioc/R/library/zlibbioc/include -DZLIB_LIBRARY=D:/biocbld/bbs-2.13-bioc/R/library/zlibbioc/libs/i386/zlib1bioc.dll c:/openbabel_src/i386 You can run this from c:/openbabel_build/i386 Then: make make install