Python API, CustomGBForce, TabulatedFunction, OpenCL vs. CPU
Posted: Sat Jun 02, 2018 10:27 am
Hi Peter -
I'm working on a model that is implemented primarily using the Python API. One of my forces is a CustomGBForce that includes tabulated functions. When running a test simulation, simply changing the platform from OpenCL to CPU (or Reference) gives me different answers, and the cause of the problem seems to be the way the two platforms are reading the tabulated functions. I am using both Discrete2DFunctions and Discrete3DFunctions. If I eliminate the tabulated functions from the energy term expression, the platforms then give similar answers. When the tabulated functions are part of the energy expression, OpenCL is giving me an answer that is closer to what I expect. Can you think of what I might be doing wrong? Is there some particular order that I should call addPerParticleParameter, addGlobalParameter, addTabulatedFunction, addComptuedValue, and addEnergyTerm? What is the difference in the way that the platforms handle tabulated functions?
Thanks,
Nick
I'm working on a model that is implemented primarily using the Python API. One of my forces is a CustomGBForce that includes tabulated functions. When running a test simulation, simply changing the platform from OpenCL to CPU (or Reference) gives me different answers, and the cause of the problem seems to be the way the two platforms are reading the tabulated functions. I am using both Discrete2DFunctions and Discrete3DFunctions. If I eliminate the tabulated functions from the energy term expression, the platforms then give similar answers. When the tabulated functions are part of the energy expression, OpenCL is giving me an answer that is closer to what I expect. Can you think of what I might be doing wrong? Is there some particular order that I should call addPerParticleParameter, addGlobalParameter, addTabulatedFunction, addComptuedValue, and addEnergyTerm? What is the difference in the way that the platforms handle tabulated functions?
Thanks,
Nick