Showing posts with label general chemistry. Show all posts
Showing posts with label general chemistry. Show all posts

Monday, December 30, 2013

Wolfram|Alpha and chemistry homework problems


Update 2014.01.20: This video really inspired this post and nicely addresses many of the objections one might raise.

About two weeks ago I wrote a blogpost wondering to what extent many chemistry homework problems are rendered trivial by chemical calculators.  As part of the post I started a little experiment where I see how many problems posted on Reddit's Chemhelp page I could solve using such calculators. I subsequently expanded the experiment to include Yahoo Answers chemistry page. Here you can see my contributions for Reddit and Yahoo Answers, but I'll focus on the Yahoo Answers.

As I am writing this I have supplied 21 answers on Yahoo Answers and 11 answers on Reddit (plus 1 in the mathhelp page). All but 3 of the answers involve Wolfram|Alpha (WA) so this is what I'll focus on here.  Most of these questions can be answered in two steps using WA and many can be answered in one step, i.e. one simply reformulates the question, types it in to WA and gets the answer.

Examples of the latter type of question:

"How many grams of sulfur (S) are needed to react completely with 246 g of mercury (Hg) to form mercuric sulfid?" which can be answered by typing the following into WA: "convert 246 g Hg to mercuric sulfid" (which also fixes the spelling).

"Calculate the number of moles of Al2O3 produced from 27.6 moles of O2" => "convert 27.6 moles O2 to Al2O3"

"How many grams of NaOH are in 250 mL of a 3.0 M NaOH solution?" => "convert 250 mL 3.0 M NaOH to grams"

"Na2CO3+Pt(ClO3)2 -> NaClO3 + PtCO3. Balance the equation.?" => "Na2CO3+Pt(ClO3)2 -> NaClO3 + PtCO3"

"C2H6+O2-> CO2+H2O. Draw Lewis dot structures for each species.?" => "lewis structure of CO2"

"Calculate the empirical formula of a molecule with the following percent compositions: 59.7% lithium (Li) and 40.3% nitrogen." => "59.7% lithium and 40.3% nitrogen"

"What is the number of mmoles solute in 2 liters of 0.0555 M KMnO?" => "convert 2 liters of 0.0555 M KMnO to mmoles"

"A 10% kcl solution in water has a density of 1.06/ml'calculate its malarity and malality?" => "convert 10 % KCl to malality"

"the blue color in some fireworks occurs when copper (I) chloride is heated to 1500K and emits a blue light of wavelength 4.50*10^2nm. How much energy does one photon of this light carry?" => "convert 485 nm wavelength to joules"

"What is the amount of substance of hydrogen atoms in 0,50g methane (CH4) and why?" => "how much hydrogen in 0.50 grams of methane"

"If 500 grams of Fe reacts with ample Oxygen according to the following equation: 4Fe + 3O2 = 2Fe2O3 A) How many grams of rust are produced? B) How many grams of Oxygen are needed?" => "how much Fe2O3 from 500 grams Fe"

These questions require a bit more knowledge:

"What mass of phosphorous is required to manufacture 2 metric tons (2000 kg) calcium phosphate?" => "convert 2000 kg calcium phosphate to phosphorous".  By default WA interprets calcium phosphate as hydroxyapatite but alerts you to the fact that tricalcium diphosphate is an alternative.  This is a poorly phrased question.
"E=200 M^ -1 Cm^ -1 A=1 Pathlength=0.5 cm Concentration of protein???" => "beer lambert equation"

"Balance the following redox reactionin basic solution using half reaction method?  O2 + Cr 3+ -> H2O2 + Cr2O7 2- to find how many electrons are lost and gained during the reaction" => "O2 + Cr^3+ + OH- -> H2O2 + Cr2O7^2- + e- + H2O" While not straightforward the equation doesn't balance in WA until OH-, e-, and H2O are put on the correct sides.  So this can really be solved by trial and error, once you know translate "basic solution" into these constituents.

"From 0.65 g CaClx, 1.68 g of silver chloride (AgCl) were obtained. Which one is the formula of the calcium salt?" => "moles of Cl in 1.68 g AgCl" then "moles of Cl in 0.65 g CaCl" and "moles of Cl in 0.65 g CaCl2".  Notice how it becomes trivial to solve this problem by trial an error, compared to setting up an algebraic equation.


I would characterize all but the last three problems as "square root problems": they contain the same educational value as asking "what is the square root of 10?", i.e. close to zero. The only real reason were are assigning these problems is because they were taken from (or "inspired" by) textbook questions that were written before chemical calculators like WA were available.

The thing is tools like WA allows us to assign much more interesting chemistry questions. One of the reasons many students think chemistry is boring is that introductory chemistry often is incredibly boring because we assign boring problems with no real point and (with tools like WA) for no good reason.


This work is licensed under a Creative Commons Attribution 4.0 International License.

Tuesday, December 10, 2013

Chemical Calculators and homework problems

Tl;dr: I am looking at questions posted at Reddit's Chemhelp page to see how many can be helped by freely available computational tools. You can see the ongoing experiment here.

Before the general availability of conventional pocket calculators every chemistry student has to be able to compute the values of common mathematical functions such as square roots and logarithmic functions by hand or slide rule. Now we no longer teach this skill which frees up time to focus on chemistry and we can assign harder problems or more problems involving such functions because they can be solved much faster with a calculator.

However, there are now several software packages and phone-apps that can solve chemical problems such as chemical nomenclature or balancing chemical reactions.  However, we are not making use of these tools and spending an inordinate amount of time teaching these concepts. Concepts which are becoming the chemical equivalent of the square root function.  Perhaps we could focus on more interesting chemical problems and leave the memorization and other tedious tasks to the computer. I think chemistry would become a more interesting subject as a result.

To test how far along we are on this path, I am looking at questions posted at Reddit's Chemhelp page to see how many can be helped by freely available computational tools. You can see the ongoing experiment here.

UPDATE 2013.12.25: ... and here on Yahoo Answers.

Please join me!

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Friday, December 6, 2013

Sunday, January 8, 2012

The ideal app for an ideal gas


I recently came across a very cool app called Atoms in Motion ($2.99).  With this app you can perform molecular dynamics simulations of He, Ne, Ar, and Kr (and mixtures thereof) at different temperatures, volumes, and number of atoms.


It is effortless to set up a simulation and change the conditions: swipe to change T (or shake the iPad!) and pinch to change V.  You can also flick an atom and, frankly, the most fun is to build a few clusters at 1 K and then move an atom carefully in position and flick it at a cluster! Something I have dubbed "atomic billiards".


Teaching
Since not every student has an iPad (yet), the main teaching-use will probably be in lecture, projection the simulation on using a VGA adapter (hint: simulations make for great peer instruction questions).  Because it is based on real simulations, and not pre-recorded movies, the app is very versatile and can be used to demonstrate very simple things like solids, liquids, and gases or an atomic view of temperature or relatively complex things like defects in solids and deviations from ideal gas behavior (using the plotting tool). 

However, the ideal use of this app would really be self-guided discovery.  Most features are very intuitive (the plotting tool takes some practice) and I'd love to see what a class of 10-year olds iPad users would get out of this. Side note: it would really have been great if the iPad could vibrate and the pressure could be linked to the vibration.


Documentation
Another strength of this app is the quality of documentation and extra information available in the app and on the top bar of the website.  I'm particularly impressed by the animated figure on "how big is an atom", which reminded me of the orders-of-ten approach.  I would be lovely to see a similar explanation of the nano-second.

Disclaimer: I was made aware of this app by the developer, but I bought my own copy, and was not asked to write a review on the blog.

Saturday, December 10, 2011

Bond lengths, Avogadro, Google Docs, and gamification

Recently a colleague of mine, Henrik, lamented that at a recent oral exam many first year students had no clue what a typical bond length in a molecule is.  I am not a big fan of memorizing something that can be easily Googled, but we're talking order of magnitude here, not the last decimal place.

This is a place where molecular modeling tools such as Avogadro can help, but how to do this exactly?  Knowing an approximate bond length by heart comes from looking at many, many molecular structures, and imagining a worksheet with dozens of fill-in-the-blank bond lengths already puts me to sleep.

But how about something like: use Avogadro to build a molecule with the longest CC single bond possible.  This sounds a bit more fun and I bet a few strategies are already popping into your mind. 

Based on my recent excellent experience with Google Docs, I would then have student collect answers on a common Google spreadsheet.  Students could either collect their work on a single sheet or one sheet per student/team. This allows students to learn different design principles from each other and adds an element of competition (gamification) since you can now compare results.

Would this actually work?  I challenge you to find out!
By work I mean: engage students enough to build a large number of molecules and think about bond lengths?  I don't know, but how about testing it out here?  I have started a spreadsheet with a few entries.  If you can do better, feel free to add your entries.

Some ground rules: 
1. The bond length must come from the lowest energy conformation
2. To beat a current entry the CC bond length must be longer by 0.005 Å
3. You must use the MMFFs force field (which will limit the number of elements at your disposal).
4. For now I'll leave the maximum number of atoms open, but the fewer atoms you use, the more impressed I will be.

You might have the students figure these issues out by themselves. Explaining why they are important could be very teachable moments.

Practical tips
1. As the molecules get more complicated, naming them becomes difficult.  In that case I suggest using SMILES, which you can generate with this GUI.  It would be nice if Avogadro has a "Copy SMILES" option.
2. You can build your molecule using SMILES.

Friday, April 30, 2010

Polarization and intermolecular interaction


Figure 4.16. 0.002 au isodensity surface with superimposed molecular electrostatic potential for (a) methane using the methane density for the methane–water dimer and (b) free methane monomer. The maximum potential value, 0.01 au, is five times smaller than in previous figures to make the increase in negative charge visible. The black spheres in (a) denote the position of the three nuclei of water. The level of theory is M06/6-31+G(2d,p)//M06/6-31G(d).
Click on the picture for an interactive version.
Click here for a pop-up window
From Molecular Modeling Basics CRC Press, 2010

In a previous post I showed how the difference in the strengths of interaction between methane, methane-water, and water dimer is due to their differences in polarity, which can be visualized using molecular electrostatic potentials (MEPs). Methane interacts stronger with water than with methane because of polarization, i.e. rearrangement of the methane electrons due to the polar water molecule that, to a first approximation, induces a dipole moment in methane.

The polarization of the methane density is not visible in the MEP of the methane–water dimer (Figure 4.15b) because the polarity of the water H atom dominates the MEP in that region. But if we remove the water molecule, the net increase in negative charge in the methane molecule where it interacts with the partially positive H atom of the water is apparent (Figure 4.16).

Making the figure
This is a not a plot one makes every day, so the process is a bit involved. The main trick is to construct the methane part of the density from the corresponding localized molecular orbitals, and then tricking GAMESS into printing a file with just those LMOs that MacMolPlt can read. The procedure is described in some detail Section 5.5 of the book, so here I just post the corresponding screencast.

Sunday, April 25, 2010

When molecules attract



Figure 4.14. M06/6-31G(d) optimized geometries of (a) methane dimer, (b) water–methane dimer where water acts as a H-bond donor, (c) water–methane dimer where methane acts as a H-bond donor, and (d) water dimer.
Click on the picture for an interactive version.
Click here for a pop-up window
From Molecular Modeling Basics CRC Press, 2010

The molecular dimers shown in Figure 4.14 have very different interaction energies: -0.5, -1.0, -0.6, and -5.1 kcal/mol, respectively; which are reasonably well reproduced at the M06/6-31+G(2d,p)// M06/6-31G(d) level of theory: -0.4, -0.5, 0.0, and -4.9 kcal/mol.

The source of this difference in intermolecular attraction can be easily visualized with electrostatic potential maps (Figure 4.15). Methane is non-polar and the main source of attraction in the methane dimer is dispersive forces (which are hard to visualize). Water is polar, and the methane–water interaction (where the water is the H-donor) is a bit stronger than the methane dimer. This is due to an electrostatic interaction - more specifically polarization, but more about this in a future post.


Figure 4.15. 0.002 au isodensity surface with superimposed molecular electrostatic potential for (a) methane dimer, (b) water–methane dimer where water acts as an H-bond donor, (c) water–methane dimer where methane acts as an H-bond donor, and (d) water dimer. The maximum potential value is 0.05 au and the level of theory is M06/6-31+G(2d,p)//M06/6-31G(d).
Click on the picture for an interactive version.
Click here for a pop-up window
From Molecular Modeling Basics CRC Press, 2010

Instructions on how to make interactive electrostatic potential maps with Jmol can be found here. Finally, I introduce a new feature (pop-up windows) to the blog because I can't figure out how to include Jmol buttons (which gives more control to the viewer) into blog posts. This feature also gives you access to the underlying GAMESS files as I have discussed here.

Wednesday, March 31, 2010

Canonical and localized molecular orbitals


Figure 4.10. 0.045 au isosurfaces of the four valence canonical MOs of NH3 computed using B3LYP/6-31G(d). A value of 0.045 au is chosen because it results in a 0.002 au isodensity surface when squared.
From Molecular Modeling Basics CRC Press, May 2010.
Click on the picture for an interactive version

According to Valence Shell Electron Pair Repulsion (VSEPR) theory many bond angles involving elements such as C, N, and O are close to 109.5o because the four valence electron pairs that surround these atoms adopt a tetrahedral geometry to minimize repulsion. In the case of CH4 the H-C-H angle is exactly 109.5o because the repulsion between the four electron pairs in the C-H bonds are identical. NH3 has a lone pair that is fatter than a bond near the nucleus, so the lone pair-bond repulsion is slightly larger than the bond-bond repulsion. This results in a H-N-H angle of 107o, slightly smaller than 109.5o.

However, this is far from obvious when looking at the four valence MOs of NH3 (Figure 4.10) computed using B3LYP/6-31G(d). The reason is that that MOs are not unique, and that these MOs (which lead to a diagonal Fock matrix and are known as canonical MOs) are not the MOs where the electron pair repulsion is a minimum. Algorithms have been implemented that find a new set of MOs (localized MOs or LMOs) that represent a linear combination of canonical MOs for which the MO–MO repulsion is a minimum (Figure 4.11).


Figure 4.11. 0.045 au isosurfaces of the four valence localized MOs of NH3 computed using B3LYP/6-31G(d). There are three N–H bond LMOs [(a)–(c)] and one lone pair LMO [(d)].
From Molecular Modeling Basics CRC Press, May 2010.
Click on the picture for an interactive version

LMOs for which the inter-orbital repulsion is a minimum are called energy localized orbitals or Edmiston-Ruedenberg orbitals. Other popular choices are Foster-Boys and Pipek-Mezey LMOs, which use different localization criteria.

Using MacMolPlt
The screencast below shows how to compute Ruedenberg LMOs for ammonia using GAMESS (local=ruednbrg in the $contrl group), and how to display the LMOs, as well as the canonical MOs, in MacMolPlt. I also show how to identify the HOMO and LUMO canonical MOs in MacMolPlt.

Note that I specify a geometry optimization in the GAMESS input file. GAMESS will only compute the LMOs for the optimized geometry.




Using Jmol
I use Jmol for the interactive figures and the scripts can be found here and here. Unlike the density and electrostatic potential, Jmol can generate its own grid data, so to display MO number 2 you simply use "mo 2" in the script. I use
mo 2; mo cutoff 0.045; mo fill nomesh; mo translucent 0.2
to make it a little prettier.

Jmol cannot find the MOs in a GAMESS geometry optimization file, and Jmol only stores the LMOs if present. So to display the canonical MOs with Jmol you need a single point energy calculation (output file) and to display the LMOs with Jmol you need a single point energy calculation with local=ruednberg added (output file).

Saturday, February 20, 2010

Ionic and metallic bonding

fig4-7new

Figure 4.7. 0.0005 au isodensity surface with superimposed electrostatic potential of (a) H–Li, (b) Li, (c) Li2. The maximum potential value is 0.05 au, and the level of theory is B3LYP/6-31G(d).
From Molecular Modeling Basics CRC Press, May 2010.

Figure 4.7 highlights two other kinds of bonds. Note the decrease in the size of the Li atom (and the large positive charge) compared to the Li atom in Li–H. LiH is best thought of as Li+H- (i.e., the bonding electron pair belongs to H- rather than being shared), which is an example of ionic bonding.

Here is an interactive version of Figure 4.7a where the atomic densities of H and Li are superimposed on the density of H-Li.

Click on the picture for an interactive version

Li2 is more polar than H2: more positive at the ends and more negative in the middle, indicating the a larger rearrangement of electron density upon binding compared to H2. Here is an interactive version (the corresponding Jmol script can be found here; see this post on making plots like this), where I have superimposed the electron densities of the Li atoms and Li2:

Click on the picture for an interactive version

Looking deeper into the density (by using a larger, 0.01 au, isodensity value) reveals a density rearrangement that is quite different from H2:

Click on the picture for an interactive version

Here you can see strong localization of electron density between the nuclei, indicating that Li2 is best thought of as Li+:Li+, where ":" indicates an electron pair. This is an example of metallic bonding.

Both ionic and metallic bonding are distinctly different from covalent bonding, in that only covalent bonding leads to the formation of distinct molecules, while ionic and metallic bonding leads to formation of crystals.

To demonstrate this, find the lowest energy structures of H4, Li4, and Li2H2, using, for example, B3LYP/6-31G(d). Go ahead, I'll wait.

Why do I use a different isodensity value for this plot?
I usually use a 0.002 au isodensity surface, but in Figure 4.7 I use 0.0005. This is something I didn't discuss in the book but should have. When I made the plot of the 0.002 au isodensity surface with superimposed electrostatic potential of Li atom, I discovered that is was very blue, i.e. quite positive (go ahead, try it for yourself). I only got a neutral-looking atom when I went down to 0.0005 aus, which is what I have used for the figures (unless otherwise noted).

The positive electrostatic potential on the 0.002 au isodensity surface of Li indicates that a significant amount of density is found outside this surface, which is clearly not the case of the H atom, as shown in a previous post. This, in turn, indicates that the Li electron density decreases more slowly with distance compared to H, which makes sense since Li is much less electronegative than H. Thus, the 0.002 au isodensity surface is a reflection of the van der Waals surface of organic molecules (containing electronegative elements) but not alkali metals.

Thursday, February 18, 2010

Covalent bonding

fig4-5
Figure 4.5. 0.002 au isodensity surface with superimposed electrostatic potential of (a) H2 and (b) H atom. The maximum potential value is 0.05 au, and the level of theory is B3LYP/6-31G(d).
From Molecular Modeling Basics CRC Press, May 2010.

If we look at the electron density of H2 (Figure 4.5a), we can clearly see that at this separation the electron densities of the two H atoms have fused indicating electron sharing, a hallmark of covalent bonding. Here is an interactive version (the corresponding Jmol script can be found here; see this post on making plots like this), where I have superimposed the electron densities of the H atoms and H2:

Click on the picture for an interactive version

What you can't see in this picture is that the electron density has rearranged significantly between the nuclei, which is the source of the bond strength. To see this we need to look at a larger isodensity value (here 0.075 au):

Click on the picture for an interactive version

Sunday, February 7, 2010

I'm positive

fig4-2
Figure 4.2. 0.002 au isodensity surface with superimposed electrostatic potential of (a) Li+, (b) Na+, and (c) K+ ion. The maximum potential value is 0.8 au, and the level of theory is B3LYP/6-31G(d).
From Molecular Modeling Basics CRC Press, May 2010.

Here is an example of how computational chemistry can be used to enhance teaching at the general chemistry level.

Why does the ionization energy decrease on from Li to Na to K? That's the same as asking why the electron affinities decrease on going from Li+ to Na+ to K+.

Figure 4.2 show the ions colored by how positive they are at the surface (i.e. the electrostatic potential superimposed on the 0.002 isodensity surface). The darker the
color the more positive the ion, and it is clear that the Li+ ion is “more positive” than Na+, which is more positive than K+. Thus, more energy should be released when adding an electron to Li+ compared to Na+, and hence more energy is needed to remove an electron from Li
compared to Na (and similarly for K).

The reason why Li+ is “more positive” than Na+ or, more accurately, why the potential on the 0.002 au isodensity surface is more positive for Li+ than for Na+, is that the former is a smaller ion than the latter, so the surface is closer to the +1 charge at the center of the ion.

fig4-4
Figure 4.4. 0.002 au isodensity surface with superimposed electrostatic potential of (a) Li+, (b) Ne+, and (c) Na+ ion. The maximum potential value is 0.8 au, and the level of theory is B3LYP/6-31G(d).
From Molecular Modeling Basics CRC Press, May 2010.

This rationalization is, of course, only qualitative and is is not predictive of the ionization energies among different groups. For example, based on Figure 4.4 one would expect that Ne would have roughly the same ionization potential as Na, which is not true at all.

When making these figures it is very important to get the relative sizes of the ions correct, but this can be difficult since each image can be zoomed to an arbitrary size. The screencast below shows how to control this in MacMolPlt using the Manual Windows Parameter window.

The same point can also be made with a "quick-and-dirty" electrostatic potential, as shown in this interactive figure. Here the electrostatic potential is due to a plus one charge centered at the atom (rather than the nuclear charge and the electron density) and the surfaces are the spheres defined by empirical ionic radii. The Jmol script can be found here, and the mol2 files here, here, and here.

Click on the picture for an interactive version

Sunday, July 12, 2009

The AutoOpt tool in Avogadro

I am have been meaning to do a screencast of the Auto Optimization feature in Avogadro for a while. Fortunately Geoff Hutchison beat me to it, as you can see above, and did a much better job than I could have. To prove that point I made the screencast below. It shows how the autoopt tool can be used to illustrate intermolecular interactions - in this case hydrogen bonding between water molecules. Note how the H atoms on one water follow the O atom on the other when you move it (electrostatic attraction), how it's impossible to get the O atoms next to each other (electrostatic repulsion), and how one molecule gets out of the way when you try to push the other too close (steric repulsion).

Sunday, July 5, 2009

The ammonia VSEPR

The H-N-H angle in NH3 is 107o while the H-C-H angle in CH4 is 109.5o. The simplest explanation for both is the Valence Shell Electron Pair Repulsion (VSEPR) theory. Methane adopts a tetrahedral geometry to minimize repulsion between the four electron pairs in the C-H bonds. Similarly for ammonia, but it has a lone pair, which is fatter near the nucleus, so the lone pair-bond repulsion is slightly larger than the bond-bond repulsion. This results in a H-N-H angle that is slightly smaller than 109.5o.

Here is a Jmol application I wrote to illustrate just that. I use GAMESS and B3LYP/6-31G(d) to compute the geometry (H-N-H angle = 106o) and molecular orbitals. Molecular orbitals are not unique and most quantum programs do not produce VSEPR orbitals by default. Instead you have to tell the programs to localize the orbitals after they have been computed. There are several criteria for what localized orbitals are, and one of them is to minimize electron pair repulsion as VSEPR theory suggests. In GAMESS (the only program I know of which this option) such localized molecular orbitals are called Ruedenberg orbitals after Klaus Ruedenberg who first devised an algorithm to compute them with modern theoretical methods.

Jmol allows you to load several files at once and display orbitals for each simultaneously. So I simply computed orbitals for three different ammonia orientations (get the output files here, here, and here). Then it was simply a matter of writing a small script to go from one geometry to the other. It's very simple and the entire script can be found here:

load files "nh3b.log" "nh3c.log" "nh3d.log"
background white
rotate x -90
frame 1.1;isosurface mo26 mo 26 fill translucent 0.4
delay 4
frame 1.1;isosurface mo24a mo 24 fill translucent 0.9;delay 0.2
frame 1.1;isosurface mo24a mo 24 fill translucent 0.8;delay 0.2
frame 1.1;isosurface mo24a mo 24 fill translucent 0.7;delay 0.2
frame 1.1;isosurface mo24a mo 24 fill translucent 0.6;delay 0.2
frame 1.1;isosurface mo24a mo 24 fill translucent 0.5
delay 3
frame 1.1;isosurface mo24a mo 24 fill translucent 1.0
frame 3.1;isosurface mo24d mo 24 fill translucent 0.5;
select 3.1; spacefill off; wireframe off;
select 2.1; spacefill off; wireframe off;
frame all
delay 1
frame 3.1;isosurface mo24d mo 24 fill translucent 1.0;
frame 2.1;isosurface mo24 mo 24 fill translucent 0.5
frame all
spin on