Page 1 of 1

Hardcode directories and platform

Posted: Tue Sep 22, 2009 8:45 am
by jackygrahamez
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())

RE: Hardcode directories and platform

Posted: Mon Nov 09, 2009 10:21 am
by cmbruns
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.