Difference between revisions of "File formats/Export"

From Jmol
Jump to navigation Jump to search
m (MOL format)
(MOL format)
Line 7: Line 7:
  
 
=== MOL format ===
 
=== MOL format ===
==== Atom line ====
+
Jmol can export the currently selected set of atoms to a file in
The top line is an example of Jmol 12.1.25 output in each atom's line of a MOL file, while the bottom line is the specification by MDL/Symyx:
+
* MOL v2000 format (single model)
  3.6133866 2.2537918 -2.035789 C
+
* MOL v3000 format (single model)
xxxxx.xxxxyyyyy.yyyyzzzzz.zzzz aaaddcccssshhhbbbvvvHHHrrriiimmmnnneee
+
* SDF v2000 format (single or multiple models)
 +
according to the [http://www.symyx.com/downloads/public/ctfile/ctfile.pdf official format specification from MDL-Symyx-Accelrys].
  
d = mass difference (isotopes)
+
''(Jmol version 12.1.26 has this full set of options; former versions export only MOL v2000 and match the specification only partially.)''
  
c = formal charge code
+
The syntax (see
 +
[{{ScriptingDoc}}#writemodel reference documentation]) is
 +
write myFile.mol #exports to MOL v2000
 +
write v3000 myFile.mol #exports to MOL v3000
 +
write myFile.sdf #exports to SDF v2000
  
Some software pieces are more forgiving than others in reading MOLfiles. For example, [http://nisla05.niss.org/PowerMV/?q=PowerMV/ PowerMV] (a freeware viewer for SDF files; [http://dx.doi.org/10.1021/ci049847v DOI:10.1021/ci049847v]) fails to open files exported by Jmol. (SDF format is identical to MOL format, except that it supports more than one model, so one just needs to rename the file to have PowerMV try and open it.)
+
write mol myFile.myExt #exports to MOL v2000
 
+
  write v2000 myFile.myExt #exports to MOL v2000
Jmol export can hence be improved in producing this format:
+
  write v3000 myFile.myExt #exports to MOL v3000
* For atoms, shift the position of the coordinates so that the decimal point is at the right place. Reduce the number of decimals accordingly.
+
  write sdf myFile.myExt #exports to SDF v2000
* For atoms, add the trailing zeros that represent extra, optional, data.
 
 
 
Proposed output (satisfies PowerMV input):
 
  3.6133866 2.2537918 -2.035789 C  0 0
 
xxxxx.xxxxyyyyy.yyyyzzzzz.zzzz aaaddcccssshhhbbbvvvHHHrrriiimmmnnneee
 
All the extra zeros could be added for a better compliance, but that would increase the file size.
 
 
 
==== Bond line ====
 
The top line is an example of Jmol 12.1.25 output in each bond's line of a MOL file, while the bottom line is the specification by MDL/Symyx:
 
  1 2  1
 
111222tttsssxxxrrrccc
 
 
 
1,2 = atoms bonded (atom numbers)
 
 
 
t = bond type
 
 
 
s = stereo type
 
 
 
x = not used; r,c = specific to MDL database query
 
 
 
Jmol export can also be improved in producing this format:
 
* For bonds, add the trailing zeros that represent extra, optional, data.
 
 
 
Proposed output (satisfies PowerMV input):
 
  111222tttsssxxxrrrccc
 
  1  2  1  0
 
 
 
==== End records ====
 
Jmol export can also be improved:
 
* Add the end record "M  END".
 
* Add the end record "$$$$" needed for SDF-format compliance.
 

Revision as of 18:06, 19 December 2010

Exporting or saving molecular model files from Jmol

Although Jmol is basically a viewer, it has some limited capabilities to save files for the displayed molecular model (or a subset of it).

  • write command
  • Pop-up menu
  • save isosurface command

MOL format

Jmol can export the currently selected set of atoms to a file in

  • MOL v2000 format (single model)
  • MOL v3000 format (single model)
  • SDF v2000 format (single or multiple models)

according to the official format specification from MDL-Symyx-Accelrys.

(Jmol version 12.1.26 has this full set of options; former versions export only MOL v2000 and match the specification only partially.)

The syntax (see reference documentation) is

write myFile.mol #exports to MOL v2000
write v3000 myFile.mol #exports to MOL v3000
write myFile.sdf #exports to SDF v2000
write mol myFile.myExt #exports to MOL v2000
write v2000 myFile.myExt #exports to MOL v2000
write v3000 myFile.myExt #exports to MOL v3000
write sdf myFile.myExt #exports to SDF v2000

Contributors

AngelHerraez