Hi Folks, Some of you may have been using my color_b.py script for colouring by the value of the B-factor. Thanks to the stimulus of one user, I've updated it to have a variety of colouring gradients. You can now select from the following options:
Gradients: 'bwr' blue-white-red (like grasp electrostatic colouring) 'rwb' red-white-blue 'bgr' blue-green-red (also known as 'rainbow') 'rgb' red-green-blue (also known as 'reverserainbow') 'bmr' blue-magenta-red 'rmb' red-magenta-blue 'gray' dark-to-light gray-scale 'reversegray' light-to-dark gray-scale For each of these gradients you can provide a saturation and value (as in the "s" and "v" in the "HSV" colour scale). So you can make the colours pastel or highly saturated and dark as you so desire! For the gray-scale gradients, "sat" sets the minimum intensity and "value" sets the maximum intensity. Now, rather than specifying ramp=1 or ramp=0 to select the type of "binning" of the data, I changed the option to mode='ramp' or mode='hist' to select binning by equal numbers of atoms in each colour (ramp) or equal spacing of the b-values in each colour (hist). I've also written a couple of new scripts: 1) data2bfactor.py, which reads a data file and alters the B-factor for each residue (or atom) of the requested molecule with the values in the data file. Obviously one might use this in conjuction with the color_b.py script to colour your molecule by the value in the data. :) (Caution, this is somewhat crude and due to the use of the "alter" function in PyMOL is very slow, especially for altering individual atomic B-factors -- I hope to improve it, but it works for me for now). There are two functions in this script, data2b_res and data2b_atom for reading data per residue or per atom respectively. They expect to read a data file of the form: CHAIN RESI RESN data or CHAIN RESI RESN NAME data (where CHAIN,RESI,RESN,NAME mean the same as they do in PyMOL selection commands). Blank lines or comment lines in the data file preceded with a '#' are ignored. After doing "run data2bfactor.py" you can call the functions with: data2b_res('mol','file.data') or data2b_atom('mol','file.data') where you'll obviously need to fill in the correct values for 'mol' and 'file.data'. 2) stride_ss.py, which takes the output from the "stride" secondary structure calculation and apply it to a molecule within PyMOL. Obviously you'll need a copy of stride, which I got with my copy of VMD (http://www.ks.uiuc.edu/Research/vmd/). Of course I only have VMD in order to get stride, not because of its graphical abilities. :) Please note, for those of you that may have bookmarked (or have a link to) my web site at Johns Hopkins, I left there 5 months ago. Please refer to my current web site for my PyMOL stuff: http://adelie.biochem.queensu.ca/~rlc/work/pymol I hope these are helpful to somebody! Cheers, Robert -- Robert L. Campbell, Ph.D. <r...@post.queensu.ca> Senior Research Associate phone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-533-2497 Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2