I am using PyMol to visualize .pdb protein structures.

I show/hide representation a lot, and sometimes I get confused with what representations are currently displayed. So I end up with doing a lot of hides (basically trying to hide each representation).

Is there a command which shows me what representations are currently used.

For instance if I have used

show ribbon
show lines
show mesh
hide lines

and than use some sort of showRepresentation it will return me ribbon, mesh

  • 2
    $\begingroup$ If you do that via the context menu on the sidebar, there is an option "show as" that will remove the previous representations and only show the new one. $\endgroup$ Apr 29, 2013 at 15:45

1 Answer 1


You can use "as" to switch to a particular style (http://pymolwiki.org/index.php/As ):

as cartooon, 11AS and chain a

You can also hide everything, to remove all representations (http://pymolwiki.org/index.php/Hide):

hide every, 11AS and not (n. ca+c+n and resi 5-10)

I'm a fairly expert user of PyMOL and I've never seen an API exposed which will show you what representations are being used. That's not to say that it doesn't exist, there are a variety of undocumented features and commands still.

The problem is it isn't as simple as ribbon,mesh. Every single atom can be displaying any combination of representations, so as an API call or command, it would have to return the status of every atom in your selection. If the displayed representations are exposed somewhere they're probably in a very low level format like that, and not of use unless you're a programmer.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .