Posts Tagged ‘simplecode’

This is part 2 in a series, here is part 1.

In the last section, you should have got Zed Shaw’s LamsonProject running successfully through its unit tests.

Now I’ll show you how to make what maybe the *simplest* application with Lamson that you’ll ever see. All our application is going to do is:

  1. Receive emails with Lamson.
  2. Pull the content from the body and subject lines using python.
  3. Send the data to Google Calendar to be turned into a calendar entry using the quickAdd call, again using python.

Because Lamson is built to interact easily with Python code, this is snap. (more…)

Read Full Post »

VMD and NAMD are two closely linked molecular dynamics tools from the UIUC Computational Biophysics Group.  As you can probably guess from the ‘Biophysics’ header, the emphasis for this suite is on large-scale macromolecular clusters such as proteins or even lipid bilayers, meaning CHARMM and force field models are the order of the day.

Despite the emphasis on biochemistry, there is an interesting tutorial on simulating water permeation through carbon nanotubes.  When I stumbled across that tutorial on the same day I saw a post about desalinization using carbon nanotubes, I thought ‘kismet!’.


Read Full Post »

This post builds on a previous post, if you’re interested, please read it first.  If not … leave.

Previously I showed how to modify the JChemPaint status bar to display the angle of rotation as we drag our molecule through its paces.

Now to do something a tiny bit more useful.  We’re going to add an option to the JChemPaint toolbar that will allow us to specify an exact rotation of our selection.  That was incoherent … fine … how about some pictures instead?

You can also get a combined diff of both of these posts against r15286 of JChemPaint here.

Read Full Post »

In my last post, I provided instructions on how to compile an up to date version of JChemPaint.  While exciting … yeah, right … what you as the dabbling chemist / programmer really want to do is extend the functionality of JChemPaint.

As the boringest [sic] example I could come up with … let’s add a rotation tracker to the ‘2d rotate’ ability of JChemPaint, meaning when we rotate a molecule 90°, let’s add a display to the status bar so we know we’ve hit 90° exactly.

this is what we’ve got:

this is what we want:

but how the hell do we get there?


Read Full Post »

Python IMAP and other horrors

The state of IMAP access in the main python library is appalling.  I don’t mean poor quality so much as thin; the documentation is thin, the examples are thin, and the code itself is a thin layer of sugar over the raw strings being burped out by the IMAP server.  I know I can’t fix it, because well, no one cares, but I can show you how I’ve gotten it working with gmail.


Read Full Post »