XBSA - X windows Ball-and-Stick Program by M. Methfessel Nov. 1995 with small additions by Jan Labanowski, 1997


This manual is based in large part on the original README file written by the original author: Michael Methfessel, methfessel@ihp-ffo.de, Institute for Semiconductor Physics, PO Box 409, D-15204 Frankfurt (Oder), Germany. Jan Labanowski (jkl@ccl.net) introduced some new commands and written the HTML version of the manual. If in doubt, look up the original README file

The XBSA program is a derivative of the original XBS program and contains few extensions which allow animation of a series of frames and option to query geometry (distances, angles, and coordinates). It displays Ball and Stick figures of molecules under X-window system. It is fairly portable, small, and what is more important, it comes with the source code which is available under GNU Public License. Therefore it is free, and without many restrictions -- except, you cannot resell it, but you can modify it, and redistribute it for free. If you do not see a binary for your machine in the bin directory (or if the binary does not work) try to compile it. The (instructions (file INSTALL) are provided in the source directory (./xbsa/src).


File Formats

XBS uses its own format for representing molecules. It is simple and much more flexible than other formats in use. You have more flexibility to highlight specific atoms or bonds with different colors by editing the input file. The utility (written by Jan Labanowski) is provided to convert the popular XYZ XMol format to the format required by XBS

The XBS may use one or two files with the same base name, but different extensions, .bs, and .mv respectively. It is called as:
     xbsa filename
where filename is a file name without extension. The .bs file always needs to be present. It contains the following sections:

Example:
* ch3ohv.OUT   -113.54919315
atom   C      0.050065    0.665047    0.000000
atom   O      0.050065   -0.767876    0.000000
atom   H     -0.912101   -1.005927    0.000000
atom   H      1.090132    0.995415    0.000000
atom   H     -0.439468    1.081620    0.886605
atom   H     -0.439468    1.081620   -0.886605
 
spec   C   0.495   0.18  0.31  0.31
spec   O   0.405   0.80  0.36  0.36
spec   H   0.375   0.97  0.97  1.00
 
bonds  C   O   0.150   2.250   0.15   0.50
bonds  C   H   0.109   1.635   0.11   0.50
bonds  O   H   0.105   1.575   0.11   0.50

Lines which start with asterisk * are treated as comments and you can also use empty lines for better readability. While units of length are assumed to be Angstroms, they actually need not be, if you use other units consistently. Also, the symbols need not be chemical element symbols, but all symbols need to be defined in the .bs file.

Lines starting with atom tag have a general format:
     atom symbol X Y Z
and provide atom symbol and Cartesian coordinates for each atom in the molecule.

Lines with spec tag have a format:
    spec symbol color
and provide information how atoms with a given symbol should be displayed. The first number is the radius of a ball for a given atom symbol. The last portion of the line provides color for this atom. The color can be specified as a degree of white (0 - white, 1 - black), the triple of numbers representing RGB (Red, Green, Blue) components of color, or the official X11 windows color name as given in /usr/lib/X11/rgb.txt on your system). So the entry for oxygen, O, in the above example could have been also as:

spec   O   0.405   0.80 
which would be a gray oxygen atom, or
spec   0   0.405   IndianRed
which represents the same color as
spec   O   0.405   0.80  0.36  0.36
original entry.

The bonds lines have a general format of:
    bond symbol1 symbol2 min max radius color
and entries denote:

The XBSA program checks if the file name.bs exists, and if not, program exits with error. Then it checks if the name.mv (move file) is present. The name.mv contains additional frames which can be used for animation. Its format is much simpler than the name.bs. The frames are represented by the list of Cartesian coordinates in exactly the same order as in the name.bs file but without any other information. Each frame begins from the line starting with the word frame followed by optional comment. You can list several triples of Cartesian coordinates on the same line, or each number on a separate line. For example, the 2 frames which corresponds to the .bs example above could be:

frame    * ch3ohv.5 step 1
   0.0717     0.6629     0.0000 
   0.0349    -0.7571     0.0000
  -0.8753    -1.1941     0.0000
   1.0858     1.0819     0.0000
  -0.4589     1.0730     0.8671
  -0.4589     1.0730    -0.8671
frame    * ch3ohv.5 step 2
   0.0912     0.6609 
   0.0000     0.0213    -0.7473     0.0000
  -0.8422    -1.3639     0.0000     1.0819     1.1600     0.0000
  -0.4765     1.0652     0.8496    -0.4765
   1.0652    -0.8496

XBSA command line options

There are several options which can be entered on the command line:


XBSA keyboard commands

There are two modes for entering commands in XBSA: