Catalyzes the formation of NAD(+) from nicotinamide mononucleotide (NMN) and ATP (PubMed:17402747). Can also use the deamidated form; nicotinic acid mononucleotide (NaMN) as substrate with the same efficiency (PubMed:17402747). Can use triazofurin monophosphate (TrMP) as substrate (PubMed:17402747). Also catalyzes the reverse reaction, i.e. the pyrophosphorolytic cleavage of NAD(+) (PubMed:17402747). For the pyrophosphorolytic activity, prefers NAD(+) and NaAD as substrates and degrades NADH, nicotinic acid adenine dinucleotide phosphate (NHD) and nicotinamide guanine dinucleotide (NGD) less effectively (PubMed:17402747). Involved in the synthesis of ATP in the nucleus, together with PARP1, PARG and NUDT5 (PubMed:27257257). Nuclear ATP generation is required for extensive chromatin remodeling events that are energy-consuming (PubMed:27257257). Also acts as a cofactor for glutamate and aspartate ADP-ribosylation by directing PARP1 catalytic activity to glutamate and aspartate residues on histones (By similarity). Fails to cleave phosphorylated dinucleotides NADP(+), NADPH and NaADP(+) (PubMed:17402747). Protects against axonal degeneration following mechanical or toxic insults (By similarity). Neural protection does not correlate with cellular NAD(+) levels but may still require enzyme activity (By similarity). {ECO:0000250|UniProtKB:Q9EPA7, ECO:0000269|PubMed:17402747, ECO:0000269|PubMed:27257257}. This is the function of ENSG00000173614 (NMNAT1, nicotinamide nucleotide adenylyltransferase 1).