Impact of functional groups substitution on the molecular properties of magnesium and scandium phthalocyanines