Hardcode directories and platform

OpenMM Zephyr provides a visual application for running GPU-accelerated molecular simulations.
POST REPLY
User avatar
Jack Shultz
Posts: 77
Joined: Thu May 28, 2009 6:49 pm

Hardcode directories and platform

Post by Jack Shultz » Tue Sep 22, 2009 8:45 am

I need to make it so all dependencies are in the current working directory and the platform is hardcoded. I notice this code calls a function in OpenMM. Any way I can make these changes without messing with OpenMM code?

Context* context = new Context(*sys, *integ);
Platform& platform = context->getPlatform();

printf("OpenMM Platform: %s\n", platform.getName().c_str());
fprintf(fplog, "OpenMM Platform: %s\n", platform.getName().c_str())

User avatar
Christopher Bruns
Posts: 32
Joined: Thu Apr 07, 2005 1:10 pm

RE: Hardcode directories and platform

Post by Christopher Bruns » Mon Nov 09, 2009 10:21 am

Three ways of selecting the Platform are:

1) You can influence the selection of OpenMM Platform by setting the environment variable OPENMM_PLUGIN_DIR to a location containing the particular platform dll/so/dylib you want, such as that containing OpenMMCuda.dll.

2) Starting with release 1.0 beta of OpenMM, you can set the environment variable OPENMM_PLATFORM to contain the name of the platform you want to use.

3) I believe there is also another constructor signature for OpenMM::Context that takes an OpenMM::Platform as an argument.


POST REPLY