The electronic structures of some first transition series metal porphyrins and phthalocyanines