this post was previously published on my old website, there’ll be a few of those older but useful posts that I’ll be migrating over in the next little while…

Molecules are beautiful things, intricate and infinitely variable. As part of research publications it can be useful to catch them from their best angles. This short post gives some tips on how to present molecules in publications.

Our model for today is Prostaglandin-F2&#945 PGE2a

There are a number of chemical databases and ways of expressing molecular identities. A Wikipedia search is not a bad place to start. If you look to the right of the page, you’ll see a number of “Identifiers” in chemical databases listed. PubChem, a public database run by the NIH lists Prostaglandin-F2&#945 and shows an image. It also gives a chemical code, or isomeric SMILES code: CCCCC[C@@H](/C=C/[C@H]1[C@@H](C[C@@H]([C@@H]1C/C=C\CCCC(=O)O)O)O)O

Now we can take this code and do something really interesting with it. Download and run a program called Jmol. It’s a Java program which is open source and cross platform. Once open, go to the File menu and click on “Get MOL”, then paste the SMILES code in and…


You’ll now see a great 3D rendering of your molecule. You can rotate it at will, as well as changing colours, the size of molecules and other settings.
Jmol also loads much larger molecules and protein sequences. This is where the Protein Data Bank comes in useful. Look up your protein, for example BDNF and you’ll notice a four character descriptor, in this case: 1B8M as well as an option to save a .pdb file. Either of these options can be used to visualize the protein in Jmol (either >>File>>Get PDB, or >>File>>Open respectively).


This image was viewed with the following options (right click to bring them up):

  1. color >> atoms >> by scheme >> chains
  2. style >> structures >> ribbons

Jmol is a powerful piece of software with it’s own scripting capabilities. This makes standardizing your images easy.

It also allows making animations and all sorts of other things. For example, the animation for the Prostaglandin-F2&#945 molecule above was created using the following script:

# goal: a 360 degree spin 

~degstep = 5 # or 2, degrees per step
~degrees = 0 # total degrees rotated

while (~degrees <text><</text> 360)
	rotate y @~degstep
	~degrees += ~degstep
	~whereami = "degrees = " + ~degrees 
	print ~whereami
	~fileprefix = "anim/"

	~degreesplus = 1000 + ~degrees
	~towrite = ~fileprefix + "m" + ~degreesplus + ".jpg"

	#~towrite = ~fileprefix + "m" + ~degrees + ".jpg"
	write image jpg @~towrite

These images can then be combined using another open source java program called imageJ. Just import image sequence, then save as animgif.

Another useful bit of scripting for Jmol, is saving off with transparency, this allows adding images to composite documents more easily. Try this from the console:

wireframe 0.15
spacefill 25%
color bonds [40,40,40]
write pngT /YourfilePath/molecule.png