Page 1 of 1

Build C/Fortran Wrappers for plugins

Posted: Wed Aug 20, 2014 11:05 am
by kpbishop
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

Re: Build C/Fortran Wrappers for plugins

Posted: Thu Aug 21, 2014 2:38 pm
by peastman
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

Re: Build C/Fortran Wrappers for plugins

Posted: Fri Aug 22, 2014 10:19 am
by kpbishop
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