Please bear with me a bit while trying to explain my question as best as I can. I am a 4th year medical student so my command on chemistry is not too good, but I find it fascinating and intriguing, it is like magic.

My question is as follows:
How do scientists actually know the exact composition of a compound e.g. Caffeine ($\ce{C8H10N4O2}$), how do they exactly know that it has this exact amount of hydrogen or nitrogen atoms in a single molecule? After knowing that, how do they know the precise geometry of the molecule (here I mean the hexagons and pentagons and how they connect).

And one last thing, how do they know the exact geometry and sequence of atoms in an enzyme?

  • 1
    $\begingroup$ The structure of Caffeine has been confirmed by synthesis i.e. the synthesised material is in all respects identical to the natural. As for the geometry of the molecule that comes from X-ray crystallography $\endgroup$ – Waylander Nov 19 '17 at 16:14
  • $\begingroup$ The As to the Q you are addressed to are all right but do not really satisfy your Q. Indeed, chemists figured out the structure of many "pentagons and hexagons" by studying their reactivity and effectively synthesing them. Plus theory to rationalize and work out the details. AFM etc arrived later and can be seen as a celebration of the Genius. You may try to read about history of benzene or chlorophyll, for instance. $\endgroup$ – Alchimista Nov 19 '17 at 22:23
  • $\begingroup$ A 'picture' only recently using atomic force and scanning tunnelling microscopes as given in answer to the question linked to above. But we determine a molecule's structure primarily using a combination, as necessary, of x-ray crystallography, nuclear magnetic resonance (nmr) and mass spectrometry . None of these produce a 'picture' directly but the data obtained is used to form a model of a molecule's structure. $\endgroup$ – porphyrin Nov 21 '17 at 11:24