1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue...

13
1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See license online: by-nc-sa/3.0

Transcript of 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue...

Page 1: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

1

More Rappture Objects

Michael McLennanHUBzero® Platform for Scientific Collaboration

Purdue University

This work licensed underCreative Commons

See license online:by-nc-sa/3.0

Page 2: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

2

Groups

Use Group objects to group inputs together

Add label/descriptionto groups

Page 3: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

3

Group of Groups

Group of just groups tabs

Group with other elements box with group contents

Page 4: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

4

Phase

Use Phase objects to create input panels

* Use this sparingly--only if there are already lots of inputs and groups.

Page 5: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

5

Enable/disable

Use Enable condition to enable/disable inputs

booleanenables/disablesnumber entries

1 Copy the path for the boolean

2

Paste (cntl-Y)into the Enablecondition of eachnumber

Page 6: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

6

Enable/disable

Enable condition can be an expression

number valueenables/disablesnumber below it

input.(negf).(tbe):eV >= 3

Get the value of thetight-binding energy

numberConvert

to eV

Enable High-energy lifetimewhenever tbe >= 3

Page 7: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

7

Enable/disable groups

Use Enable condition to enable/disable whole groups

Group

Group

Group

Page 8: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

8

Notes

Use Note objects to embed documentation

Set an ordinary HTML file

Can reference images and otherHTML files in the same directory,or using absolute http:// paths

Page 9: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

9

Notes

<html> <body> <p> <img style="float: right; margin: 8px;" src="bysize.gif"/> <b>Set the dot size</b><br/> Explore the effects of the particle size onthe absorption spectrum for quantum dots.</p><p> Learn more about quantum dots:<ul style="margin: 0px; padding-left: 16px;"> <li>Klimeck: <a href="http://www.nanohub.org/resources/189">Quantum Dots</a></li> <li>Sands: <a href="http://www.nanohub.org/resources/376">Nanomaterials: Quantum Dots, Nanowires, and Nanotubes</a></li> <li>Lent: <a href="http://www.nanohub.org/resources/148">Quantum-dot Cellular Automata</a></li> <li><a href="http://www.nanohub.org/resources/tags/quantumdots">more...</a></li> </ul> </p> </body> </html>

<html> <body> <p> <img style="float: right; margin: 8px;" src="bysize.gif"/> <b>Set the dot size</b><br/> Explore the effects of the particle size onthe absorption spectrum for quantum dots.</p><p> Learn more about quantum dots:<ul style="margin: 0px; padding-left: 16px;"> <li>Klimeck: <a href="http://www.nanohub.org/resources/189">Quantum Dots</a></li> <li>Sands: <a href="http://www.nanohub.org/resources/376">Nanomaterials: Quantum Dots, Nanowires, and Nanotubes</a></li> <li>Lent: <a href="http://www.nanohub.org/resources/148">Quantum-dot Cellular Automata</a></li> <li><a href="http://www.nanohub.org/resources/tags/quantumdots">more...</a></li> </ul> </p> </body> </html>

Note can pop upexternal web sites

Example: bysize.html

Page 10: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

10

Under the hood: XML

The builder is great, but it’s not perfect

Where are thepreset controls?

Page 11: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

11

Under the hood: XML

Builder

tool.xml

<XML>

<?xml version="1.0"?> <run> <tool> <title>Example with temperature</title> </tool> <input> <number id="temp"> <about> <label>Temperature</label> </about> <default>300K</default> <units>K</units> </number> </input> </run>

<?xml version="1.0"?> <run> <tool> <title>Example with temperature</title> </tool> <input> <number id="temp"> <about> <label>Temperature</label> </about> <default>300K</default> <units>K</units> </number> </input> </run>

skeletonprogram

<preset> <value>300K</value> <label>300K (room temperature)</label> </preset> <preset> <value>77K</value> <label>77K (liquid nitrogen)</label> </preset> </number> </input> </run>

You can add stufflike this by hand

Page 12: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

12

Atoms

<input> <periodicelement id="second"> <about> <label>Second Element</label> </about> <default>O</default> <inactive>lanthanoid actinoid</inactive> <returnvalue>symbol</returnvalue> </periodicelement> …

weightnumbernamesymbolall

actinoidalkali-metalalkaline-earth-metalhalogenlanthanoidmetalloidnoble-gasother-non-metalpost-transition-metaltransition-metalunknown

Prompt for elements from the periodic table

Page 13: 1 More Rappture Objects Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative Commons See.

13

Exercise #3: Add options to Spirograph

• Add a note at the very top• Add a “model parameters” tab and a “comments” tab• When comments are enabled, produce an output string with comments

note

boolean

string

Enable/disable based on the boolean