The following contains answers to typical questions from contributors about OpenMS.
The following section provides general information to new contributors.
I am new to OpenMS. What should I do first?#
I have written a class for OpenMS. What should I do?#
Follow the OpenMS coding conventions.
Coding style (brackets, variable names, etc.) must conform to the conventions.
The class and all the members must be documented thoroughly.
Check your code with the tool
php tools/checker.phpfor detailed instructions.
Please open a pull request and follow the pull request guidelines.
The following section provides information about how to troubleshoot common OpenMS issues.
OpenMS complains about boost not being found#
CMake got confused. Set up a new build directory and try again. Build from source, deleting the
cmake directory might help.
The following questions are related to the build system.
What is CMake?#
CMake builds BuildSystems for different platforms, e.g. VisualStudio Solutions on Windows, Makefiles on Linux etc.
This allows us to define in one central location (namely
CMakeLists.txt) how OpenMS is build and have the platform
specific stuff handled by
CMake. View the cmake website for more information.
How do I use CMake?#
See Installation instructions for your platform.
In general, call
CMake(.exe) with some parameters to create the native build-system.
Afterwards, (but usually) don’t have to edit the current configuration using a GUI named
CMake-GUI in Windows), which ships with
ccmake is mentioned in this document, substitute this by
CMake-GUI if your OS is Windows. Edit
CMakeCache.txt file directly.
How do I generate a build-system for Eclipse, KDevelop, CodeBlocks etc?#
cmake into a console. This will list the available code generators available on your platform,
pass them to
CMake using the
How do I add a new class to the build system?#
Create the new class in the corresponding sub-folder of the sub-project. The header has to be created in
src/<sub-project>/include/OpenMSand the cpp file in
Add both to the respective
sources.cmakefile in the same directory (e.g.,
Add the corresponding class test to
Add the test to the
executables.cmakefile in the test folder (e.g.,
Add them to git by using the command
How do I add a new directory to the build system?#
Create two new
sources.cmakefiles (one for
src/<sub-project>/include/OpenMS/MYDIR, one for
src/<sub-project>/source/MYDIR), using existing
sources.cmakefiles as template.
Add the new
If you created a new directory directly under
src/openms/source, then have a look at
Add a new section that makes the unit testing system aware of the new (upcoming) tests.
Look at the very bottom and augment
Add a new group target to
The following section provides information about how to debug your code.
How do I run a single test?#
Execute an OpenMS class test using the CTest regular expressions:
$ ctest -V -R "^<class>_test" # To build a class test, call the respective make target in ./source/TEST: $ make <class>_test
To run a TOPP test, use:
$ ctest -V -R "TOPP_<tool>"
To build the tool, use:
$ make <tool>
How do I debug uncaught exceptions?#
Dump a core if an uncaught exception occurs, by setting the environment variable
Each time an uncaught exception occurs, the
OPENMS_DUMP_CORE variable is checked and a segmentation fault is caused,
if it is set.
(Linux) How can I set breakpoints in gdb to debug OpenMS?#
Debug the TOPPView application to stop at line 341 of SpectrumMDIWindow.C.
Enter the following in your terminal:
Run gdb: shell> gdb TOPPView
Start the application (and close it):
gdb> run [arguments]
Set the breakpoint:
gdb> break SpectrumMDIWindow.C:341
Start the application again (with the same arguments):
Where can I find the definition of the main page?#
Find a definition of the main page here.
Where can I add a new module?#
Add a new module here.
How is the command line documentation for TOPP tools created?#
OpenMS/doc/doxygen/parameters/TOPPDocumenter.cpp creates the command line documentation for all classes
that are included in the static
ToolHandler.cpp tools list. It can be included in the documentation using
@verbinclude TOPP_<tool name>.cli
Test if everything worked by calling
make doc_param_internal. The command line documentation is written to
What are the important files for adding a new tutorial section?#
View the following OpenMS tutorials:
OpenMS/doc/OpenMS_tutorial/refman_overwrite.tex.in(for PDF tutorials)
OpenMS/doc/doxygen/public/OpenMS_Tutorial_html.doxygen(for html tutorials)
View the following TOPP and TOPPView tutorials:
OpenMS/doc/TOPP_tutorial/refman_overwrite.tex.in(for PDF tutorials)
OpenMS/doc/doxygen/public/TOPP_Tutorial_html.doxygen(for html tutorials)
How do I contribute to a bug fix?#
To contribute to a bug fix:
Submit the bug as a GitHub issue.
Create a feature branch (e.g.
feature/fix_missing_filename_issue_615) from your (up-to-date) develop branch in your fork of OpenMS.
Fix the bug and add a test.
Create a pull request for your branch.
After approval and merge make sure the issue is closed.