Good to hear from you.
I didn't know about "alt" as a selection, so in the end that gave the answer... Your example, which I find quite clever, didn't exactly match my goal, though, so just to clarify: Rather than distinguishing residues with alternate conformations from those "normal" ones without, I wanted to have the labels distinguish alternate conformer A from B and so on within a given residue. Since there was this backtick A or B at the end of the atom name in the right-click drop down menu I expected it would be somehow accessible via command line in the label command. But "name" didn't do it. But of course, using your "alt" selection I could do:
label alt a, "A"
label alt b, "B"
or indeed color all B conformations pink with:
color pink, alt b
And after realizing this, I just tried:
label myprotein, alt
which by its simplicity is obviously something I might have tried earlier. Elegantly, as most residues don't have any "alt" conformation, it has the nice side effect that labels only show up for those with alternate conformations as well!
Thanks for the tip!
(By the way, neither the pymol help nor the wiki include "alt" as "symbols defined in the name space" which currently includes things like "name, resn, resi, b, q, segi, type, formal_charge, partial_charge, numeric_type, text_type). I guess that means I should learn to wiki it up.
This series of commands seems to do the job although a little sloppy.
label alt a+"", "A%s-%s" % (resn, resi)
label alt b+"", "B%s-%s" % (resn, resi)
hide labels, alt ""
-bobOn 12/7/05, Seth Harris < firstname.lastname@example.org> wrote:Hi,
I'm writing a small script to visit alternate conformations, stepping through each as a frame in a movie with the cursor keys. I'd like to label them to distinguish the alternates so I can see which I'd like to keep or not, but:
label alternates, name
only displays the atom name without the pertinent `A or `B that the right mouse click menu includes.
Is there a way to show this information with the label command or other means?
p.s. Those extra "3D" and other superfluous characters show up for me as well receiving the pymol list as a digest on gmail based web. I don't know if it's a result of the "digestion" process, but it seems like "=" signs and other non-alpha characters are associated with these burps of indigestion, invariably followed by 2D or 3D or such. I've kind of learned to ignore them, but obviously they can cause some confusion and are at least minorly amusing when they reappear like some "who's on first" miscommunication as warren's advice mention there should be no "3D" just the number "10" like this, and then it proceeded to again display the 3D!! Perhaps the Digest is the culprit and could be treated? It also displays HTML as full text with tags and all that garbage, by the way.
"""I'm not sure where that "3D10" is coming from -- it should simply be the
alter all, b=3D10
map_new can take a selection as its fourth argument, so you could