Hi Robert,

you can set the distance between each atom and the center as b-factor, and then use spectrum (or spectrumany [1]) for coloring.

I wrote a small python script that will do that, see attachment.

Example (in PyMOL command line):

run distancecoloring.py
centerdistance2b (all)
spectrum b, blue_white_red, (all)

Cheers,
  Thomas

[1] http://pymolwiki.org/index.php/Spectrumany

On 07/28/2011 04:29 PM, Muench, Robert wrote:
Dear community,

I was searching the internet for several days now to find out how to
perform a distance dependent coloring in pymol.

The idea is to color the surface of a viral (spherical) structure. I
would like to define the xyz-coordinates of the center of the viral
structure an color all residues with a gradient depending on the
distance from these xyz coordinates.

Can anyone please help me out?

All the best

Robert

*Robert Münch***

---------------------------------------------------------

Dipl. Biologist / PhD-Student

*Paul-Ehrlich-Institut*

Federal Institute for Vaccines and Biomedicines

Division of Medical Biotechnology

Section 6/5 - Viral Gene Transfer Medicinal Products

63225 Langen, Germany

Phone: +49-6103-77-4222

Fax: +49-6103-77-1255

--
Thomas Holder
MPI for Developmental Biology

Attachment: distancecoloring.py
Description: application/chimera

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to