* part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter().
* part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter().
* Finally, call addTorsion() once for each torsion. After an torsion has been added, you can modify its parameters by calling setTorsionParameters().
* Finally, call addTorsion() once for each torsion. After an torsion has been added, you can modify its parameters by calling setTorsionParameters().
* This will have no effect on Contexts that already exist unless you call updateParametersInContext().
* This will have no effect on Contexts that already exist unless you call updateParametersInContext().
* theta is guaranteed to be in the range [-pi,+pi]
* Note that theta is guaranteed to be in the range [-pi,+pi], which may cause issues with force discontinuities if the energy function does not respect this domain.
*
*
* As an example, the following code creates a CustomTorsionForce that implements a periodic potential:
* As an example, the following code creates a CustomTorsionForce that implements a periodic potential: