Computational schemes for defects energetics