…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.

RSS feed | Trackback URI

15 Comments »

Comment by davejac
2009-11-28 20:01:23

The politics of failure have failed! We need to make them work again!

 
Comment by Ψ*Ψ
2009-11-28 21:08:34

SO FAST! I always hated Jmol…it just wasn’t worth the wait.
That thing looks like an uberbrick.

 
Comment by Matt
2009-11-28 21:20:03

Abortions for some, miniature American flags for others!

 
Comment by Captain Skellett
2009-11-29 06:07:06

It even has a shadow, so sexxxy. I may need some alone time with this molecule now.

 
Comment by Rhenium
2009-11-29 13:14:45

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.

Comment by excimer
2009-11-29 13:59:00

I’ve always had a soft spot for cruciforms. I chalk it up to my raging messiah complex.

Comment by unbalanced reaction
2009-11-29 15:00:27

That just made my Sunday.

 
 
 
Comment by OrganicOverdose
2009-11-29 20:26:41

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.

 
Comment by Markus Sitzmann
2009-11-29 21:13:39

A easy way to change atom colors will come – but Noel and I wanted to put the thing out :-)

 
Comment by kevin.bacon
2009-11-30 11:50:06

so you chose to demonstrate the magic of 3D representation using a purely planar molecule? Or am I missing something?

Comment by excimer
2009-11-30 13:14:16

flat, pretty and dead, man. flat, pretty and dead.

 
 
Comment by Uncle Al
2009-11-30 16:03:37

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?

 
Comment by LiqC
2009-11-30 17:32:40

I hate that all the cool things still don’t work in Opera.

Comment by baoilleach
2009-12-01 06:52:55

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.

 
 
Comment by LiqC
2009-12-01 17:35:27

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!

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

You can add images to your comment by clicking here.