Add A Comment:
Note that OpenMM 5.0 added a CustomCompoundBondForce which is a superset of all the other custom bonded forces, and does have addFunction(). So you can now use it to implement all the things you described. I'm leaving this feature request open, though, since addFunction() could still potentially be added to the other classes. It wouldn't add any new functionality, but it would provide a little more convenience.
Corrected the title of this request (should be 'addFunction', not 'addForce'). Good idea!