Effective-pair interactions in transition-metal alloys: A supercell total-energy approach.