Effects of through-bond and through-space interactions on singlet-triplet energy gaps in localized biradicals