
Hi again Chimera team, I'm looking for a fairly quick and dirty way to apply some annotations using 2D labels to a bunch of open structures. Basically, I have ~16 structures open on screen, which I then tile to compare. I'd like the model name to be displayed just below each model so that its easy to track. I've found this thread (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-July/004081.html) which appears to be attempting a similar thing (though I'd like to use the model.name not serial number), but the approach doesn't seem to work (no labels appear and there is no information in the reply log or IDLE to give me any clues). Any suggestions/alternatives appreciated! Joe Joe Healey M.Sc. B.Sc. (Hons) MSRB PhD Student MOAC CDT, Senate House University of Warwick Coventry CV47AL Mob: +44 (0) 7536 042620 | Email: J.R.J.Healey@warwick.ac.uk Jointly working in: Waterfield Lab<http://www2.warwick.ac.uk/fac/med/research/tsm/microinfect/staff/waterfieldl...> (WMS Microbiology and Infection Unit) and the Gibson Lab<http://www2.warwick.ac.uk/fac/sci/chemistry/research/gibson/gibsongroup/> (Warwick Chemistry) Twitter: @JRJHealey<https://twitter.com/JRJHealey> | Website: MOAC Page<http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey> | ORCID: orcid.org/0000-0002-9569-6738

Hi Joe, I don’t think there is a simple way (not involving python scripting) to achieve what you want… The instructions in that previous post are for 3D labels, not 2D, and they work to label the first atom in each structure by the model number: labelopt info molecule la @/serialNumber=1 The part that specifies model number is “info molecule” and it does not have a model-name option. I see that “molecule” isn’t even documented as a choice for type of info, so I will need to add it… apparently I didn’t know about it and failed to notice the omission when that previous post appeared! Sorry about that. IMO, “molecule” is somewhat misleading and should be “model” instead, as there could be many different molecules in a single model. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/labelopt.html> Don’t be distracted by the serial number stuff in the “label” command; it simply indicates which atoms to label: the first one in each model. It was used simply to just get one label per model without prior knowledge of the atom names and residue numbers in each structure, since the label command potentially applies to all atoms. You could use the “2dlabels” command instead, but you would have to manually specify the text for each label and its X,Y position in the graphics window (or use the 2D Labels graphical interface and place the labels by hand, which is much easier as long as you don’t have to do it too many times) <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/2dlabels.html> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels....> Somebody else would have to advise on the Python-scripting possibilities for a more automatic approach. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Feb 23, 2018, at 1:54 AM, Healey, Joe <J.R.J.Healey@warwick.ac.uk> wrote:
Hi again Chimera team, I'm looking for a fairly quick and dirty way to apply some annotations using 2D labels to a bunch of open structures.
Basically, I have ~16 structures open on screen, which I then tile to compare. I'd like the model name to be displayed just below each model so that its easy to track. I've found this thread (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-July/004081.html) which appears to be attempting a similar thing (though I'd like to use the model.name not serial number), but the approach doesn't seem to work (no labels appear and there is no information in the reply log or IDLE to give me any clues).
Any suggestions/alternatives appreciated! Joe

Hi Elaine, Ah ok I see, thank you. A python solution would be fine too, I do have quite a lot of these to do so positioning them all by hand would be a bit of a last resort. Naively I would have thought an approach like defining a centroid for each structure, taking the x and y coords, then looping through each structure to acquire the model name from the python object, and then positioning the label with an offset might work? Is there any documentation for the python implementation of 2dlabels? Thanks, Joe M.Sc. B.Sc. (Hons) MSRB PhD Student MOAC CDT, Senate House University of Warwick Coventry CV47AL Mob: +44 (0) 7536 042620<tel:+44%207536%20042620> | Email: J.R.J.Healey@warwick.ac.uk<mailto:J.R.J.Healey@warwick.ac.uk> Jointly working in: Waterfield Lab<http://www2.warwick.ac.uk/fac/med/research/tsm/microinfect/staff/waterfieldl...> (WMS Microbiology and Infection Unit) and the Gibson Lab<http://www2.warwick.ac.uk/fac/sci/chemistry/research/gibson/gibsongroup/> (Warwick Chemistry) Twitter: @JRJHealey<https://twitter.com/JRJHealey> | Website: MOAC Page<http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey> | ORCID: orcid.org/0000-0002-9569-6738<http://orcid.org/0000-0002-9569-6738> On 23 Feb 2018, at 19:07, Elaine Meng <meng@cgl.ucsf.edu<mailto:meng@cgl.ucsf.edu>> wrote: Hi Joe, I don’t think there is a simple way (not involving python scripting) to achieve what you want… The instructions in that previous post are for 3D labels, not 2D, and they work to label the first atom in each structure by the model number: labelopt info molecule la @/serialNumber=1 The part that specifies model number is “info molecule” and it does not have a model-name option. I see that “molecule” isn’t even documented as a choice for type of info, so I will need to add it… apparently I didn’t know about it and failed to notice the omission when that previous post appeared! Sorry about that. IMO, “molecule” is somewhat misleading and should be “model” instead, as there could be many different molecules in a single model. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/labelopt.html> Don’t be distracted by the serial number stuff in the “label” command; it simply indicates which atoms to label: the first one in each model. It was used simply to just get one label per model without prior knowledge of the atom names and residue numbers in each structure, since the label command potentially applies to all atoms. You could use the “2dlabels” command instead, but you would have to manually specify the text for each label and its X,Y position in the graphics window (or use the 2D Labels graphical interface and place the labels by hand, which is much easier as long as you don’t have to do it too many times) <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/2dlabels.html> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels....> Somebody else would have to advise on the Python-scripting possibilities for a more automatic approach. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco On Feb 23, 2018, at 1:54 AM, Healey, Joe <J.R.J.Healey@warwick.ac.uk<mailto:J.R.J.Healey@warwick.ac.uk>> wrote: Hi again Chimera team, I'm looking for a fairly quick and dirty way to apply some annotations using 2D labels to a bunch of open structures. Basically, I have ~16 structures open on screen, which I then tile to compare. I'd like the model name to be displayed just below each model so that its easy to track. I've found this thread (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-July/004081.html) which appears to be attempting a similar thing (though I'd like to use the model.name not serial number), but the approach doesn't seem to work (no labels appear and there is no information in the reply log or IDLE to give me any clues). Any suggestions/alternatives appreciated! Joe

Hi Joe, I can’t answer about the python part, but two comments: If you’re using 2D labels, it has (almost) nothing to do with the X,Y coordinates of the structures. It is simply the fractional X,Y position in the graphics window rectangle. E.g. 0.5 0.5 means lower left corner of text is smack dab in the middle of the window. Try using the 2D Labels graphical interface (under Tools… Utilities) and you’ll see what I mean. <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels....> Rather than python-scripting Chimera directly, it may be easier to have your own code write a 2d-label file (see documentation), for example: <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/example.l...> If you’re using 3D (regular) labels, then position would be based on some atom’s position (but the “label” or “rlabel” command also takes an offset, so theoretically you could offset it 20 angstroms downward or something like that). However, the part that I don’t know how to do (that would presumably require python) is to make the text of the 3D label the name of the model. Elaine
On Feb 24, 2018, at 5:38 AM, Healey, Joe <J.R.J.Healey@warwick.ac.uk> wrote:
Hi Elaine,
Ah ok I see, thank you. A python solution would be fine too, I do have quite a lot of these to do so positioning them all by hand would be a bit of a last resort.
Naively I would have thought an approach like defining a centroid for each structure, taking the x and y coords, then looping through each structure to acquire the model name from the python object, and then positioning the label with an offset might work?
Is there any documentation for the python implementation of 2dlabels?
Thanks,
Joe
M.Sc. B.Sc. (Hons) MSRB PhD Student MOAC CDT, Senate House University of Warwick Coventry CV47AL Mob: +44 (0) 7536 042620 | Email: J.R.J.Healey@warwick.ac.uk
Jointly working in: Waterfield Lab (WMS Microbiology and Infection Unit) and the Gibson Lab (Warwick Chemistry)
Twitter: @JRJHealey | Website: MOAC Page | ORCID: orcid.org/0000-0002-9569-6738
On 23 Feb 2018, at 19:07, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Joe, I don’t think there is a simple way (not involving python scripting) to achieve what you want…
The instructions in that previous post are for 3D labels, not 2D, and they work to label the first atom in each structure by the model number:
labelopt info molecule la @/serialNumber=1
The part that specifies model number is “info molecule” and it does not have a model-name option. I see that “molecule” isn’t even documented as a choice for type of info, so I will need to add it… apparently I didn’t know about it and failed to notice the omission when that previous post appeared! Sorry about that. IMO, “molecule” is somewhat misleading and should be “model” instead, as there could be many different molecules in a single model. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/labelopt.html>
Don’t be distracted by the serial number stuff in the “label” command; it simply indicates which atoms to label: the first one in each model. It was used simply to just get one label per model without prior knowledge of the atom names and residue numbers in each structure, since the label command potentially applies to all atoms.
You could use the “2dlabels” command instead, but you would have to manually specify the text for each label and its X,Y position in the graphics window (or use the 2D Labels graphical interface and place the labels by hand, which is much easier as long as you don’t have to do it too many times) <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/2dlabels.html> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels....>
Somebody else would have to advise on the Python-scripting possibilities for a more automatic approach.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Feb 23, 2018, at 1:54 AM, Healey, Joe <J.R.J.Healey@warwick.ac.uk> wrote:
Hi again Chimera team, I'm looking for a fairly quick and dirty way to apply some annotations using 2D labels to a bunch of open structures.
Basically, I have ~16 structures open on screen, which I then tile to compare. I'd like the model name to be displayed just below each model so that its easy to track. I've found this thread (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-July/004081.html) which appears to be attempting a similar thing (though I'd like to use the model.name not serial number), but the approach doesn't seem to work (no labels appear and there is no information in the reply log or IDLE to give me any clues).
Any suggestions/alternatives appreciated! Joe
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Elaine, Ah I didn’t realise it was fractional. I thought the model x and y might in some way be translatable to the viewer x and y. If it’s beyond the scope of Chimera to do this easily I might be able to come up with a different approach when I just put the final figure together. Thanks for your help anyway! Joe M.Sc. B.Sc. (Hons) MSRB PhD Student MOAC CDT, Senate House University of Warwick Coventry CV47AL Mob: +44 (0) 7536 042620<tel:+44%207536%20042620> | Email: J.R.J.Healey@warwick.ac.uk<mailto:J.R.J.Healey@warwick.ac.uk> Jointly working in: Waterfield Lab<http://www2.warwick.ac.uk/fac/med/research/tsm/microinfect/staff/waterfieldl...> (WMS Microbiology and Infection Unit) and the Gibson Lab<http://www2.warwick.ac.uk/fac/sci/chemistry/research/gibson/gibsongroup/> (Warwick Chemistry) Twitter: @JRJHealey<https://twitter.com/JRJHealey> | Website: MOAC Page<http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey> | ORCID: orcid.org/0000-0002-9569-6738<http://orcid.org/0000-0002-9569-6738> On 23 Feb 2018, at 19:07, Elaine Meng <meng@cgl.ucsf.edu<mailto:meng@cgl.ucsf.edu>> wrote: Hi Joe, I don’t think there is a simple way (not involving python scripting) to achieve what you want… The instructions in that previous post are for 3D labels, not 2D, and they work to label the first atom in each structure by the model number: labelopt info molecule la @/serialNumber=1 The part that specifies model number is “info molecule” and it does not have a model-name option. I see that “molecule” isn’t even documented as a choice for type of info, so I will need to add it… apparently I didn’t know about it and failed to notice the omission when that previous post appeared! Sorry about that. IMO, “molecule” is somewhat misleading and should be “model” instead, as there could be many different molecules in a single model. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/labelopt.html> Don’t be distracted by the serial number stuff in the “label” command; it simply indicates which atoms to label: the first one in each model. It was used simply to just get one label per model without prior knowledge of the atom names and residue numbers in each structure, since the label command potentially applies to all atoms. You could use the “2dlabels” command instead, but you would have to manually specify the text for each label and its X,Y position in the graphics window (or use the 2D Labels graphical interface and place the labels by hand, which is much easier as long as you don’t have to do it too many times) <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/2dlabels.html> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels....> Somebody else would have to advise on the Python-scripting possibilities for a more automatic approach. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco On Feb 23, 2018, at 1:54 AM, Healey, Joe <J.R.J.Healey@warwick.ac.uk<mailto:J.R.J.Healey@warwick.ac.uk>> wrote: Hi again Chimera team, I'm looking for a fairly quick and dirty way to apply some annotations using 2D labels to a bunch of open structures. Basically, I have ~16 structures open on screen, which I then tile to compare. I'd like the model name to be displayed just below each model so that its easy to track. I've found this thread (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-July/004081.html) which appears to be attempting a similar thing (though I'd like to use the model.name not serial number), but the approach doesn't seem to work (no labels appear and there is no information in the reply log or IDLE to give me any clues). Any suggestions/alternatives appreciated! Joe

Hi, Joe. I added a "label" option to the "tile" command so you can add 2D labels for tiled models with: tile #0 label true (Unfortunately, the model specifier is required.) This will display the model number and name at the lower left corner of each tile. The label styles can be changed using the "2dlabel" command, e.g., 2dlabel change * color cyan Of course, there are limitations since the 2D labels are not associated with the models, so scaling and translating models will not affect the added labels and generally resulting in an unusable view; rotating models should be okay though. This should be available in Chimera daily builds dated February 27, 2018 or later. Hope this helps a little. Conrad On 2/24/2018 10:18 AM, Healey, Joe wrote:
Hi Elaine,
Ah I didn’t realise it was fractional. I thought the model x and y might in some way be translatable to the viewer x and y.
If it’s beyond the scope of Chimera to do this easily I might be able to come up with a different approach when I just put the final figure together.
Thanks for your help anyway!
Joe
__
M.Sc. B.Sc. (Hons) MSRB
PhD Student
MOAC CDT, Senate House
University of Warwick
Coventry
CV47AL Mob: +44 (0) 7536 042620 <tel:+44%207536%20042620> | Email:J.R.J.Healey@warwick.ac.uk <mailto:J.R.J.Healey@warwick.ac.uk>
Jointly working in:
Waterfield Lab <http://www2.warwick.ac.uk/fac/med/research/tsm/microinfect/staff/waterfieldlab/>(WMS Microbiology and Infection Unit)
and the Gibson Lab <http://www2.warwick.ac.uk/fac/sci/chemistry/research/gibson/gibsongroup/> (Warwick Chemistry)
Twitter:@JRJHealey <https://twitter.com/JRJHealey> | Website:MOAC Page <http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey> | ORCID: orcid.org/0000-0002-9569-6738 <http://orcid.org/0000-0002-9569-6738>
On 23 Feb 2018, at 19:07, Elaine Meng <meng@cgl.ucsf.edu <mailto:meng@cgl.ucsf.edu>> wrote:
Hi Joe, I don’t think there is a simple way (not involving python scripting) to achieve what you want…
The instructions in that previous post are for 3D labels, not 2D, and they work to label the first atom in each structure by the model number:
labelopt info molecule la @/serialNumber=1
The part that specifies model number is “info molecule” and it does not have a model-name option. I see that “molecule” isn’t even documented as a choice for type of info, so I will need to add it… apparently I didn’t know about it and failed to notice the omission when that previous post appeared! Sorry about that. IMO, “molecule” is somewhat misleading and should be “model” instead, as there could be many different molecules in a single model. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/labelopt.html>
Don’t be distracted by the serial number stuff in the “label” command; it simply indicates which atoms to label: the first one in each model. It was used simply to just get one label per model without prior knowledge of the atom names and residue numbers in each structure, since the label command potentially applies to all atoms.
You could use the “2dlabels” command instead, but you would have to manually specify the text for each label and its X,Y position in the graphics window (or use the 2D Labels graphical interface and place the labels by hand, which is much easier as long as you don’t have to do it too many times) <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/2dlabels.html> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels....>
Somebody else would have to advise on the Python-scripting possibilities for a more automatic approach.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Feb 23, 2018, at 1:54 AM, Healey, Joe <J.R.J.Healey@warwick.ac.uk <mailto:J.R.J.Healey@warwick.ac.uk>> wrote:
Hi again Chimera team, I'm looking for a fairly quick and dirty way to apply some annotations using 2D labels to a bunch of open structures.
Basically, I have ~16 structures open on screen, which I then tile to compare. I'd like the model name to be displayed just below each model so that its easy to track. I've found this thread (http://www.cgl.ucsf.edu/pipermail/chimera-users/2009-July/004081.html) which appears to be attempting a similar thing (though I'd like to use the model.name not serial number), but the approach doesn't seem to work (no labels appear and there is no information in the reply log or IDLE to give me any clues).
Any suggestions/alternatives appreciated! Joe
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (3)
-
Conrad Huang
-
Elaine Meng
-
Healey, Joe