Or create your own onfordeandtorque function and then assign this one with newton_addentity.

Then you don't have to touch the wrapper code.