One-carbon nitrogen ring bases (thymine and cytosine) covalently linked to a sugar (ribose or deoxyribose) and one to three phosphate groups; can function as extracellular messengers, antimetabolites, and chain terminators that inhibit viral DNA polymerase.