make Ring_Potential and test_xcamshift_afa work with ensemble code