openmm / openmm-plumed

OpenMM plugin to interface with PLUMED
59 stars 23 forks source link

plugin-openMM version compatibilities and CMakeLists.txt #79

Open des2037 opened 8 months ago

des2037 commented 8 months ago

Hi openMM-plumed devs,

I just compiled the openmm-plumed plugin on Summit (Oak Ridge), and I made some observations that I thought might be helpful to the community.

1) The openmm-plumed plugin version 2.0 is NOT compatible with earlier versions of openMM (I tested v7.5.0, v7.7.0, v8.0.0). This is because v2.0 of the plugin requires openmmapi/include/openmm/internal/CustomCPPForceImpl.h, which wasn't introduced into openMM until rather recently. Taking advantage of CustomCPPForceImpl is described in the plugin release notes, but sadly I didn't realize CustomCPPForceImpl isn't available in earlier openMM versions. It might be helpful to add a remark regarding version compatibilities to the install notes; i.e., if using openMM < v8.1.0 use v1.0 of plugin.

2) Odd behavior: in my hands, if CMAKE_INSTALL_PREFIX is set to be identical to OPENMM_DIR, the files weren't copied in make install. However, if I pointed to a new subdirectory (that doesn't exist until compile), e.g., ${OPENMM_DIR}/my_plumed_files, then the files are indeed copied.

3) As others have observed, I did indeed need to add ${OPENMM_DIR}/my_plumed_files/lib to $LD_LIBRARY_PATH

4) I had to edit CMakeLists.txt, changing this line: INCLUDE_DIRECTORIES("${PLUMED_INCLUDE_DIR}")

to

INCLUDE_DIRECTORIES("${PLUMED_INCLUDE_DIR}" "${PLUMED_INCLUDE_DIR}/plumed")

Otherwise, it would miss header files (maybe this is resolved in plugin v2.0)

Anyway, I hope this helps other unlucky folks who can't use the conda install (due to unsupported hardware, e.g., POWER9). 🙂

RaulPPelaez commented 8 months ago

Hi, thanks for taking the time to write this!

  1. I added a note to the README.
  2. This is strange and probably hints at some underying issue/missconfiguration. See here the script that we use to compile the conda-forge package for this plugin https://github.com/conda-forge/openmm-plumed-feedstock/blob/main/recipe/build.sh . In there, OPENMM_DIR==CMAKE_INSTALL_PREFIX.
  3. Unless I am missing something, this happens because you are installing to a non-standard library. Install to $CONDA_PREFIX (or $OPENMM_DIR, or /usr/local/) and the library should go to a place where ldd looks for it.
  4. In the aforementioned build script PLUMED_INCLUDE_DIR=${PREFIX}/include/plumed
peastman commented 7 months ago

What directory did you try to install to? Might it have been a permissions issue?