…And always twirling, twirling, twirling towards freedom!
November 28th, 2009 by excimer[1] 3D fanatics, rejoice! For there is now a simple way to add 3D representations of molecules to your blagoblag. Co-developed by Markus Sitzmann of NCI/CADD and Mr. Noel O’Blog, they have developed a simple script that you can load from the NCI website and, with a SMILES or InCHI key, allows you to visualize a molecule using Twirlymol, which is basically a no-frills Jmol which loads much, much, much faster. To wit:
EDIT: Changed molecule to show off the 3D-ness.
The code for blogspot is on Noel’s post above; for WordPress use the following template:
<div id="DIVNAME" height="500" width="500"></div>
<script type="text/javascript" src="http://cactus.nci.nih.gov/chemical/structure/MOLECULE/twirl?div_id=DIVNAME"></script>
Use an arbitrary name for the DIVNAME, and the MOLECULE string should be a SMILES or InCHI key; common molecules in NCI’s database such as “aspirin” or “buckminsterfullerene” work too. Converting a structure to SMILES or InCHI is easy with ChemDraw; highlight the structure and go to “Edit-Copy As.” You should convert the SMILES or InCHI key to a web-friendly address using CADD’s Chemical Identifier resolver; that was necessary for me to get the structure to work. Adding styles to the div tag allows you to change the background color and have sexytimes.
I don’t think there’s an easy way to change the color scheme for the atom labels, which are the standard CPK colors.
I apologize if you learned something today; that was not my intention.
[1] This post was written entirely for the Simpsons reference.
The politics of failure have failed! We need to make them work again!
SO FAST! I always hated Jmol…it just wasn’t worth the wait.
That thing looks like an uberbrick.
Abortions for some, miniature American flags for others!
It even has a shadow, so sexxxy. I may need some alone time with this molecule now.
Ahhh… the delights of cruciform donor-acceptor molecules.
I wonder if it likes to align in the solid state for zero NLO effect like p-nitro-aniline does.
I’ve always had a soft spot for cruciforms. I chalk it up to my raging messiah complex.
That just made my Sunday.
Sweet, now we can have longer load times on blog pages. It might be ok for the Sepo’s but our internet is abysmal. If only Australia wasn’t an island, then we could have a 3D structure instead of the 2D structures which fail to represent molecules accurately and in a way other chemists can understand (*sarcasm*). Actually, I do think it is cool but probably a little redundant for my circumstances.
A easy way to change atom colors will come – but Noel and I wanted to put the thing out
so you chose to demonstrate the magic of 3D representation using a purely planar molecule? Or am I missing something?
flat, pretty and dead, man. flat, pretty and dead.
All of organic chemistry less an epsilon is a Schlegel diagram flat graph. All physical stereocenter labels arise from composition (R,S), geometry (P,M; Delta,Lambda), or an abstract concept called color.
Are you feeling clean and wholesome? Science has the cure! Here is a K5 molecule with five stereocenters (center carbon and its four attachments) that cannot be stereolabeled even in principle,
http://www.mazepath.com/uncleal/66chira.hin
HyperChem
http://www.mazepath.com/uncleal/66chira.mol2
Tripos
http://www.mazepath.com/uncleal/66chir2a.png
point group T not Th or Td
Try that out. Are there any SMILES out there now?
I hate that all the cool things still don’t work in Opera.
Thanks for letting me know. Actually, the twirling works fine – Opera just doesn’t remember to redraw it afterwards! I’ve fixed this problem – in the meanwhile you’ll just have to scroll the page off the screen and back again to force a redraw.
I see. Sometimes it rotates the shadow alone, sometimes – only the bottom half of the molecule.
But hey, it’s Opera. It’s way cool in other browsers!