- Introduction
The preset system in the Solid State Simulations has been
designed such that instructors and students can save and
load their own presets. This is useful for demonstrating an
interesting set of parameters in a lecture, preparing a problem set
based on presets different from the ones we provide, or for saving a
particularly interesting set of parameters to recall for later
investigation.
There are two kinds of files important for writing your own presets:
``.pre'' files and ``.htm'' files. The ``.pre'' files contain the
program parameters and are needed by the simulations to set the
sliders and buttons to the desired values. The ``.htm'' files contain
the description of the corresponding preset and are needed by the
html browser to display the annotations in some readable
format. We describe first how to save your own
presets and to create the ``.pre'' file; then we give the procedure to
load customized sets while running a program; and
finally show how to access your own presets through
the help menu and how to add annotations to the presets.
Warning! Using somebody else's presets might cause damage to
your computer system. A preset file consists of a set of commands
which are executed when the preset is loaded. These commands set the
parameters of the simulation such as lattice size, atomic radius, and
so on. There is, however, no protection for damaging commands that
might have been added to the preset file. On Unix systems, make sure
that any preset files for shared use have their file permissions set
such that the files cannot be modified by unauthorized people. Check
with your system administrator for details.
- Saving your own, customized presets
To save your own presets:
- Set all the sliders, buttons, and
configure and menu choices in the program to the
desired parameter values. NOTE that although most system parameters are included in the preset system, there are a few exceptions. A little experimentation will quickly determine which ones.
-
Click on the preset button on the main panel.
-
Select save from the menu to get a file selection menu.
-
Choose the directory (folder) where you want to save your preset by
double-clicking on the name of the directory (folder) in the
directory box. Note that double-clicking on the symbol ``..''
(``::'' for MacOS) moves you ``up'' one directory. The default
directory for the preset save is the directory from which you
started the simulation. Once you have chosen a new directory, it will
remain the default as long as the program is running.
-
Type into the selection box the file name for the preset. It is recommended to use the extension ``.pre'' for the name of your preset. Press enter in the selection box to save the preset.
-
{Note that you may choose a name, e.g. brav05.pre, for your new preset which is the same as a standard preset but save it in a different directory (folder). The name in the preset menu will now correspond to the new preset and the old will disappear. The next time you open ``bravais'', it will be the old brav05.pre which will be listed in the preset menu, not the new. The new one may be loaded into the program and the preset list as described below, displacing the old preset of the same name from the list. The old preset may still be loaded into the program from the annotation window but, since it is no longer listed in the preset menu, it will not be indicated in the preset list. It's easier not to duplicate names than to figure out what happens when you do!}
- Loading customized presets from the main panel
To load customized presets from the main panel:
-
Click on the preset button on the main panel.
-
Select load to get the file selection menu.
-
Choose the directory where the preset file is located by
double-clicking on the name of the directory in the directory
box. Note that double-clicking on the symbol ``..''
(``::'' for MacOS) moves you ``up'' one directory. The
directory from which you started the simulation will be the default
directory which can save you a lot of mouse-clicking. Once you have
chosen a new directory, it will remain the default as long as the
program is running.
-
If the preset file has the ``.pre'' extension, its name will appear in
the files box. Double--click on the name to load it. If it
does not have the ``.pre'' extension, either change the filter
to reflect the correct file name extension or type in the preset file
name in the selection box and press enter. Once a preset
is loaded, it will appear in the preset menu (but not in an old torn off version).
- Presets and annotations using the help system
To edit the SSS preset annotations, to write html annotations for your
own presets, and to have access to them from the help system,
the html browser provided with the SSS programs allows you to
edit any page you have called up, provided you have the ``right''
file permissions set for accessing that file on your
system. For Unix systems, check with your system
administrator for details. Be warned, however, that this built-in
editor has only the most basic functionality.
For example, to add a preset 9 to the presets for ``ising'':
-
Create and save a preset named ising09.pre using the procedure
described above.
-
Click help on the ``ising'' main panel.
-
Select presets for browsing
-
Click edit on the html page ising presets. You are now
editing the file presets.htm in the directory sss/lib/ising.
-
Use the current entities as a model. Add to that file a line such as
<a href="ising09.pre">09</a> -- <a href="ising09.htm"> My new title </a>.
Click on save to save the changes you made to ising.htm.
When you later click on the number 09, the preset 9 will be
loaded into ``ising''; and once you have constructed the annotation file
ising09.htm, clicking on the My new title will load the file
ising09.htm into the html browser.
-
Create a new annotation page in one of two ways. One is to change
the pathname in the window in the upper right corner of the html page
to the name of the annotation file you want to create, ising09.htm.
A return creates the new file; and a click on the edit button lets
you write an appropriate title and the annotation. You may find it
useful to look at an existing annotation file as a model. Save and you
have the annotation added. An alternative is to make a copy of ising08.htm
and rename it ising09.htm. Either edit it with any text
editor, or return to the preset list and click on My new title to
open the new file which may then be edited after a click on the edit button.
- Exercises and other editing
You may edit others of the help files in similar fashion. The procedure is
simple.
The exercises provided on the SSS disk involve the use of figures: ``frame grabs''
of displays and graphs from the SSS programs. To make such an exercise, you will
need a frame grabber for your platform which can save files in GIF format.
For the additional exercises in the SSS package, these GIF files are saved in
the sss/lib/program_name/figures directory. They are loaded onto the html
page with a link to the figure written as
<img src="pathname">. A quick look at one of the additional
exercises in the SSS package will be helpful.
Each exercise in the SSS set has an answer
linked from the question and stored in an answer directory. The exercises are
easily converted to quizzes by moving or restricting read permission for the
answer files.
Statistical Mechanics: Entropy, Order Parameters, and Complexity,
now available at
Oxford University Press
(USA,
Europe).