Skip to content

Compilation

Ondrej Marsalek edited this page Mar 4, 2015 · 2 revisions

Build settings

Pick a suitable subdirectory of compile as a template and make a copy. Edit the make_head.mk file to set the desired name of the binary, compilers and their options. Build with make as usual. The resulting binary will be in bin or elsewhere if you changed the settings.

Recognized DEFINE flags

DEFINE flags can be used to enable the compilation of some optional features. Add them to the DEFINE variable in make_head.mk as needed. The possible recognized flags are:

  • -DH2 - Diep and Johnson molecular hydrogen interactions
  • -DPLUMED - Interface to PLUMED: http://www.plumed-code.org/. Needs additional build settings, see the example compile directories for details. Currently in a separate branch.
  • -DTIMER - Save timer information to standard error output.

TODO: List all possible flags.

Python interface

If you want to use the Python interface, you will need to build PINY as a shared library. Do that using make libpiny, with otherwise identical settings. Make sure you leave in the -fPIC option (or the corresponding setting of your compiler) to enable the linking of a shared library.