Apply the switching function to the CustomNonbondedForce as well.