Hi Robert,

I did something like this in the past. Check out the ramp_new command
page on the PyMOLWiki for an example
(http://pymolwiki.org/index.php/Ramp_new#Elaborate_examples) for
arbitrary functions.

Here's a very quick way to color a surface by distance from a given
point--here I chose the origin (0,0,0):

# fetch a friendly protein

fetch 1hug, async=0

# show it as a surface

as surface

# create a pseudoatom at the origin; we will
# measure the distance from this point

pseudoatom pOrig, pos=(0,0,0), label=origin

# create a new color ramp, measuring the distance
# from pOrig to 1hug, colored as rainbow

ramp_new proximityRamp, pOrig, selection=1hug, range=[5,65], color=rainbow

# set the surface color to the ramp coloring

set surface_color, proximityRamp, 1hug

# some older PyMOLs need this recoloring/rebuilding

recolor; rebuild

Cheers,

-- Jason


On Thu, Jul 28, 2011 at 10:29 AM, Muench, Robert <robert.mue...@pei.de> 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
>
> ---------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> 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
>



-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

------------------------------------------------------------------------------
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