Creating Movies
Jump to navigation
Jump to search
Jmol / JSmol Tutorials
- A list of Jmol / JSmol Tutorials written by users.
- Using the mouse (English · Español · Français · Japanese).
- Scripting quickstart: rendering options · selecting atoms.
- How to create surfaces and isosurfaces, including cavities, pockets and tunnels.
- Displaying shapes, polyhedra, orbitals, dipoles, distances, forces and vibrations.
- Creating movies.
- Customizing Jmol: macros · menus.
- Web pages without writing code by using the Jmol "Export to Web" function.
What you need
An animation is just a sequence of images, so all one needs is jmol to create a batch file of images. There is currently no menu option to do this, but a small bit of scripting can do the trick. It is possible to get the movie output from either one frame at several angles or from a series of frames.
The main part of the script is given here: based on a mail from Bob Hanson on the mailing list.
name = "./frame0000.jpg"; nFrames = 125; nDegrees = 1; thisFrame = 0; width = 640; height = 480; set zoomLarge false; message loop; thisFrame = thisFrame + 1; fileName = name.replace("0000","" + ("0000" + thisFrame)[-4][0]); #rotate x @nDegrees; #rotate y @nDegrees; #rotate z @nDegrees; frame next; refresh; write image @width @height @fileName; if (thisFrame < nFrames);goto loop;endif; background black;
Save this text in a file, for example movieloop.jmol. Now you still need to load
Exporting from a multiframe XYZ file
peichern 1. xyz datei öffnen, ansicht anpassen 2. jmol console 'script' starten, da 'write state "formovie.state" ' ausführen. 3. cat formovie.state movie.jmol > domovie.jmol 4. dann 'jmol domovie.jmol' ausführen, 5. convert *.jpg out.gif