Re: [PyMOL] ribbon-like with one color
Thank you for that tip Mark. Using those palettes I managed to compose the cartoon that I wanted. Thank you all that sent me scripts and tips. All the best, Mario Sanches Mark A Saper wrote: There are actually other spectrums built into the PyMOL. To use one of them, type spectrum palette=palette_name, selection=selection The list of built-in palettes are in cmd.py of the code. All seem to be multi color; so there are none that are just different shades of one color. _ Mark A. Saper, Ph.D. Associate Professor of Biological Chemistry Biophysics Research Division, University of Michigan Chemistry Building Room 3040 930 N University Ave Ann Arbor MI 48109-1055 U.S.A. sa...@umich.edu(734) 764-3353fax (734) 764-3323 http://www.biochem.med.umich.edu/biochem/research/profiles/saper.html Biophysics Interdepartmental Graduate Program: http://www.umich.edu/ ~biophys - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Mario Sanches Laboratório Nacional de Luz Síncrotron Cristalografia e Espectroscopia de Biomoléculas Tel: +55 19 3512 1109
Re: [PyMOL] ribbon-like with one color
Thank you for the script Andreas, it worked fine. Now, is there any way to define wich objet is going to be colored? I want to use different color hues for two different objects. Thank you, Mario Sanches Andreas Henschel wrote: Hi Mario, you can define new colors wit the set_color command. below are two python functions that can define ranges, one using HSV color space, one RGB. The former is a derivite of a script earlier posetd by Robert L. Campbell on the wiki. Hope that helps. Cheers, Andreas def hueSpectrum(hue1=0.0, hue2=0.2, nbins=10, sat=1., value=1.): ## by default creates 10 shades of red ## Derived from color_b.py ## Author Robert L. Campbell, see pymol wiki colorNames=[] stepsize = (hue1 - hue2) / nbins for j in range(nbins): # for the selection colorName = hueSpectrum%02d%(j) colorNames.append(colorName) hsv = (hue1 - stepsize * float(j), sat, value) #convert to rgb and append to color list rgb = colorsys.hsv_to_rgb(hsv[0],hsv[1],hsv[2]) cmd.set_color(colorName, rgb) return colorNames def hueSpectrum2(r=1., g = .0, b = .0, shades=10, shadeSpec=0.4): colorNames=[] r0 = max(r - shadeSpec/2, 0.0) g0 = max(g - shadeSpec/2, 0.0) b0 = max(b - shadeSpec/2, 0.0) stepsize = shadeSpec/(shades-1.) for j in range(shades): # for the selection colorName = hueSpectrum%02d%(j) colorNames.append(colorName) r0 = min(r0+stepsize, 1.0) g0 = min(g0+stepsize, 1.0) b0 = min(b0+stepsize, 1.0) cmd.set_color(colorName, (r0, g0, b0)) return colorNames def colorSpec(residue1, residue2, shades=10): ## careful: assumes consecutive resi's ... resiPerColor = abs(residue1-residue2)/shades for j in range(residue2-residue1): color = shades*j/(residue2-residue1) ## use only generated shades. Careful: don't exceed! cmd.color(hueSpectrum%02d % color, resi %s %(residue1 + j) ) ## usage: cmd.load(/group/bioinf/Data/PDBLinks/1god.pdb) ## change path cmd.as(cartoon) cmd.color(white, 1god) #hueSpectrum(0.5, 0.7) ## dark blue to cyan, looks cool, too! hueSpectrum2() ## reddish colorSpec(89, 109) Mario Sanches wrote: I am trying to color a structure with a ribbon like feature but not going from blue to red, but instead, using differente blue hues (or red hues, etc). Is that possible? Thank, -- Mario Sanches Laboratório Nacional de Luz Síncrotron Cristalografia e Espectroscopia de Biomoléculas Tel: +55 19 3512 1109
[PyMOL] ribbon-like with one color
I am trying to color a structure with a ribbon like feature but not going from blue to red, but instead, using differente blue hues (or red hues, etc). Is that possible? Thank, -- Mario Sanches Laboratório Nacional de Luz Síncrotron Cristalografia e Espectroscopia de Biomoléculas Tel: +55 19 3512 1109
[PyMOL] residues with no bound
Hi Pymolers I have a pdb file with two subsequent double conformation residues. When I load this on pymol those two residues are not bound. Is there any special command I have to use to bound then in this case? Thanks in advance. Mario sanches
Re: [PyMOL] question on differential coloring of protein chains
Hi Alex. hello- i am new to pymol and am trying to figure out how to differentially color different chains (i.e. different proteins) in the structure i am viewing. the structure i am working with is actually a structure of two proteins that were co-crystalized and i would like assign different colors to them. thanks for your help. alex dajkovic As long as I know you can do that by creating copies of the same molecule. Do like this: load molecule.pdb, mole create copy, (mole) Then assign different colors to each (for example): color blue, mole color red, copy Finally show each chain separately: show cartoon, (mole c;A) show cartoon, (copy c;B) (in the case you what a cartoon representation of chains A and B). I hope that helps you. -- Mario Sanches, PhD Student Protein Crystallography Group São Paulo University, São Carlos Physics Institute Phone: +55 (16) 273 9868 sanc...@if.sc.usp.br