table of contents
XBS(1) | General Commands Manual | XBS(1) |
NAME¶
xbs - ball and stick molecule modelingSYNOPSIS¶
- xbs
- [-id] [-h] [-geo gg] [-sc x] [-color]
DESCRIPTION¶
xbs uses X-window graphics to produce ball-and-stick plots. It reads coordinates and other data from an input file id.bs (e.g. ch4.bs) and possibly different "frames" with shifted coordinates from an auxillary move file Iid.mv (e.g. ch4.mv). The default files are in.bs and in.mv In the Debian distribution, see the example input files and script in /usr/share/doc/xbs/examples.OPTIONS¶
- -geo gg
- set window geometry
- -sc x
- set scale factor
- -t title
- set window title
- -color
- use color
- -bw
- b/w with smooth grays
- -st
- b/w with stippled grays
- -rv
- reverse colors
- -autocolor
- chose own colors
- -hh
- long help
- -geo gg
- set window geometry
INPUT FORMAT¶
In a simple case, a file ch4.bs could look like this:atom C 0.000 0.000 0.000
atom H 1.155 1.155 1.155
atom H -1.155 -1.155 1.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 1.00
bonds C C 0.000 4.000 0.109 1.00
bonds C H 0.000 3.400 0.109 1.00
bonds H H 0.000 2.800 0.109 1.00
atom species x y z
spec name radius color
frame This is frame number two
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.ONLINE HELP¶
Typing 'xbs -h' and 'xbs -hh' gives short respectively long help.COMMANDS¶
1. Color:- A color is specified either as a number between 0 and 1 (gray value), three numbers between 0 and 1 (red, green, blue values or RGB), or as a color name from the file /usr/lib/X11/rgb.txt (or similar).
- In the input file, the color of each species or bond is set in these three ways.
- The following xbs options are related to color: -color enable colors (default) bw uses greys only -st uses grays only, stippled from a few values -rv reverse all colors -auto choose own colors. You can change these interactively with the update command. For consistency, black is now 0 and white is 1. The -rv option switches this. The only reason for using -bw or -st is that the commands 'light' and 'gramp' do not work with colors.
- The '-auto' option is used to color the atoms in some standard way. These colors are set in routine 'set_auto_colors' in file subs.h. Starting from the species label (ie. Pd3 or Mg-a) the leading alpha part is extracted and capitalized (ie. PD or MG) and this string is used to select a color. The idea is to put one's favorite colors into the routine and then recompile xbs.
- The command 'color' changes the colors of atoms interactively, ie. 'color C* green' changes the color of all matching species. To show the color of a species, use the command without specifying a color (ie. 'color C1' or 'color C-a').
- When data is saved with the 'save' command, the current colors (as set with 'color') are saved as a string. With 'save -rgb' the RGB values are written instead of color names. If the -rv option is used, the reversed colors are saved as RGB values.
- print -T print and add some info as title
- print -t 'text .... ' print and put text as title
- update -rv update but switch on reversing
- update +rv update but switch off reversing
- update -bw update but switch to black/white
- save -rgb save with colors as rgb values
- save -step n save with only every n'th frame
-
(good to compress a big .mv file).
- Use 'help update' etc on the input line to see the options.
-
- 3. Pattern matching for atom labels: * matches any string, + any char.
- This can be used in the 'color' command and in the 'bonds'
lines in the input file (which determine what bonds are drawn). For
example, 'bonds C* H* ...' selects all bonds between
atoms like C1 and H34 etc. and 'bonds * * ...' selects all pairs.
- 4. Other miscellaneous changes:
-
- Key 'a' displays the axis directions.
- Key 'n' shows atom names or numbers. Key 'c' shows the coordinates.
- To close a postscript print file, use command 'close'.
- Command 'dup x y z' duplicates all atoms shifted by (x,y,z).
- Command 'cut x y z a b' cuts to those atoms between a and b
along the vector (x,y,z).
- The input line has a history list to retrieve old commands.
Use the up and down arrows when the input line is active.
- On some systems, the backspace key does not work to edit the
input line. Therefore the left-arrow key was defined to have
the backspace function also.
AUTHOR¶
M. Methfessel <methfessel@ihp-ffo.de>FILES¶
/usr/lib/xbs/in.bs default data fileAugust 3, 1998 |