MMTF-C++
The C++ language MMTF libraries
|
The macromolecular transmission format (MMTF) is a binary encoding of biological structures.
This repository holds the C++-03 compatible API, encoding and decoding libraries. The MMTF specification can be found here.
You need the headers of the MessagePack C++ library (version 2.1.5 or newer). If you do not have them on your machine already, you can download the "include" directory from the MessagePack GitHub repository.
You only need to include the mmtf.hpp header in your code to use MMTF. For instance a minimal example to load an MMTF file looks as follows:
The C++ MMTF library is header only so you do not need to compile it. If you have a source file named demo.cpp
(e.g. including the code above), you can generate an executable demo.exe
as follows:
Here, <MSGPACK_INCLUDE_PATH>
and <MMTF_INCLUDE_PATH>
are the paths to the "include" directories of MessagePack and this library respectively.
For your more complicated projects, a CMakeLists.txt
is included for you.
You can also perform a system wide installation with cmake
and ninja
(or make
).
To do so:
cmake
automatically sets the installation directory to /usr/local/include
, if you want to install it to another *include/
directory run cmake
with the command:
Be aware that /include
is added to the end of DCMAKE_INSTALL_PREFIX
and that is where your files are installed (i.e. the above would install at /home/me/local/include/
).
To build the tests + examples we recommend using the following lines:
Example codes:
You can generate a doxygen based documentation of the library by calling doxygen
in the docs folder. You will need doxygen 1.8.11 or later for that. Open docs/html/index.html
to see the generated documentation.