< embed src=struct1.cdx width="480" height="300" >
|
| A structure displayed by the ChemDraw Plugin, with the standard ChemDraw tool bar |
Here struct1.cdx is the ChemDraw structure you want to publish,
and the rest of the statement tells the dimensions (in pixels) of
the box that the Plugin uses on the screen. If struct1.cdx isn't
in the same directory or folder as your HTML code, be sure to include
the file specification, e.g.:
< embed src="D:\bruce\project3\struct1.cdx" width="480" height="300" >
You could center your box on the page with just a few more keystrokes:
< embed src=struct1.cdx width="360" height="200" >
|
| ChemDraw and Chem3D
Plugins are the future for web publishing. |
|
The embed statement actually has a few more fields, which revert
to default values in the above examples. These statements give an
editable structure in a drawing area bounded by a pair of scroll
bars on its bottom and right sides. The ChemDraw toolbar appears
on the screen and can be moved like any other window. When the mouse
is in the drawing area, a right-click (or control-click for Mac)
will bring up all traditional menus (File, Edit, etc.) that usually
appear across the top of the ChemDraw window.
If you don't want people to be able to edit your work, you just
add the viewonly=true qualifier (the default is that your picture
is editable):
< embed src=struct1.cdx width="360" height="200" viewonly=true
>
With this statement your structure appears without scroll bars,
and the ChemDraw toolbar does not appear. This is what you would
use to publish a paper-you want your colleagues to read your
work, not change it! Of course, they can still copy your structures
and use them in their own work.
Before leaving the ChemDraw Plugin for now, we point out that in
addition to ChemDraw structures, you can also publish structures
in MDL molfile and SMILES formats. These require extra keywords
in the embed statement. To read the full story about the ChemDraw
Plugin and its syntax, point your browser to doc.camsoft.com and
choose the ChemDraw Plugin selection from the menu.
The basic idea of the Chem3D Plugin is exactly the same, and the
simplest example of its embed statement is just as easy:
< embed SRC="D:\bruce\C3Dmodel.c3d" width=500 height=500 >
When a Web browser equipped with the Chem3D plugin encounters this
statement, the page image it produces shows your molecule, with
no box or border. When the user moves the cursor over the image,
it turns into the familiar hand icon. The model can be rotated by
pressing down and dragging, exactly as in Chem3D.
|
| A Chem3D model displayed by the Chem3D Plugin. The model can be rotated by moving the pointer over the structure, then pressing and dragging. |
Two useful qualifiers for the embed command determine the control
icons that surround your model. The statement
< embed SRC="D:\bruce\C3Dmodel.c3d" width=500 height=500 rotationbars="true" >
produces the normal Chem3D rotation bar borders, allowing precise
rotations about the Cartesian axes. The reader of your Web page
can also select atoms or bonds and do internal rotations.
The statement:
< embed SRC="D:\bruce\C3Dmodel.c3d" width=500 height=500 moviecontroller="true" >
produces the Chem3D control bar that lets the reader of your Web
page replay a molecular dynamics trajectory. Of course, this is
useful only if your model file actually contains one-just
as you first draw a structure or calculate a model, you must calculate
the dynamics, then save it, for your Web page viewer to use it.
The various qualifiers can be combined, e.g.,
< embed SRC="D:\bruce\C3Dmodel.c3d" width=500 height=500 moviecontroller="true"
rotationbars="true" >
If you omit the qualifiers, they revert to their default values
of "false." You should also keep in mind that the reader of your
Web page sees whatever you saved in your model: if you saved a protein
model with a ribbon rendering, that's what they'll see. If you saved
a molecular electrostatic potential surface, that's what will show
up when someone accesses your Web page.
A fine point for advanced users: The Chem3D Plugin can also view
models in file formats other than Chem3D (*.c3d), and your readers
will be able to see whatever display information is supported by
the format. Popular formats include certain Gaussian and MOPAC files,
and interchange standards such as the Protein Data Bank PDB format.
For a complete list, see the documentation page on doc.camsoft.com.
To wrap up, the ChemDraw and Chem3D Plugins bring "live"chemical
structures to Web pages. Readers anywhere on the Internet can view
and manipulate structures and models that you place in your Web
pages, provided their Web browsers have the Plugins. With the ChemDraw
and Chem3D Plugins now available, the era of electronic chemical
publishing is here!