Investigation of the ground- and metastable states of AnN (An=Th..Pu)