The majority of the Colvars module can be built with all major versions of the C++ language. A few recent features are an exception, and require an executable built with C++11, which all recent compilers support but not all enable by default yet.
Because NAMD, LAMMPS or VMD do not support C++11 on all platforms yet, they are often built without those features. This page points to the relevant information to identifying and potentially solving this issue.
Currently the following variable types are only available when the code is built with C++11 standard or higher:
Starting from 2019-06-02
customFunction also requires C++11, due to improvements in the Lepton library available from the OpenMM repository.
GROMACS already follows the C++11 standard in full.
LAMMPS is built by default with C++11, including most of the precompiled builds. The C++11 transition is best handled through the CMake build recipe, which will automatically include or exclude C++11-specific sections of Colvars. Tip: with CMake version 3.1 or later, try using the
-D CMAKE_CXX_STANDARD=11 flag to enable C++11 (if not already the compiler’s default). Build recipes following traditional
make available in
src/MAKE/MACHINES may require manual edits; check the README of the Colvars library in the LAMMPS distribution for details.
NAMD precompiled builds will soon follow the C++11 standard but do not yet at the moment. Build recipes for the Intel, Cray and IBM compilers in the
arch folder are already set to require C++11. Recipes based on
g++ should be adapted by replacing
-std=c++11, to ensure that the
g++ version being used supports all needed features (in older GNU compilers,
11 are not the same).
VMD currently does not provide build recipes with C++11 support. Enabling C++11-dependent features will most likely require a custom build with manual edits to the