For surface electrostatic plots in PyMOl
dens and esp cube files, then run this command:
isosurface name, map, level
name = name to call the
new surface (I typically
call this dens)
Create a new color map
ramp_new name, source, [-.05,-0.025, 0,0.025, .05], [red,orange, yellow,green, blue]
name = name of the color ramp (I use “spectrum” as a name)
source = the esp cube file source
alter the values in the first vector to match the molecule (see jmol bits below)
set surface_color, color, selection
color = name of the color ramp (“spectrum”)
selection = name of the density isosurface (“dens”)
Rebuild to see the colors if they do not show up.
Setting the color range
To extract the range of values on a
given isosurface when generating the color ramp I use jmol to get
If anyone knows how to do this in
pymol that would be great.
In jmol run the following from the console:
isosurface dens 0.02 "C:/…/dens.cube" color absolute -0.1 0.1 "C:/…/ esp.cube"
where dens.cube and esp.cube are the paths to the electron density and electrostatic potential files.
The max and min values will be displayed on the console. Go back to pymol and divide this range by 4 to set the color scale for the esp color ramp.