Hello, I've been writing a program to help students and chemists with calculations and stuff. My app already has a formula calculation, concentraiont, balancer, etc. The two big things I'm working on right now is calculating the redox reactions (balance, determine which is the reducing agent and which is the oxidating agent) and 3-D modeling of molecules. It's so cool, you can choose a carbon atom and attach hydrogen to it to give it a tetrahedral shape. Because the app renders the model in 3-D, you will be able to see it from any angle. I'm sure once people get used to this they will be able to create very creative and complex molecular models.
Anyway, what I'm having trouble on is the damn redox reactions. The algo I have for it right now solves very complex redox reactions. Like the following.
What my algo has trouble with is when to add an H+ ion and on what side and when to add H2O and on what side.
I know how to do it by hand. Human intuition is always a plus. But I'm trying to figure out a programmatic way to solve it.
Just exactly when do I add an H+ and how do I know which side to add? And when and where for H2O?
Help in this will be greatly appreciated.