Pteros  2.0
Molecular modeling library for human beings!
Installation on Linux

Dependencies

The prerequisites for compilation of Pteros are the following:

  • Standard-conforming C and C++11 compilers (tested with gcc>=4.8, clang>=3.1).
  • cmake build system.
  • boost 1.48 or higher.
  • Git for getting the source code.
  • Python 2.5 or higher (optional if you don't use dynamic plugins and python bindings)
  • Doxygen (only if you want to build documentation yourself)
  • Sphinx (only if you want to build documentation for python bindings yourself)

If you are using Debian or Ubuntu it should be enough to run the following command in the terminal to install all dependencies:

1 sudo apt-get install g++ cmake libboost-all-dev python-dev python-numpy python-sphinx git doxygen

Installation of dependencies on Windows is described here.

Note
Starting from May 2014 Pteros has moved to C++11 standard. As a result it can only be compiled with sufficiently modern C++ compilers. We are aware that many workstations and computational clusters still have ancient versions of compilers, which do not support C++11. For such situations an older C++98 version of Pteros is preserved in a separate repository (see below).

Building Pteros

Getting the code

Get the latest source code from the Git repository:

1 git clone -b experimental git://git.code.sf.net/p/pteros/code pteros-code

This will create a directory named "pteros-code" in you current working directory and will download the source code into it.

You can also get the "stable" branch:

1 git clone git://git.code.sf.net/p/pteros/code pteros-code
Warning
Currently the stable branch is significantly outdated and not as stable as it should be. It is advised to use experimental branch for all projects. This may change in the future.

If you need an older version, which does not contain C++11 features, use the "optional_cpp11" branch:

1 git clone -b optional_cpp11 git://git.code.sf.net/p/pteros/code pteros-code
Warning
The optional_cpp11 branch is completely outdated and will never get new features! It is preserved only for compatibility with ancient compilers.

Compiling

Create a separate build directory (for example 'pteros_build'). Go to this directory and issue the following commands:

1 cmake <path to Pteros source directory> -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<where to install Pteros>
2 make
3 make install
Warning
The 'make install' command may require root access if you are installing into the system-wide location.

The first cmake command will print something like this:

1 ------------------------------
2 IMPORTANT!
3 In order to be able to link with Pteros and to use Pteros Python modules
4 you have to add the following lines to your .bashrc file:
5 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:<path to Pteros>/lib"
6 export PYTHONPATH="$PYTHONPATH:<path to Pteros>/python"
7 export PATH="$PATH:<path to Pteros>/bin"
8 ------------------------------

Copy suggested lines and add them to your .bashrc file (it is assumed that bash shell is used. If it is not the case use the syntax of your actual shell instead).

If you want to compile with alternative compiler (for example Clang), add the following flags to cmake invocation:

1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

Testing installation

Run the following command:

1 pteros_analysis.py --help all

If you see any errors then Pteros can't load plugins or something elese went wrong.

Note
This is only applicable if you are building with Python support!

Enabling SASA code

Pteros can perform the Solvent Accesible Surface Area (SASA) computatations using POWERSASA code developed in the Karlsruhe Institute of Technology. POWERSASA is licensed by specific and rather restrictive "Academic/Non-Profit SASA software license agreement". See the comment in the file src/core/sasa/power_sasa.h for details. This license is NOT Open Source and imply many restrictions! Please read it carefully. If you agree with this license and performed all required steps use the following flag when invoking cmake:

1 -DPOWERSASA="ON"

By default this code is NOT compiled. Pteros doesn't support SASA computations without it.

Note
I contacted the authors of POWERSASA several times to ask for official permision to use their code but got no reply. It seems that nobody is concerned about the licensing of POWERSASA now. But you are warned :)

Building Pteros without Python

Pteros could be build without Python. If no Python libraries are found in the System the compilation of Python bindings and plugins is disabled and only the core libraries are built.

If the Python is installed, but you don't want to use it add the following flag to CMake invocation:

1 -DPYTHON_BINDINGS="OFF"

Compiled analysis plugins, which are written in C++, will be also missing in this case because they are built as Python extensions by default. However, it is possible to build each plugin as a separate standalone program, which does not depend on Python, by adding the following flag to CMake:

1 -DSTANDALONE_PLUGINS="ON"

If you want to build plugins as the standalone programs AND as python extensions at the same time use the following flags:

1 cmake <usual options> -DPYTHON_BINDINGS="ON" -DSTANDALONE_PLUGINS="ON"
2 make
3 make install
Note
In this case each plugin will be compiled twice, so expect longer compilation time.

Building Pteros without OpenMP

By default Pteros is compiled with OpenMP paralellization of many internal operations. However, on certain clusters running SGE scheduler the usage of OpenMP is prohibited. There are also other situations when you may want to disable OpenMP. Use the following flag to compile without OpenMP:

1 cmake <usual options> -DUSE_OPENMP="OFF"

Troubleshooting

The most common problems during installation arise from bugs in Boost or in the compilers and from the wrong versions of the libraries, which are found by CMake. In general Google is your best friend in solving any problem. If you are stuck completely write to yesint4(AT)yahoo.com and attach error messages and the system configuration (versions of all required libraries and compiler).

Known problems

  • Clang compiler doesn't work with Boost < 1.52
  • If there are several Boost versions in the system CMake may find the right one for one library (say, Boost.threads) but the wrong one for the other (say, Boost.python), which causes very strange errors. The solution is to include the following flags to CMake invocation:
    1 -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_ROOT="Correct path to boost"
  • All Pteros plugins have to be up to date with the main library, but CMake doesn't always ensure this if you pull new updates from the repository. If plugins suddenly stop working after update delete CMakeCache.txt and CMakeFiles and recompile.

Linking with Pteros

It is recommended to use CMake. You can use autoconf/automake or custom Makefiles, but this will never be officially supported. The "template" subdirectory of the source tree contains the skeleton of CMake project, which could be used to link your own program with pteros libraries.