calculate lennard jones for each pair