1
$\begingroup$

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

$\endgroup$
  • 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$ – Mad Scientist Apr 29 '13 at 15:45
4
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.