ChemKit Developments

Recently I have been continuing development of ChemKit. It is now able to calculate Gibbs free energy and predict the temperatures at which different changes and reactions will occur, while also being able to calculate the atomic orbital energy levels.

In order to calculate the Gibb's free energy I required the entropy and enthalpy changes of the reaction. While it may be possible to calculate the enthalpy change by storing the relatively simple bond enthalpies (or using the atomic orbitals and working out the bond energies) it proved harder to do so for the entropy changes so I took the lazier option to just store the compounds in data tables. This allows the program to calculate the entropy and enthalpy changes, and hence predict the temperature at which a reaction will go using the typical Gibb's energy equation;

\Delta G = \Delta H - T\Delta S

This proved relatively useful. As shown below it allows for relatively accurate prediction of reactions;

> set temp 300
> gibbs H2O(l) -> H2O(g)
Entropy Change of Reaction: 118.78Jmol-1K-1
Enthalpy Change of Reaction: 44.01kJmol-1
Gibbs Free Energy at 300.0K: 8.376kJmol-1
Will reaction go?: No
Temperature: 370.516922041K
ln K: -3.35980746089
> set temp 400
> gibbs H2O(l) -> H2O(g)
Entropy Change of Reaction: 118.78Jmol-1K-1
Enthalpy Change of Reaction: 44.01kJmol-1
Gibbs Free Energy at 400.0K: -3.502kJmol-1
Will reaction go?: Yes
Temperature: 370.516922041K
ln K: 1.05354993983
>

As you can see, it says the reaction (more a state change in this case, I chose the state change because it is a well known one) will not occur at 300 kelvin, but will at 400 kelvin. As we know, water boils at 373.15 kelvin (100\circ C), so this seems likely. It further predicts that the temperature at which it will finally go is 370.5K - this is slightly below the temperature normally considered to be the boiling point however given the use of average data it is relatively close.

After writing this I decided to calculate the atomic orbital energies. As currently ChemKit uses electronegativites (which are based on the lowest occupied atomic orbital... kind of) it already sort of uses the energies to predict reaction products. Adding a calculator to work them out, however, makes the change more visible. For this I used the following equation;

E = -R_{y}\frac{Z^{2}}{n^2}

Where R_{y} is the Rydberg Constant for eV (13.6eV essentially the energy of a ground state electron in hydrogen), Z is the nuclear charge and $n$ is the principal quantum number. By adjusting the nuclear charge to take into account the electron shielding this produces some relatively accurate numbers;

> element Na
=== Sodium (Na) ===
Atomic Number: 11
Atomic Mass: 22.98977
Electronegativity: 0.9
1s0 (-1646.29eV): 2
2s0 (-275.515eV): 2
2p-1 (-166.67eV): 2
2p0 (-166.67eV): 2
2p1 (-166.67eV): 2
3s0 (-1.512eV): 1

> element F
=== Fluorine (F) ===
Atomic Number: 9
Atomic Mass: 18.9984
Electronegativity: 4.0
1s0 (-1102.062eV): 2
2s0 (-166.67eV): 2
2p-1 (-85.036eV): 2
2p0 (-85.036eV): 2
2p1 (-85.036eV): 1

> element H
=== Hydrogen (H) ===
Atomic Number: 1
Atomic Mass: 1.00794
Electronegativity: 2.1
1s0 (-13.606eV): 1

>

As you can see from this, the highest energy orbital in fluorine is -85.0eV, in sodium it is -1.5eV and in hydrogen it is -13.6eV. This means that as electrons will tend to have a higher probability in an area of lower energy the position in which an electron will have a higher probability in NaH is closer to the Hydrogen, while in HF it is closer to the fluorine - the electron wants to be in a lower energy state.

I am going to continue developing ChemKit as my primary project from now on (it can still be found on my github), and I will hopefully come out with the aforementioned Lorentz Transformation post within the week.