Usage of Builder Script

NOTICE: If you use VMD plugin, you may don't have to use this script.

There are some python helper scripts in scripts/python directory to build XML data from PDB file. Users can create a XML data for wm3d using this script.

It is to be noticed that these scripts are also used in the VMD plugin internally.

ATOM definition

Information about atoms are defined in scripts/python/DEFAULTS. In default, only some elements which are common for proteins are registered. If you want to register atoms, please add its name, color, radius, and vdw-radius(in angstrom) to this file.

# lines begun with "#" are ignored
# atomtype color radius van-der-waals-radii(used to determine bond)
H 0xAAAAAA 6 1.2
C 0x00FF00 10 2.0
# for alpha carbon, not for calcium
Ca 0x00FF00 10 2.0
N 0x0000FF 10 2.0
O 0xFF0000 10 2.0
F 0xF8ABA6 10 2.0
Na 0xAFDFE4 12 2.0
Mg 0x001F43 14 2.5
S 0xFFFF00 14 3.0
P 0xF8ABA6 14 3.0
Cl 0x008000 14 3.0
The color and radius are used to XML output, vdw-radius is used to determine covalent bonds.

Script Usage

There are two ways to use "builder.py" which is the main routine.

  1. use command line arguments
  2. interactive mode

This script can create XML data of objects such as spheres, sticks, coils, and ribbons, but never create setting-related elements (<SETTING> and its child elements). Please add them manually when you need these kinds of elements.

Use command line arguments

Here is a sample usage. In this sample, XML data of the protein backbone are generated in COIL style.

  1. % ./builder.py -l pdb.pdb -s -Z > output.xml

Use interactive mode

Interactive mode can be invoked if no arguments are given to builder.py. Sample usage is shown in the following, where lines begun with ">>" are output by the XML (to stderr) and the others are user input.

  1. % ./builder.py > output.xml
  2. >> entering command line mode.
  3. >> type "exit" or press Ctrl+D to exit.
  4. >> type "help" to show list of commands
  5. load pdb.pdb
  6. >> read xxxx atoms from the pdb file
  7. select
  8. >> select xxxx atoms
  9. gencoil
  10. >> finished to generate chains
  11. exit
  12. >> bye.

This sample do the same thing as the command line sample above.

Notices

You should MANUALLY add <WMXML> and </WMXML> tags in the beginning and end of the output.xml, respectively.

Stride is used to determine the secondary structure, when you create <RIBBON>s. The path of the Stride is given in system.py, where default path is "/usr/local/lib/vmd/stride_LINUX" for Linux and "C:/Program Files/University of Illinois/VMD/stride_WIN32.exe" for Windows, where these locations are standard path for standard VMD users. Please change these strings if your Stride path is different from those default values.

Stride is used only on secondary structure assignment. Therefore, genchains (commandline: -z) is the only affected command. Other commands such as genatoms(-x), genbonds(-y), gencoils(-Z) can be used without Stride.

See scripts/python/README for further information.