Jump to content

How are the symbols in compounds ordered?


jaylach

Recommended Posts

Hi Everyone,

 

First off, let me apologize now if my Science/Chemistry lingo is incorrect. I'm not really a science guy, unfortunately.

 

Now, on to the question! I'm currently writing a puzzle game for the Xbox that's based on Science/Chemistry. The goal is to create as many molecules (or compounds, whichever is correct, lol) as you can in a given time limit. You also have to do this while fighting against your Enthalpy (just like in the real world, some molecules give off heat while others absorb it..). It's a pretty simple concept, actually :D

 

So, here's the question I have. In my code, I need to be able to refer to these molecules.. And since they are dynamically generated (by the user), I need to know how to order the elements in said molecule. For instance, how do I know that H2O is correct and not OH2?

 

I've looked through a bunch of lists of naturally occurring compounds, and I just can't seem to find any rhyme or reason to the way the symbols are ordered. It would make sense that they would go by Atomic number, however that's not correct (see: CH4). I was also thinking maybe it could be alphabetically, but that's not right either (see: NH3). And, finally, I thought maybe it was ordered by the number of atoms (H2O - 2 H and 1 O)... but again, not right (see: NH3 and H2O).

 

So, the question I have is.. how are these things ordered? Is there any logic to it I could apply in my code to make sure I'm building the molecule (behind the scenes) correctly? Any help, advice, or pointers in the right direction would be greatly appreciated. Thanks!! :D

 

P.S: For those interested, you can see a very early alpha video of the game here:

(Shameless plug, I know.. sorry!! hehe :D)
Link to comment
Share on other sites

in general, the least electronegative element goes first. However, sometimes the order is changed in order to give some information about the structure of the compound involved. chemical nomenclature depends on the class of chemical you're naming and the context within which you are naming it.

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.