Finding dimensions of a bounding box in Jmol

The Jmol applet (or Java application) is widely used to visualize the structure of molecules.  It is very powerful, but not that well documented. If you don’t have Jmol running, open the page for Glucose Oxidase (1CF3) from the Protein Databank so you can follow the instructions for finding the size of the bounding box. Right-click on the applet to get a pop-up menu with lots of options.  Under the Style submenu, click on Boundbox to show a bounding box around the molecule:

Show bounding box
Show bounding box

It would be great to know the dimensions of the bounding box, but you can’t access this information from the GUI.  Right-click again and choose Console from the menu:
Show console
Show console

On the command line, type the command

getProperty boundBoxInfo

You will see the following output:

Console output
Console output

The first line is the (x,y,z) coordinates of the center of the box.  The second line is the vector from the center of the box to one corner.  To get the dimensions of the box, multiply each component of the vector by two.  You can also get the dimensions of the bounding box by subtracting the coordinates of Corner 0 from the coordinates of Corner 1.  The International Union of Crystallography has an excellent quick-reference guide to Jmol commands.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.