UCSF Chimera Web Data

Chimera can be used as a helper application for several types of files linked to web pages:
Web Data File Types
type suffix (extension) contents
Chimera web data .chimerax instructions on data files to open, commands and code to execute (can have a Chimera demo embedded)
Mol2 .mol2 molecular structure
PDB .pdb
.ent
molecular structure
Python .py
.pyc
.pyo
.pyw
Python code
VRML .vrml
.wrl
graphical object

While the other file types are somewhat standard, Chimera web data (chimerax) files are specifically meant to be interpreted by Chimera.

For Chimera to show the data when a link to a file is clicked,

  1. the web browser must be configured to send the file to Chimera
  2. except on Mac OS X, Chimera must be enabled to accept such files

Users will be asked to confirm whether files containing Chimera commands and/or Python code should be accepted. By default, this will happen the first time such a file is encountered during each Chimera session; other options are to ask each time and never (controlled in the Web Access preferences). Because commands and code written with malicious intent may harm a user's computer, only files from a trusted source should be accepted.

Browser Configuration Browser Configuration icon

For Chimera to act as a helper application for data linked to web pages, the browser must recognize which files should be sent to Chimera. Except on Mac OS X, this can be set up automatically using the Browser Configuration tool (under Tools... Utilities in the Chimera menu). The alternative is to configure the browser manually.

Manual Configuration

The automated approach is much easier and should be used where possible. The manual configuration procedure varies with browser and system; the examples below address only the Chimera web data (chimerax) file type.

On Mac OS X:

Currently, Safari cannot be configured to send files to Chimera.

The simplest way to configure Mozilla, Netscape, and Firefox for file types not already assigned a helper application is to attempt to open the file, then instruct the browser to

Open with (browse to locate Chimera)
(the default location is /Applications/Chimera.app); check the option to do this automatically for such files in the future. If the file type is already assigned a helper application, the assignment can be changed using the browser preferences.

Internet Explorer preferences include a section for file helpers (helper applications). A file helper should be added with the following information:

Description: Chimera web data
Extension: chimerax
MIME type: application/x-chimerax
File type: ????
File creator: Chim
How to handle: View with Application 
  (browse to locate Chimera)
The File type and File creator fields must contain only the four characters shown and no spaces. Other settings (those not mentioned here) can be left unchanged.

On UNIX:

Browser preferences generally include a section for helper applications. A new type should be added with the following information:
Description: Chimera web data
File extension (suffix): chimerax
MIME type: application/x-chimerax
Application:
  CHIMERA_ROOT/bin/chimera_send
                  - or sometimes -
  CHIMERA_ROOT/bin/chimera_send %s
where the Chimera installation directory should be substituted for CHIMERA_ROOT (/usr/local/chimera is the default).

In addition, UNIX systems use .mime.types to identify types of files downloaded from the web and .mailcap to associate these types with applications; both files reside in a user's home directory. Both files should be created if they do not already exist. The line
application/x-chimerax chimerax
should be added to the end of .mime.types and the lines
application/x-chimerax
CHIMERA_ROOT/bin/chimera_send %s
should be added to the end of .mailcap. The Chimera installation directory should be substituted for CHIMERA_ROOT.
On Windows:
Mozilla/Netscape and Internet Explorer use the system registry to determine which application should handle a particular type of file. Only users with administrative privileges can register a file type. The general procedure for registering the Chimera file type will be something like: from the Control Panel menu, choose (depending on the system) Tools... Folder Options or View... Options, then click the File Types tab. Create a new type with
File extension: chimerax
and (if asked)
Description: Chimera web data
MIME type: application/x-chimerax
Add a new action (it may be necessary to click on the line for the chimerax type and then the Advanced button to add this information):
Action: open
Application used to perform action:
  "CHIMERA_ROOT\bin\chimera.exe" "--send" "%1"
where the Chimera installation directory should be substituted for CHIMERA_ROOT (C:\Program Files\Chimera is the default). Check the box to "Always show extension" before closing the File Types panel.

Accepting Web Data

After a browser has been configured to send Chimera the appropriate files, setting Accept web data to true in the Web Access preferences enables the running instance of Chimera to accept such files. On Mac OS X, this preference is not shown, since Chimera will always be enabled to accept such files. If there is no running instance of Chimera enabled to accept web data, another instance of Chimera will be started and used to open the data. If there are multiple running instances of Chimera set to accept web data, the file will be sent to the instance that most recently had focus (was most recently clicked into).

Even when Chimera is enabled to accept web data, it is necessary to confirm acceptance of certain file types (once per session by default; controlled in the Web Access preferences).


UCSF Computer Graphics Laboratory / December 2009