Monday, October 22, 2012

Know this: Non-breaking space/hyphen

So I found out about non-breaking space and non-breaking hyphen not too long ago. I wish I had known about this earlier! Basically it tells the program (in my case MS Word) not to put a line-break in between two words. For example "E." on one line and "coli" on the next, or a chemical name over two lines:

But by using a non-breaking space/hyphen you can have those words on the one line:

So how do you insert a non-breaking space or hypen? In MS Word:

Shift + Ctrl + [space bar]
Shift + Ctrl + [hyphen]

Easy! :)

Sunday, May 27, 2012

List of useful sites/resources for chemists/biochemists

So just thought I start a list of some sites and resources that I have used a lot during my PhD. This is a working list.

Google scholar
Easy way to look up papers, and for looking up papers for downloading a citation for Endnote (or similar). For anyone who goes to Melbourne Uni use this URL: http://scholar.google.com.au.ezp.lib.unimelb.edu.au/ . It will give you full access to most journals. Other institutions would probably have something similar.

Delta Mass
Really great site for trying to work out what are those adduct peaks are in your mass spectrum.

SDBS
Ever wanted to find experimental spectral data (NMR, IR, MS, etc) on common compounds? Look here!

Reaxys
Like SciFinder but way better!

MolPort
Think of it as Amazon for small molecules.

Please feel free to comment on any other sites that you have found useful.

Saturday, May 26, 2012

Extracting the amino acid sequence from a PDB file with Pymol

So I was just looking for a really quick way to take the sequence information from my PDB file so I could compare it to the real sequence to ensure that I have the correct amino acids in my structure. There are various programs that can do but I just wanted a quick way without having to download a new program or upload my PDB file and wait for a result. Found that  Pymol is able to exactly what I wanted and quickly.

Load your pdb file with Pymol. Then use the following command:

save somename.fasta

Or for a just one chain:

save somename.fasta, chain A

The file is saved in the same folder as your pdb file. Now you can do an alignment (or whatever you need to do with the sequence).

Note: if you have residues which have alternative conformations it's best to remove these alternate conformation. If not, Pymol will add two residues to the sequence file instead of one. To remove alternate confomations in Pymol:

remove not (alt ''+A)
alter all, alt=''

For more info see here.

Monday, May 21, 2012

Publication quality figures - Chemdraw and Pymol

I just printed a draft of a couple of my chapters. I have quite a lot of figures in these chapters ranging from graphs made from OriginPro, pictures of my X-ray structure made with Pymol and chemical structures made with Chemdraw. What I immediately noticed was how blurry some of the figures were. It really annoyed me! Like I understand DPIs and all that so why the crappy printing?! So I guess I could've let this slide, I mean I do have better things to do (like write a thesis) but of course I couldn't!

So what I figured out was that my when saving my Chemdraw files as TIFFs the settings on my new computer were off. Instead of >600 dpi it was set at 300 dpi. This is enough of a difference to get blurry pics. Lineart really should be 1000-1200 dpi. So I re-saved all my Chemdraw pics at 1000 dpi. Done.

Onto Pymol.Checking the dpi most pics were around 90 dpi! No wonder they looked blurry! But what did I do wrong? I did ray all my pics. After a quick google search I realised that just hitting the "ray" button isn't good enough (yeh I should've known, but I never really thought about it).

So what I needed were 300 dpi pictures from Pymol. What I did was calculate the resolution of the pic that I required based on the physical size of the picture. (Of course you could have a picture that was much larger than what you really needed and just resize in Word, but the size of each image will also be larger leading to a huge Word file.) For example, if I wanted a 2 x 3 inch image (Yes inches. Annoying for people who work in cm. Just, divide by 2.54 to convert cm to inches) then the resolution I need would be (2*300) x (3*300), which is 600 x 900 dpi. Then I typed (more like copy and pasted) the following commands into Pymol:

ray 600,900;
png picturename.png, dpi=300;

I also changed the antialiasing setting to 2, for higher quality images and also set hash-max to 220 so that it would ray faster (it uses more comp resources. Default is 100).

set antialias, 2
set hash_max, 220

This saves an image called "picturename.png" with a resolution of 300 dpi with a final size of 2 x 3 inches. Viola. Now repeat for the other 30+ Pymol pics...

So the general resolution settings (as I understand from looking at publication guidelines) are as follows:
  • Lineart (e.g. Chemdraw, graphs) should be 1000-1200 dpi; 
  • Halftone (e.g. Pymol, crystal pics, imaging) should be 300 dpi; and 
  • Combination halftones (mix of lineart and halftones) should be 600-900 dpi.
However, if you are preparing figures for a paper, check the journal.

Final words:
  • Check the dpi setting on your figures. Make sure that you have the right dpi settings for the right type of pic
  • In Word zoom in 500%. If it's blurry it will probably print out blurry.

The beginning...

So post numero uno. Just thought I start this blog to post things thesis related. I figure if I need to know this, then there must be someone else out there who could benefit from my extensive googling (and in the process I'm also contributing to the www. Yep we've come full circle!).

Also, I tend to forget things. So thing blog can be a reminder of how to do stuff...