Difference between revisions of "File formats/3D PDF"

From Jmol
Jump to navigation Jump to search
(more info after improvements in Jmol export to IDTF; some caveats; sample docs)
m (Sample documents)
Line 50: Line 50:
 
(Text in these documents have been added later using Adobe Acrobat Pro.)
 
(Text in these documents have been added later using Adobe Acrobat Pro.)
  
* [http://chemapps.stolaf.edu/jmol/docs/examples-11/pdf/test1.idtf.pdf 3D PDF] of a small protein, crambin (1crn.pdb).
+
* [http://chemapps.stolaf.edu/jmol/docs/examples-11/pdf/test1.idtf.pdf 3D PDF] of a small protein, crambin (1crn.pdb), in cartoon rendering.
* [http://chemapps.stolaf.edu/jmol/docs/examples-11/pdf/quartzPolyhedra.idtf.pdf 3D PDF] with a polyhedra rendering of the quartz model.
+
* [http://chemapps.stolaf.edu/jmol/docs/examples-11/pdf/quartzPolyhedra.idtf.pdf 3D PDF] with a polyhedra rendering of quartz.

Revision as of 23:05, 17 July 2010

PDF documents with integrated 3D interactive models

Installations

Jmol

You need at least version 12.0.RC26 to do this.

IDTF to U3D

(See also descriptions and comments for Jmol output to IDTF and U3D formats.)

  • Windows installation of IDTFConverter
  1. Download and unzip http://www.iaas.msu.ru/tmp/u3d/u3dIntelWin.zip into, perhaps, File icon.gifc:\idtf\
  2. Create a simple command file File icon.gifu3d.bat and place it in a folder where it is easily accessible (e.g. the Windows directory or a folder included in the system's path). This File icon.gifu3d.bat file must contain this text:
c:\idtf\idtfconverter.exe -input %1.idtf -output %1.u3d
  • MacOS and Linux installation of IDTFConverter
  1. See IDTF for instructions on getting the converter.
  2. Create a command file similarly to the one described for Windows.

LaTeX to PDF

There are several pdfLatex software, like teTeX (Unix; discontinued in 2006), MiKTeX (Windows), TeX Live (Unix, Linux, Windows), MacTeX...

  • Installation of MiKTeX (Windows)
  1. Download and install MiKTeX "basic" from http://miktex.org/
  2. Do an update (menu Programs > MiKTeX > Maintenance > Update)
  3. Download the movie15 package (menu Programs > MikTex > Maintenance > Package Manager)

Creating the document

1. Within Jmol script console: write c:/temp/xxx.idtf

or from the application's pop-up menu: File > Export IDTF 3D model (a dialog prompts for destination folder and filename).
Either of those will create two files: File icon.gifxxx.idtf and File icon.gifxxx.idtf.tex

2. At the system command line or terminal, call the File icon.gifu3d.bat file (Windows), or equivalent MacOS or Linux command file, to convert the File icon.gif.idtf to File icon.gif.u3d format:

u3d c:\temp\xxx

3. Run the TeXworks program --included in MiKTeX-- and open in it your File icon.gifxxx.idtf.tex.

4. Click menu item Typeset > Typeset, or click on the green 'play'-like button (leftmost in the toolbar).

When processing ends, you will see a blank document in a new TeXworks window, because MiKTeX can't display the model, but File icon.gifxxx.idtf.pdf should have been created.

5. Open the File icon.gif.pdf file using Adobe Reader v. 7 or later.

If you don't see the model in its panel inside the document, right-click on it and choose Partial options > Fit visible

Caveats

  • If you move in Jmol the model rotation center away from screen center (as with CTRL-ALT-drag), the model in the 3D PDF will be a very close but not quite perfect reproduction. (The reason for this is that moving the center of perspective seems to be not supported in virtual reality formats like VRML and U3D.)
  • Lighting is not working properly: the light moves with the model. If someone knows how to do that, please let us know.
  • Perspective canot be orthographic from the beginning (Jmol uses this by default for crystal structures). Once in the 3D PDF, there is a right-mouse-button option to go into that mode. Please let us know if you know how to do that.
  • Don't expect rotation and translation using the mouse in the 3D PDF to be like in Jmol. It is harder to control, and you can even completely loose the rotation center.

Sample documents

(Text in these documents have been added later using Adobe Acrobat Pro.)

  • 3D PDF of a small protein, crambin (1crn.pdb), in cartoon rendering.
  • 3D PDF with a polyhedra rendering of quartz.

Contributors

AngelHerraez, Vdlee