<?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=Rotamer_Toggle</id>
	<title>Rotamer Toggle - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Rotamer_Toggle"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;action=history"/>
	<updated>2026-07-04T12:56:57Z</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=Rotamer_Toggle&amp;diff=9572&amp;oldid=prev</id>
		<title>Bell: 47 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9572&amp;oldid=prev"/>
		<updated>2014-03-28T03:49:29Z</updated>

		<summary type="html">&lt;p&gt;47 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 03:49, 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>Bell</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9571&amp;oldid=prev</id>
		<title>Newacct at 08:04, 17 August 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9571&amp;oldid=prev"/>
		<updated>2010-08-17T08:04:30Z</updated>

		<summary type="html">&lt;p&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 08:04, 17 August 2010&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-l95&quot; &gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&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;   &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;   &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;import colorsys,sys&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;import colorsys,sys&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;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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;import re&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&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;import editing&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;import editing&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;import os&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;import os&lt;/div&gt;&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-l124&quot; &gt;Line 124:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&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;   &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;   &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;                     # Parse by whitespace (I believe format is white space and not fixed-width columns)&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;                     # Parse by whitespace (I believe format is white space and not fixed-width columns)&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;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;                     dat = &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;re&lt;/del&gt;.split(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;\s+&amp;quot;,line&lt;/del&gt;)&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;                     dat = &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;line&lt;/ins&gt;.split()&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;   &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;   &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;                     # Add to rotamer library in memory :  &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;                     # Add to rotamer library in memory :  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Newacct</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9570&amp;oldid=prev</id>
		<title>Cowsandmilk: /* SCRIPTS (Rotamers.py ; MyMenu.py) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9570&amp;oldid=prev"/>
		<updated>2010-02-14T19:12:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;SCRIPTS (Rotamers.py ; MyMenu.py)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;//wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;amp;diff=9570&amp;amp;oldid=9569&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Cowsandmilk</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9569&amp;oldid=prev</id>
		<title>Cowsandmilk: Undo revision 8036 by Cowsandmilk (Talk)</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9569&amp;oldid=prev"/>
		<updated>2010-02-14T18:56:09Z</updated>

		<summary type="html">&lt;p&gt;Undo revision 8036 by &lt;a href=&quot;/index.php/Special:Contributions/Cowsandmilk&quot; title=&quot;Special:Contributions/Cowsandmilk&quot;&gt;Cowsandmilk&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:Cowsandmilk&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Cowsandmilk (page does not exist)&quot;&gt;Talk&lt;/a&gt;)&lt;/p&gt;
&lt;a href=&quot;//wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;amp;diff=9569&amp;amp;oldid=9568&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Cowsandmilk</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9568&amp;oldid=prev</id>
		<title>Cowsandmilk at 13:03, 2 February 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9568&amp;oldid=prev"/>
		<updated>2010-02-02T13:03:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;//wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;amp;diff=9568&amp;amp;oldid=9567&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Cowsandmilk</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9567&amp;oldid=prev</id>
		<title>Newacct at 02:19, 28 December 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9567&amp;oldid=prev"/>
		<updated>2009-12-28T02:19:32Z</updated>

		<summary type="html">&lt;p&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 02:19, 28 December 2009&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-l129&quot; &gt;Line 129:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 129:&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;		    #   key format       RES:PHI_BIN:PSI_BIN&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;		    #   key format       RES:PHI_BIN:PSI_BIN&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;		    #   value format     PROB, CHI1, CHI2, CHI3, CHI4&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;		    #   value format     PROB, CHI1, CHI2, CHI3, CHI4&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;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;try:&lt;/del&gt;&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;key = &lt;/ins&gt;dat[RES]+&amp;quot;:&amp;quot;+dat[PHI]+&amp;quot;:&amp;quot;+dat[PSI]&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;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;		        rotdat[&lt;/del&gt;dat[RES]+&amp;quot;:&amp;quot;+dat[PHI]+&amp;quot;:&amp;quot;+dat[PSI]].append([ dat[PROB], dat[CHI1], dat[CHI2], dat[CHI3], dat[CHI4] ])&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;		    if key in rotdat:&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;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;except KeyError&lt;/del&gt;:&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;		        rotdat[key&lt;/ins&gt;].append([ dat[PROB], dat[CHI1], dat[CHI2], dat[CHI3], dat[CHI4] ])&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;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;			rotdat[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dat[RES]+&amp;quot;:&amp;quot;+dat[PHI]+&amp;quot;:&amp;quot;+dat[PSI]&lt;/del&gt;] = [ [ dat[PROB], dat[CHI1], dat[CHI2], dat[CHI3], dat[CHI4] ] ]&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;else&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;			rotdat[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key&lt;/ins&gt;] = [ [ dat[PROB], dat[CHI1], dat[CHI2], dat[CHI3], dat[CHI4] ] ]&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;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;		     &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;		     &lt;/div&gt;&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-l229&quot; &gt;Line 229:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 230:&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;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;     list = [chi1,chi2,chi3,chi4]&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;     list = [chi1,chi2,chi3,chi4]&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;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;     for i in range(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0,&lt;/del&gt;len(CHIS[at.resn])):&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;     for i in range(len(CHIS[at.resn])):&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;	print &amp;quot;Setting Chi&amp;quot;+str(i+1)+&amp;quot; to &amp;quot;+str(list[i])&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;	print &amp;quot;Setting Chi&amp;quot;+str(i+1)+&amp;quot; to &amp;quot;+str(list[i])&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;         editing.set_dihedral(sel + ' and name '+CHIS[at.resn][i][0],		     &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;         editing.set_dihedral(sel + ' and name '+CHIS[at.resn][i][0],		     &lt;/div&gt;&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-l245&quot; &gt;Line 245:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 246:&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;def getBins(sel):&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;def getBins(sel):&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;     return doRotamers(sel, type=&amp;quot;bins&amp;quot;)&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;     return doRotamers(sel, type=&amp;quot;bins&amp;quot;)&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;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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Specific comparison operator for rotamer prob data &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;def mycmp(first, second):&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	return cmp( first[1], second[1])&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&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;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;# Color Ramp...&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;# Color Ramp...&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;def rot_color(vals):  &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;def rot_color(vals):  &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;	nbins = 10&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;	nbins = 10&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;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;	vals.sort(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mycmp&lt;/del&gt;)&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;	vals.sort(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;key=lambda x: x[1]&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;#	print &amp;quot;End sort: &amp;quot;+str(len(vals))+&amp;quot; : &amp;quot;+str(nbins)&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;#	print &amp;quot;End sort: &amp;quot;+str(len(vals))+&amp;quot; : &amp;quot;+str(nbins)&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;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;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;	# Coloring scheme...&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;	# Coloring scheme...&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;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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	i = 0&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&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;	j = 0&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;	j = 0&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;	rgb = [0.0,0.0,0.0]&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;	rgb = [0.0,0.0,0.0]&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;	sel_str = &amp;quot;&amp;quot;&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;	sel_str = &amp;quot;&amp;quot;&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;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;while &lt;/del&gt;i &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt; &lt;/del&gt;len(vals):&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;for &lt;/ins&gt;i &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in range(&lt;/ins&gt;len(vals&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&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;		if int(len(vals)/nbins) == 0 or i % int(len(vals)/nbins) == 0:&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;		if int(len(vals)/nbins) == 0 or i % int(len(vals)/nbins) == 0:&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;		      hsv = (colorsys.TWO_THIRD - colorsys.TWO_THIRD * float(j) / (nbins-1), 1.0, 1.0)&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;		      hsv = (colorsys.TWO_THIRD - colorsys.TWO_THIRD * float(j) / (nbins-1), 1.0, 1.0)&lt;/div&gt;&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-l273&quot; &gt;Line 273:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 269:&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;		cmd.set_color(&amp;quot;RotProbColor&amp;quot;+str(i), rgb)&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;		cmd.set_color(&amp;quot;RotProbColor&amp;quot;+str(i), rgb)&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;		cmd.color(&amp;quot;RotProbColor&amp;quot;+str(i), str(vals[i][0]))&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;		cmd.color(&amp;quot;RotProbColor&amp;quot;+str(i), str(vals[i][0]))&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;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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		i += 1&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&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;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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l297&quot; &gt;Line 297:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 292:&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;	       # Don't process Glycines or Alanines&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;	       # Don't process Glycines or Alanines&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;	       if not (at.resn == 'GLY' or at.resn == 'ALA'):&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;	       if not (at.resn == 'GLY' or at.resn == 'ALA'):&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;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;	        if &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;not &lt;/del&gt;at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi in residues:&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;	        if at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;not &lt;/ins&gt;in residues:&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;	            residues.append(at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi)&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;	            residues.append(at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi)&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;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;		    # Check for a null chain id (some PDBs contain this)  &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;		    # Check for a null chain id (some PDBs contain this)  &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;		    unit_select = &amp;quot;&amp;quot;&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;		    unit_select = &amp;quot;&amp;quot;&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;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;		    if &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;not &lt;/del&gt;at.chain &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;= &amp;quot;&amp;quot;:&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;		    if at.chain &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;!&lt;/ins&gt;= &amp;quot;&amp;quot;:&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;			unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&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;			unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l343&quot; &gt;Line 343:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 338:&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;		    # Get current chi angle measurements&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;		    # Get current chi angle measurements&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;		    chi = []&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;		    chi = []&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;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;		    for i in range(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0,&lt;/del&gt;len(CHIS[at.resn])):&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;		    for i in range(len(CHIS[at.resn])):&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;		       chi.append(cmd.get_dihedral(residue_def + ' and name '+CHIS[at.resn][i][0],		     &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;		       chi.append(cmd.get_dihedral(residue_def + ' and name '+CHIS[at.resn][i][0],		     &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;		  			             residue_def + ' and name '+CHIS[at.resn][i][1],		     &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;		  			             residue_def + ' and name '+CHIS[at.resn][i][1],		     &lt;/div&gt;&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-l355&quot; &gt;Line 355:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 350:&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;                     prob = 0&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;                     prob = 0&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;		    prob_box = 22 		     &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;		    prob_box = 22 		     &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;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;		    for item in range(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0,&lt;/del&gt;len(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)])):&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;		    for item in range(len(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)])):&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;			print &amp;quot;Rotamer from db: &amp;quot;+str(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item])&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;			print &amp;quot;Rotamer from db: &amp;quot;+str(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item])&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;			if chi[0]:&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;			if chi[0]:&lt;/div&gt;&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-l405&quot; &gt;Line 405:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 400:&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;	# Loop through atoms in selection		&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;	# Loop through atoms in selection		&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;	for at in atoms.atom:&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;	for at in atoms.atom:&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;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;		if at.resn &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;== &lt;/del&gt;'GLY' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;or at.resn == &lt;/del&gt;'ALA' or &amp;quot;%s:%s:%s&amp;quot; % (at.chain,at.resn,at.resi) in residues:&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;		if at.resn &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in (&lt;/ins&gt;'GLY'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;'ALA'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/ins&gt;or &amp;quot;%s:%s:%s&amp;quot; % (at.chain,at.resn,at.resi) in residues:&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;			continue&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;			continue&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l413&quot; &gt;Line 413:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 408:&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;	        # Check for a null chain id (some PDBs contain this)  &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;	        # Check for a null chain id (some PDBs contain this)  &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;	        unit_select = &amp;quot;&amp;quot;&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;	        unit_select = &amp;quot;&amp;quot;&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;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;	        if &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;not &lt;/del&gt;at.chain &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;= &amp;quot;&amp;quot;:&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;	        if at.chain &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;!&lt;/ins&gt;= &amp;quot;&amp;quot;:&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;		    unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&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;		    unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l424&quot; &gt;Line 424:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 419:&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;		# Store crystal angle&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;		# Store crystal angle&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;		crystal_angles = [0.0,0.0,0.0,0.0]&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;		crystal_angles = [0.0,0.0,0.0,0.0]&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;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;		for angle in range(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0,&lt;/del&gt;3):&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;		for angle in range(3):&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;			try:&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;			try:&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;				crystal_angles[angle] = bin[3][angle]&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;				crystal_angles[angle] = bin[3][angle]&lt;/div&gt;&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-l434&quot; &gt;Line 434:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 429:&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;		&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;		&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;		count = 0&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;		count = 0&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;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;		for item in range(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0, &lt;/del&gt;len(match_rotamers)):&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;		for item in range(len(match_rotamers)):&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;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;			# Store probablity&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;			# Store probablity&lt;/div&gt;&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-l450&quot; &gt;Line 450:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 445:&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;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;			# Output to screen ...&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;			# Output to screen ...&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;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;			print &amp;quot;Residue %s%s, rotamer %i, prob %s&amp;quot; % &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(str&lt;/del&gt;(at.resn&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/del&gt;,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;str(&lt;/del&gt;at.resi&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/del&gt;,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;int(&lt;/del&gt;item&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/del&gt;,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;str(&lt;/del&gt;prob&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/del&gt;)&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;			print &amp;quot;Residue %s%s, rotamer %i, prob %s&amp;quot; % (at.resn,at.resi,item,prob)&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;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;			# Set to new rotamer&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;			# Set to new rotamer&lt;/div&gt;&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-l516&quot; &gt;Line 516:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 511:&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;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;	# Set max number of rotamers to display (probably should be somewhere 'higher up' in the code)&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;	# Set max number of rotamers to display (probably should be somewhere 'higher up' in the code)&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;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;	max_rotamers = 10&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;	max_rotamers = &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;min(&lt;/ins&gt;10&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;len(match_rotamers))&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;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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;	if &lt;/del&gt;len(match_rotamers) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt; max_rotamers:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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;	    max_rotamers = len(match_rotamers&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&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;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;	# Create menu entry for each possible rotamer&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;	# Create menu entry for each possible rotamer&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;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;         for item in range(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0,&lt;/del&gt;max_rotamers):&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;         for item in range(max_rotamers):&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;              result.append( [ 1, str(match_rotamers[item]), 'rotamers.set_rotamer(&amp;quot;'+s+'&amp;quot;,&amp;quot;'\&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;              result.append( [ 1, str(match_rotamers[item]), 'rotamers.set_rotamer(&amp;quot;'+s+'&amp;quot;,&amp;quot;'\&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;										    +str(match_rotamers[item][1])+'&amp;quot;,&amp;quot;'\&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;										    +str(match_rotamers[item][1])+'&amp;quot;,&amp;quot;'\&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Newacct</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9566&amp;oldid=prev</id>
		<title>Newacct at 08:12, 27 November 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9566&amp;oldid=prev"/>
		<updated>2009-11-27T08:12:03Z</updated>

		<summary type="html">&lt;p&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 08:12, 27 November 2009&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-l95&quot; &gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&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;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;import colorsys,sys&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;import colorsys,sys&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;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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;import string&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&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;import re&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;import re&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;import editing&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;import editing&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Newacct</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9565&amp;oldid=prev</id>
		<title>Tmwsiy at 18:25, 13 March 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9565&amp;oldid=prev"/>
		<updated>2008-03-13T18:25:48Z</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;===DESCRIPTION===&lt;br /&gt;
Backbone-Dependent Rotamer library (Dunbrack, Cohen ; see ref) is imported into pymol giving access to this information.  There are a number of different ways to use the data, I've only implemented a few as well as added extra functions that seemed useful.&lt;br /&gt;
*Rotamer Menu - an added menu into menu.py, which displays the most common rotamers for the given(clicked) residue; you can also set the residue any of the common rotamers as well&lt;br /&gt;
*colorRotamers - color rotamers by closest matching rotamer angles from database; i.e. color by how common each rotamer of selection, blue - red (least to most common).&lt;br /&gt;
*set_rotamer - routine called by above menu, but can be called manually to set a specific residues side-chain angles&lt;br /&gt;
*set_phipsi - set all phi,psi angles of given selection to given angles (useful for creating secondary structures)&lt;br /&gt;
*createRotamerPDBs - create pdb for each rotamer of given selection ; filter by rotamer-probability&lt;br /&gt;
&lt;br /&gt;
===IMAGES===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:RotamerMenu.png|Rotamer Menu for a GLN residue&lt;br /&gt;
Image:GLURotamerComparison5.png|Rotamer Comparison of crystal structure and most common for GLU; just as an example&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Print out while selecting most common rotamer from above-left image (GLN residue):&lt;br /&gt;
  Given GLN:40 PHI,PSI (-171.626373291,-96.0500335693) : bin (-170,-100)&lt;br /&gt;
  CHIs: [179.18069458007812, 72.539344787597656, -47.217315673828125]&lt;br /&gt;
  Setting Chi1 to -176.9&lt;br /&gt;
  Setting Chi2 to 177.4&lt;br /&gt;
  Setting Chi3 to 0.7&lt;br /&gt;
&lt;br /&gt;
===SETUP===&lt;br /&gt;
run &amp;quot;rotamers.py&amp;quot; and use functions from commandline.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
To setup a rotamer menu inside the residue menu (default windows pymol installation):&lt;br /&gt;
*copy rotamers.py to C:/Program Files/DeLano Scientific/PyMol/modules/pymol/rotamers.py&lt;br /&gt;
*copy mymenu.py   to C:/Program Files/DeLano Scientific/PyMol/modules/pymol/menu.py (WARNING : overwrites default menu.py - use at your own risk)&lt;br /&gt;
*copy bbdep02.May.sortlib to C:/Program Files/DeLano Scientific/PyMol/modules/pymol/bbdep02.May.sortlib (or newer version of sorted bbdep)&lt;br /&gt;
This is only one possible way to do this, I am sure there are many others. I'm not going to post the bbdep, but there is a link in the References section to Dunbrack's download page (get the &amp;quot;sorted&amp;quot; lib)&lt;br /&gt;
&lt;br /&gt;
===NOTES / STATUS===&lt;br /&gt;
*Tested on Pymolv0.97, Windows platform, Red Hat Linux 9.0 and Fedora Core 4. Will test v0.98 and MacOSX later on.&lt;br /&gt;
*The way it's setup now, when you import rotamers , it will automatically read-in the rotamer database; this may not be what you want.&lt;br /&gt;
*Post problems in the discussion page, on 'my talk' page or just email me : dwkulp@mail.med.upenn.edu&lt;br /&gt;
&lt;br /&gt;
TASKS TODO:&lt;br /&gt;
*Rotamer Movie, using mset, etc create movie to watch cycle through rotamers&lt;br /&gt;
*Code could be organized a bit better; due to time constraints this is good for now..&lt;br /&gt;
&lt;br /&gt;
TASKS DONE:&lt;br /&gt;
*Store crystal structure in rotamer menu, so you can go back to original orientation&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 colorRotamers selection&lt;br /&gt;
 set_rotamer selection, chi1_angle [,chi2_angle] [,chi3_angle] [,chi4_angle]&lt;br /&gt;
 set_phipsi selection phi_angle, psi_angle&lt;br /&gt;
 createRotamerPBDs selection [,ncutoff] [,pcutoff] [,prefix]&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
   colorRotamers chain A&lt;br /&gt;
   set_rotamer resi 40, -60,-40   (only set chi1,chi2 angles)&lt;br /&gt;
   set_phipsi resi 10-40, -60,-60 (create an alpha-helical-like section)&lt;br /&gt;
   createRotamerPDBs resi 10-12, ncutoff=3 (create 9 PDBs; each with one of the 3 most probable rotamers for resi 10,11,12)&lt;br /&gt;
   createRotamerPDBs resi 14, pcutoff=0.4  (create a pdb file for each rotamer of residue 14 with probablity &amp;gt; 0.4)&lt;br /&gt;
&lt;br /&gt;
===REFERENCES===&lt;br /&gt;
Dunbrack and Cohen. Protein Science 1997&lt;br /&gt;
&lt;br /&gt;
[http://dunbrack.fccc.edu/bbdep/index.php Dunbrack Lab Page (Contains backbone-dependent library)]&lt;br /&gt;
&lt;br /&gt;
===SCRIPTS (Rotamers.py ; MyMenu.py)===&lt;br /&gt;
Rotamers.py &lt;br /&gt;
 &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
##################################################################&lt;br /&gt;
# File:          Rotamers.py&lt;br /&gt;
# Author:        Dan Kulp&lt;br /&gt;
# Creation Date: 6/8/05&lt;br /&gt;
# Contact:       dwkulp@mail.med.upenn.edu&lt;br /&gt;
#&lt;br /&gt;
# Notes:&lt;br /&gt;
#     Incorporation of Rotamer library&lt;br /&gt;
#     readRotLib() - fills rotdat; &lt;br /&gt;
#        indexed by &amp;quot;RES:PHI_BIN:PSI_BIN&amp;quot;.&lt;br /&gt;
#&lt;br /&gt;
#     Three main functions:&lt;br /&gt;
#     1. colorRotamers - colors according&lt;br /&gt;
#          to rotamer probablitity&lt;br /&gt;
#     2. getBins(sel)&lt;br /&gt;
#           phi,psi bin for rotamer&lt;br /&gt;
#     3. set_rotamer - set a side-chain &lt;br /&gt;
#           to a specific rotamer	&lt;br /&gt;
#&lt;br /&gt;
#     To setup a rotamer menu in the &lt;br /&gt;
#   right click, under &amp;quot;Residue&amp;quot;&lt;br /&gt;
#        1. cp mymenu.py modules/pymol/menu.py&lt;br /&gt;
#        2. cp rotamers.py modules/pymol/rotamers.py (update ROTLIB)&lt;br /&gt;
#&lt;br /&gt;
# Requirements:&lt;br /&gt;
#  set ROTLIB to path for rotamer library&lt;br /&gt;
# Reference: &lt;br /&gt;
#  Dunbrack and Cohen. Protein Science 1997&lt;br /&gt;
####################################################################&lt;br /&gt;
&lt;br /&gt;
import colorsys,sys&lt;br /&gt;
import string&lt;br /&gt;
import re&lt;br /&gt;
import editing&lt;br /&gt;
import os&lt;br /&gt;
import cmd&lt;br /&gt;
import math&lt;br /&gt;
&lt;br /&gt;
# Path for library&lt;br /&gt;
ROTLIB=os.environ['PYMOL_PATH']+&amp;quot;/modules/pymol/bbdep02.May.sortlib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Place for library in memory..&lt;br /&gt;
rotdat = {}&lt;br /&gt;
&lt;br /&gt;
def readRotLib():	&lt;br /&gt;
    # Column indexes in rotamer library..&lt;br /&gt;
    RES  = 0&lt;br /&gt;
    PHI  = 1&lt;br /&gt;
    PSI  = 2&lt;br /&gt;
    PROB = 8&lt;br /&gt;
    CHI1 = 9&lt;br /&gt;
    CHI2 = 10&lt;br /&gt;
    CHI3 = 11&lt;br /&gt;
    CHI4 = 12&lt;br /&gt;
&lt;br /&gt;
    if os.path.exists(ROTLIB):&lt;br /&gt;
		print &amp;quot;File exists: &amp;quot;+ROTLIB&lt;br /&gt;
		input = open(ROTLIB, 'r')&lt;br /&gt;
		for line in input:&lt;br /&gt;
&lt;br /&gt;
	  	    # Parse by whitespace (I believe format is white space and not fixed-width columns)&lt;br /&gt;
		    dat = re.split(&amp;quot;\s+&amp;quot;,line)&lt;br /&gt;
&lt;br /&gt;
		    # Add to rotamer library in memory : &lt;br /&gt;
		    #   key format       RES:PHI_BIN:PSI_BIN&lt;br /&gt;
		    #   value format     PROB, CHI1, CHI2, CHI3, CHI4&lt;br /&gt;
		    try:&lt;br /&gt;
		        rotdat[dat[RES]+&amp;quot;:&amp;quot;+dat[PHI]+&amp;quot;:&amp;quot;+dat[PSI]].append([ dat[PROB], dat[CHI1], dat[CHI2], dat[CHI3], dat[CHI4] ])&lt;br /&gt;
		    except KeyError:&lt;br /&gt;
			rotdat[dat[RES]+&amp;quot;:&amp;quot;+dat[PHI]+&amp;quot;:&amp;quot;+dat[PSI]] = [ [ dat[PROB], dat[CHI1], dat[CHI2], dat[CHI3], dat[CHI4] ] ]&lt;br /&gt;
&lt;br /&gt;
		    &lt;br /&gt;
    else:&lt;br /&gt;
	print &amp;quot;Couldn't find Rotamer library&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Atoms for each side-chain angle for each residue&lt;br /&gt;
CHIS = {}&lt;br /&gt;
CHIS[&amp;quot;ARG&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot;,&amp;quot;NE&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot;,&amp;quot;NE&amp;quot;,&amp;quot;CZ&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;ASN&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;OD2&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;ASP&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;OD1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
CHIS[&amp;quot;CYS&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;SG&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
CHIS[&amp;quot;GLN&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot;,&amp;quot;OE1&amp;quot;]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;GLU&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot;,&amp;quot;OE1&amp;quot;]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;HIS&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;ND1&amp;quot;]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;ILE&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG1&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG1&amp;quot;,&amp;quot;CD1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;LEU&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;LYS&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot;,&amp;quot;CE&amp;quot;],&lt;br /&gt;
		[&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot;,&amp;quot;CE&amp;quot;,&amp;quot;NZ&amp;quot;]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;MET&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;SD&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;SD&amp;quot;,&amp;quot;CE&amp;quot;]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;PHE&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;PRO&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;SER&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;OG&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;THR&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;OG1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;TRP&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
                [&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD1&amp;quot;]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;TYR&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot; ],&lt;br /&gt;
		[&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG&amp;quot;,&amp;quot;CD1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
CHIS[&amp;quot;VAL&amp;quot;] = [ [&amp;quot;N&amp;quot;,&amp;quot;CA&amp;quot;,&amp;quot;CB&amp;quot;,&amp;quot;CG1&amp;quot; ]&lt;br /&gt;
	      ]&lt;br /&gt;
&lt;br /&gt;
# Color Rotamer by side-chain angle position&lt;br /&gt;
#  'bin' side-chain angles into closest&lt;br /&gt;
def colorRotamers(sel):&lt;br /&gt;
    doRotamers(sel)&lt;br /&gt;
&lt;br /&gt;
# Utility function, to set phi,psi angles for a given selection&lt;br /&gt;
# Note: Cartoon, Ribbon functionality will not display correctly after this&lt;br /&gt;
def set_phipsi(sel, phi,psi):&lt;br /&gt;
    doRotamers(sel,angles=[phi,psi],type=&amp;quot;set&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Set a rotamer, based on a selection, a restype and chi angles&lt;br /&gt;
def set_rotamer(sel, chi1, chi2=0,chi3=0,chi4=0):&lt;br /&gt;
    at = cmd.get_model(&amp;quot;byres (&amp;quot;+sel+&amp;quot;)&amp;quot;).atom[0]&lt;br /&gt;
&lt;br /&gt;
    list = [chi1,chi2,chi3,chi4]&lt;br /&gt;
    for i in range(0,len(CHIS[at.resn])):&lt;br /&gt;
	print &amp;quot;Setting Chi&amp;quot;+str(i+1)+&amp;quot; to &amp;quot;+str(list[i])&lt;br /&gt;
        editing.set_dihedral(sel + ' and name '+CHIS[at.resn][i][0],		    &lt;br /&gt;
		             sel + ' and name '+CHIS[at.resn][i][1],		    &lt;br /&gt;
		             sel + ' and name '+CHIS[at.resn][i][2],		    &lt;br /&gt;
		             sel + ' and name '+CHIS[at.resn][i][3], str(list[i]))		    &lt;br /&gt;
&lt;br /&gt;
    # Remove some objects that got created&lt;br /&gt;
    cmd.delete(&amp;quot;pk1&amp;quot;)&lt;br /&gt;
    cmd.delete(&amp;quot;pk2&amp;quot;)&lt;br /&gt;
    cmd.delete(&amp;quot;pkmol&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Get Phi,Psi bins for given selection&lt;br /&gt;
# WARNING:  assume selection is single residue (will only return first residue bins)&lt;br /&gt;
def getBins(sel):&lt;br /&gt;
    return doRotamers(sel, type=&amp;quot;bins&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Specific comparison operator for rotamer prob data &lt;br /&gt;
def mycmp(first, second):&lt;br /&gt;
	return cmp( first[1], second[1])&lt;br /&gt;
&lt;br /&gt;
# Color Ramp...&lt;br /&gt;
def rot_color(vals): &lt;br /&gt;
	nbins = 10&lt;br /&gt;
	vals.sort(mycmp)&lt;br /&gt;
#	print &amp;quot;End sort: &amp;quot;+str(len(vals))+&amp;quot; : &amp;quot;+str(nbins)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	# Coloring scheme...&lt;br /&gt;
	i = 0&lt;br /&gt;
	j = 0&lt;br /&gt;
	rgb = [0.0,0.0,0.0]&lt;br /&gt;
	sel_str = &amp;quot;&amp;quot;&lt;br /&gt;
	while i &amp;lt; len(vals):&lt;br /&gt;
		if int(len(vals)/nbins) == 0 or i % int(len(vals)/nbins) == 0:&lt;br /&gt;
		      hsv = (colorsys.TWO_THIRD - colorsys.TWO_THIRD * float(j) / (nbins-1), 1.0, 1.0)&lt;br /&gt;
&lt;br /&gt;
		      #convert to rgb and append to color list&lt;br /&gt;
		      rgb = colorsys.hsv_to_rgb(hsv[0],hsv[1],hsv[2])&lt;br /&gt;
		      if j &amp;lt; nbins-1:&lt;br /&gt;
		              j += 1	&lt;br /&gt;
&lt;br /&gt;
		cmd.set_color(&amp;quot;RotProbColor&amp;quot;+str(i), rgb)&lt;br /&gt;
		cmd.color(&amp;quot;RotProbColor&amp;quot;+str(i), str(vals[i][0]))&lt;br /&gt;
		i += 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Main function                           &lt;br /&gt;
def doRotamers(sel,angles=[], type=&amp;quot;color&amp;quot;):                           &lt;br /&gt;
&lt;br /&gt;
	# Read in Rotamer library if not already done&lt;br /&gt;
	if len(rotdat) == 0:&lt;br /&gt;
		readRotLib()&lt;br /&gt;
&lt;br /&gt;
	# Set up some variables..&lt;br /&gt;
	residues = ['dummy']  # Keep track of residues already done&lt;br /&gt;
	probs = []            # probability of each residue conformation&lt;br /&gt;
	phi = 0               # phi,psi angles of current residue&lt;br /&gt;
	psi = 0&lt;br /&gt;
&lt;br /&gt;
	# Get atoms from selection&lt;br /&gt;
	atoms = cmd.get_model(&amp;quot;byres (&amp;quot;+sel+&amp;quot;)&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Loop through atoms in selection		&lt;br /&gt;
	for at in atoms.atom:&lt;br /&gt;
	    try:&lt;br /&gt;
	       # Don't process Glycines or Alanines&lt;br /&gt;
	       if not (at.resn == 'GLY' or at.resn == 'ALA'):&lt;br /&gt;
	        if not at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi in residues:&lt;br /&gt;
	            residues.append(at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi)&lt;br /&gt;
&lt;br /&gt;
		    # Check for a null chain id (some PDBs contain this) &lt;br /&gt;
		    unit_select = &amp;quot;&amp;quot;&lt;br /&gt;
		    if not at.chain == &amp;quot;&amp;quot;:&lt;br /&gt;
			unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&lt;br /&gt;
&lt;br /&gt;
		    # Define selections for residue i-1, i and i+1    &lt;br /&gt;
		    residue_def = unit_select+'resi '+str(at.resi)&lt;br /&gt;
  		    residue_def_prev = unit_select+'resi '+str(int(at.resi)-1)&lt;br /&gt;
		    residue_def_next = unit_select+'resi '+str(int(at.resi)+1)&lt;br /&gt;
&lt;br /&gt;
	            # Compute phi/psi angle&lt;br /&gt;
&lt;br /&gt;
		    phi = cmd.get_dihedral(residue_def_prev+' and name C',residue_def+' and name N',residue_def+' and name CA',residue_def+' and name C')&lt;br /&gt;
		    psi = cmd.get_dihedral(residue_def+' and name N',residue_def+' and name CA',residue_def+' and name C',residue_def_next+' and name N')&lt;br /&gt;
		    if type == &amp;quot;set&amp;quot;:&lt;br /&gt;
			    print &amp;quot;Changing &amp;quot;+at.resn+str(at.resi)+&amp;quot; from &amp;quot;+str(phi)+&amp;quot;,&amp;quot;+str(psi)+&amp;quot; to &amp;quot;+str(angles[0])+&amp;quot;,&amp;quot;+str(angles[1])&lt;br /&gt;
			    cmd.set_dihedral(residue_def_prev+' and name C',residue_def+' and name N',residue_def+' and name CA',residue_def+' and name C',angles[0])&lt;br /&gt;
			    cmd.set_dihedral(residue_def+' and name N',residue_def+' and name CA',residue_def+' and name C',residue_def_next+' and name N', angles[1])&lt;br /&gt;
			    continue&lt;br /&gt;
						&lt;br /&gt;
		    # Find correct 10x10 degree bin		        		&lt;br /&gt;
		    phi_digit = abs(int(phi)) - abs(int(phi/10)*10)&lt;br /&gt;
		    psi_digit = abs(int(psi)) - abs(int(psi/10)*10)&lt;br /&gt;
		    &lt;br /&gt;
		    # Remember sign of phi,psi angles&lt;br /&gt;
	    	    phi_sign = 1&lt;br /&gt;
		    if phi &amp;lt; 0:    phi_sign = -1&lt;br /&gt;
&lt;br /&gt;
		    psi_sign = 1&lt;br /&gt;
		    if psi &amp;lt; 0:    psi_sign = -1&lt;br /&gt;
&lt;br /&gt;
		    # Compute phi,psi bins&lt;br /&gt;
  		    phi_bin = int(math.floor(abs(phi/10))*10*phi_sign)&lt;br /&gt;
		    if phi_digit &amp;gt;= 5:    phi_bin = int(math.ceil(abs(phi/10))*10*phi_sign)&lt;br /&gt;
&lt;br /&gt;
		    psi_bin = int(math.floor(abs(psi/10))*10*psi_sign)&lt;br /&gt;
		    if psi_digit &amp;gt;= 5:    psi_bin = int(math.ceil(abs(psi/10))*10*psi_sign)&lt;br /&gt;
&lt;br /&gt;
	            print &amp;quot;Given &amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi+&amp;quot; PHI,PSI (&amp;quot;+str(phi)+&amp;quot;,&amp;quot;+str(psi)+&amp;quot;) : bin (&amp;quot;+str(phi_bin)+&amp;quot;,&amp;quot;+str(psi_bin)+&amp;quot;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
		&lt;br /&gt;
		    # Get current chi angle measurements&lt;br /&gt;
		    chi = []&lt;br /&gt;
		    for i in range(0,len(CHIS[at.resn])):&lt;br /&gt;
		       chi.append(cmd.get_dihedral(residue_def + ' and name '+CHIS[at.resn][i][0],		    &lt;br /&gt;
		  			             residue_def + ' and name '+CHIS[at.resn][i][1],		    &lt;br /&gt;
					             residue_def + ' and name '+CHIS[at.resn][i][2],		    &lt;br /&gt;
					             residue_def + ' and name '+CHIS[at.resn][i][3]))		    &lt;br /&gt;
		    print &amp;quot;CHIs: &amp;quot;+str(chi)&lt;br /&gt;
		    if type == 'bins':&lt;br /&gt;
		         return [at.resn, phi_bin,psi_bin]&lt;br /&gt;
&lt;br /&gt;
		    # Compute probabilities for given chi angles&lt;br /&gt;
                    prob = 0&lt;br /&gt;
		    prob_box = 22 		    &lt;br /&gt;
		    for item in range(0,len(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)])):&lt;br /&gt;
			print &amp;quot;Rotamer from db: &amp;quot;+str(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item])&lt;br /&gt;
			if chi[0]:&lt;br /&gt;
			    if chi[0] &amp;gt;= float(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][1]) - (prob_box/2) and \&lt;br /&gt;
				chi[0] &amp;lt;= float(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][1]) + (prob_box/2):&lt;br /&gt;
				if len(chi) == 1:&lt;br /&gt;
					prob = rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][0]&lt;br /&gt;
					break&lt;br /&gt;
				if chi[1] &amp;gt;= float(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][2]) - (prob_box/2) and \&lt;br /&gt;
				 float(chi[1] &amp;lt;= rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][2]) + (prob_box/2):&lt;br /&gt;
					if len(chi) == 2:&lt;br /&gt;
					    prob = rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][0]&lt;br /&gt;
					    break&lt;br /&gt;
					if chi[2] &amp;gt;= float(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][3]) - (prob_box/2) and \&lt;br /&gt;
					   float(chi[2] &amp;lt;= rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][3]) + (prob_box/2):&lt;br /&gt;
    					    if len(chi) == 3:&lt;br /&gt;
					        prob = rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][0]&lt;br /&gt;
					        break&lt;br /&gt;
					    if chi[3] &amp;gt;= float(rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][4]) - (prob_box/2) and \&lt;br /&gt;
					       float(chi[3] &amp;lt;= rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][4]) + (prob_box/2):&lt;br /&gt;
					        prob = rotdat[at.resn+&amp;quot;:&amp;quot;+str(phi_bin)+&amp;quot;:&amp;quot;+str(psi_bin)][item][0]&lt;br /&gt;
					        break&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
		    print &amp;quot;PROB OF ROTAMER: &amp;quot;+str(prob)&lt;br /&gt;
		    print &amp;quot;---------------------------&amp;quot;&lt;br /&gt;
		    probs.append([residue_def, prob])&lt;br /&gt;
&lt;br /&gt;
	    except:&lt;br /&gt;
#		probs.append([residue_def, -1])&lt;br /&gt;
		print &amp;quot;Exception found&amp;quot;&lt;br /&gt;
		continue&lt;br /&gt;
&lt;br /&gt;
	# Color according to rotamer probability&lt;br /&gt;
	rot_color(probs)	    &lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#  Create PDB files containing most probable rotamers&lt;br /&gt;
def createRotamerPDBs(sel,ncutoff=10,pcutoff=0,prefix=&amp;quot;ROTAMER&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
	# Get atoms from selection&lt;br /&gt;
	atoms = cmd.get_model(&amp;quot;byres (&amp;quot;+sel+&amp;quot;)&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	# Set up some variables..&lt;br /&gt;
	residues = ['dummy']  # Keep track of residues already done&lt;br /&gt;
&lt;br /&gt;
	# Loop through atoms in selection		&lt;br /&gt;
	for at in atoms.atom:&lt;br /&gt;
		if at.resn == 'GLY' or at.resn == 'ALA' or &amp;quot;%s:%s:%s&amp;quot; % (at.chain,at.resn,at.resi) in residues:&lt;br /&gt;
			continue&lt;br /&gt;
&lt;br /&gt;
		# Add to residue list (keep track of which ones we've done)&lt;br /&gt;
		residues.append(&amp;quot;%s:%s:%s&amp;quot; % (at.chain,at.resn,at.resi))&lt;br /&gt;
&lt;br /&gt;
	        # Check for a null chain id (some PDBs contain this) &lt;br /&gt;
	        unit_select = &amp;quot;&amp;quot;&lt;br /&gt;
	        if not at.chain == &amp;quot;&amp;quot;:&lt;br /&gt;
		    unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	        # Define selections for residue &lt;br /&gt;
		residue_def = unit_select+'resi '+str(at.resi)&lt;br /&gt;
&lt;br /&gt;
		# Get bin (phi,psi) definitions for this residue&lt;br /&gt;
		bin = doRotamers(residue_def, type='bins')&lt;br /&gt;
&lt;br /&gt;
		# Store crystal angle&lt;br /&gt;
		crystal_angles = [0.0,0.0,0.0,0.0]&lt;br /&gt;
		for angle in range(0,3):&lt;br /&gt;
			try:&lt;br /&gt;
				crystal_angles[angle] = bin[3][angle]&lt;br /&gt;
			except IndexError:&lt;br /&gt;
				break&lt;br /&gt;
&lt;br /&gt;
		# Retreive list of rotamers for this phi,psi bin + residue type&lt;br /&gt;
		match_rotamers = rotdat[&amp;quot;%s:%s:%s&amp;quot; % (bin[0],str(bin[1]),str(bin[2]))]&lt;br /&gt;
		&lt;br /&gt;
		count = 0&lt;br /&gt;
		for item in range(0, len(match_rotamers)):&lt;br /&gt;
&lt;br /&gt;
			# Store probablity&lt;br /&gt;
			prob = match_rotamers[item][0]&lt;br /&gt;
&lt;br /&gt;
			# Check cutoffs&lt;br /&gt;
			if float(prob) &amp;lt;= float(pcutoff):&lt;br /&gt;
				continue&lt;br /&gt;
&lt;br /&gt;
			if float(count) &amp;gt;= float(ncutoff):&lt;br /&gt;
				break&lt;br /&gt;
&lt;br /&gt;
			# Increment count&lt;br /&gt;
			count += 1&lt;br /&gt;
&lt;br /&gt;
			# Output to screen ...&lt;br /&gt;
			print &amp;quot;Residue %s%s, rotamer %i, prob %s&amp;quot; % (str(at.resn),str(at.resi),int(item),str(prob))&lt;br /&gt;
&lt;br /&gt;
			# Set to new rotamer&lt;br /&gt;
			set_rotamer(residue_def,match_rotamers[item][1],match_rotamers[item][2],match_rotamers[item][3],match_rotamers[item][4])												&lt;br /&gt;
				&lt;br /&gt;
			# Store in PDB file&lt;br /&gt;
			cmd.save(&amp;quot;%s_%s%s_%i_%s.pdb&amp;quot; % (prefix,str(at.resn),str(at.resi),int(item),str(prob)))&lt;br /&gt;
			&lt;br /&gt;
			# Reset crystal angle&lt;br /&gt;
			set_rotamer(residue_def,crystal_angles[0],crystal_angles[1],crystal_angles[2],crystal_angles[3])&lt;br /&gt;
&lt;br /&gt;
# Uncommenting this is nice because it loads rotamer library upon startup&lt;br /&gt;
#  however, it slows the PyMOL loading process a lot&lt;br /&gt;
#  instead I've put this call into the menuing code..&lt;br /&gt;
# readRotLib()&lt;br /&gt;
&lt;br /&gt;
cmd.extend('set_phipsi',set_phipsi)&lt;br /&gt;
cmd.extend('set_rotamer',set_rotamer)&lt;br /&gt;
cmd.extend('colorRotamers',colorRotamers)&lt;br /&gt;
cmd.extend('createRotamerPDBs',createRotamerPDBs)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
MyMenu.py&lt;br /&gt;
 Since menu.py is copyrighted I can't post my edited version, but you can create it very simply by adding these two peices of code&lt;br /&gt;
&lt;br /&gt;
1. In the &amp;quot;pick_option(title,s,object=0)&amp;quot; function of menu.py add the following code after the first &amp;quot;result =&amp;quot; statement&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Edit dwkulp 6/11/05 , add a rotamer menu to residue menu&lt;br /&gt;
   if title == 'Residue':&lt;br /&gt;
	result.extend([[ 1, 'rotamers'    , rotamer_menu(s)]])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. At the end of the file add this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
###############################################&lt;br /&gt;
# Dan Kulp&lt;br /&gt;
# Added Rotamer list to residue menu..&lt;br /&gt;
# rotamer.py must be importable (I placed it in &lt;br /&gt;
# the same directory as menu.py)&lt;br /&gt;
###############################################&lt;br /&gt;
&lt;br /&gt;
import rotamers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def rotamer_menu(s):&lt;br /&gt;
	# Check for rotamer library being loaded&lt;br /&gt;
	if not rotamers.rotdat:&lt;br /&gt;
             rotamers.readRotLib()&lt;br /&gt;
#	     return [ [2, &amp;quot;Must run rotamers.py first&amp;quot;,'']]&lt;br /&gt;
&lt;br /&gt;
	# Check for valid rotamer residue..&lt;br /&gt;
	res = cmd.get_model(&amp;quot;byres (&amp;quot;+s+&amp;quot;)&amp;quot;).atom[0].resn&lt;br /&gt;
        if not res in rotamers.CHIS.keys():&lt;br /&gt;
	    return [ [2, &amp;quot;Residue: &amp;quot;+res+&amp;quot; not known sidechain or does not have rotamers&amp;quot;, '']]&lt;br /&gt;
&lt;br /&gt;
	# Get PHI,PSI bins for rotamer (also prints out current phi,psi, chi1,chi2,chi3,chi4)&lt;br /&gt;
	bins = rotamers.doRotamers(s,type='bins')&lt;br /&gt;
&lt;br /&gt;
	# Add a title to the menu&lt;br /&gt;
	result = [ [2, bins[0]+' Rotamers in bin ('+str(bins[1])+','+str(bins[2])+')','' ], [1, ':::PROB,CHI1,CHI2,CHI3,CHI4:::','']]&lt;br /&gt;
&lt;br /&gt;
        # Grab the entries for this residue and phi,psi bins&lt;br /&gt;
	match_rotamers = rotamers.rotdat[bins[0]+&amp;quot;:&amp;quot;+str(bins[1])+&amp;quot;:&amp;quot;+str(bins[2])]&lt;br /&gt;
&lt;br /&gt;
	# Set max number of rotamers to display (probably should be somewhere 'higher up' in the code)&lt;br /&gt;
	max_rotamers = 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	if len(match_rotamers) &amp;lt; max_rotamers:&lt;br /&gt;
	    max_rotamers = len(match_rotamers)&lt;br /&gt;
&lt;br /&gt;
	# Create menu entry for each possible rotamer&lt;br /&gt;
        for item in range(0,max_rotamers):&lt;br /&gt;
             result.append( [ 1, str(match_rotamers[item]), 'rotamers.set_rotamer(&amp;quot;'+s+'&amp;quot;,&amp;quot;'\&lt;br /&gt;
										    +str(match_rotamers[item][1])+'&amp;quot;,&amp;quot;'\&lt;br /&gt;
										    +str(match_rotamers[item][2])+'&amp;quot;,&amp;quot;'\&lt;br /&gt;
										    +str(match_rotamers[item][3])+'&amp;quot;,&amp;quot;'\&lt;br /&gt;
										    +str(match_rotamers[item][4])+'&amp;quot;)'])&lt;br /&gt;
	return result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|Rotamer Toggle]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Structural_Biology_Scripts|Rotamer Toggle]]&lt;/div&gt;</summary>
		<author><name>Tmwsiy</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9563&amp;oldid=prev</id>
		<title>Tmwsiy at 02:06, 13 March 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9563&amp;oldid=prev"/>
		<updated>2008-03-13T02:06:00Z</updated>

		<summary type="html">&lt;p&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 02:06, 13 March 2008&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-l327&quot; &gt;Line 327:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 327:&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;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;	            # Compute phi/psi angle&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;	            # Compute phi/psi angle&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;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;		    phi = cmd.get_dihedral(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;residue_def&lt;/del&gt;+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CB&lt;/del&gt;',residue_def+' and name CA',residue_def+' and name N',&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;residue_def_prev&lt;/del&gt;+' and name C')&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;/div&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;		    psi = cmd.get_dihedral(residue_def+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;O&lt;/del&gt;',residue_def+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;C&lt;/del&gt;',residue_def+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CA&lt;/del&gt;',&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;residue_def&lt;/del&gt;+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CB&lt;/del&gt;')&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;		    phi = cmd.get_dihedral(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;residue_def_prev&lt;/ins&gt;+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;C&lt;/ins&gt;',residue_def+' and name CA',residue_def+' and name N',&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;residue_def&lt;/ins&gt;+' and name C')&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;		    psi = cmd.get_dihedral(residue_def+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;N&lt;/ins&gt;',residue_def+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CA&lt;/ins&gt;',residue_def+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;C&lt;/ins&gt;',&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;residue_def_next&lt;/ins&gt;+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;N&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;		    if type == &amp;quot;set&amp;quot;:&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;		    if type == &amp;quot;set&amp;quot;:&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;			    print &amp;quot;Changing &amp;quot;+at.resn+str(at.resi)+&amp;quot; from &amp;quot;+str(phi)+&amp;quot;,&amp;quot;+str(psi)+&amp;quot; to &amp;quot;+str(angles[0])+&amp;quot;,&amp;quot;+str(angles[1])&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;			    print &amp;quot;Changing &amp;quot;+at.resn+str(at.resi)+&amp;quot; from &amp;quot;+str(phi)+&amp;quot;,&amp;quot;+str(psi)+&amp;quot; to &amp;quot;+str(angles[0])+&amp;quot;,&amp;quot;+str(angles[1])&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;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;			    cmd.set_dihedral(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;residue_def&lt;/del&gt;+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CB&lt;/del&gt;',residue_def+' and name CA',residue_def+' and name N',&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;residue_def_prev&lt;/del&gt;+' and name C',angles[0])&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;			    cmd.set_dihedral(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;residue_def_prev&lt;/ins&gt;+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;C&lt;/ins&gt;',residue_def+' and name CA',residue_def+' and name N',&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;residue_def&lt;/ins&gt;+' and name C',angles[0])&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;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;			    cmd.set_dihedral(residue_def+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;O&lt;/del&gt;',residue_def+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;C&lt;/del&gt;',residue_def+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CA&lt;/del&gt;',&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;residue_def&lt;/del&gt;+' and name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CB&lt;/del&gt;', angles[1])&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;			    cmd.set_dihedral(residue_def+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;N&lt;/ins&gt;',residue_def+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CA&lt;/ins&gt;',residue_def+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;C&lt;/ins&gt;',&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;residue_def_next&lt;/ins&gt;+' and name &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;N&lt;/ins&gt;', angles[1])&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;			    continue&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;			    continue&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;						&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;						&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tmwsiy</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9562&amp;oldid=prev</id>
		<title>Tmwsiy: /* NOTES / STATUS */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotamer_Toggle&amp;diff=9562&amp;oldid=prev"/>
		<updated>2005-09-19T14:40:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;NOTES / STATUS&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 14:40, 19 September 2005&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-l47&quot; &gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&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;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;===NOTES / STATUS===&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;===NOTES / STATUS===&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;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;*Tested on Pymolv0.97, Windows platform &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and on &lt;/del&gt;Red Hat Linux 9.0. Will test v0.98 later on.&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;*Tested on Pymolv0.97, Windows platform&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;Red Hat Linux 9.0 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and Fedora Core 4&lt;/ins&gt;. Will test v0.98 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and MacOSX &lt;/ins&gt;later on.&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;*The way it's setup now, when you import rotamers , it will automatically read-in the rotamer database; this may not be what you want.&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;*The way it's setup now, when you import rotamers , it will automatically read-in the rotamer database; this may not be what you want.&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;*Post problems in the discussion page, on 'my talk' page or just email me : dwkulp@mail.med.upenn.edu&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;*Post problems in the discussion page, on 'my talk' page or just email me : dwkulp@mail.med.upenn.edu&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tmwsiy</name></author>
	</entry>
</feed>