Macro

From Jmol
Revision as of 13:24, 10 June 2007 by Anonymous (talk)
Jump to navigation Jump to search
Jmol / JSmol Tutorials

Jmol Macro's

A Jmol macro is a small script that provides some reusable functionality for the Jmol Application. It is saved as a simple text file, like any other script, in the $HOME/.jmol/macros subdirectory. It will show up in the Macro menu of the Jmol application.

Windows: the $HOME folder's location is stored in the environment variable %USERPROFILE% or in the environment variables %HOMEDRIVE% and %HOMEPATH%; it will usually be at c:\Documents and Settings\(yourUserName)\

If you don't find it, try

My PC > right-click > Properties > Advanced Options (tab) > Environment Variables (button)
or open a command line and type set

The macro file must be a text file with the extension macro, and its contents must be two lines, starting with "Title=" and "Script=" (only one macro per file).

Example macro 1

To show everything as balls-and-sticks, CPK color, create a text file, write this:

Title=Ball