Showing posts with label Chemistry. Show all posts
Showing posts with label Chemistry. Show all posts

Sunday, October 18, 2009

Love/Hate Relationship

This term I found a job on campus myself (yes, the economy is still in the dumps); the professor that I will be working with has already given me some stuff to do. The good thing is that they are interesting stuff. The bad thing is that they are interesting stuff - I get distracted from studying.

Anyway, recently one of my calculations had a problem and wouldn't run properly (it's not a convergence issue).

On the one hand, the professor was awesome and took the time to help me fix the problem, despite it being grant season*, and yay, now things seem to work.

On the other hand, it ended up being a really, really stupid newbie-type problem.

I don't know whether to laugh or cry (or bang my head against the wall).

*It's funny how nearly every chemistry professor I have this term mentioned having to hole up somewhere and write grant proposals, while none of the math professors did.


Continue...

Sunday, July 26, 2009

Easiest Troubleshooting Ever

Or: I was really dumb yesterday.

I was trying to play a bit* with porphin, that being the simplest porphyrin according to Wikipedia. Being really lazy, I drew the molecule in ChemDraw, exported it as a molfile, imported that into the computation program, cleaned it a bit, then ran an optimization.

It turns out that the export (exportation?) process does not include implicit hydrogens. And I was dumb enough to not notice until this happens**:

(Yes yes I'm using GaussView/Gaussian 03W, but that's irrelevant to this discussion.)

Of course, optimizations sometimes go wrong even if the initial structure is correct. But this is just asking for trouble. So yea. Public warning. Don't be like me, and remember to check the structure for things like implicit hydrogens when importing the input file from elsewhere.

(I guess this is really only applicable when the input is exported from a drawing program like ChemDraw. It'd be unimaginably annoying to check, say, a PDB file. Also, unnecessary.)

*Y'know, instead of doing my work-related calculations like a good undergrad assistant should. But hey, it was Friday evening...
**Actually, I didn't notice the absence of hydrogens until after I restarted the calculation, and was halfway home. Of course then I have to go back and fix it.


Continue...

Tuesday, July 14, 2009

Say What You Will

People say alot of things about The-Program-That-Shall-Not-Be-Named, much of it rather unkind (and with good reason). But, say what you will, at least it handles unit cell/supercell manipulation pretty well (even if it fails to do actual calculations on the cell). Moreover, it'll figure out the space group for me when I start mucking around with my unit cell. That alone made my day. Sure, I can find the space group manually, but hey, I'm lazy and I'll probably make mistakes anyway.

Of course, the reliability with which programs figure out point/space groups can be suspect, because the "apparent" symmetry of a molecule is not necessarily the "true" symmetry after accounting for geometry optimization*. However, since the coordinates of my structure are really simple, I don't have to worry about that (I hope).

After a long day of struggling to prep one sample (stupid finicky setup *mutters*), having something actually work as planned is a nice change. Now if I can only learn how to write scripts so that my series of calculations can run without me manually tweaking each input file, that'd be even better. Given that I'm not in computer science, though, I'm probably stuck with running commands manually. Oh well.

Actually, instead of running calculations, I really should be working on my "professional development" assignment (due in less than three hours). *Grumpy*

*In this case, the "Symmetrize" button is a useful friend to have. It does exactly as advertised - it tries to maximize, or at least increase, the symmetry of a structure; one can also constrain a calculation to fit a certain symmetry. It's sometimes a bit limited, and I'm never quite sure what exactly is it doing**, but it helps.
**One of my professors is old-fashioned enough to manually symmetrize molecules, meaning with the list of atomic coordinates and a set of matrices. Sure, in this case you'll know exactly what is being done to the molecular geometry, but just thinking about it gives me the shivers. *Shivers*


Continue...

Saturday, July 11, 2009

*Pokes at Avogadro*

There *has* to be more documentation on Avogadro (the program). I don't know how to get it to do the simplest things.

Avogadro can open cif files, which is great; however, by default it displays only the nonequivalent atoms. I want it to generate the rest of the unit cell; after all, the cif file does have the space group.

Well, there *is* a button called "fill unit cell" (under build - unit cell parameters). But it fills the cell only for one atom! For example, if I put in the cif file for NaCl, it gives me all the Na positions (including ones bordering adjacent unit cells), but only four Cl positions (forming the vertices of one tetrahedron). Now I'm trying to get it to give me the other atoms. Aggravating.

Another way to try to fill the cell is via the "super cell builder" command (and asking for a 1*1*1 "supercell"); this doesn't work either. Oddly enough, asking for a (say) 2*1*1 supercell will fill the (super)cell completely. Unfortunately, however, supercells cannot be "undone" to give a filled unit cell.

Now I'm seeing "ghosts". I closed the first file and opened a second cif file for a different structure; when I translate/rotate this new unit cell I see atoms from the previous cif file. Erk.

Sometimes (inconsistent) weird things happen if I click "apply" instead of "ok" too. Or maybe I just inadverdently did something dumb.

For some reason, lower symmetry cif files seem to do alright ("seem" being the keyword). It's just cubic ones. Maybe this is a "feature".

(Of course, I can use other packages as well, but I'll have to haul my lazy backside to the lab to do that, and I'd really rather stay at home at this late hour.)

[Edited]
Strange workaround: display a supercell (in "unit cell parameters" rather than "super cell builder"), then shrink it back.


Continue...

Friday, July 10, 2009

Quick Link on Computational Basis Sets

While I was trying to look up LANL2DZ, I found this link on computational chemistry instead. It's quick and dirty as a guide to computational methods and basis sets. Not sure how universally held the page's opinions are, but they sound good enough to me for now.

Also, trying to run crystal structures on The-Program-That-Shall-Not-Be-Named sucks. Right now I've had my share of warning messages (can't do much about them), and my Fermi level energy's oscillating between 10000 and -10000 hartrees*. Wonderful, isn't it?

(I'm actually using a proper solid-state computational program for my proper calculations, but I was wondering how'd TPTSNBN do. Not well, as it turns out.)

*Let me correct that: it's +/- 7 million hartrees. *Not sure of what to say at this point*


Continue...

Tuesday, July 7, 2009

Remarks on Making Iodine

Over at My Chemical Journey is a Youtube video showing how to make iodine. It's cute, but I do want to make some comments.

This is a "weekend project" only if you have to track down all the reagents and equipment. As home reactions go, this one is straightforward; as an example of high school chemistry, I'll just call it "cute", as before. However, the chemicals involved must be respected.

Safety first - gloves and safety glasses are essential for this synthesis! Don't just wear goggles on your forehead. The lab coat's a good idea too, but not as important.

KI is probably easiest to get online - I've never seen it in a store (though it's out there). There are other iodine sources, of course, but they probably cost more.

Any strong acid will work as 'proton' source, but some choices are better than others from a practical standpoint. For example, concentrated HCl outside a fume hood is nasty stuff due to its volatility.

Do NOT use bleach as the oxidizer, or your lungs will hate you. Sodium hypochlorite reacts with acid to form chlorine, which, as everyone knows, is a corrosive gas. Of course, if you want a chlorine cloud to go with the iodine...

For those with a power supply, electrolysis may be a more cost-effective method. But that's a whole different story.

Do actually be careful with how much oxidizer you add. Too little oxidizer, and you'll get the triiodide complex (the brown stuff), i.e. no crystals. Too much oxidizer (especially H2O2), and you get things like iodate; again, no crystals.

It's probably better to do the reaction somewhere cool, since iodine is also (obviously) volatile. This stuff will also stain plastic, and corrode metal. Use glass. (Teflon might also work.)

The traditional way to purify the product is by sublimation. I've never done this step myself, but it shouldn't be too hard (though it'll require a bit of creativity with respect to equipment).

Last but not the least, the product is not easy to store. Also, be careful with waste disposal. Something to keep in mind.

[Edited]
Did I just call electrons oxidants? Sorry. Fixed.


Continue...

Monday, June 22, 2009

On a Completely Unrelated Vein

For powder XRD (or maybe just the instrument the lab uses), if the sample is not flat (i.e. x-ray might not quite hit the right places it was calibrated for), one of two things can happen.

  1. If the sample is lower than expected (e.g. indents), the powder pattern shifts to higher 2 &theta
  2. Similarly if the sample is higher than expected (e.g. mounds), the powder pattern shifts to lower 2 &theta

(I spent 15 minutes* trying to match powder patterns to no avail and this turned out to be why. Sigh.)

Pedantry behooves me to note that I said e.g. not i.e. because I'm sure there are other situations where the sample isn't at the expected location.

*This doesn't sound like much - I guess I'm used to spending only two minutes on it because I know what my expected products are.


Continue...

Wednesday, May 6, 2009

I take back what I said about ampouling.

Sealing ampoules turns out to be nontrivial, especially when the contents of the ampoules are under vacuum.

The theory is pretty straightforward. Heat the glass at the desired sealing area, rotating slowly. This time, heat a bit more - the glass will melt and bend "inwards". Now, when I was watching other people do this, the glass melts in a nice ring and a few repeated twists will seal the ampoule. A few more twists will free the ampoule, and then just tidy up the sealed end with a bit more heat.

When I do it, the glass softens quickly and drastically. It's still possible to seal the tube when this happens - when all the glass in the heated area has more-or-less merged, twist the ampoule until the closed end comes off. Then just tidy up the end as before.

It turns out that it's really easy to break the tubing by heating the glass too much. The nice thing about evacuated ampoules is that, if you break the vacuum, it makes a loud popping sound. So yea. If you break an ampoule, everyone within hearing range will know it.

And let's just say that I've managed to break every ampoule handed to me today during sealing. Yay me. Fortunately, the reagents in question can survive in air for a reasonable amount of time (during which the sample gets re-evacuated and re-sealed by my supervisor), but we'll see what happens during characterization.

I'm not sure why it's so hard to seal ampoules without breaking the vacuum. One complication is that the ampoule comes with the vacuum line attachment (I'm not sure what the glass connection to the Schlenk line is called). The attachment is a bit unwieldy, so it's a bit harder to turn the glass tubing evenly. Making glass ampoules is much easier since the first step (pulling tubing apart) gives rise to a nice narrow opening that's easy to close, whereas in sealing ampoules there's no pulling step, so the opening is relatively large and hard to close. Other than that, I don't know.

More samples tomorrow, more opportunities to break ampoules. Yay?

[Edited]
Nine new ampoules. Two stayed intact all the way. The optimist will say that 2/9 is infinitely greater than zero; the pessimist will say that 2/9 is still crap as an average. Hm.

[Edited again]
Five more ampoules. All successfully sealed - woot! Now let's see if this ability is permanent or some fleeting thing.


Continue...

Monday, May 4, 2009

First Day - Glasswork

There'll be two posts today. The first is kind of a lesson on basic glassworking. The second is more-or-less storytelling.

Ok, so the lab in which I work requires ampouling of samples. This means making ampoules. Lots of them.

Source material: borosilicate glass tubing, 1 cm diameter (hey, metric!). The ones in the lab are almost as long as I am tall, which either says alot about the tubing or says alot about me. A hydrogen/oxygen torch is required, also. (A lighter to start the torch would be nice.)

1. Mark the tubing to the desired length (say 30 cm or so - about twice the ampoule length), as many as desired. It's probably more efficient to mark multiple tubes at a time.

2. Cut the glass. The lab I'm in happens to have an automated diamond-edged wheel. It basically spins so that I just have to touch the glass tubing to the wheel, slightly rotating the tubing, to get a deep scratch, about 1/5 - 1/4 the circumference of the tubing. My idea of a deep scratch is "just when the wheel breaks through one tubing wall". I like it - the manual kind strikes me as annoying*. There's a downside though - the wheel has been set up so that it turns toward the user, along with any accompanying shrapnel. Thus, the fume hood sash must be down (or some other form of protection set up).

3. Break the glass. Hold the tubing so that opposing thumbs meet diametrically across from the scratch (in particular, the scratch faces away from you). Break the tubing by applying a outward and slightly sideways force - like, I don't know, breaking a cookie. And do it gently! It will break more-or-less evenly, no worries there. Now we have a whole bunch of shorter glass tubing.

4. Now the fun part - torch! First check the gas source, both hydrogen and oxygen. Main valve is on, regulator is set correctly, pressure is good. Then open the regulator valve.

5. Start the hydrogen flow on the torch. Light it. It will burn mostly colourless, a little blue, a little pinkish-yellow. Sometimes flares yellow if the air's dusty or something. Adjust the hydrogen until the flame length is about umm, the distance between a stretched thumb and forefinger. If I have to give a number I'd say 15 cm.
Then start the oxygen. The flame will turn very bright, and a lovely pale blue. Adjust oxygen flow until the flame is well-defined (it looks kind of like a pencil), and about oh, a little longer than twice as long or so.

6. At this point I change safety glasses from the normal ones to ones that block UV. It's probably safer to do this earlier, but I can't see the hydrogen-only flame with the glasses on!

7. Hopefully the cut tubing have been stacked somewhere safe and reachable without touching the torch. Pick one, and heat the middle, rotating constantly (a moderate speed is fine). The hot part will turn white. Don't touch the cut ends - they are sharp and hot. When you feel the glass starting to sag around the white part, remove the tubing from heat and pull. Hard. Now you'll have something that looks like two Pasteur pipettes stuck tip-to-tip. Disconnect them by heating the very thin middle lightly and pull a bit more.

Incidentally, two things to note: always rotate when heating the glass. Never pull and heat at the same time. Failure to comply will give wrecky results.

8. To turn "Pasteur pipettes" into ampoules, heat the part of each "pipette" where it starts to thin down drastically. With rotation, of course. I'm right handed, so the large end is in my right hand (and does all the rotating in this step), and the smaller end is in my left hand. When the thing softens, pull the thin part off entirely. That thin end might make a good TLC spotter...

9. Seal the end of the tubing by keeping the end (and only the end) in the flame with constant rotation. It should seal, and flatten out. If it doesn't flatten, remove from heat, quickly press on a heatproof surface (I use the torch), and return the end to heat.

10. For people who likes round ends (like test tubes), blow through the cold end of the tube. Assuming that the hot end is hot enough, the flat part will round out. Don't touch the diamond-wheel-cut part; it's still hot and sharp.

11. Fire-polish the open end by heating it (with rotation) just until the entire circumference of the open circle turns white (i.e. glass has melted).

12. Turn off the torch. Oxygen off first, always. Then hydrogen. (Try doing it the other way once - see why this is necessary.) Then all the other valves off. Chuck the useless glass bits into the glass disposal bin, or donate them to organic chemists, whatever.

And yea. Two open-ended ampoules. Not clean, mind you. I'll post on how to close the other end when I learn how, though I don't see why it should be any different from making the ampoule in the first place.

*Caveat: I've never used a manual glass tubing cutter, but I've used one for cutting metal tubing. For metal tubing cutters, don't just scratch the tubing - cut right through with it. Metals are too flexible to snap.


Continue...

Sunday, May 3, 2009

Does Anyone Else Do This?

Whenever I see a pair of crucible tongs turned upside-down on a bench (i.e. such that the tips are touching the bench), I must - no matter what - turn them over.

The reason is simple - upside-down tongs are more prone to damage. For those who haven't used crucible tongs for awhile, crucible tongs are not flat; they are shaped like a pair of scissors with tips bent perpendicular (more-or-less*) to the "scissoring plane". If someone accidentally pushes down on the tongs while they are upside-down, they might get bent out of shape to uselessness.

This was taught to me during my second work term - the beaker tongs there are really crucible tongs, and I used them very often. Nobody there ever flipped the tongs the wrong way, but from then on, I am paranoid about upside-down tongs, even though they are rather trivial in the grand scheme of things (it's not like, say, messing with an ICP quartz tube).

It got to the point where if I see someone - even someone I hardly know - leaving tongs upside down, I'll flip them over. Yes, in front of the offender. Must...flip...

I'm thinking about this because starting tomorrow I'll be working in a lab with ovens and furnaces, and those always remind me of beaker/crucible tongs. Does anyone else have obsessive lab behaviour with trivial equipment like this?

(I was going to include an image of crucible tongs, but many of the ones on Google are upside-down. And I can't flip them over. Noooo! Flip them over! Flip them over! *Quickly closes window*)

*It's actually an obtuse angle with respect to the rest of the tongs (or acute with respect to the bench when the tongs are right-side-up, whichever way you want to look at it)

I know I've been on hiatus for the last while; nothing bloggable happened, therefore no blog posts. I don't know whether I'll post more when work starts; we'll see.


Continue...

Saturday, April 25, 2009

Lab Techniques Link

There are alot of videos out there that illustrate lab techniques, most notably ones from MIT OpenCourseWare. University of Alberta also has a set. My school has these videos, as well, for organic lab techniques, but those are accessible only to students taking the particular course.

I just want to share one more set of videos, from the Chinese University of Hong Kong. Chinese voice-over, English caption.

I think I got the link from some forum somewhere - it's been awhile. What's interesting about this site is that they show more sophisticated techniques than the usual pipetting and TLC. For example, there are videos on using Schlenk lines and glove boxes - very useful for students who'll be using such things!

(Some of the videos are rather dated - watch the one on NMR.)


Continue...

Wednesday, April 15, 2009

A Problem on Inorganic Final

Today's inorganic final makes me very sad because
1) I apparently can't calculate the packing ratio of hcp (something's wrong with my calculation and I know it but can't find the mistake!)
2) I can't do two problems on the exam. Complete blankout. And there aren't that many problems to begin with.

Anyway, I think I've finally figured out how to do the latter part. So here's the solution for the blogosphere to criticize.

(I hope my LaTeX show up properly.)

Question: Find the systematic absences of P2221 and C222.

I'll do C222 just to avoid typing the subscript :P (The other is similar). Furthermore, I mix Hermann-Mauguin and Schonflies symbols. I'm shameless like that.

First thing to notice is the centering: Primitive space groups have no a priori systematic absences. C-centering does: d-spacings with odd h + k Miller indices are not observed. This will pop up formally when I do the final calculation, but it's something worth noticing.

Second thing to notice is that both are orthorhombic space groups. On the exam, I wasn't sure of this, but the trick is that the symmetry cannot be *lower* than orthorhombic - otherwise there'll be a 1 somewhere - and the symmetry cannot be higher, because tetragonal space groups always have a 4 somewhere, trigonal have 3's, hexagonal have 6's, and cubic has a 3 in the middle (space diagonal) term. By these numbers I mean the number itself or some variation thereof (i.e. rotation, rotoinversion, or screw axis). Anyway, of the non-orthorhombic crystal systems, only monoclinic has "monoclinic C" as a legitimate Bravais lattice.

Now I am going to make one rather huge assumption: the space group has standard setting (I don't know the right terminology for this), meaning, "the symmetry operations are located at what it looks like in the crystallography table". I am pretty sure that this *is* an assumption one must make, and this is the assumption I couldn't figure out in the final itself.

Now one must generate the symmetry-equivalent locations. Cheating a bit here (I am really bad at this and this isn't the final anyway), check the lovely Crystallography Tables and one will obtain the following Wyckoff positions:

x, y, z
x, -y, z
-x, y, z
-x, -y, z

x + 1/2, y + 1/2, z
x, 1/2 - y, z
1/2 - x, y + 1/2, z
1/2 - x, 1/2 - y, z

Ok so there's 8 of them and they are paired (applying the criterion that we have c-centering to the top four positions gives the bottom four positions).

Now we can go and look at Miller-index-dependent part of the structure factor. It probably has a name; I call it E(hkl).

F_{hkl} = \displaystyle{\sum_j f_j E(hkl)}
where j is the index for all atomic positions, and
E(hkl) = e^{2 \pi i(hx + ky + lz)}
Because we have all these symmetry equivalent positions, E(hkl) is a bit more complicated. If we instead index the structure factor over all non-conjugate positions (i.e. positions which are not related by any symmetry operation) and incorporate all the symmetry-related positions into one E(hkl), then we get a much longer expression:
E(hkl) = e^{2 \pi i(hx + ky + lz)} + e^{2 \pi i(hx - ky + lz)} + \ldots + e^{2 \pi i(h(1/2 - x) + k(1/2 - y) + lz)}
Do the obvious thing and factor.
E(hkl) = e^{2 \pi i(hx + ky + lz)}\{1 + e^{2 \pi i(-2ky)} + \ldots + e^{2 \pi i[h(1/2 - 2x) + k(1/2 - 2y)]}\}
(I hope I got all the parentheses in there). Here's the tricky part. For a systematic absence, E(hkl) = 0. The left factor
e^{2 \pi i(hx + ky + lz)}
is nonzero for arbitrary x, y, z. The only way we can get E(hkl) = 0 independently of atomic positions x, y, z is for the right factor to equal 0. If the right factor is actually independent of x, y, z this will be trivial, because Miller indices are always integers and Euler's formula applies:
e^{i \theta} = \cos{\theta} + i\sin{\theta}
Sadly, this isn't the case. Let us consider only the right factor. Now what? Factor again. Really. The factor becomes
[1 + e^{\pi i(h + k)}][1 + e^{2\pi i(-2ky)} + e^{2\pi i(-2hx)} + e^{2\pi i(-2hx - 2ky)}]
The left sub-factor gives the familiar, well-beloved systematic absence: if h + k is odd, E(hkl) = 0:
0 = 1 + e^{\pi i(h + k)} \Rightarrow (h + k) \equiv 1\,(\mathrm{mod}\,2)
The right side is slightly dicier on first glance, but it's actually a sum of the form.
1 + a + b + ab = (a + 1)(b + 1)
So factor again. (Writing out the right factor only:)
[1 + e^{2\pi i(-2hx)}][1 + e^{2\pi i(-2ky)}]
Both terms are nonzero in general for arbitrary x and y.

So we are done. The only systematic absence is still the usual condition: d-spacings with Miller index {h,k,l} such that h + k is odd will not be observed. The restrictions imposed by the three C2 axes are position-dependent and therefore do not, in general, give rise to systematic absences.

If the solution's wrong, please let me know. Meanwhile I'll either be studying for my next exam or lamenting about how badly I did in this final. (Knowing me, it's the latter. But I really ought to study*.)

Incidentally (it's probably obvious), I changed some template parameters so that the equations will actually display fully. If it shows up wonky on your computer, let me know.

*For some reason, my sleeping schedule's messed up such that now I sleep during the afternoon/evening and study at night, taking exams in the morning. This isn't good since my next exam is in the afternoon.


Continue...

Tuesday, April 7, 2009

Open a bottle of drug-of-choice and let's celebrate!

YES! I have an optimized geometry. And the frequency calculation to prove it.

I have a nanomaterials final this Thursday and right now, I don't care - it's time to celebrate! *Bounces around the room*

Seriously if I am on the street right now I will probably start hugging random people.

Yay! Optimized structure! Wheeeeeeeeeeeeeeeeeeee!

Actually, I had a convergent structure on Tuesday (March 31st), but as one of the professors who helped me out said - I'll believe it when I see the frequency calculation.

Well the frequency calculation got cut off because I ran out of space (stupid space quota on campus computers). But the log file has enough information. No imaginary frequencies - therefore a minimum. Well, well!

I feel all vindicated. And very pleased.

Sure, my molecule (ferriin) is nothing new, nothing groundbreaking, and definitely does not constitute original research (someone else did it already, in much greater detail, and with a better basis set to boot). But it's a heady feeling all the same. If this is what real research is like - I want in.

Sure, I spent so much time on this that I am behind in most of my other courses.

Sure, nobody cares but me, anyway.

At this point, none of that matters. Because the computation worked. That's good enough. More than good enough.


Continue...

Monday, March 30, 2009

Hope

The optimization of my troublesome open-shelled system is well underway, with the use of DFT and some tweaks. It looks like it might even converge!

Now that I said that, I probably just jinxed it. But it's exciting to see the log file! So close! *Bounces impatiently*

Step 2, assuming step 1 converged: tighten convergence criteria
Step 3, assuming step 2 converged: frequency calculation (for thermochemical data and to check minimality)
Step 4 and beyond is relatively trivial: data-crunching

Shoutout: THANK YOU professors for making awesome suggestions. And one professor for actually running calculations. As usual, I'll give them professors all a hug except that'll just freak them (and me) out, so I shouldn't do that*. But thanks.

*This is one reason why I give out candy to professors. They don't always know it's me, though.

[Edited]
Yep, the calculation is now officially jinxed. The energy is oscillating. Curses! (It's getting uncomfortably close to midnight, too...)

Postscript:
(Regarding the optimization of the hexaaquairon complexes, particular the +3 one)
Prof: It was a sextet, right? If it isn't you just optimized an excited state.
Me: ummmm I think so... *dubiously* (turns out it wasn't, fuck**!)

Yea ok I had a pre-med moment and thought the hexaaquairon complexes were low spin. That wasted 11 hours of calculation time *hangs head in shame*. (And they converged so nicely too!)

**A side effect of working at places where every other coworker swears. Alot. Sorry. Tangentially, for some reason I find it funny when professors swear by accident.


Continue...

Wednesday, March 25, 2009

That's Just Not Right

The University happens to have two computational chemistry programs: "the-program-that-shall-not-be-named" (TPTSNBN) and "that-other-program" (TOP). The former actually gets used in all sorts of applications (e.g. research), whereas the latter is more of a teaching tool than anything else.

Well, you know how I had a recalcitrant molecule that won't do anything in TPTSNBN? It ran (sort of) in TOP! Of course, I had to do so much massaging and random crap that the numbers don't mean anything, but at least the calculations that worked ran quickly, and those that didn't were relatively honest: they ran or they didn't, and a popup message will tell me so within the first minute (rather than, oh, after 20 hours).*

Sigh. I've badgered multiple professors about my convergence problems (they haven't gotten around to looking at it yet), but I can hardly expect a professor to swoop down and save me every time.

Still, it's outright amazing that TOP ran anything like my molecule at all; usually we just feed TOP small organics like benzene or suchlike.

*"Best" message from TPTSNBN ever: "Kill the batch, now!"


Continue...

Thursday, March 12, 2009

Open-Shell Systems are Cursed

The-program-that-shall-not-be-named just won't handle them, it seems. Or something.

This here is basically as a log to keep track of what I've tried so far.

Goal: geometry optimization, followed by a frequency calculation. Your typical sequence of events.

The input structure is the optimized structure of a molecule that looks exactly the same except the charge is different by +1. Hence the open shell.

Things that I've tried from here (all of which failed):

  • Pick a smaller basis set. Mind you, my current basis set is plenty small as it is. Then I tried using STO-3G and it still won't work. Semi-empirical methods do not apply because I have a metal in my system. Maybe I should try DFT instead of HF.
  • Changing the initial structure slightly (minor bond length change). Nope.
  • Screw the geometry optimization. Ran a single-point energy calculation (which worked), and a frequency calculation (which didn't).
Now I am trying to force the convergence, and added a couple of thousand of cycles to compensate. Let's see if that works, although I am not optimistic in that regard (the log file is not looking good).

I should note that the error isn't "I ran out of cycles/memory". More like "something weird's happening and so I keep repeating the same procedure - which doesn't work - until I run out of cycles".

Actually, I should also try shifting the MO energies. And turning off DIIS extrapolation. Maybe later, when the current run is finished.


Continue...

Sunday, February 22, 2009

In Spectral Hell

Spectra assignments, that is. I thought I won't have to see them (much) again after second year, but apparently not - third year organic lab's full of them. (However powerful proton and carbon-13 NMR may be, it's still incredibly annoying to manually interpret the spectra; IR is easier, at least. Usually.). Anyway, here's a picture of one of my products to remind me why am I still doing this.

(I posted a cell-phone image of the same sample previously, but that pales in comparison to this.)
It's actually quite a bit more orange than that. But anyway. All my other products are boring white stuff. (Plus one yellow oil, which is not much more interesting than white solids).

[Edited]
The blogroll slightly less obsolete than before; that, of course, is not saying much. Ok, fine, I'll get back to my pages (and pages and pages) of spectra.


Continue...

Saturday, February 14, 2009

Pólya-Burnside Enumeration

My previous post regarding the need to study notwithstanding, I want to talk about Pólya-Burnside enumeration*. It's a way to count the number of orbits of elements subject to a group action. This sounds all technical and uninteresting, until one realizes that molecules, under the set of "rigid" operations that leave the molecule invariant, is such a set of elements, with the operations themselves being the group action. (By "rigid", it pretty much means rotations only. In particular, no mirrors. However, I don't see why this theorem won't work with point groups - after all, point groups are groups!)

To make things more formal and rigorous, I need to talk about groups and group actions for a bit.

Well. First things first. A group G is a nonempty set S with a binary operation, *, satisfying four things:

  • S is closed under the operation. In particular if a, b are in G, then a*b is in G
  • * is associative. That is, if a, b, c are in S then
    a*(b*c) = (a*b)*c
  • There exists an identity element: that is, there exists an e in S such that for all a in S, e*a = a*e = a
  • Every element has an inverse: for all a in S, there exists a b in S such that a*b = b*a = e, where e is defined as in the previous point

Alot of things are groups: examples include the set of rationals under addition and the set of bijections under composition. It is easy to show that e and the inverse of a (which I'll start to call a-1) are unique.

Second thing up: group action. Given a group G and a set X (X doesn't have to be a group), a group action is a function
\Psi: G \times X \to X
satisfying two things:
  • Ψ (e, x) = x for all x in X
  • Ψ (g, Ψ (h, x)) = Ψ (gh, x) for all g and h in G, x in X

If G has a group action with X, we say that G acts on X.

This definition is actually pretty natural. If our group happens to be the set of rotations, one of which is g, and x happens to be a molecule, a group action is the act of performing a rotation g on the molecule x.

The set of g in G such that Ψ (g, x) = x is called the stabilizer of x, written as SG(x).

We can define a binary operation ~ on X, by saying x ~ y if there exists a g in G such that Ψ (g, x) = y. We can show things like this binary operation is an equivalence relation, that the stabilizer is a subgroup of G (i.e. a subset in G that is a group), and more interestingly, that if G and X are finite, then
|[a]| = \displaystyle{\frac{|G|}{|S_G(a)|}}
where [a] is the equivalence class of a, also called the orbit of a.
(I won't prove the last point although it's relevant to our discussion, because then I'll have to talk about Lagrange's Theorem and cosets and stuff and that'll make this blog post too long).

Theorem (this theorem has waaaaay too many names, like Cauchy-Frobenius Lemma and Burnside's Theorem)

Suppose that the finite group G acts on a finite set X. Then the number of orbits [X/G] is given by
[X/G]=\frac{1}{G}\sum_{g \in G}F(g)
where F(g) is the number of elements in X that's fixed by g (i.e. the set of x's such that g is in the stabilizer of x).

The proof is short and sweet. Fix x in X. Consider
\sum_{g \in G}F(g)
The element x is counted in the sum once, every single time g is in SG(x). So x is counted |SG(x)| times.

But we are counting orbits not elements. Every element in a particular orbit is counted |SG(x)| times, and there's
\displaystyle{\frac{|G|}{|S_G(x)|}}
elements in an orbit, so in total an orbit is counted
S_G(x)\cdot\displaystyle{\frac{|G|}{|S_G(x)|}}=|G|
times. In other words,
\sum_{g \in G}F(g) = [X/G]\cdot|G|

Ok, what's this good for? I'll give one example in the next post.

Apparently Pólya's original paper is awesome, but I can't read it because it's in German. There's an English translation in my school's library, but someone borrowed it!

(Random tangent: hey, the featured article of the day is the aldol reaction! Cool!)

*My group theory professor spent a lecture on this, so that's why I know about it.


Continue...

Wednesday, January 21, 2009

Measuring IR Spectra of Solids

Measuring the IR of a compound is pretty much a standard procedure in an undergraduate organic lab. After all, it's quick, and gives us students a good idea of what functional groups the product actually has; nobody'll let us touch an NMR machine, that's for sure!

Sample preparation for IR spectrum measurement is easy for liquids: just use the stuff neat on a salt plate (well, ok, two salt plates). For solids, however, things are a little bit more complicated.

It's strange, actually. In things like UV-Vis spectroscopy, the Beer-Lambert Law applies. Among other things, this implies that light must pass through the sample. IR spectroscopy, when you get right down to it, isn't all that different from UV-Vis; sure, different motions are excited (the transitions are between vibrational rather than electronic energy levels), but still, light must pass through the sample!

What I find strange is that, alot of the "usual" methods used for preparing solid samples for IR well, don't actually let light pass through the sample very well. But they work!

See, the way my organic lab instructor likes to do IR is to actually dissolve the solid in a solvent and run the solution like a liquid sample. The solvent must be relatively inert, with a simple IR spectrum, like DCM and small alkanes. Since the solution is clear, this makes sense to me. The two problems with this method are: if the solvent dries and the salt plates got stuck*, or, if the sample ended up containing air bubbles. (Of course, don't use too much solvent, either, or the solvent peaks will overwhelm the sample spectrum - usually it's along the lines of a few crystals of solid plus just one drop of solvent.)

However, the "canonical" procedure is to grind the solid up (in a mortar and pestle, say) with some inert mulling agent with a simple, known spectrum (e.g. nujol), and measure the spectrum of the suspension. Presumably, the fact that it's a fine suspension allows the IR light source to interact with the sample while still allowing a (possibly nonlinear) path for the light to go through and reach the detector. (I've never actually done this, by the way.)

I've also heard of the "grind solid sample together with KBr then put it in a pellet press" method. This strikes me as rather odd, as well. Using too much sample will obscure the signal; using not enough sample means that the light will just pass through plain KBr (a substance transparent to IR) and give the spectrum of, say, air. I guess it works much the same way as nujol mulls do: there is "enough" light of each wavelength interacting with and passing through the sample to give results.

What prompted this post was the third way of prepping solid IR samples: thin film on salt plate. (Not in organic lab.) I didn't even realize that "thin film" was the idea until the lab instructor told me. Brief procedure: grind the solid in a solvent that it turns out to be soluble in. Place this suspension/solution on a salt plate as in nujol mulls. Let the solvent evaporate. Sandwich sample with another salt plate, and run the sample dry like that. Sure, now we don't have any solvent interferences, but... Dry sample? With possible airspace and uneven sample thickness (such that light might not pass through)? Really? (But it works! My spectrum was pretty**!)

Postscript: whoever who wrote in the manual to wash my product with water, methanol, and diethyl ether, should be lambasted. The stuff is soluble*** in the latter two solvents! (Admittedly, all solvents were at room temperature, mainly because I need to go up three floors in another building to get ice.) To their credit, CRC handbook's only comment was "slightly soluble in DMSO", but still! I was not pleased when I saw precipitate in the vacuum flask.

*Salt plates are expensive, considering that they are...salt. Meaning NaCl or its relatives (e.g. KBr). The chemistry store at my school deliberately jacked up the price of salt plates during terms when IR-running organic courses are in session, possibly to make sure we students take good care of them. (Or maybe they just want to make a profit.)
**If up-side down from the usual IR spectrum, i.e. peaks point up, not down. Possibly because the machine is an FTIR one?
***Ok, one possibility is that my product is totally different from what it's supposed to be. Considering that the reactants are liquids, and that any potential byproducts (e.g. oligomers) should be less soluble in (various) solvents, however, this is unlikely.


Continue...

Tuesday, December 30, 2008

Whee!

(Sorry I am a bit excitable right now.)

Look! Look! Course outline for my Inorganic 2 Course!

Content:
This course provides a detailed examination of the structure and bonding in main group and solid state compounds, including valence bond and molecular orbital theory for describing electronic structures, Hückel and Extended Hückel approximations. Structures of simple solids, including close packing of spheres and derived ionic lattice types; aspects of chemical crystallography, Bravais lattices, point groups, space groups, crystal planes, and X-ray diffraction; ionic interactions in gases and solution; descriptive chemistry and characterization of main group element compounds.

The first set of course notes is also out online, and the professor makes good his promise - sphere packing, ionic lattices, and basics of crystallography. *Squeals excitedly*

Well ok, some of the stuff is review (e.g. close-packings are taught in first-year), but as my first inorganic course has pointed out, "review" does not mean "easy".

Incidentally, has anyone heard of the Kepler Conjecture? Basically, it says that the maximum average sphere-packing density for monodisperse spheres is the same as that of cubic/hexagonal close-packings. Very cool, because it's not obvious*!

*Proceeds to wander off to read about monodisperse sphere packings, including random ones*

(Ok, I realize that googling the posted course outline can partly wreck my anonymity; I trust you readers with your judgement).

*Not obvious to me, that is. If you happen to be a physicist or an engineer**, however...
**Kind of like this.


Continue...