Calculation of NMR and EPR parameters : theory and applications