File formats/Chemical Structure

From Jmol
Jump to navigation Jump to search
File Formats

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 (or JME Molecule Editor) is a Java applet written by Peter Ertl which allows to draw, edit and display molecules and reactions within a web page.

Its successor, JSME Molecule Editor, needs no Java and runs in any browser using just JavaScript.

The native data format for both JME and JSME is called JME format. They can also import and export other formats.

JME format (file or text string)

It is formed by a single line of text, specifying atom identities, coordinates and bonds. JME format

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 (everything in 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"

In summary, the format of the JME String is as follows (in a single line):

  • number of atoms
  • number of bonds
  • (atomic_symbol x_coord y_coord) for all atoms
  • (atom1 atom2 bond_order) for all bonds

For stereo bonds, the bond order is -1 for up and -2 for down from the first to the second atom.

Example files.

Contributors

AngelHerraez