University of Exeter Shield xbs readme information

The following contains the `README' information from the xbs standard package . There is no facility in the program to change the linewidth for the postscript output, but this can be easily acheived by editing the postscript file. Just after the line
%%EndPageSetup
add the line
n setlinewidth,
where n is an integer (the default vaue being 1). Typical values are 2-4.

XBS BALL-AND-STICKS PLOTTING PROGRAM (M. Methfessel Nov. 1995)

This program uses X-window graphics to produce ball-and-sticks plots. It reads coordinates and other data from an input file (ie. ch4.bs) and possibly different "frames" with shifted coordinates from an auxillary move file (ie. ch4.mv). The default files are in.bs and in.mv.

INSTALLATION

Compile by command 'cx xbs'. This compiles the C program together with the X-Window includes and libraries. If everything works properly, you can do 'cx -O xbs' in a second step to optimize. Possibly the settings inside cx have to be changed for some operating systems. Presently cx is set up for IBM AIX. There is a second version called cx.sgi which is set up for Silicon Graphics workstations.

INPUT

In a simple case, a file ch4.bs could look like this:

atom C 0.000 0.0000.000
atom H 1.155 1.1551.155
atom H -1.155 -1.1551.155
atom H 1.155 -1.155-1.155
atom H -1.155 1.155-1.155

spec C 1.000 0.7
spec H 0.700 0.7

bonds C C 0.0004.000 0.109 1.00
bonds C H 0.0003.400 0.109 1.00
bonds H H 0.0002.800 0.109 1.00

This sets the coordinates in the format

atom species x y z

and how to draw each atomic species, in the format
spec name radius color

and how to draw bonds, in the format
bonds name1 name2 min-length max-length radius color

A move file contains additional frames like this:


frame This is frame number two
0.000 0.000 0.000 1.155 1.155 1.155 -1.155 -1.155 1.155 1.155 -1.155 -1.155 -1.155 1.155 -1.155

After the keyword 'frame' comes an indentifying string, then come the coordinates for all the atoms. Line breaks can appear anywhere between the coordinates.

Other input lines are also possible, namely the lines which set parameters (see below). Example: 'inc 5' sets the increment for the rotation to 5 degrees.

In both files, lines starting with * and blank lines are comments.

USAGE

After starting the program with 'xbs ch4' the plot can be controlled directly by selected keys. For example, to rotate the molecule use the cursor keys and the keys "," and "." The last two were chosen because they are below "<" and ">" whch look like arrows. To step through the frames to show a "movie", use keys '[' and ']'. A number of other keys are defined to function directly. More complicated functions are done by pressing 'i' to get an input line and then typing a command.

Use 'xbs -hh' to get information on keys and commands.

Sizing: Keys '+' and '-' make the plot bigger or smaller.

Perspective: Key p switches the perspective. Default is off. For pseudoperspective, the sphere sizes depend on the distance to the viewer but the positions on the page are unchanged. For true perspective, the sizes and the positions both change. The strength of the perspective effect depends on the distance to the viewer, which is shown in the status line. It is changed with keys 'd' and 'D' or can be set directly with command 'dist'. (Note: if you come too close and put the viewpoint inside an atom, the program will try to color the whole universe, which takes very long).

Lighting: command 'gramp slope middle' greys out the atoms in the back by an exponential ramp. Command 'light x y z' shades the atoms somewhat as if light shines along vector (x,y,z). These commands only work in black/white mode. To switch back to normal coloring, enter 'gramp' or 'light' without arguments.

Positioning: Keypad keys 8,6,4,2 move the plot about by an increment dpos (which can be set by the command 'dpos'). Keypad key '*' saves the current position as 'home' (or use command 'pos' to set the home position directly). Keypad key 7 moves the plot home. Positions are relative to the center of the window.

Saving: command 'save' writes the data to a file (default Save.bs). If there are multiple frames, a move file is also written. The 'save' command has some options, see below.

Printing: the command 'print' writes output to a postscript file, by default the file 'Bs.ps'. A print file stays open until it is explicitly closed. In this way several plots can be superimposed on the same page, using the keypad cursor keys to shift the subplots on the page. The 'print' command has some options, see below.

GETTING HELP

Typing 'xbs -h' and 'xbs -hh' gives short respectively long help.

After starting xbs, key 'h' toggles an overview. This is the same information as is obtained with 'xbs -hh'.

On the input line, use 'help print' or 'print ?' or even 'print -h' to get help on a specific command such as (in this case) print. This help also shows any possible options for the command.

The space bar toggles extra information about the plot written into the window.

SOME MORE DETAILS AND RECENT CHANGES


Last modified: Mon Mar 27 08:04:59 2000 by Jonathan Goss
goss@excc.ex.ac.uk
Valid HTML 4.0!
validate