installing USER-MOLFILE with cmake

Hi all,

I’m a new cmake user having some difficulty compiling the USER-MOLFILE package. The instructions (https://lammps.sandia.gov/doc/Build_extras.html#user-molfile) say that only the flag (-D PKG_USER-MOLFILE=yes) is required. If I do this, the compile is successful, but using molfile with the rerun command does not work.

ERROR on proc 0: No suitable molfile plugin found (src/USER-MOLFILE/reader_molfile.cpp:80)

I know that USER-MOLFILE looks in the wrong spot for plugins on my system by default. My old compile (NOT using cmake), I specified a custom molfile_SYSINC location to overwrite the default choice made in lib/molfile. I was wondering if there was a way to do this for my cmake build?

Thanks!
David

Hi all,

I’m a new cmake user having some difficulty compiling the USER-MOLFILE package. The instructions (https://lammps.sandia.gov/doc/Build_extras.html#user-molfile) say that only the flag (-D PKG_USER-MOLFILE=yes) is required. If I do this, the compile is successful, but using molfile with the rerun command does not work.

ERROR on proc 0: No suitable molfile plugin found (src/USER-MOLFILE/reader_molfile.cpp:80)

I know that USER-MOLFILE looks in the wrong spot for plugins on my system by default. My old compile (NOT using cmake), I specified a custom molfile_SYSINC location to overwrite the default choice made in lib/molfile. I was wondering if there was a way to do this for my cmake build?

molfile_SYSINC sets the path to the plugin header files, not the plugins.

in CMake builds, there is currently no way to change that, but you can simply copy the vmdplugin.h and molfile_plugin.h files from your VMD installation over the copies in lib/molfile to have the matching ABI version compiled into your LAMMPS executable or library, so you can load your VMD plugins.

axel.

FYI, i’ve added an option to the CMake system, that this can now be changed with:
-DMOLFILE_INCLUDE_DIRS=/path/to/your/vmd/plugins/include

in https://github.com/lammps/lammps/pull/1374

this should be included in the next patch.

axel.

Hi Axel,

molfile_SYSINC sets the path to the plugin header files, not the plugins.

Right, whoops. As you mention, in my case I’m looking for the VMD-provided headers.

FYI, i’ve added an option to the CMake system, that this can now be changed with:

-DMOLFILE_INCLUDE_DIRS=/path/to/your/vmd/plugins/include

Great, thanks for your help and the speedy fix!

David