Calculation of interaction potentials between two heavy ions at finite temperature