<?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=Aa_codes</id>
	<title>Aa codes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Aa_codes"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Aa_codes&amp;action=history"/>
	<updated>2026-07-09T04:59:51Z</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=Aa_codes&amp;diff=14100&amp;oldid=prev</id>
		<title>Cchem: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=14100&amp;oldid=prev"/>
		<updated>2017-09-18T02:46:08Z</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 02:46, 18 September 2017&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=Aa_codes&amp;diff=14099&amp;oldid=prev</id>
		<title>Speleo3: Bio.Data.SCOPData.protein_letters_3to1</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=14099&amp;oldid=prev"/>
		<updated>2017-09-06T17:48:05Z</updated>

		<summary type="html">&lt;p&gt;Bio.Data.SCOPData.protein_letters_3to1&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 17:48, 6 September 2017&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-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&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 lang=&amp;quot;python&amp;quot;&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 lang=&amp;quot;python&amp;quot;&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;div&gt;from Bio.PDB import to_one_letter_code as one_letter&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;from Bio.PDB import to_one_letter_code as one_letter&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from Bio.Data.SCOPData import protein_letters_3to1 as one_letter&lt;/ins&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;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;/table&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=6303&amp;oldid=prev</id>
		<title>Pyadmin: 7 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=6303&amp;oldid=prev"/>
		<updated>2014-03-28T01:48:50Z</updated>

		<summary type="html">&lt;p&gt;7 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 01:48, 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=Aa_codes&amp;diff=6302&amp;oldid=prev</id>
		<title>Tlinnet: /* Simple */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=6302&amp;oldid=prev"/>
		<updated>2013-02-01T15:04:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Simple&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Just a quick little script to allow you to convert from 1-to-3 letter codes and 3-to-1 letter codes in PyMOL.  Copy the code below and drop it into your .pymolrc file.  Then, each time you load PyMOL, &amp;quot;one_letter&amp;quot; and &amp;quot;three_letter&amp;quot; will be defined.&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
== Simple ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; enclose=&amp;quot;pre&amp;quot;&amp;gt;&lt;br /&gt;
# one_letter[&amp;quot;SER&amp;quot;] will now return &amp;quot;S&amp;quot;&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;
&lt;br /&gt;
# three_letter[&amp;quot;S&amp;quot;] will now return &amp;quot;SER&amp;quot;&lt;br /&gt;
three_letter = dict([[v,k] for k,v in one_letter.items()])&lt;br /&gt;
&lt;br /&gt;
three_letter ={'V':'VAL', 'I':'ILE', 'L':'LEU', 'E':'GLU', 'Q':'GLN', \&lt;br /&gt;
'D':'ASP', 'N':'ASN', 'H':'HIS', 'W':'TRP', 'F':'PHE', 'Y':'TYR',    \&lt;br /&gt;
'R':'ARG', 'K':'LYS', 'S':'SER', 'T':'THR', 'M':'MET', 'A':'ALA',    \&lt;br /&gt;
'G':'GLY', 'P':'PRO', 'C':'CYS'}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simple and Clever ==&lt;br /&gt;
Here's another way to accomplish this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# The real convenience in there is that you can easily construct any&lt;br /&gt;
# kind of hash by just adding a matching list, and zipping.&lt;br /&gt;
aa1 = list(&amp;quot;ACDEFGHIKLMNPQRSTVWY&amp;quot;)&lt;br /&gt;
aa3 = &amp;quot;ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR&amp;quot;.split()&lt;br /&gt;
aa123 = dict(zip(aa1,aa3))&lt;br /&gt;
aa321 = dict(zip(aa3,aa1))&lt;br /&gt;
&lt;br /&gt;
# Then to extract a sequence, I tend to go for a construction like:&lt;br /&gt;
sequence = [ aa321[i.resn] for i in cmd.get_model(selection + &amp;quot; and n. ca&amp;quot;).atom ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using BioPython ==&lt;br /&gt;
If you have BioPython you can use the following, which includes also many three-letter codes of modified amino acids:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from Bio.PDB import to_one_letter_code as one_letter&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using PyMOL ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol.exporting import _resn_to_aa as one_letter&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# we used to have to do the following to get the amino acid name&lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.aa = &amp;quot;&amp;quot;&lt;br /&gt;
cmd.iterate(&amp;quot;myselection&amp;quot;, &amp;quot;stored.aa=resn&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now we can just call&lt;br /&gt;
three_letter[string.split(cmd.get_fastastr(&amp;quot;myselection&amp;quot;),'\n')[1]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Tlinnet</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=6300&amp;oldid=prev</id>
		<title>Speleo3: LEU missing in aa3</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Aa_codes&amp;diff=6300&amp;oldid=prev"/>
		<updated>2011-07-05T12:34:20Z</updated>

		<summary type="html">&lt;p&gt;LEU missing in aa3&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Just a quick little script to allow you to convert from 1-to-3 letter codes and 3-to-1 letter codes in PyMOL.  Copy the code below and drop it into your .pymolrc file.  Then, each time you load PyMOL, &amp;quot;one_letter&amp;quot; and &amp;quot;three_letter&amp;quot; will be defined.&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
== Simple ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# one_letter[&amp;quot;SER&amp;quot;] will now return &amp;quot;S&amp;quot;&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;
&lt;br /&gt;
# three_letter[&amp;quot;S&amp;quot;] will now return &amp;quot;SER&amp;quot;&lt;br /&gt;
three_letter = dict([[v,k] for k,v in one_letter.items()])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simple and Clever ==&lt;br /&gt;
Here's another way to accomplish this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# The real convenience in there is that you can easily construct any&lt;br /&gt;
# kind of hash by just adding a matching list, and zipping.&lt;br /&gt;
aa1 = list(&amp;quot;ACDEFGHIKLMNPQRSTVWY&amp;quot;)&lt;br /&gt;
aa3 = &amp;quot;ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR&amp;quot;.split()&lt;br /&gt;
aa123 = dict(zip(aa1,aa3))&lt;br /&gt;
aa321 = dict(zip(aa3,aa1))&lt;br /&gt;
&lt;br /&gt;
# Then to extract a sequence, I tend to go for a construction like:&lt;br /&gt;
sequence = [ aa321[i.resn] for i in cmd.get_model(selection + &amp;quot; and n. ca&amp;quot;).atom ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using BioPython ==&lt;br /&gt;
If you have BioPython you can use the following, which includes also many three-letter codes of modified amino acids:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from Bio.PDB import to_one_letter_code as one_letter&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using PyMOL ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol.exporting import _resn_to_aa as one_letter&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# we used to have to do the following to get the amino acid name&lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.aa = &amp;quot;&amp;quot;&lt;br /&gt;
cmd.iterate(&amp;quot;myselection&amp;quot;, &amp;quot;stored.aa=resn&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now we can just call&lt;br /&gt;
three_letter[string.split(cmd.get_fastastr(&amp;quot;myselection&amp;quot;),'\n')[1]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
</feed>