You are reading the documentation for version 1.9 of OpenStructure. You may also want to read the documentation for:
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.7.1
1.8
1.10
1.11
2.0
2.1
2.2
2.3
2.3.1
devel
Installing OpenStructure From Source¶Brief Overview¶For a simple and portable way to use OpenStructure we recommend using a container solution. We provide recipes to build images for Docker and Singularity. The latest recipes and instructions can be found on our GitLab site (Docker instructions and Singularity instructions). If you wish to compile OpenStructure outside of a container, you need to follow the steps which we describe in detail below. In essence, these steps are:
Installing the Dependencies¶OpenStructure uses a bunch of OpenSource libraries. If you haven’t already installed them, please install them now! Where appropriate the minimally required version is given in parentheses. When you enable support for image processing, you will need:
If you would like to use the info module, also install:
If you would like to use the graphical user interface (GUI), also install: If you would like to use the
In case you are compiling under Windows you have to install Visualstudio 2008. to compile the dependencies and OpenStructure. We recommend to compile the dependencies manually. Enter the directories where the dependencies are located in Tools->Options->Projects and Solutions->VC++ directories. Choose ‘bin’ directories to enter program paths to cmake, qmake and python, ‘lib’ directories to point to the location(s) of your dependencies. Getting the Source Code¶OpenStructure uses git as the revision control system. The main repository can be browsed here. To get the source code, use git clone: git clone https://git.scicore.unibas.ch/schwede/openstructure.git <directory-name>
The above command will clone OpenStructure into the directory specified by <directory-name>. If omitted, the directory will be called ost. Note Some versions of curl have have trouble with the certificate of the OpenStructure git server and fail to clone the repository. To work around this, disable the SSL certificate verification by setting the following environment variable: export GIT_SSL_NO_VERIFY=1
Picking the right branch¶By default you are checking out the master branch. Master is, by definition a stable branch. It always points to the latest release. However, there are several other branches at your disposal. The main development is happening in the develop branch. It contains the newest features and bug fixes. However, we don’t make any guarantees that the develop branch is bug free and doesn’t contain major bugs. After all, it’s in constant flux. If you are developing new features, start your feature branch off develop. Besides that, there are several smaller features branches that are used to group together commits for one specific features. To change to a specific branch, use git checkout <branch-name>
Configuring¶OpenStructure uses CMake for compiling and building the project. The next required step is to configure the build environment using cmake. You can do that by invoking cmake in the project directory. cmake . <options>
There are two kinds of options: Options that let you control the building behaviour, enabling and disabling the compilation of certain modules and options that let you tell CMake where to find the dependencies. All of them are passed to CMake with via -D<opt>=<value>. On Windows, use Tools -> VisualStudio -> commandline prompt from within VisualStudio. Flag to choose build generator¶CMake supports different build generators. On UNIX, i.e. MacOS X and Linux, the default build generator is Makefiles, but it is also possible to use other programs. For a list of supported build generators on your platform, start cmake without parameters. On Windows you have to explicitly set the build generator to “Visual Studio 9 2008” (or a later version): cmake -G"Visual Studio 9 2008"
Flags to Control the Dependencies¶By default, CMake searches the standard directories for dependencies. However, on some systems, this might not be enough. Here is a short description of how CMake figures out what dependencies to take and how you can influence it.
Build Options¶
Example Configurations¶Generic linux without GUI The simplest way to compile OpenStructure is to disable the GUI and any dependency to Qt4. You can build an optimized OpenStructure without GUI as follows: cmake . -DOPTIMIZE=ON -DENABLE_INFO=OFF
The molecular mechanics module can be enabled by installing OpenMM and adding the appropriate flags as follows (replace <OPENMM> with the actual path to OpenMM): cmake . -DOPTIMIZE=ON -DENABLE_INFO=OFF -DENABLE_MM=ON \
-DOPEN_MM_LIBRARY=<OPENMM>/lib/libOpenMM.so \
-DOPEN_MM_INCLUDE_DIR=<OPENMM>/include/ \
-DOPEN_MM_PLUGIN_DIR=<OPENMM>/lib/plugins
Note that the OpenMM binaries available online may be incompatible with files compiled using your gcc compiler (known as “Dual ABI” issue). This has been observed for OpenMM versions 6.1 until 7.1.1 when compiling with gcc versions >= 5.1. In those cases, you cannot use the binaries and will have to install OpenMM from source. On some Linux distributions, there are issues with Qt4 and hence it may not be possible to build OpenStructure with GUI support at all. This is for instance known to be an issue with boost versions >= 1.62. We hope to support Qt5 in the next OpenStructure release. Ubuntu 16.04 with GUI All the dependencies can be installed from the package manager as follows: sudo apt-get install cmake sip-dev libtiff-dev libfftw3-dev libeigen3-dev \
libpng-dev python-all python2.7 python-qt4 libboost-all-dev \
qt4-qtconfig qt4-qmake libqt4-dev libpng-dev
Now, all dependencies are located in standard locations and cmake will automatically find them without the need to pass any additional parameters. The only exception is the Python library which is put in a different path than expected. Also, we add -DOPTIMIZE, which will tell cmake to build an optimized version of OpenStructure. cmake . -DPYTHON_LIBRARIES=/usr/lib/x86_64-linux-gnu/libpython2.7.so \
-DOPTIMIZE=ON
Fedora 26 without GUI All the dependencies can be installed from the package manager as follows: sudo dnf install cmake eigen3-devel boost-devel libpng-devel python2-devel \
fftw-devel libtiff-devel
Here, we compile a version without GUI as follows: cmake . -DOPTIMIZE=ON -DENABLE_INFO=OFF
macOS with Homebrew without GUI Homebrew can be used to conveniently install all packages on macOS. Unfortunately, Qt4 is not (officially) supported on macOS Sierra (and newer). Hence, it is not possible to build OpenStructure with GUI support there. Homebrew installs all the software under /usr/local. Thus we have to tell cmake where to find Boost and Python. Also the Python headers and libraries are not located as they are on linux and hence they must be specified too: cmake . -DPYTHON_INCLUDE_PATH=/usr/local/opt/python/Frameworks/Python.framework/Headers \
-DPYTHON_LIBRARIES=/usr/local/opt/python/Frameworks/Python.framework/Python \
-DBOOST_ROOT=/usr/local -DPYTHON_ROOT=/usr/local \
-DSYS_ROOT=/usr/local -DENABLE_INFO=OFF -DOPTIMIZE=ON
Building the Project¶Type make. If you are using a multi-core machine, you can use the -j flag to run multiple jobs at once. On Windows run ‘Build OpenStructure’ from the build menu. What’s next?¶On Linux and MacOS X, you can start dng from the command-line. The binaries are all located in stage/bin: stage/bin/dng
or, to start the command-line interpreter: stage/bin/ost
If you repeatedly use OpenStructure, it is recommended to add /path/to/ost/stage/bin to your path. Getting the newest changes¶To get the newest changes from the central git repository, enter git pull
in your terminal. This will fetch the newest changes. |
ContentsSearchEnter search terms or a module, class or function name. Previous topicNext topicA gentle introduction to OpenStructure You are here
|