Difference between revisions of "File formats"

From Jmol
Jump to navigation Jump to search
m
 
(65 intermediate revisions by 7 users not shown)
Line 1: Line 1:
(A timid attempt to compile information on file format specifications. It's far from complete yet.)
+
{{Jmol_Documentation_Sections}}
 +
(An attempt to compile information on file format specifications. It's not complete yet.)
  
== (MDL) MOL and SD formats ==
+
Jmol [{{SVN Trunk}}Jmol-datafiles/ example/test data files] in all formats accepted.
Jmol reads MOL and SD files (and can write MOL files under some circumstances).
 
  
Original from Elsevier MDL.
+
[[:en:Chemical_file_format|Chemical file formats]] on Wikipedia.
  
Official document: http://www.mdl.com/downloads/public/ctfile/ctfile.pdf
+
[http://openbabel.sourceforge.net/wiki/Category:Formats File formats] on Open Babel.
  
 +
Nice description of [http://reference.wolfram.com/mathematica/guide/3DGeometryAndModelingFormats.html 3D Geometry & Modeling Formats] by Wolfram Mathematica.
  
== PDB format ==
+
See the specific subsections:
Jmol reads PDB files.
+
<div style="width:30ex;">
 
+
{{File_Formats}}
(Official Protein Data Bank document) Atomic Coordinate Entry Format Description:
+
</div>
http://www.pdb.org/pdb/file_formats/pdb/pdbguide2.2/guide2.2_frame.html
+
<div style="clear:both;"></div>
 
 
 
 
== XYZ format ==
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/xyz/ Example by Paul Bourke]
 
 
 
 
 
== (Gaussian) Cube format ==
 
Jmol reads Cube files.
 
 
 
Original from Gaussian software ([http://www.gaussian.com/ Gaussian website]).
 
 
 
Description of Cube Input and Cube Output formats:
 
http://www.nersc.gov/nusers/resources/software/apps/chemistry/gaussian/g98/00000430.htm
 
 
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/cube/ Description by Paul Bourke]
 
 
 
 
 
== (Hyperchem) HIV format ==
 
[http://local.wasp.uwa.edu.au/~pbourke/dataformats/hyperchem/ Example by Paul Bourke]
 
 
 
 
 
== Alchemy formats ==
 
[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 (JVXL) format ==
 
Jmol reads and writes JVXL files.
 
 
 
Unique to Jmol, stores isosurface data.
 
 
 
Documented at http://www.stolaf.edu/academics/chemapps/jmol/docs/misc/JVXL-format.pdf
 
 
 
 
 
== Script format ==
 
Jmol reads script files, using not the <code>load</code> command, but the <code>script</code> 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 <code>load</code> 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: <code>[http://jmol.org/jslibrary/#jmolAppletInline jmolAppletInline], [http://jmol.org/jslibrary/#jmolLoadInline jmolLoadInline], [http://jmol.org/jslibrary/#jmolLoadInlineScript jmolLoadInlineScript]</code>.
 
 
 
=== Molecular coordinates inline within a script or script file ===
 
Can be done using the <code>[http://www.stolaf.edu/academics/chemapps/jmol/docs/?ver=11.0#data data "model"]</code> command (Jmol 11 only).
 
 
 
=== Script inline within a molecular coordinates file ===
 
Scripts can be included after a <code>#jmolscript:</code> 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 <code>REMARK #jmolscript:</code> in any line, followed by the script commands in the same line.
 
* In a MOL file, use <code>#jmolscript:</code> in the '''third line''', followed by the script commands in the same line. Note, however, that <code>#</code> cannot be the first character on that line, so use an initial '''space''' if nothing else.
 
* In an XYZ file, use <code>#jmolscript:</code> 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.
 

Latest revision as of 22:56, 26 January 2020

Jmol + JSmol Documentation

(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.

File formats on Open Babel.

Nice description of 3D Geometry & Modeling Formats by Wolfram Mathematica.

See the specific subsections: