From: Sean L. <mag...@ho...> - 2009-11-07 15:06:07
|
Mark, Sorry for the earlier confusion. I think I found a hackish way of getting a gray spectrum: To specify a particular color spectrum you need to know the language of the spectral ranges. These ranges are discussed briefly in the PyMOL-Wiki (spectral range colors): http://www.pymolwiki.org/index.php/Color_Values#Spectral_range_colours The Wiki actually speaks of a "gray spectrum". In using the spectrum command, when the user specifies a "palette" this string is cross referenced in a dictionary called "palette_dict" which is located in module/pymol/constants.py. For each dictionary key, a unique set of palette values is returned (prefix, digit, minimum, maximum) and interprested. Prefix specifies which spectrum to use: "gray" = gray "s" = spectrum "o" = original "r" = reversed offset spectrum "c" = complementary spectrum "w" = complementary spectrum separated by white The minimum and maximum values correspond to the range that you want for a particular spectrum and is discussed on the Wiki page. For the gray spectrum, the values run from 00 to 99. I haven't quite deciphered what the "digit" value corresponds to but for the non-gray spectrum it is set to 3 but I noticed that it produces drastically different results if you set it to 1 or 2 for the gray spectrum. It may be related to a jump value of some sort but don't quote me on that! Unfortunately, none of the gray spectral values exist in that palette dictionary. Having said that, you can hack it by adding it to the dictionary itself: 1) Go to the directory where PyMOL is installed 2) Navigate to module/pymol/constants 3) Look for 'red_cyan' : ('c',3,916,999), 'cyan_red' : ('c',3,999,916), 4) Underneath it, add your own gray spectrum 'red_cyan' : ('c',3,916,999), 'cyan_red' : ('c',3,999,916), 'grey10_grey90' :('gray',1,10,90), 5) Then, open PyMOL, load your molecule, and type "spectrum b, grey10_grey90" and this should give you a gray spectrum. Once again, you may need to play with the "digit" value as a value of "3" vs. a value of "1" can produce very different results. I'll leave it up to the user as a lesson to figure out what it means (cause I haven't). Sean _________________________________________________________________ Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you. http://go.microsoft.com/?linkid=9691817 |