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
Surface
(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!
==Tips== === Exporting Surface/Mesh Coordinates to File=== PyMOL can export its coordinates as WRL wireframe model files for VRML input. ====Older PyMOL Versions==== <source lang="python"> # export the coordinates to povray open("surface.inc","w").write(cmd.get_povray()[1]) </source> ====Newer PyMOL Versions==== <source lang="python"> # export the coordinates to .wrl file save myscene.wrl </source> or <source lang="python"> # export the coordinates to .obj file. Only surface representation can be saved as .obj. # NOTE: the coordinates are saved in camera coordinate system. save myscene.obj </source> ===Representation-independent Color Control=== To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object. Or use the [[surface_color]] setting that is available. [[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]] ===Displaying a protein as surface with a ligand as sticks=== An easy way to do this is to create separate objects for each type of display. 1 Load your protein 2 Select the ligand 3 Create a separate object for the ligand 4 Remove ligand atoms from the protein 5 Display both objects separately Example: <source lang="python"> load prot.ent,protein select ligand,resn FAD create lig_sticks,ligand remove ligand show sticks,lig_sticks show surface,protein </source> Even easier is to: 1 Load the protein 2 S (Show) > organic > stick 3 S (Show) > surface ===Calculating a partial surface=== There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one: <source lang="python"> flag ignore, not A/49-63/, set delete indicate show surface </source> If the surface was already computed, then you'll also need to issue the command: <source lang="python"> rebuild </source> See [[Get_Area]] for more information on surface area calculations. ===Displaying surface inside a molecule=== As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is: <source lang="python"> set ambient=0 set direct=0.7 set reflect=0.0 set backface_cull=0 </source> Which gives no shadows and only a few artifacts. As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in "ray". <source lang="python"> util.ray_shadows("heavy") set two_sided_lighting=1 set backface_cull=0 </source> ===Creating a Closed Surface=== <gallery> Image:Surface_open.png|Example OPEN Surface Image:Surface_closed.png|Example CLOSED Surface </gallery> To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object. Here's an example. <source lang="python"> sel A, id 1-100 create B, A show surface, B </source> ===Smooth surface quick (blob)=== To get a quick blob type surface (not as accurate): <source lang="python"> set solvent_radius, 4 alter all, vdw=4 sort set surface_quality, 1 </source> ===Smooth surface accurate (blob)=== To get an accurate blob type surface: <source lang="python"> set surface_quality, 1 alter all, b=50 alter all, q=1 set gaussian_resolution,5 map_new mapA, gaussian, 1, sele or pdb, 6 isosurface surfA, mapA </source> '''Notes:''' Set gaussian resolution is variable with a larger number causing a more smooth surface (4 is medium and 8 is very smooth). The temperature factor field (b) has at least as much impact as the resolution setting, so increasing b factors is the more computationally efficient way of increasing the blur effect. If you are displaying more then one surface in a .pse file you must create a new map for each one (if you have three you will create mapA for the first, mapB for the second and mapC for the third), then you apply an isosurface to each map (isosurface surfA, mapA - isosurface surfB, mapB - isosurface surfC, mapC). === Huge Surfaces === If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].
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
Surface
(section)
Add topic