Update TabulatedFunction in a Custom*Force without reinitialize the Context
Posted: Tue Aug 29, 2017 8:19 am
Can we update a TabulatedFunction in a Custom*Force without reinitializing the Context?
I have tried to do it using the following procedure, but it does not work.
After assigning a new_value to the TabulatedFunction, I calculated the energy. The energy is still based on the old values of the TabulatedFunction, not the new_value.
Thanks,
Xinqiang
I have tried to do it using the following procedure, but it does not work.
Code: Select all
OpenMM::Continuous1DFunction* func = (OpenMM::Continuous1DFunction*) &(Custom*Force -> getTabulatedFunction(0));
func -> setFunctionParameters(new_value, min, max);
Thanks,
Xinqiang