https://wiki.pymol.org/index.php?title=Label&feed=atom&action=historyLabel - Revision history2024-03-28T19:12:28ZRevision history for this page on the wikiMediaWiki 1.35.1https://wiki.pymol.org/index.php?title=Label&diff=13858&oldid=prevCchem: 54 revisions2017-02-06T03:04:54Z<p>54 revisions</p>
<p><b>New page</b></p><div>[[Image:Pl.png|right|500px]]<br />
<br />
The [[Label]] command controls how PyMOL draws text labels for PyMOL objects.<br />
<br />
= Details =<br />
Labeling is important so there are many options for your fine tuning needs. You can change the [[Label_size|label size]], [[Label_color|label color]], positioning, [[Label_font_id|font]], the [[Label_outline_color|label outline color]] that masks the font and much, much more.<br />
<br />
You can have PyMOL label atoms by properties or arbitrary strings as you want; you can even use Unicode fonts for special symbols like, <math>\alpha, \beta, \pm, \textrm{\AA}</math>, etc.<br />
<br />
The following gallery shows some examples of how extensible the [[Label]] command is. <br />
<gallery heights="180px" widths="200px" align="center" perrow="3"><br />
Image:Label_pre.png|Simple label<br />
Image:New_fonts.jpeg|Example showing usage of Unicode fonts for special characters, see [[label_font_id]].<br />
Image:Font_ex.png|Another example with Unicode fonts<br />
Image:Label_ex.png|Example label<br />
Image:Ls0.png|Label shadows turned off<br />
Image:Ls2.png|Label shadows turned on<br />
</gallery><br />
<br />
==Built-in Object Properties==<br />
Aside from arbitrary string labels, like "This is the catalytic residue" for an atom/residue you can also use the following built-in molecular properties:<br />
* '''name''', the atom name<br />
* '''resn''', the residue name<br />
*'''resi''', the residue number/identifier<br />
*'''chain''', the chain name<br />
*'''q''', charge<br />
*'''b''', the occupancy/b-factor<br />
*'''segi''', the segment identifier<br />
*'''type''' ''(ATOM,HETATM)'', the type of atom<br />
*'''formal_charge''', the formal charge<br />
*'''partial_charge''', the partial charge<br />
*'''numeric_type''', the numeric type<br />
*'''text_type''', the text type<br />
<br />
You can use one of these properties as:<br />
<source lang="python"><br />
# simple example: label residue 22's atoms with their names<br />
label i. 22, name<br />
<br />
# Label residue #44's alpha carbon with it's residue name, residue number and B-factor.<br />
label n. CA and i. 44, "(%s, %s, %s)" % (resn, resi, b)<br />
</source><br />
<br />
See the syntax and examples below for more info.<br />
<br />
=Syntax=<br />
To use the label command follow this syntax:<br />
<source lang="python"><br />
# labeling syntax<br />
label [ selection[, expression]]<br />
</source><br />
where '''selection''' is some object/selection you want to label and '''expression''' is some string (or set of strings) which PyMOL is to use to label the given selection.<br />
<br />
We have plenty of examples. See [[#Examples|the examples]] below.<br />
<br />
=Settings=<br />
Here are all the label settings and their general effect. For each label setting, see the respective web page for more details.<br />
<br />
'''[[label_angle_digits]]'''<br />
:: sets the number of decimals in angle label.<br />
'''[[label_distance_digits]]'''<br />
:: sets the number of decimals in distance label.<br />
'''[[label_shadow_mode]]'''<br />
:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source><br />
'''[[label_color]]'''<br />
:: sets the color of the label text. Note that you can have labels of different colors for different objects or selections. Some examples:<br />
<source lang="python"><br />
# per-object:<br />
set label_color, color-name, object-name #eg, set label-color, magenta, /protein<br />
<br />
# per-atom:<br />
set label_color, color-name, selection #eg, set label-color, marine, /protein/A/A/23/CA<br />
<br />
# another example<br />
fragment arg<br />
label all, name<br />
set label_color, yellow, arg<br />
set label_color, red, elem c<br />
</source><br />
<br />
'''[[label_font_id]]'''<br />
:: sets the font to render your label. There are 12 different fonts from 5&mdash;16. Numbers 15 and 16 are special for unicode. Eg: <source lang="python">set label_font_id, 12</source>. See the [[label_font_id]] page for explicit examples on how to use unicode characters in PyMOL labels.<br />
'''[[label_size]]'''<br />
:: sets the size of the text. You can use positive numbers 2, 3, 4, etc for point sizes, or negative numbers for Angstrom-based sizes. Default is 14 points. Labels in Angstrom-size scale with the distance from the front plane, labels in point-size don't. Eg: <source lang="python">set label_size, -2 #results in a size of 2 Angstroms</source><br />
'''[[label_digits]]'''<br />
:: sets the number of decimals in label. It affects all digits only if label_distance_digits or label_dihedral_digits or label_angle_digits are set to -1.<br />
'''[[label_outline_color]]'''<br />
:: each label is outlined (so you can do white-on-white labels, for example). This options sets the color of the label outline. Eg. <source lang="python">set label_outline_color, orange</source><br />
'''[[label_dihedral_digits]]'''<br />
:: sets the number of decimals in dihedral label.<br />
'''[[label_position]]'''<br />
:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-left_click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and being able to save them.<br />
<br />
=Examples=<br />
<source lang="python"><br />
#1.<br />
# make a very simple label on the 14th alpha carbon.<br />
label n. CA and i. 14, "This is carbon 14."<br />
<br />
#2.<br />
# make a fake scene label; use this to label entire scenes, not just atoms/bonds.<br />
pseudoatom foo<br />
label foo, "Once upon a time..."<br />
<br />
#3.<br />
# make a huge label<br />
set label_size, -5<br />
pseudoatom foo<br />
label foo, "This is large text"<br />
<br />
#4. Partial Charge<br />
label (chain A),chain<br />
label (n;ca),"%s-%s" % (resn,resi)<br />
label (resi 200),"%1.3f" % partial_charge<br />
<br />
<br />
#5. The gallery image above Label_ex.png was created with this code<br />
# and finally, some labels were moved around in '''edit_mode'''.<br />
label (resi 200),"%1.3f" % b<br />
set label_font_id, 10<br />
set label_size, 10<br />
<br />
#6. This example shows how to label a selection with the <br />
# XYZ coordinates of the atoms <br />
from pymol import stored<br />
stored.pos = []<br />
# select the carbon atoms in my hetero atoms to label<br />
select nn, het and e. C<br />
# get the XYZ coordinates and put them into stored.pos<br />
# insert at the front because pop() will read the array in reverse<br />
iterate_state 1, (nn), stored.pos.insert(0,(x,y,z))<br />
# label all N atoms. You need the pop() function or else<br />
# PyMOL will complain b/c you didn't provide enough coords.<br />
label nn, ("%5.5s, %5.5s, %5.5s") % stored.pos.pop()<br />
</source><br />
<br />
= User Comments =<br />
==Labels Using ID Numbers==<br />
The following commnent,<br />
<source lang="python"><br />
label SELECTION, " %s" % ID <br />
</source><br />
labels the SELECTION with atom ID numbers.<br />
<br />
You can make more complicated selections/lables such as<br />
<source lang="python"><br />
label SELECTION, " %s:%s %s" % (resi, resn, name)<br />
</source><br />
which will give you something like "GLU:139 CG"<br />
<br />
==Labels Using One Letter Abbreviations==<br />
* First, Add this to your $HOME/.pymolrc file:<br />
<source lang="python"><br />
# start $HOME/.pymolrc modification<br />
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \<br />
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y', \<br />
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A', \<br />
'GLY':'G', 'PRO':'P', 'CYS':'C'}<br />
# end modification<br />
</source><br />
<br />
* Second, instead of:<br />
<source lang="python"><br />
label n. ca, resn<br />
</source><br />
use:<br />
<source lang="python"><br />
label n. ca, one_letter[resn]<br />
</source><br />
or: ( to get something like D85)<br />
<source lang="python"><br />
label n. ca, "%s%s" %(one_letter[resn],resi)<br />
</source><br />
<br />
==Labels and defer_builds_mode==<br />
If You have a weak video card, You might want to set<br />
<source lang="python"><br />
set defer_builds_mode, 5<br />
</source><br />
It helps a lot but breaks labels rendering. You can use<br />
<source lang="python"><br />
set defer_builds_mode, 4<br />
</source><br />
instead.<br />
<br />
=See Also=<br />
[[:Category:Labeling]]<br />
<br />
All the settings posted above.<br />
<br />
[[Category:Labeling|Label]]<br />
[[Category:Commands|Label]]</div>Cchemhttps://wiki.pymol.org/index.php?title=Label&diff=7819&oldid=prevPyadmin: 1 revision2014-03-28T02:16:17Z<p>1 revision</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 02:16, 28 March 2014</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Pyadminhttps://wiki.pymol.org/index.php?title=Label&diff=7818&oldid=prevEsguerra at 11:07, 18 February 20142014-02-18T11:07:26Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:07, 18 February 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l39" >Line 39:</td>
<td colspan="2" class="diff-lineno">Line 39:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Label residue #44's alpha carbon with it's residue name, residue number and B-factor.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Label residue #44's alpha carbon with it's residue name, residue number and B-factor.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>label n. CA and i. 44, "(%s, %s, %s"<del class="diffchange diffchange-inline">) </del>% (resn, resi, b)</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>label n. CA and i. 44, "(%s, %s, %s<ins class="diffchange diffchange-inline">)</ins>" % (resn, resi, b)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Esguerrahttps://wiki.pymol.org/index.php?title=Label&diff=13856&oldid=prevPavel: /* Settings */2013-06-27T18:10:47Z<p><span dir="auto"><span class="autocomment">Settings</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:10, 27 June 2013</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l90" >Line 90:</td>
<td colspan="2" class="diff-lineno">Line 90:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets the number of decimals in dihedral label.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets the number of decimals in dihedral label.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_position]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_position]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-<del class="diffchange diffchange-inline">middle-click</del>''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and being able to save them.</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-<ins class="diffchange diffchange-inline">left_click</ins>''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and being able to save them.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Examples=</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Examples=</div></td></tr>
</table>Pavelhttps://wiki.pymol.org/index.php?title=Label&diff=13855&oldid=prevBorisKheyfets: /* Labels Using One Letter Abbreviations */2012-10-15T13:21:01Z<p><span dir="auto"><span class="autocomment">Labels Using One Letter Abbreviations</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:21, 15 October 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l172" >Line 172:</td>
<td colspan="2" class="diff-lineno">Line 172:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>==Labels <del class="diffchange diffchange-inline">Using One Letter Abbreviations</del>==</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>==Labels <ins class="diffchange diffchange-inline">and defer_builds_mode</ins>==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If You have a weak video card, You might want to set</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If You have a weak video card, You might want to set</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="python"></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><source lang="python"></div></td></tr>
</table>BorisKheyfetshttps://wiki.pymol.org/index.php?title=Label&diff=13854&oldid=prevBorisKheyfets at 13:20, 15 October 20122012-10-15T13:20:36Z<p></p>
<p><b>New page</b></p><div>[[Image:Pl.png|right|500px]]<br />
<br />
The [[Label]] command controls how PyMOL draws text labels for PyMOL objects.<br />
<br />
= Details =<br />
Labeling is important so there are many options for your fine tuning needs. You can change the [[Label_size|label size]], [[Label_color|label color]], positioning, [[Label_font_id|font]], the [[Label_outline_color|label outline color]] that masks the font and much, much more.<br />
<br />
You can have PyMOL label atoms by properties or arbitrary strings as you want; you can even use Unicode fonts for special symbols like, <math>\alpha, \beta, \pm, \textrm{\AA}</math>, etc.<br />
<br />
The following gallery shows some examples of how extensible the [[Label]] command is. <br />
<gallery heights="180px" widths="200px" align="center" perrow="3"><br />
Image:Label_pre.png|Simple label<br />
Image:New_fonts.jpeg|Example showing usage of Unicode fonts for special characters, see [[label_font_id]].<br />
Image:Font_ex.png|Another example with Unicode fonts<br />
Image:Label_ex.png|Example label<br />
Image:Ls0.png|Label shadows turned off<br />
Image:Ls2.png|Label shadows turned on<br />
</gallery><br />
<br />
==Built-in Object Properties==<br />
Aside from arbitrary string labels, like "This is the catalytic residue" for an atom/residue you can also use the following built-in molecular properties:<br />
* '''name''', the atom name<br />
* '''resn''', the residue name<br />
*'''resi''', the residue number/identifier<br />
*'''chain''', the chain name<br />
*'''q''', charge<br />
*'''b''', the occupancy/b-factor<br />
*'''segi''', the segment identifier<br />
*'''type''' ''(ATOM,HETATM)'', the type of atom<br />
*'''formal_charge''', the formal charge<br />
*'''partial_charge''', the partial charge<br />
*'''numeric_type''', the numeric type<br />
*'''text_type''', the text type<br />
<br />
You can use one of these properties as:<br />
<source lang="python"><br />
# simple example: label residue 22's atoms with their names<br />
label i. 22, name<br />
<br />
# Label residue #44's alpha carbon with it's residue name, residue number and B-factor.<br />
label n. CA and i. 44, "(%s, %s, %s") % (resn, resi, b)<br />
</source><br />
<br />
See the syntax and examples below for more info.<br />
<br />
=Syntax=<br />
To use the label command follow this syntax:<br />
<source lang="python"><br />
# labeling syntax<br />
label [ selection[, expression]]<br />
</source><br />
where '''selection''' is some object/selection you want to label and '''expression''' is some string (or set of strings) which PyMOL is to use to label the given selection.<br />
<br />
We have plenty of examples. See [[#Examples|the examples]] below.<br />
<br />
=Settings=<br />
Here are all the label settings and their general effect. For each label setting, see the respective web page for more details.<br />
<br />
'''[[label_angle_digits]]'''<br />
:: sets the number of decimals in angle label.<br />
'''[[label_distance_digits]]'''<br />
:: sets the number of decimals in distance label.<br />
'''[[label_shadow_mode]]'''<br />
:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source><br />
'''[[label_color]]'''<br />
:: sets the color of the label text. Note that you can have labels of different colors for different objects or selections. Some examples:<br />
<source lang="python"><br />
# per-object:<br />
set label_color, color-name, object-name #eg, set label-color, magenta, /protein<br />
<br />
# per-atom:<br />
set label_color, color-name, selection #eg, set label-color, marine, /protein/A/A/23/CA<br />
<br />
# another example<br />
fragment arg<br />
label all, name<br />
set label_color, yellow, arg<br />
set label_color, red, elem c<br />
</source><br />
<br />
'''[[label_font_id]]'''<br />
:: sets the font to render your label. There are 12 different fonts from 5&mdash;16. Numbers 15 and 16 are special for unicode. Eg: <source lang="python">set label_font_id, 12</source>. See the [[label_font_id]] page for explicit examples on how to use unicode characters in PyMOL labels.<br />
'''[[label_size]]'''<br />
:: sets the size of the text. You can use positive numbers 2, 3, 4, etc for point sizes, or negative numbers for Angstrom-based sizes. Default is 14 points. Labels in Angstrom-size scale with the distance from the front plane, labels in point-size don't. Eg: <source lang="python">set label_size, -2 #results in a size of 2 Angstroms</source><br />
'''[[label_digits]]'''<br />
:: sets the number of decimals in label. It affects all digits only if label_distance_digits or label_dihedral_digits or label_angle_digits are set to -1.<br />
'''[[label_outline_color]]'''<br />
:: each label is outlined (so you can do white-on-white labels, for example). This options sets the color of the label outline. Eg. <source lang="python">set label_outline_color, orange</source><br />
'''[[label_dihedral_digits]]'''<br />
:: sets the number of decimals in dihedral label.<br />
'''[[label_position]]'''<br />
:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and being able to save them.<br />
<br />
=Examples=<br />
<source lang="python"><br />
#1.<br />
# make a very simple label on the 14th alpha carbon.<br />
label n. CA and i. 14, "This is carbon 14."<br />
<br />
#2.<br />
# make a fake scene label; use this to label entire scenes, not just atoms/bonds.<br />
pseudoatom foo<br />
label foo, "Once upon a time..."<br />
<br />
#3.<br />
# make a huge label<br />
set label_size, -5<br />
pseudoatom foo<br />
label foo, "This is large text"<br />
<br />
#4. Partial Charge<br />
label (chain A),chain<br />
label (n;ca),"%s-%s" % (resn,resi)<br />
label (resi 200),"%1.3f" % partial_charge<br />
<br />
<br />
#5. The gallery image above Label_ex.png was created with this code<br />
# and finally, some labels were moved around in '''edit_mode'''.<br />
label (resi 200),"%1.3f" % b<br />
set label_font_id, 10<br />
set label_size, 10<br />
<br />
#6. This example shows how to label a selection with the <br />
# XYZ coordinates of the atoms <br />
from pymol import stored<br />
stored.pos = []<br />
# select the carbon atoms in my hetero atoms to label<br />
select nn, het and e. C<br />
# get the XYZ coordinates and put htem into stored.pos<br />
iterate_state 1, (nn), stored.pos.append((x,y,z))<br />
# label all N atoms. You need the pop() function or else<br />
# PyMOL will complain b/c you didn't provide enough coords.<br />
label nn, ("%5.5s, %5.5s, %5.5s") % stored.pos.pop()<br />
</source><br />
<br />
= User Comments =<br />
==Labels Using ID Numbers==<br />
The following commnent,<br />
<source lang="python"><br />
label SELECTION, " %s" % ID <br />
</source><br />
labels the SELECTION with atom ID numbers.<br />
<br />
You can make more complicated selections/lables such as<br />
<source lang="python"><br />
label SELECTION, " %s:%s %s" % (resi, resn, name)<br />
</source><br />
which will give you something like "GLU:139 CG"<br />
<br />
==Labels Using One Letter Abbreviations==<br />
* First, Add this to your $HOME/.pymolrc file:<br />
<source lang="python"><br />
# start $HOME/.pymolrc modification<br />
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \<br />
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y', \<br />
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A', \<br />
'GLY':'G', 'PRO':'P', 'CYS':'C'}<br />
# end modification<br />
</source><br />
<br />
* Second, instead of:<br />
<source lang="python"><br />
label n. ca, resn<br />
</source><br />
use:<br />
<source lang="python"><br />
label n. ca, one_letter[resn]<br />
</source><br />
or: ( to get something like D85)<br />
<source lang="python"><br />
label n. ca, "%s%s" %(one_letter[resn],resi)<br />
</source><br />
<br />
==Labels Using One Letter Abbreviations==<br />
If You have a weak video card, You might want to set<br />
<source lang="python"><br />
set defer_builds_mode, 5<br />
</source><br />
It helps a lot but breaks labels rendering. You can use<br />
<source lang="python"><br />
set defer_builds_mode, 4<br />
</source><br />
instead.<br />
<br />
=See Also=<br />
[[:Category:Labeling]]<br />
<br />
All the settings posted above.<br />
<br />
[[Category:Labeling|Label]]<br />
[[Category:Commands|Label]]</div>BorisKheyfetshttps://wiki.pymol.org/index.php?title=Label&diff=13850&oldid=prevSavinaRoja: /* Settings */2010-12-09T04:00:06Z<p><span dir="auto"><span class="autocomment">Settings</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:00, 9 December 2010</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l90" >Line 90:</td>
<td colspan="2" class="diff-lineno">Line 90:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets the number of decimals in dihedral label.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets the number of decimals in dihedral label.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_position]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_position]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and <del class="diffchange diffchange-inline">beeing </del>able to save them.</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and <ins class="diffchange diffchange-inline">being </ins>able to save them.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Examples=</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Examples=</div></td></tr>
</table>SavinaRojahttps://wiki.pymol.org/index.php?title=Label&diff=13849&oldid=prevKaro: /* Settings */2010-11-30T10:30:13Z<p><span dir="auto"><span class="autocomment">Settings</span></span></p>
<p><b>New page</b></p><div>[[Image:Pl.png|right|500px]]<br />
<br />
The [[Label]] command controls how PyMOL draws text labels for PyMOL objects.<br />
<br />
= Details =<br />
Labeling is important so there are many options for your fine tuning needs. You can change the [[Label_size|label size]], [[Label_color|label color]], positioning, [[Label_font_id|font]], the [[Label_outline_color|label outline color]] that masks the font and much, much more.<br />
<br />
You can have PyMOL label atoms by properties or arbitrary strings as you want; you can even use Unicode fonts for special symbols like, <math>\alpha, \beta, \pm, \textrm{\AA}</math>, etc.<br />
<br />
The following gallery shows some examples of how extensible the [[Label]] command is. <br />
<gallery heights="180px" widths="200px" align="center" perrow="3"><br />
Image:Label_pre.png|Simple label<br />
Image:New_fonts.jpeg|Example showing usage of Unicode fonts for special characters<br />
Image:Font_ex.png|Another example with Unicode fonts<br />
Image:Label_ex.png|Example label<br />
Image:Ls0.png|Label shadows turned off<br />
Image:Ls2.png|Label shadows turned on<br />
</gallery><br />
<br />
==Built-in Object Properties==<br />
Aside from arbitrary string labels, like "This is the catalytic residue" for an atom/residue you can also use the following built-in molecular properties:<br />
* '''name''', the atom name<br />
* '''resn''', the residue name<br />
*'''resi''', the residue number/identifier<br />
*'''chain''', the chain name<br />
*'''q''', charge<br />
*'''b''', the occupancy/b-factor<br />
*'''segi''', the segment identifier<br />
*'''type''' ''(ATOM,HETATM)'', the type of atom<br />
*'''formal_charge''', the formal charge<br />
*'''partial_charge''', the partial charge<br />
*'''numeric_type''', the numeric type<br />
*'''text_type''', the text type<br />
<br />
You can use one of these properties as:<br />
<source lang="python"><br />
# simple example: label residue 22's atoms with their names<br />
label i. 22, name<br />
<br />
# Label residue #44's alpha carbon with it's residue name, residue number and B-factor.<br />
label n. CA and i. 44, "(%s, %s, %s") % (resn, resi, b)<br />
</source><br />
<br />
See the syntax and examples below for more info.<br />
<br />
=Syntax=<br />
To use the label command follow this syntax:<br />
<source lang="python"><br />
# labeling syntax<br />
label [ selection[, expression]]<br />
</source><br />
where '''selection''' is some object/selection you want to label and '''expression''' is some string (or set of strings) which PyMOL is to use to label the given selection.<br />
<br />
We have plenty of examples. See [[#Examples|the examples]] below.<br />
<br />
=Settings=<br />
Here are all the label settings and their general effect. For each label setting, see the respective web page for more details.<br />
<br />
'''[[label_angle_digits]]'''<br />
:: sets the number of decimals in angle label.<br />
'''[[label_distance_digits]]'''<br />
:: sets the number of decimals in distance label.<br />
'''[[label_shadow_mode]]'''<br />
:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source><br />
'''[[label_color]]'''<br />
:: sets the color of the label text. Note that you can have labels of different colors for different objects or selections. Some examples:<br />
<source lang="python"><br />
# per-object:<br />
set label-color, color-name, object-name #eg, set label-color, magenta, /protein<br />
<br />
# per-atom:<br />
set label-color, color-name, selection #eg, set label-color, marine, /protein/A/A/23/CA<br />
<br />
# another example<br />
fragment arg<br />
label all, name<br />
set label_color, yellow, arg<br />
set label_color, red, elem c<br />
</source><br />
<br />
'''[[label_font_id]]'''<br />
:: sets the font to render your label. There are 12 different fonts from 5&mdash;16. Numbers 15 and 16 are special for unicode. Eg: <source lang="python">set label_font_id, 12</source><br />
'''[[label_size]]'''<br />
:: sets the size of the text. You can use positive numbers 2, 3, 4, etc for point sizes, or negative numbers for Angstrom-based sizes. Default is 14 points. Labels in Angstrom-size scale with the distance from the front plane, labels in point-size don't. Eg: <source lang="python">set label_size, -2 #results in a size of 2 Angstroms</source><br />
'''[[label_digits]]'''<br />
:: sets the number of decimals in label. It affects all digits only if label_distance_digits or label_dihedral_digits or label_angle_digits are set to -1.<br />
'''[[label_outline_color]]'''<br />
:: each label is outlined (so you can do white-on-white labels, for example). This options sets the color of the label outline. Eg. <source lang="python">set label_outline_color, orange</source><br />
'''[[label_dihedral_digits]]'''<br />
:: sets the number of decimals in dihedral label.<br />
'''[[label_position]]'''<br />
:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and beeing able to save them.<br />
<br />
=Examples=<br />
<source lang="python"><br />
#1.<br />
# make a very simple label on the 14th alpha carbon.<br />
label n. CA and i. 14, "This is carbon 14."<br />
<br />
#2.<br />
# make a fake scene label; use this to label entire scenes, not just atoms/bonds.<br />
pseudoatom foo<br />
label foo, "Once upon a time..."<br />
<br />
#3.<br />
# make a huge label<br />
set label_size, -5<br />
pseudoatom foo<br />
label foo, "This is large text"<br />
<br />
#4. Partial Charge<br />
label (chain A),chain<br />
label (n;ca),"%s-%s" % (resn,resi)<br />
label (resi 200),"%1.3f" % partial_charge<br />
<br />
<br />
#5. The gallery image above Label_ex.png was created with this code<br />
# and finally, some labels were moved around in '''edit_mode'''.<br />
label (resi 200),"%1.3f" % b<br />
set label_font_id, 10<br />
set label_size, 10<br />
<br />
#6. This example shows how to label a selection with the <br />
# XYZ coordinates of the atoms <br />
from pymol import stored<br />
stored.pos = []<br />
# select the carbon atoms in my hetero atoms to label<br />
select nn, het and e. C<br />
# get the XYZ coordinates and put htem into stored.pos<br />
iterate_state 1, (nn), stored.pos.append((x,y,z))<br />
# label all N atoms. You need the pop() function or else<br />
# PyMOL will complain b/c you didn't provide enough coords.<br />
label nn, ("%5.5s, %5.5s, %5.5s") % stored.pos.pop()<br />
</source><br />
<br />
= User Comments =<br />
==Labels Using ID Numbers==<br />
The following commnent,<br />
<source lang="python"><br />
label SELECTION, " %s" % ID <br />
</source><br />
labels the SELECTION with atom ID numbers.<br />
<br />
You can make more complicated selections/lables such as<br />
<source lang="python"><br />
label SELECTION, " %s:%s %s" % (resi, resn, name)<br />
</source><br />
which will give you something like "GLU:139 CG"<br />
<br />
==Labels Using One Letter Abbreviations==<br />
* First, Add this to your $HOME/.pymolrc file:<br />
<source lang="python"><br />
# start $HOME/.pymolrc modification<br />
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \<br />
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y', \<br />
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A', \<br />
'GLY':'G', 'PRO':'P', 'CYS':'C'}<br />
# end modification<br />
</source><br />
<br />
* Second, instead of:<br />
<source lang="python"><br />
label n. ca, resn<br />
</source><br />
use:<br />
<source lang="python"><br />
label n. ca, one_letter[resn]<br />
</source><br />
or: ( to get something like D85)<br />
<source lang="python"><br />
label n. ca, "%s%s" %(one_letter[resn],resi)<br />
</source><br />
<br />
=See Also=<br />
[[:Category:Labeling]]<br />
<br />
All the settings posted above.<br />
<br />
[[Category:Labeling|Label]]<br />
[[Category:Commands|Label]]</div>Karohttps://wiki.pymol.org/index.php?title=Label&diff=13846&oldid=prevAndrejoseph at 13:53, 24 July 20092009-07-24T13:53:49Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:53, 24 July 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l57" >Line 57:</td>
<td colspan="2" class="diff-lineno">Line 57:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_angle_digits]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_angle_digits]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: <del class="diffchange diffchange-inline">defines </del>the number of decimals in angle label</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: <ins class="diffchange diffchange-inline">sets </ins>the number of decimals in angle label<ins class="diffchange diffchange-inline">.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_distance_digits]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_distance_digits]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: <del class="diffchange diffchange-inline">defines </del>the number of decimals in distance label</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: <ins class="diffchange diffchange-inline">sets </ins>the number of decimals in distance label<ins class="diffchange diffchange-inline">.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_shadow_mode]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_shadow_mode]]'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l83" >Line 83:</td>
<td colspan="2" class="diff-lineno">Line 83:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets the size of the text. You can use positive numbers 2, 3, 4, etc for point sizes, or negative sizes for Angstrom-based sizes: A 2Ang font woukld then be -2. Eg: <source lang="python">set label_size, -2</source></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets the size of the text. You can use positive numbers 2, 3, 4, etc for point sizes, or negative sizes for Angstrom-based sizes: A 2Ang font woukld then be -2. Eg: <source lang="python">set label_size, -2</source></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_digits]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_digits]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: <del class="diffchange diffchange-inline">(no idea)</del></div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: <ins class="diffchange diffchange-inline">sets the number of decimals in label. It affects all digits only if label_distance_digits or label_dihedral_digits or label_angle_digits are set to -1.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_outline_color]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_outline_color]]'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: each label is outlined (so you can do white-on-white labels, for example). This options sets the color of the label outline. Eg. <source lang="python">set label_outline_color, orange</source></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: each label is outlined (so you can do white-on-white labels, for example). This options sets the color of the label outline. Eg. <source lang="python">set label_outline_color, orange</source></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_dihedral_digits]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_dihedral_digits]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: <del class="diffchange diffchange-inline">(no idea)</del></div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: <ins class="diffchange diffchange-inline">sets the number of decimals in dihedral label.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_position]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_position]]'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and beeing able to save them.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets any offset from the original X,Y,Z coordinates for the label. If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''"Save labels"-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and beeing able to save them.</div></td></tr>
</table>Andrejosephhttps://wiki.pymol.org/index.php?title=Label&diff=13845&oldid=prevAndrejoseph at 13:44, 24 July 20092009-07-24T13:44:35Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:44, 24 July 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l57" >Line 57:</td>
<td colspan="2" class="diff-lineno">Line 57:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_angle_digits]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_angle_digits]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: <del class="diffchange diffchange-inline">(no idea)</del></div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: <ins class="diffchange diffchange-inline">defines the number of decimals in angle label</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_distance_digits]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_distance_digits]]'''</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>:: <del class="diffchange diffchange-inline">(no idea)</del></div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>:: <ins class="diffchange diffchange-inline">defines the number of decimals in distance label</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_shadow_mode]]'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''[[label_shadow_mode]]'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:: sets whether or not PyMOL will ray trace shadows for your label text. Eg: <source lang="python">set label_shadow_mode, 2</source></div></td></tr>
</table>Andrejoseph