Alkaloids are a group of naturally occurring chemical compounds that contain mostly basic nitrogen atoms.