The chemical name for caffeine is 1,3,7-tri methylxanthine, which is a modified purine.
The 3D structure of caffeine: