As structure representation you can use any chemical structure identfier that is accepted by the Resolver including arbitrary SMILES and InChI strings.
Use it as a 3D structure viewer:
http://cactus.nci.nih.gov/chemical/structure/aspirin/twirl http://cactus.nci.nih.gov/chemical/structure/CN(Cc1cnc2nc(N)nc(N)c2n1)c3ccc(cc3)C(=O)NC(CCC(O)=O)C(O)=O/twirl http://cactus.nci.nih.gov/chemical/structure/InChI=1S/C6H12/c1-2-4-6-5-3-1/h1-6H2/twirl
You can resize it:
http://cactus.nci.nih.gov/chemical/structure/aspirin/twirl?height=200&width=200 http://cactus.nci.nih.gov/chemical/structure/aspirin/twirl?height=400&width=400 http://cactus.nci.nih.gov/chemical/structure/aspirin/twirl?height=800&width=800
Embed it into your own web page:
a. create div element in your page, tag it with an id (could be an arbitrary name), and set the height and width attribute of the div element:
<div id="twirler" height="300" width="300"></div>
b. load the twirl script from cactus.nci.nih.gov and add the URL option “div_id” which names the id of the div element:
<script src="http://cactus.nci.nih.gov/chemical/structure/aspirin/twirl?div_id=twirler" />
I tested on the following browsers how it works:
- Firefox. It works well on Firefox<3.5, however is much slower compared to the Firefox>3.5. I used Firefox on Linux and Windows XP
- Google Chrome. It works fine there and it is fast. OS was Windows XP
- Safari. I tested it only quickly there and I don’t know any particular version numbers (neither of the OS nor the browser) but it seems to work fine there, too.
- Internet Explorer. Well, well – it works, I tested it on IE7 and IE8 but it reminds more of a slide show than a molecule viewer.
Read also Noel’s post about this on his blog, he has some nice live examples using this service (embarrassingly, I still have to figure out how I get TwirlyMol working in my WordPress blog here 🙂 )