[Chimera-users] place label at arbitrary position in 3D

Oliver Clarke olibclarke at gmail.com
Thu Aug 13 13:08:36 PDT 2015


In case it is useful to anyone else - I was trying to figure out a way to place a label at an arbitrary position in 3D, so that I can for example generate a chimera session of a protein with all helices labeled and annotated appropriately.

I couldn’t figure out a way to easily do this with the built in tools (rlabel, labelopt etc all seem to require you to set an offset from an atom in the structure), so I made the following alias, which gets around this by placing an invisible marker atom at the center of rotation (which I mostly keep locked to the center of view), and attaching a label to that. Hope it is useful to somebody else too.

#Place label here (at center of rotation).
#Usage: label_here "label_text" (replace spaces in desired label text with _; they will be replaced by spaces in label)
alias ^label_here ~sel; ac mc; color black sel; repr bs sel; vdwdefine 0.01 sel; setattr a label $1 sel; transparency 100,a sel; ~sel

Cheers,
Oliver.


More information about the Chimera-users mailing list