tool.xml Reference
Every Rappture tool is defined by a tool.xml file. This page documents
the XML structure that rappture2web understands.
Root structure
<?xml version="1.0"?>
<run>
<tool>...</tool>
<input>...</input>
<output>...</output>
</run>
The <tool> section
<tool>
<title>My Tool</title>
<about>Description shown at the top of the page.</about>
<command>python3 @tool/script.py @driver</command>
<uq>true</uq> <!-- optional: enable UQ controls -->
</tool>
@toolReplaced with the directory containing
tool.xml.@driverReplaced with the path to the generated
driver.xml(classic mode) or the server URL (library mode).<uq>true</uq>Enables Uncertainty Quantification controls on numeric inputs. See Uncertainty Quantification (UQ).
The <input> section
Inputs are rendered as form controls in the sidebar. Supported types:
Type |
Description |
|---|---|
|
Floating-point number with optional units, min/max, presets |
|
Integer with optional min/max |
|
Checkbox (yes/no) |
|
Text input; multiline if |
|
Dropdown select from |
|
Multiple-select checkboxes |
|
Example file loader with |
|
Periodic table element picker |
|
Image upload input |
|
Read-only HTML or text; supports |
|
Interactive 2D canvas with hotspots |
|
Container that groups child inputs |
|
Tab container for multi-step workflows |
|
3D molecular/crystal structure viewer with parameters |
|
Visual horizontal rule between inputs |
Number input
<number id="temperature">
<about>
<label>Temperature</label>
<description>Ambient temperature.</description>
<icon>BASE64-ENCODED-GIF</icon>
</about>
<units>K</units>
<min>50K</min>
<max>1000K</max>
<default>300K</default>
<current>300K</current>
<color>purple</color>
<uq>false</uq> <!-- opt out of UQ when tool has uq=true -->
<preset>
<value>300K</value>
<label>Room temperature</label>
</preset>
<preset>
<value>77K</value>
<label>Liquid nitrogen</label>
</preset>
</number>
Choice input
<choice id="method">
<about><label>Method</label></about>
<default>fermi</default>
<option>
<about><label>Fermi-Dirac</label></about>
<value>fermi</value>
</option>
<option>
<about><label>Boltzmann</label></about>
<value>boltzmann</value>
</option>
</choice>
Conditional enable/disable
Inputs can be conditionally enabled based on other input values:
<number id="detail">
<about>
<label>Detail Level</label>
<enable>input.choice(method) == "fermi"</enable>
</about>
<default>5</default>
</number>
The <output> section
See Output Types for a complete reference of output types.