Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Ramp New
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Examples == === Color surface by an APBS calculated electrostatic map === Example map: http://pymol.org/tmp/1ubq_apbs.dx <source lang="python"> load 1ubq_apbs.dx, e_pot_map fetch 1ubq, async=0 as surface ramp_new e_pot_color, e_pot_map, [-5, 0, 5], [red, white, blue] set surface_color, e_pot_color set surface_ramp_above_mode </source> === Color binding pocket by proximity to ligand === * Ligand: blue * Protein within 4 Angstrom of ligand: red * Protein beyond 8 Angstrom of ligand: yellow <source lang="python"> fetch 1rx1, async=0 extract ligand, organic color blue, ligand show surface ramp_new prox, ligand, [4, 8], [red, yellow] color prox, 1rx1 </source> === Color isosurface by closest atom === ''See also the [[huge surfaces]] example.'' Color the isosurface within 2 Angstrom of the protein (without solvent) by atom colors. Everything beyond 2 Angstrom will be gray. <source lang="python"> fetch 1rx1, map, async=0, type=2fofc isosurface surf, map fetch 1rx1, mol, async=0 remove solvent ramp_new prox, mol, [0, 2, 2], [atomic, atomic, gray] color prox, surf </source> Updating the atom colors is possible, for example: <source lang="python"> spectrum recolor </source> === More user provided examples === ==== Ramp + Distance Measure ==== Using a ramp and a distance measure, we can color the surface by some property--here, I'll chose distance from some important atom in the receptor to the ligand atom. <gallery perrow=3 widths=250 heights=250> Image:Surface_by_prop3.png|Ligand surface colored by distance from some given atom. The remainder of the protein is hidden to more clearly visualize the calculated distances and surface color Image:Surface_by_prop.png </gallery> To reproduce the results shown here you must do the following: * obtain a protein * calculate some property for some set of atoms (like distance from some central location) and stuff the values into the b-factor * create a new object from the atoms for which you just measured a property * create a new ramp from the object with ramp_new * set the surface color of the new object Another possible application of the ramp_new command can be the representation of the ELF function [http://en.wikipedia.org/wiki/Electron_localization_function]. This function can be calculated with the TopMod software [http://www.lct.jussieu.fr/suite64.html]. * Load the cube file containing the ELF function, e.g. H2O_elf.cube. * Create an isosurface with a contour level of 0.8. <source lang="python">isosurface elf, H2O_elf, 0.8</source> * Load the cube containing the basin information, e.g. H20_esyn.cube. Basically in this cube for each point in the first cube you have either one of the numbers from 1 to 5. More details on what these numbers mean can be found in the TopMod manual. * Create a new ramp. <source lang="python">ramp_new ramp, H2O_esyn, [1, 2, 3, 5], [tv_orange, lightblue, palegreen, deeppurple]</source> * Assign the color ramp to the ELF isosurface. <source lang="python">set surface_color, ramp, elf</source> * Rebuild if necessary. <source lang="python">rebuild</source> <gallery perrow=2 widths=250 heights=250> Image:H2O.png|Localization domains of H2O. The bounding isosurface is ELF=0.8 Image:BeCl2.png|Localization domains of BeCl2. The bounding isosurface is ELF=0.8 </gallery> ==== Surface Colored by Distance from a Point ==== See [[Spectrum]] for another method that allows for more flexible coloring schemes, but needs more work to get there. <gallery widths=400 heights=250> Image:Measure.png </gallery> This example shows how to color a protein surface by its distance from a given point: <source lang="python"> # 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 </source> ====Coloring a Viral Capsid by Distance from Core==== <gallery heights=350 widths=350> Image:Capsid_by_dist.png </gallery> <source lang="python"> # create a pseudoatom at the origin-- we will # measure the distance from this point pseudoatom pOrig, pos=(0,0,0), label=origin # fetch and build the capsid fetch 2xpj, async=0, type=pdb1 split_states 2xpj delete 2xpj # show all 60 subunits it as a surface # this will take a few minutes to calculate as surface # create a new color ramp, measuring the distance # from pOrig to 1hug, colored as rainbow ramp_new proximityRamp, pOrig, selection=(2xpj*), range=[110,160], color=rainbow # set the surface color to the ramp coloring set surface_color, proximityRamp, (2xpj*) # some older PyMOLs need this recoloring/rebuilding recolor </source>
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Ramp New
(section)
Add topic