Update LD_heatmap.r

removing redundancy in calculations to speed up the analysis