I’ve been involved in a number of conversations recently around how monoisotopic masses can be used and the chance of “elucidating a structure” from a molecular formula. There are some shockingly naive views of this possibility. With the availability of accurate mass determinations by mass spectrometry, and the possibility to extract a molecular formula from the data, there are some who believe it is possible to “elucidate structures” using a monoisotopic mass. Let’s clear this naivety up…

Recently I gave a presentation at a local university regarding informatics. During the presentation I asked the students how many structures could be generated “withint the rules of basic organic chemistry” for some very short elemental formulae. General rules means no inappropriate valences but no limitations on the nature of the rings (except none base don 2-carbons :-) ) etc. EVERYONE underestimated by many factors.

While working on a structure elucidation software program the issue of how many structures could be generated from some fairly nominal formulae became very clear. Below are some example formulae, the “correct” structure associated with the data under analysis and the number of chemical structures that can be generated from this formula. Notice those numbers….numbers like: 138,136,211,624 structures from a formula of C15H22O2 !

Therefore,_the story that monoisotopic mass, that can give a single molecular formula, can give you an unambiguous chemical structure needs to stop. Now, that said, since we have close to 20 million structures online at present the question “What is the distribution of molecular formulae across ChemSpider?” was an interesting question. So, we ran a query to determine the highest frequency of formulae. The formula C18H20N2O3 occurred 5110 times in the database, 4804 times when looking at single components only. Some representative structures are shown:


I imported the data into Excel (Office 2003) with a 65000 row limit. While there are single molecular formula compounds in the list at the end of the file (viewed in wordpad) at the 65000′th row the frequency was still 45 entries in the database. It’s a long tail..


Now, many people are using mI masses to examine metabonomics data so it may be more appropriate to do the analysis on a more restricted dataset. For example, databases of interest to metabonomics people include KEGG and HMDB. Isolating the search to such databases shows that while there is a much shorter list of unique formulae (8590) a similar distribution persists . The most common formula is C6H12O6 with 71 hits. Searching this in the database shows a number of linear and cyclic carbohydrates, some with stereo, some without as shown below. if you are confused about “linear versus cyclic” see this Wikipedia article.


Monoisotopic mass isn’t going to provide the stereo information anyways and all you will get is a lot of similar structures…but of course there are MANY carbohydrates with that formula. I’ve the listed a group of some of the top formulae here and leave it to you to investigate!

Formula Number

C12H22O11 = 55 hits

C6H8O7 = 52 hits

C5H10O5 = 46 hits

C20H3205 = 46 hits

C8H803 = 40 hits

C20H32O3 = 39 hits

C20H32O4 = 38 hits

C2H4O2 = 38 hits

C24H40O4 = 37 hits

CH4O3S = 36 hits

Bottom line…even removing stereo issues and isolating to a small number of databases it is still an issue to declare that a structure is elucidated just from a mass and some form of prior knowledge or additional information such as elution order or time is necessary.

Now, this observation may not be surprising to many people. The response may be that tandem Mass Spectrometry would give an ambiguous structure. This is also not true unfortunately and in general even tandem MS (MS^n) cannot give a conclusive structure. Certainly, if stereochemistry is involved (as with many carbohydrate molecules) you are still stuck. While library look-ups using monoisotopic mass ARE valuable, and tandem MS adds more criteria for structure identification, neither are unambiguous.

Stumble it!

8 Responses to “How Many Structures Can You Generate From A Molecular Formula?”

  1. Rich Apodaca says:

    Antony – interesting stuff. CDK can enumerate structures given a molecular formula. I’ve written a little about it here:


    It’s amazing to see just how quickly the number of valid structures increase with molecular weight.

  2. John Shockcor says:

    Thanks Tony,

    I have wanted to do this myself, but did not have the tools. This might be an interesting avenue to explore with some added constraints provided by NMR, IR or even “God forbid” UV data. How quickly does the number of structures hits shrink?

  3. Eric Milgram says:


    Thanks for putting together this information. I know that many people will find it useful. Also, Rich Apodaca’s reply with information about using the Ruby CDK for generating valid chemical structures from a formula was very useful.


  4. Chris Singleton says:

    Excellent article Tony,

    Is anyone aware of how fast the available dataset is reduced when using something like a fragmentation library search? Of course, if you’re using triple-quad, I’ve seen people that require two fragments to unambiguously assign a molecule, but if you’re using a high-res (QTOF or FTMS or something) one high res fragment should be enough and will should considerably reduce the number of likely candidates. Any of the readers know what size of a set you’re working with when you consider fragments (either low-res or high-res)?

  5. Andrew Anderson says:

    Great Article….indeed a very interesting thing to consider: even with corresponding analytical data, how much constitutes a “proof of structure?”

    How many structures of “elucidated compounds” in the literature are actually incorrect? I’ve heard a few horror stories on this front :)

  6. Eric Milgram says:

    I’m writing to respond to Chris’ inquiry. First, let me reiterate a point about stereochemistry and mass spectrometry. Most people are aware that mass spectrometry has virtually no capability to give insight into stereochemical differences.

    As for Chris’ statement here, there are some fundamental things we should consider.

    “…require two fragments to unambiguously assign a molecule, but if you’re using a high-res (QTOF or FTMS or something) one high res fragment should be enough and will should considerably reduce the number of likely candidates.”

    The practice of using one confirmation ion and one quantitation ion with techniques such as EI-GC/MS or LC/MS/MS, where a fragmention pattern is generated, is widely used in targeted, quantitative studies, especially in regulated environments.

    However, I contend that when using mass spectrometry (or any analytical technique for that matter), one can never say that a molecular structure is “unambiguous.” Rather, regardless of which type of instrument one is using (e.g. nominal mass, high-res/acc, MS^n, hybrid, etc), one can only be absolutely sure when a measured chemical elicits a response that is “definitely not” the target chemical.

    However, when the measured signals from a test sample “match” the signals for the target molecule, one can only say that the signals “are consistent with” a given structure, but one cannot legitimately state that the assignment is “unambiguous”. Statisticians face this problem all the time. They can never prove sameness, rather, they can only prove difference by determining when the null hypothesis fails.

    In the targeted analysis case, one usually has more information to “confirm” a structure than just a series of masses from a fragmentation pattern. For example, if using a separation technique combined with mass spectrometry, which is often the case for a number of reasons, the additional information gained, such as retention/elution/migration time or mobility gives one further confidence as to whether a given signal is “definitely not” from a given chemical or “is consistent with” that chemical.

    As for Chris’ other question, which is listed here, I have wondered the same thing for some time.

    “Any of the readers know what size of a set you’re working with when you consider fragments (either low-res or high-res)?”

    Although use of tandem MS will decrease the number of possibilities, my experience has been that there are more chemical structures than there are unique fragmentation patterns to match to each one. For example, take a look at the fragmentation patterns for leucine and isoleucine or eladic acid and oleic acid. Whether looking at this via EI-GC/MS or LC/MS/MS, in both of these cases, many of the same ions are obtained. The ratios of some of the ions will be different, but I would challenge anyone to predict these differences a priori.

    When DNA evidence is used in a court of law, no one ever says that there is a 100% match to a suspect. Rather, the concept of “discriminating power” or “power of exclusion” is employed. For example, in cases where there is a high degree of belief that DNA found at a crime scene came from a suspect, the crime lab scientist will give a probability that the DNA “did not” come from the suspect. When that probability is along the lines of 1 in 20 billion, most people are comfortable with saying there is a “match.”

    We follow a similar line of reasoning in mass spectrometry, but we usually aren’t as precise as the molecular biologists/geneticists. In their case, they have measured allelle frequencies extensively and they can assign a probability of a certain match occurring by random chance.

    In the case of small molecules, two different compounds could certainly give the same signals regardless of the analytical configuration one is using (i.e. spectral interference). However, if one is assigning identity based on just a nominal mass, there is a significant (in my opinion anyway) probability of obtaining a false positive identification. By combining the nominal mass with a chromatographic (e.g. GC) retention time, the probability of false identification is decreased, but not eliminated. If one then switches the mass analyzer from nominal mass to accurate mass, the probability of a false positive ID further decreases. Adding tandem MS will decrease the probability even further.

    Although we cannot assign random match probabilities as precisely as the biologists, we can give a rough estimate. For example, if one assumes that with a given GC or LC method, all measureable analytes are evenly spaced throughout the run, calculating the method’s peak capacity gives an upper limit for the number of chemical species that can be discriminated.

    Similarly, one can do a similar calculation for the mass analyzer. For a typical open-tubular, capillary GC method, a peak capacity of ~1000 is not unreasonable. Similarly, for a nominal mass instrument scanning from m/z 100 – 1000, the upper limit for peak capacity would be ~1,500. Thus, if all species capable of being measured with such a method were evenly distributed in mass and retention time, the probability of any given measured species randomly matching a target species would be 1 in 1,500,000. These odds might sound good to some people, but one has to consider a number of factors. The most important is the cost of being wrong. If someone’s freedom hangs in the balance, such as in a criminal case, these odds are not good enough. Also, we know that due to chemical bonding rules and physico-chemical properties, all measured species will not be evenly distributed, so these odds represent an upper limit.

    If I’m given the choice between accurate mass or MS/MS for confirmation, I’ll take MS/MS. My reasoning is very simple. We know that all molecules with the same elemental formula will have the same accurate mass, and as Tony has illustrated, a single formula can have billions of chemical structures. However, the atom connectivity can result in different MS/MS spectra, but such differences are not guaranteed.

    However, if I can have both accurate mass and MS/MS (or MS^n), I’ll gladly take it. The bottom line is that asking whether a given measured analytical signal in a test sample is consistent with a reference signal is a very different problem than asking “what structure(s) are consistent with a given signal in a test sample?” To use DNA matching as an analogy, asking, “does the DNA that came from the crime scene match the suspect in custody?” is a much simpler problem than asking “who are all of the suspects that could match the DNA we found at the crime scene?”

  7. Ryan says:

    Anthony –

    Nice post. This reiterates just how big chemical space is!

    Question: The first figure you show (the one with the structures and number of isomers) seems to be taken from somewhere else (journal article?). A reference to the data also seems to be present in the figure caption. Can you point me to the source?


  8. HPLC says:

    This also reaffirms my opinion that the way we elucidate structure is becoming obsolete. Doesn’t seem to be much research in new and alternative ways of determining structure, for example how about based on quantum mechanical properties. By that I mean electron shell geometry. Seems a logical progression to me.

Leave a Reply