Finally found the problem in the radial_distribution_function code
it was int -> rint