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())
Hardcode directories and platform
- Christopher Bruns
- Posts: 32
- Joined: Thu Apr 07, 2005 1:10 pm
RE: Hardcode directories and platform
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.
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.