Difference between revisions of "File formats/Chemical Structure"

From Jmol
Jump to navigation Jump to search
(loading SMILES and JME)
 
(loading SMILES and JME)
Line 1: Line 1:
 
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.
 
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.
+
They can be put into text files or be just a text string fed into Jmol (inline loading).
  
 
== SMILES ==
 
== SMILES ==
 +
This ([[wikipedia:Simplified Molecular Input Line Entry Specification|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 <code>smiles</code> 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)
 +
 +
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.1.6, [http://cactus.nci.nih.gov/ 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 <code>%FILE</code> at the position where the SMILES string should be inserted into the url.
 +
 +
Examples:
 +
<nowiki>smilesUrlFormat="http://cheminfov.informatics.indiana.edu/rest/thread/d3.py/SMILES/%FILE";</nowiki>
 +
<nowiki>smilesUrlFormat="http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True";</nowiki>
 +
  
 
== JME ==
 
== JME ==
This is the native format used by the [http://www.molinspiration.com/jme/ JME Molecular Editor] by Peter Ertl.
+
This is the native format used by the [http://www.molinspiration.com/jme/ JME Molecular Editor] by Peter Ertl. It is a  format for 2D drawing, specifying atom identities, coordinates and bonds.
  
Jmol can read this format, both from file or from a text string, and make a flat 2D model out of it; then, using the built-in UFF force field minimization, Jmol generates a 3D model for the molecule, with added hydrogens (the JME format usually does not include hydrogens).
+
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:
 
Example, for isopentane:

Revision as of 20:28, 23 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)

This ability was introduced in Jmol 12.0.RC15, using the web service at Indiana University. Starting with Jmol 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

This is the native format used by the JME Molecular Editor by Peter Ertl. It is a format for 2D drawing, specifying atom identities, coordinates and bonds.

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