Electronic structures of metal pentacyanonitrosyls