Build C/Fortran Wrappers for plugins

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Kevin Bishop
Posts: 11
Joined: Sat Nov 03, 2012 8:10 pm

Build C/Fortran Wrappers for plugins

Post by Kevin Bishop » Wed Aug 20, 2014 11:05 am

Hello,

I have been attempting to build OpenMM 6.1 from source. Everything appears to build fine and the tests run/pass. However, the build does not seem to generate the C/Fortran wrappers for the plugins except for the amoeba plugin (I want the RPMD one). I have set the OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS to ON within cmake and the main wrappers get built but I don't see the wrappers for the plugins other than the amoeba in my install path.

I'm wondering if there is a way that I can build these wrappers for the plugins.

Thank you!
Kevin

User avatar
Peter Eastman
Posts: 2611
Joined: Thu Aug 09, 2007 1:25 pm

Re: Build C/Fortran Wrappers for plugins

Post by Peter Eastman » Thu Aug 21, 2014 2:38 pm

Hi Kevin,

That's correct: most of the plugins don't include C and Fortran wrappers. It would be a useful thing to add. In the mean time, if you want to access those plugins you'll have to do it from C++ code. You can still write most of your code in C or Fortran, but anything that interacts with the plugins will have to be separated out into a C++ file. That's essentially what the existing wrapper do, just in an automated way.

Peter

User avatar
Kevin Bishop
Posts: 11
Joined: Sat Nov 03, 2012 8:10 pm

Re: Build C/Fortran Wrappers for plugins

Post by Kevin Bishop » Fri Aug 22, 2014 10:19 am

Thanks Peter!

I ended up duplicating the way that the amoeba plugin generated them and got usable wrappers after some tweaking.

I had been using the wrappers from an earlier version of OpenMM, I think 4, where the wrappers were made for rpmd and didn't want to have to change my code too much.

Kevin

POST REPLY