Pteros
2.0
Molecular modeling library for human beings!
|
Pteros is currently being developed on Linux Mint with gcc and clang compilers. Design decisions are made with portability to Linux, Windows and MacOS in mind but no testing on Windows and MacOS are made. Other systems were never considered. The code itself should be 100% portable providing that the dependencies are available for your system, but expect platform-dependent quirks and issues, which are common to all complex C++ programs, not only to Pteros.
Current version of Pteros is 3.x. It depends on C++17 features and requires sufficiently modern compiler. If you are still limited by old compiler use branch v2 which is outdated but requires only C++11.
These core dependencies should be installed separately:
Pteros is able to download and compile most of its dependencies automatically, but could also used pre-installed libraries if they are found in the system. By default Pteros searches for pre-installed libraries first and if not found downloads and compiles them itself. This could be configured precisely if needed (see below).
If you are using latest Ubuntu or other debian-based system it should be enough to run the following command in the terminal to install basic dependencies:
-DTRY_SYSTEM_GROMACS=OFF -DTRY_SYSTEM_OPENBABEL=OFF
. Pteros will download and compile them itself.Get the latest source code from the Git repository:
This will create a directory named "pteros" in you current working directory and will download the source code into it.
Create a separate build directory (for example 'pteros_build'). Go to this directory and issue the following commands:
The cmake command will print something like this:
Copy suggested line and add it 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:
The following CMake variables could be used:
Variable | Meaning |
---|---|
WITH_PYTHON | Build python bindings and compile analysis plugins as Python modules. Default: ON |
WITH_OPENMP | Use OpenMP parallelization. Default: ON |
WITH_OPENBABEL | Link to OpenBabel to read pdbqt files and for substructure search. Default: ON |
WITH_GROMACS | Link to Gromacs to read tpr files. Default: ON |
WITH_TNG | Link to TNG_IO library to read tng files. Default: ON |
WITH_POWERSASA | Use bundled POWERSASA code. Default: ON |
TRY_SYSTEM_DEPENDENCIES | If OFF disables the searach for pre-installed libraries and downloads all dependencies.Default: ON |
DOWNLOAD_DEPENDENCIES | Allow downloading and compiling dependencies. Default: ON |
TRY_SYSTEM_EIGEN | Try using system Eigen. Default: ON |
TRY_SYSTEM_FMT | Try using system fmt. Default: ON |
TRY_SYSTEM_SPDLOG | Try using system spdlog. Default: ON |
TRY_SYSTEM_PYBIND11 | Try using system pybind11. Default: ON |
TRY_SYSTEM_GROMACS | Try using system Gromacs. Default: ON |
TRY_SYSTEM_OPENBABEL | Try using system OpenBabel. Default: ON |
GROMACS_SOURCE_DIR | Location of Gromacs sources in the system |
GROMACS_BINARY_DIR | Location of Gromacs binaries in the system |
Combining these variable one can control how each of dependencies is discovered in the system and downloaded if not found.
Run the following command:
If you see any errors then Pteros can't load plugins or something elese went wrong.
Pteros could be linked against Gromacs. In this case it can read Gromacs TPR files and make advantage of Gromacs topologies.
Unfortunately Gromacs developers are changing the public API from one version to the other, while Pteros still needs some low-level facilities which are now no longer exposed in the installed headers. There are also bugs in some Gromacs versions, which prevents it from being discovered and imported normally in CMake. Due to all these complications linking with Gromacs becomes a bit more involved than it should be.
You have two options:
If both Python 3.x and 2.7 are installed in your system the version 3.x will be used automatically (even if 2.7 if the system-default, like in some older Ubuntu versions).
Pteros could be build without Python by specifying the following flag:
In this case compiled C++ plugins are not built as python extension modules and python bindings are not built at all.
It is also possible to install Pteros in "pythonic" way using pip. In this case you get Pteros as a normal python module installed correctly as any other python package, but you have no control on the compilation process (unless you edit the setup.py script).
Run the following command from the Pteros directory:
Analysis plugins, which are written in C++, are compiled 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:
If you want to build plugins as the standalone programs AND as python extensions at the same time use the following flags:
By default Pteros is compiled with OpenMP paralellization for many internal operations. However, on certain computational clusters 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:
Pteros performs 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 file thirdparty/sasa/LICENSE
for details. This license is NOT Open Source and implies many restrictions. I contacted the authors of POWERSASA several times and asked for official permission to use their code but got no reply. It seems that the project is abandoned for a long time and nobody is concerned about the licensing of POWERSASA for many years. If you still don't want to use this code due to possible licensing concerns, you can swith it off:
Use issues on Github to report bugs.
libopenbabel-dev
installed from repositories fails in Ubuntu 16.x and 18.x due to corrupted headers in the package. Allow Pteros to download and compile OpenBabel instead.sudo apt-get install libomp-dev
spdlog
installed system-wide in Ubuntu from the package libspdlog-dev
. This package is built in a wrong way and it lacks spdlogConfig.cmake
file needed for correct library detection. That is why Pteros can't see it and tries to install its own bundled version of spdlog. Allow Pteros to download spdlog itself instead: -DTRY_SYSTEM_SPDLOG=OFF
.