Difference between revisions of "File formats/Chemical Structure"

From Jmol
Jump to navigation Jump to search
(SMILES)
(SMILES demo applet)
Line 15: Line 15:
 
  load smiles "CCC(C)C"
 
  load smiles "CCC(C)C"
 
(quotes may not be necessary, but are recommended for safety)
 
(quotes may not be necessary, but are recommended for safety)
 +
 +
<div style="float:right;">
 +
<jmol>
 +
  <jmolApplet>
 +
  <signed>true</signed>
 +
  <size>200</size>
 +
  <color>white</color>
 +
  </jmolApplet>
 +
</jmol>
 +
</div>
 +
Or test it here:
 +
<jmol>
 +
<jmolButton>
 +
  <script>var x=prompt('enter a SMILES string','');if(!x){quit};load @{'$'+x};
 +
  </script>
 +
  <text>enter a SMILES to be loaded</text>
 +
  </jmolButton>
 +
</jmol>
 +
<br style="clear:both;">
  
 
This ability was introduced in Jmol 12.0.RC15, using [http://cheminfo.wikispaces.com/smi23d the web service at Indiana University]. Starting with Jmol 12.0.15 and 12.1.6, [http://cactus.nci.nih.gov/ the NIH Cactus server] is used instead.  
 
This ability was introduced in Jmol 12.0.RC15, using [http://cheminfo.wikispaces.com/smi23d the web service at Indiana University]. Starting with Jmol 12.0.15 and 12.1.6, [http://cactus.nci.nih.gov/ the NIH Cactus server] is used instead.  

Revision as of 18:17, 27 September 2010

Some formats do not specify the 3D or 2D coordinates of atoms in a molecule, but just the chemical structure, that is a list of atoms and of connections (bonds) between them.

They can be put into text files or be just a text string fed into Jmol (inline loading).

SMILES

This (Simplified Molecular Input Line Entry Specification) is a standard format used for plain-text, single-line description of a chemical structure. It can be thought of as a 1D format, specifying just atoms and their connections, no coordinates. Note that there is more than one variant of SMILES strings. That is, the same chemical compund can be assigned different SMILES depending on the software used to generate the SMILES string or how the structure was drawn (e.g. the order in which atoms and bonds were added).

Jmol can read this format (not from file, just from a text string) as long as it can connect to a server that will do the conversion to a 2D or 3D format. To do this, you put a dollar sign before the SMILES string, or you use the smiles parameter. Note that the unsigned applet is not allowed connection to external servers ad so does not support this method.

Example, for isopentane:

load $CCC(C)C
load "$CCC(C)C"
load smiles "CCC(C)C"

(quotes may not be necessary, but are recommended for safety)

Or test it here:

This ability was introduced in Jmol 12.0.RC15, using the web service at Indiana University. Starting with Jmol 12.0.15 and 12.1.6, the NIH Cactus server is used instead. To force the use of a certain server, you can do:

smilesUrlFormat = "  "

and put between the quotes the url in the proper request format; use %FILE at the position where the SMILES string should be inserted into the url.

Examples:

smilesUrlFormat="http://cheminfov.informatics.indiana.edu/rest/thread/d3.py/SMILES/%FILE";
smilesUrlFormat="http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True";

JME

The JME Molecular Editor (by Peter Ertl) is an applet which allows to draw, edit and display molecules and reactions within a web page. Among its output formats there is a proprietary JME format, formed by a single line of text, specifying atom identities, coordinates and bonds.

Example files.

Jmol can read this format, both from file or from a text string, and make a flat 2D model out of it; then, it adjusts atoms into 3D, adds missing hydrogens and, using the built-in UFF force field minimization, generates a 3D model for the molecule. (The JME format usually does not include hydrogens).

Example, for isopentane:

load inline "5 4 C 7.05 -5.74 C 8.27 -7.84 C 4.63 -7.14 C 5.84 -7.84 C 7.05 -7.14 1 5 1 2 5 1 3 4 1 4 5 1"

or

load isopentane.jme

where File icon.gifisopentane.jme is a plain-text file with this content (a single line):

5 4 C 7.05 -5.74 C 8.27 -7.84 C 4.63 -7.14 C 5.84 -7.84 C 7.05 -7.14 1 5 1 2 5 1 3 4 1 4 5 1

By default, Jmol will produce the 3D optimized model. Using the filter "noMin" parameter avoids that and so you will get the model, with atoms adjusted to 3D in preparation for minimization, but without added hydrogens and without the minimization.

Example, for isopentane:

load isopentane.jme filter "noMin"

Contributors

AngelHerraez