Difference between revisions of "File formats"

From Jmol
Jump to navigation Jump to search
Line 1: Line 1:
{{TOCRight}}
 
 
 
(An attempt to compile information on file format specifications. It's not complete yet.)
 
(An attempt to compile information on file format specifications. It's not complete yet.)
  
Line 8: Line 6:
  
  
== (MDL) MOL and SD formats ==
+
= Coordinates of molecule =
 +
 
 +
== (MDL) MOL and SD ==
 
Jmol reads MOL and SD files (and can write MOL files under some circumstances).
 
Jmol reads MOL and SD files (and can write MOL files under some circumstances).
  
Line 18: Line 18:
  
  
== PDB format ==
+
== PDB ==
 
Jmol reads PDB files.
 
Jmol reads PDB files.
  
Line 27: Line 27:
  
  
== XYZ format ==
+
== XYZ ==
 
Jmol reads XYZ files.
 
Jmol reads XYZ files.
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/xyz/ Example] by Paul Bourke.
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/xyz/ Example] by Paul Bourke.
Line 34: Line 34:
  
  
== CIF format ==
+
== CIF ==
 
Jmol reads CIF files.
 
Jmol reads CIF files.
 
Crystallographic Information File, the official format from the International Union of Crystallography. [http://www.iucr.org/iucr-top/cif/standard/cifstd1.html Original documentation], Acta Cryst. (1991). A47, 655-685, and [http://www.iucr.org/iucr-top/cif/spec/version1.1/index.html 2003 update].
 
Crystallographic Information File, the official format from the International Union of Crystallography. [http://www.iucr.org/iucr-top/cif/standard/cifstd1.html Original documentation], Acta Cryst. (1991). A47, 655-685, and [http://www.iucr.org/iucr-top/cif/spec/version1.1/index.html 2003 update].
  
  
== mmCIF format ==
+
== mmCIF ==
 
Jmol reads mmCIF files.
 
Jmol reads mmCIF files.
 
Macromolecular Crystallographic Information File, an expanded format to cope with macromolecules.
 
Macromolecular Crystallographic Information File, an expanded format to cope with macromolecules.
Line 45: Line 45:
  
  
== Gaussian formats ==
+
== Gaussian ==
 
Gaussian input, output and log [http://svn.sourceforge.net/viewvc/jmol/trunk/Jmol-datafiles/gaussian/ example files].
 
Gaussian input, output and log [http://svn.sourceforge.net/viewvc/jmol/trunk/Jmol-datafiles/gaussian/ example files].
  
  
== (Gaussian) Cube format ==
+
== (Gaussian) Cube ==
 
Jmol reads Cube files.
 
Jmol reads Cube files.
  
Line 62: Line 62:
  
  
== (Hyperchem) HIV format ==
+
== (Hyperchem) HIV ==
 
Jmol reads HIV files.
 
Jmol reads HIV files.
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/hyperchem/ Example] by Paul Bourke.
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/hyperchem/ Example] by Paul Bourke.
Line 69: Line 69:
  
  
== (Tripos) Alchemy formats ==
+
== (Tripos) Alchemy ==
 
Jmol reads Alchemy and Alchemy2000 files.
 
Jmol reads Alchemy and Alchemy2000 files.
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/alc/alc3/ Alchemy example] and [http://local.wasp.uwa.edu.au/~pbourke/dataformats/alc/ Alchemy2000 description] by Paul Bourke.
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/alc/alc3/ Alchemy example] and [http://local.wasp.uwa.edu.au/~pbourke/dataformats/alc/ Alchemy2000 description] by Paul Bourke.
  
  
== Jmol Voxel format (JVXL) ==
+
== GAMESS ==
 +
Jmol reads GAMESS files (General Atomic and Molecular Electronic Structure System, by Gordon research group at Iowa State University).
 +
 
 +
[http://www.msg.ameslab.gov/GAMESS/doc.menu.html Official documentation].
 +
 
 +
 
 +
= Surfaces =
 +
 
 +
== Jmol Voxel (JVXL) ==
 
Jmol reads and writes JVXL files.
 
Jmol reads and writes JVXL files.
  
Line 81: Line 89:
 
Documented at http://www.stolaf.edu/academics/chemapps/jmol/docs/misc/JVXL-format.pdf
 
Documented at http://www.stolaf.edu/academics/chemapps/jmol/docs/misc/JVXL-format.pdf
  
 +
 +
== Pmesh ==
 +
Jmol reads pmesh files for rendering pmesh surfaces, using not the <code>load</code> command, but the <code>pmesh</code> command.
 +
[http://www.stolaf.edu/academics/chemapps/jmol/docs/#pmesh Description].
 +
 +
Example files [http://svn.sourceforge.net/viewvc/jmol/trunk/Jmol-datafiles/pmesh/ _1_] and [http://www.stolaf.edu/academics/chemapps/jmol/docs/misc/10x10pmesh.txt _2_].
 +
 +
 +
== (Gaussian) Cube ==
 +
 +
See [[#(Gaussian)_Cube_format|above]].
 +
 +
 +
= Scripting =
  
 
== Script format ==
 
== Script format ==

Revision as of 12:02, 3 February 2007

(An attempt to compile information on file format specifications. It's not complete yet.)

Jmol example/test data files in all formats accepted.

Chemical file formats on Wikipedia.


Coordinates of molecule

(MDL) MOL and SD

Jmol reads MOL and SD files (and can write MOL files under some circumstances).

Original from Elsevier MDL.

Official document: http://www.mdl.com/downloads/public/ctfile/ctfile.pdf, copied here.

Example files.


PDB

Jmol reads PDB files.

(Official Protein Data Bank document) Atomic Coordinate Entry Format Description: http://www.pdb.org/pdb/file_formats/pdb/pdbguide2.2/guide2.2_frame.html

Example files.


XYZ

Jmol reads XYZ files. Example by Paul Bourke.

Example files.


CIF

Jmol reads CIF files. Crystallographic Information File, the official format from the International Union of Crystallography. Original documentation, Acta Cryst. (1991). A47, 655-685, and 2003 update.


mmCIF

Jmol reads mmCIF files. Macromolecular Crystallographic Information File, an expanded format to cope with macromolecules. Official documentation.


Gaussian

Gaussian input, output and log example files.


(Gaussian) Cube

Jmol reads Cube files.

Original from Gaussian software (Gaussian website).

Description of Cube Input and Cube Output formats: http://www.nersc.gov/nusers/resources/software/apps/chemistry/gaussian/g98/00000430.htm

Description by Paul Bourke.

Example files.


(Hyperchem) HIV

Jmol reads HIV files. Example by Paul Bourke.

Example files.


(Tripos) Alchemy

Jmol reads Alchemy and Alchemy2000 files. Alchemy example and Alchemy2000 description by Paul Bourke.


GAMESS

Jmol reads GAMESS files (General Atomic and Molecular Electronic Structure System, by Gordon research group at Iowa State University).

Official documentation.


Surfaces

Jmol Voxel (JVXL)

Jmol reads and writes JVXL files.

This format is unique to Jmol, stores isosurface data.

Documented at http://www.stolaf.edu/academics/chemapps/jmol/docs/misc/JVXL-format.pdf


Pmesh

Jmol reads pmesh files for rendering pmesh surfaces, using not the load command, but the pmesh command. Description.

Example files _1_ and _2_.


(Gaussian) Cube

See above.


Scripting

Script format

Jmol reads script files, using not the load command, but the script command. These are plain-text files containing commands in the Jmol/Rasmol/Chime syntax, that will modify the way the molecular model is shown. The file can have any extension.


Inline formats

Molecular data are usually contained in an external file and loaded into Jmol using the load command, but they can also be contained within the webpage (or fed into it using JavaScript or PHP, e.g. from a database).

In turn, script commands can also be contained in the molecular file.

To allow for this "inline" formats, several methods are implemented:

[Please, note that these are advanced procedures. For normal needs, they can be avoided in favour of using normal scripting practices.]

Molecular coordinates inline within a webpage

Can be done using direct instructions for the applet or, more easily, using functions in the Jmol.js library: jmolAppletInline, jmolLoadInline, jmolLoadInlineScript.

Molecular coordinates inline within a script or script file

Can be done using the data "model" command (Jmol 11 only).

Script inline within a molecular coordinates file

Scripts can be included after a #jmolscript: tag (case-sensitive). This must be taken as a comment by the molecular file parser, so its location depends on the file format:

  • In a PDB file, use REMARK #jmolscript: in any line, followed by the script commands in the same line.
  • In a MOL file, use #jmolscript: in the third line, followed by the script commands in the same line. Note, however, that # cannot be the first character on that line, so use an initial space if nothing else.
  • In an XYZ file, use #jmolscript: in the second line, followed by the script commands in the same line.

In all cases, the script will be applied after the whole molecule has loaded.