Distribution of pair distances for two interacting molecules with and without interaction potential