Understanding the magnetic anisotropy for linear sandwich [Er(COT)]+-based compounds: a theoretical investigation.