Bundle Example: Add a Tool

This example describes how to create a ChimeraX bundle that defines a graphical interface. Graphical interfaces can either be based on HTML or on the Qt windowing toolkit.


ChimeraX’s graphical interface is written using the Qt windowing toolkit (version 5), accessed through a Python wrapping of the toolkit (the toolkit itself is written in C++). The Qt-based tool example demonstrates how to develop a graphical interface using the Qt toolkit’s capabilities.

For the sake of simplicity the Qt example does not create an interface for the commands developed earlier in the tutorial, but instead displays a text-input field which logs text typed in by the user, using the appropriate log command.


For developers who are experts in both developing HTML-based user input forms and in Javascript development, it may be easier to deploy an HTML-based graphical user interface. Other developers are strongly advised to create a Qt-based interface instead, as described in the preceding section. The Javascript communication between the HTML front end and Python back end is particularly challenging for non-experts. That said, the HTML-based tool example demonstrates developing a graphical interface whose layout is specified using HTML.

The HTML example takes the commands developed earlier in the tutorial and creates a graphical interface for them.

What’s Next