Comparison of different approaches to the study of local defects in crystals. I. Theoretical considerations and computational schemes