Ab initio configuration-interaction study of the ground and low-lying electronic states of NiI.