<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Talk%3ALabel</id>
	<title>Talk:Label - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Talk%3ALabel"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Label&amp;action=history"/>
	<updated>2026-06-26T16:07:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=13536&amp;oldid=prev</id>
		<title>Cchem: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=13536&amp;oldid=prev"/>
		<updated>2016-05-31T05:42:45Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:42, 31 May 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cchem</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=13535&amp;oldid=prev</id>
		<title>Pavel: /* Unicdoe Fonts */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=13535&amp;oldid=prev"/>
		<updated>2016-05-27T15:50:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Unicdoe Fonts&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:50, 27 May 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l58&quot; &gt;Line 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;=====&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Unicdoe &lt;/del&gt;Fonts=====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;=====&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Unicode &lt;/ins&gt;Fonts=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;[[Image:Font_ex.png|300px|thumb|right|Notice the Angstrom and superscript 2 characters.  You can add other characters as well.]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;[[Image:Font_ex.png|300px|thumb|right|Notice the Angstrom and superscript 2 characters.  You can add other characters as well.]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pavel</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=90&amp;oldid=prev</id>
		<title>Pyadmin: 17 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=90&amp;oldid=prev"/>
		<updated>2014-03-28T00:44:03Z</updated>

		<summary type="html">&lt;p&gt;17 revisions&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:44, 28 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=89&amp;oldid=prev</id>
		<title>Vinnyrose at 14:12, 20 June 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Label&amp;diff=89&amp;oldid=prev"/>
		<updated>2009-06-20T14:12:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Fixes ==&lt;br /&gt;
*Updates needed&lt;br /&gt;
&lt;br /&gt;
=New Page Content=&lt;br /&gt;
==New Page Overview==&lt;br /&gt;
This is the content for the new labels page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Old Page =&lt;br /&gt;
[[Image:Label_pre.png|200px|right|PyMol Labels]]&lt;br /&gt;
===DESCRIPTION===&lt;br /&gt;
'''label''' allows one to configure the appearance of text labels for PyMOL objects.  It labels one or more atoms properties over a selection using the python evaluator with a separate name space for each atom.  The symbols defined in the name space are:&lt;br /&gt;
* '''name''', the atom name&lt;br /&gt;
* '''resn''', the residue name&lt;br /&gt;
*'''resi''', the residue number/identifier&lt;br /&gt;
*'''chain''', the chain name&lt;br /&gt;
*'''q''',&lt;br /&gt;
*'''b''', the occupancy/b-factor&lt;br /&gt;
*'''segi''', the segment identifier&lt;br /&gt;
*'''type''' ''(ATOM,HETATM)'', the type of atom&lt;br /&gt;
*'''formal_charge''', the formal charge&lt;br /&gt;
*'''partial_charge''', the partial charge&lt;br /&gt;
*'''numeric_type''', the numeric type&lt;br /&gt;
*'''text_type''', the text type&lt;br /&gt;
&lt;br /&gt;
All strings in the expression must be explicitly quoted.  This operation typically takes several seconds per thousand atoms altered.  To clear labels, simply omit the expression or set it to ''.&lt;br /&gt;
&lt;br /&gt;
[[Label]] is great for labeling atoms, residues and objects.  For a scene label, see [[Pseudoatom]].&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 label (selection),expression&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SETTINGS===&lt;br /&gt;
====FONT====&lt;br /&gt;
There are 10 different scalable fonts.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set label_font_id, number&amp;lt;/source&amp;gt;&lt;br /&gt;
where number is 5 through 14.&lt;br /&gt;
=====UTF8 Fonts=====&lt;br /&gt;
&lt;br /&gt;
[[Image:New_fonts.jpeg|thumb|New fonts in PyMol.  Notice the alpha and beta characters.]]&lt;br /&gt;
&lt;br /&gt;
Newer versions support UTF8 fonts; use '''label_font_id''' from above to 15 or 16.  The good news about the UTF8 fonts is that they support the alpha and beta characters. (See image.)&lt;br /&gt;
&lt;br /&gt;
Here's some example code for the image at right:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# roman&lt;br /&gt;
set label_font_id, 15&lt;br /&gt;
set label_shadow_mode, 3&lt;br /&gt;
label 5/CA, &amp;quot;\316\261-Helix&amp;quot;&lt;br /&gt;
label 10/CA, &amp;quot;\316\262-Sheet&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# italic&lt;br /&gt;
set label_font_id, 16&lt;br /&gt;
&lt;br /&gt;
# make bigger&lt;br /&gt;
set label_size, 50&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Unicdoe Fonts=====&lt;br /&gt;
[[Image:Font_ex.png|300px|thumb|right|Notice the Angstrom and superscript 2 characters.  You can add other characters as well.]]&lt;br /&gt;
&lt;br /&gt;
PyMOL gives you the flexibility to use encoded unicode fonts.  This allows us to insert various symbols, like the symbol used for Angstrom.  Here are the steps to insert a character from the unicode character set.&lt;br /&gt;
&lt;br /&gt;
* Find the code for your character at [http://www.unicode.org/charts Unicode Charts].  The Angstrom character, &amp;lt;math&amp;gt;\textrm{\AA}&amp;lt;/math&amp;gt; is u&amp;quot;\u00c5&amp;quot; and &amp;lt;math&amp;gt;\pm&amp;lt;/math&amp;gt; is u&amp;quot;\u00b1&amp;quot;.&lt;br /&gt;
* Label the selection.  For simple strings, just type the string in double quote, -- &amp;quot;like this&amp;quot; -- and append to the end of that .encode('utf-8') -- &amp;quot;like this&amp;quot;.encode('utf-8').  A working example is shown here,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# label residue 30 with &amp;quot;4.1 Ang^2 +/- 0.65 Ang^2; see the image at right&lt;br /&gt;
label i. 30, &amp;quot;4.1&amp;quot; + u&amp;quot;\u00c5\u00b2  \u00b1 0.65 \u00c5\u00b2 &amp;quot;.encode('utf-8')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====SIZE====&lt;br /&gt;
The font size can be adjusted&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set label_size, number&amp;lt;/source&amp;gt;&lt;br /&gt;
where number is the point size (or -number for Angstroms)&lt;br /&gt;
&lt;br /&gt;
====COLOR====&lt;br /&gt;
Set a label's color by&lt;br /&gt;
 set label_color, color&lt;br /&gt;
where color is a valid PyMol color.&lt;br /&gt;
&lt;br /&gt;
If the coloring of the labels is not ''exactly'' the same as you'd expect (say black turns out grey, or red turns out pink), then try the following settings:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
unset depth_cue&lt;br /&gt;
unset ray_label_specular&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====EXPRESSION====&lt;br /&gt;
To set what the label reads (see above)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;label selection, expression&amp;lt;/source&amp;gt;&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 label all, name&lt;br /&gt;
 label resi 10, b&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====POSITION====&lt;br /&gt;
To position labels&lt;br /&gt;
 edit_mode&lt;br /&gt;
then&lt;br /&gt;
ctrl-middle-click-and-drag to position the label in space. (On Windows systems this appears to be shift-left-click-and-drag, presumably because those mice lack a true middle button.)&lt;br /&gt;
&lt;br /&gt;
ctrl-shift-left-click-and-drag alters a label's z-plane. (Windows only? This may use the middle button, rather than shift-left, under *NIX / 3-button mice systems.)&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
==== Partial Charge ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label (chain A),chain&lt;br /&gt;
label (n;ca),&amp;quot;%s-%s&amp;quot; % (resn,resi)&lt;br /&gt;
label (resi 200),&amp;quot;%1.3f&amp;quot; % partial_charge&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
The following image was created with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label (resi 200),&amp;quot;%1.3f&amp;quot; % b&lt;br /&gt;
set label_font_id, 10&lt;br /&gt;
set label_size, 10&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and finally, some labels were moved around in '''edit_mode'''.&lt;br /&gt;
[[Image:Label_ex.png|thumb|Labels.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== More Advanced ====&lt;br /&gt;
This example shows how to label a selection with the XYZ coordinates of the atoms&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.pos = []&lt;br /&gt;
&lt;br /&gt;
# select the carbon atoms in my hetero atoms to label&lt;br /&gt;
select nn, het and e. C&lt;br /&gt;
&lt;br /&gt;
# get the XYZ coordinates and put htem into stored.pos&lt;br /&gt;
iterate_state 1, (nn), stored.pos.append((x,y,z))&lt;br /&gt;
&lt;br /&gt;
# label all N atoms.  You need the pop() function or else&lt;br /&gt;
# PyMOL will complain b/c you didn't provide enough coords.&lt;br /&gt;
label nn, (&amp;quot;%5.5s, %5.5s, %5.5s&amp;quot;) %  stored.pos.pop()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Users Comments===&lt;br /&gt;
====Labels Using ID Numbers====&lt;br /&gt;
The following commnent,&lt;br /&gt;
 label SELECTION, &amp;quot; %s&amp;quot; % ID &lt;br /&gt;
labels the SELECTION with atom ID numbers.&lt;br /&gt;
&lt;br /&gt;
You can make more complicated selections/lables such as&lt;br /&gt;
 label SELECTION, &amp;quot; %s:%s %s&amp;quot; % (resi, resn, name)&lt;br /&gt;
which will give you something like &amp;quot;GLU:139 CG&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Labels Using One Letter Abbreviations====&lt;br /&gt;
* First, Add this to your $HOME/.pymolrc  file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# start $HOME/.pymolrc modification&lt;br /&gt;
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \&lt;br /&gt;
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y',    \&lt;br /&gt;
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A',    \&lt;br /&gt;
'GLY':'G', 'PRO':'P', 'CYS':'C'}&lt;br /&gt;
# end modification&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*. Second, instead of:&lt;br /&gt;
 label n. ca, resn&lt;br /&gt;
use:&lt;br /&gt;
 label n. ca, one_letter[resn]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Label]]&lt;br /&gt;
[[Category:Labeling|Label]]&lt;/div&gt;</summary>
		<author><name>Vinnyrose</name></author>
	</entry>
</feed>