<?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=InterfaceResidues</id>
	<title>InterfaceResidues - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=InterfaceResidues"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;action=history"/>
	<updated>2026-09-02T23:11: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=InterfaceResidues&amp;diff=13315&amp;oldid=prev</id>
		<title>Bell: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=13315&amp;oldid=prev"/>
		<updated>2015-11-16T05:01:05Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:01, 16 November 2015&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=InterfaceResidues&amp;diff=13314&amp;oldid=prev</id>
		<title>Speleo3: select None -&gt; 'none'</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=13314&amp;oldid=prev"/>
		<updated>2015-11-13T13:59:10Z</updated>

		<summary type="html">&lt;p&gt;select None -&amp;gt; &amp;#039;none&amp;#039;&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 13:59, 13 November 2015&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-l132&quot; &gt;Line 132:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 132:&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;	cmd.enable(cmpx)&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.enable(cmpx)&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.select(selName1, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;None&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;	cmd.select(selName1, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'none'&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;	for (model,resi,diff) in stored.r:&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 (model,resi,diff) in stored.r:&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;		key=resi+&amp;quot;-&amp;quot;+model&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=resi+&amp;quot;-&amp;quot;+model&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=13066&amp;oldid=prev</id>
		<title>Bell: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=13066&amp;oldid=prev"/>
		<updated>2015-10-19T01:22:03Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:22, 19 October 2015&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=InterfaceResidues&amp;diff=13065&amp;oldid=prev</id>
		<title>Speleo3: import cmd, thanks to Josh Hardy</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=13065&amp;oldid=prev"/>
		<updated>2015-09-10T15:01:53Z</updated>

		<summary type="html">&lt;p&gt;import cmd, thanks to Josh Hardy&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:01, 10 September 2015&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-l46&quot; &gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&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 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;= 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;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;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;from pymol import stored&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;from pymol import &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cmd, &lt;/ins&gt;stored&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;def interfaceResidues(cmpx, cA='c. A', cB='c. B', cutoff=1.0, selName=&amp;quot;interface&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;def interfaceResidues(cmpx, cA='c. A', cB='c. B', cutoff=1.0, selName=&amp;quot;interface&amp;quot;):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=6166&amp;oldid=prev</id>
		<title>Pyadmin: 5 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=InterfaceResidues&amp;diff=6166&amp;oldid=prev"/>
		<updated>2014-03-28T01:47:08Z</updated>

		<summary type="html">&lt;p&gt;5 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:1h4gi.png|thumb|right|300px|The red residues were detected as being in the interface of the two proteins.  This is PDB 1H4G from the Example below.]]&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This script finds interface residues between two proteins or chains, using the following concept.  First, we take the area of the complex.  Then, we split the complex into two pieces, one for each chain.  Next, we calculate the chain-only surface area.  Lastly, we take the difference between the comeplex-based areas and the chain-only-based areas.  If that value is greater than your supplied cutoff, then we call it an interface residue.&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
interfaceResidue complexName[, cA=firstChainName[, cB=secondChainName[, cutoff=dAsaCutoff[, selName=selectionNameToReturn ]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where,&lt;br /&gt;
&lt;br /&gt;
'''complexName'''&lt;br /&gt;
:: The name of the complex.  cA and cB must be within in this complex&lt;br /&gt;
''' cA'''&lt;br /&gt;
:: The name of the first chain to investigate&lt;br /&gt;
''' cB '''&lt;br /&gt;
:: The name of the 2nd chain to investigate&lt;br /&gt;
''' cutoff '''&lt;br /&gt;
:: The dASA cutoff, in sqaure Angstroms&lt;br /&gt;
''' selName '''&lt;br /&gt;
:: Name of the selection to return.&lt;br /&gt;
&lt;br /&gt;
For each residue in the newly defined interface, this script returns the model (cA or cB) name, the residue number and the change in area.  To get that information use [[interfaceResidues]] in the api form as:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
myInterfaceResidues = interfaceResidue(complexName[, cA=firstChainName[, cB=secondChainName[, cutoff=dAsaCutoff[, selName=selectionNameToReturn ]]]])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and the result, &amp;lt;pre&amp;gt;myInterfaceResidues&amp;lt;/pre&amp;gt; will have all the value for you.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
For these two examples, make sure you've run the script first.&lt;br /&gt;
&lt;br /&gt;
== Simple Example ==&lt;br /&gt;
This just finds the residues b/t chain A and chain B&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1h4g, async=0&lt;br /&gt;
interfaceResidues 1h4g&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Complex Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1qox, async=0&lt;br /&gt;
foundResidues = interfaceResidues(&amp;quot;1qox&amp;quot;, cA=&amp;quot;c. I&amp;quot;, cB=&amp;quot;c. J&amp;quot;, cutoff=0.75, selName=&amp;quot;foundIn1QOX&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Image:1qoxi.png|400px|thumb|center|Interface residues between chains I and J in 1QOX.]]&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import stored&lt;br /&gt;
&lt;br /&gt;
def interfaceResidues(cmpx, cA='c. A', cB='c. B', cutoff=1.0, selName=&amp;quot;interface&amp;quot;):&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	interfaceResidues -- finds 'interface' residues between two chains in a complex.&lt;br /&gt;
	&lt;br /&gt;
	PARAMS&lt;br /&gt;
		cmpx&lt;br /&gt;
			The complex containing cA and cB&lt;br /&gt;
		&lt;br /&gt;
		cA&lt;br /&gt;
			The first chain in which we search for residues at an interface&lt;br /&gt;
			with cB&lt;br /&gt;
		&lt;br /&gt;
		cB&lt;br /&gt;
			The second chain in which we search for residues at an interface&lt;br /&gt;
			with cA&lt;br /&gt;
		&lt;br /&gt;
		cutoff&lt;br /&gt;
			The difference in area OVER which residues are considered&lt;br /&gt;
			interface residues.  Residues whose dASA from the complex to&lt;br /&gt;
			a single chain is greater than this cutoff are kept.  Zero&lt;br /&gt;
			keeps all residues.&lt;br /&gt;
			&lt;br /&gt;
		selName&lt;br /&gt;
			The name of the selection to return.&lt;br /&gt;
			&lt;br /&gt;
	RETURNS&lt;br /&gt;
		* A selection of interface residues is created and named&lt;br /&gt;
			depending on what you passed into selName&lt;br /&gt;
		* An array of values is returned where each value is:&lt;br /&gt;
			( modelName, residueNumber, dASA )&lt;br /&gt;
			&lt;br /&gt;
	NOTES&lt;br /&gt;
		If you have two chains that are not from the same PDB that you want&lt;br /&gt;
		to complex together, use the create command like:&lt;br /&gt;
			create myComplex, pdb1WithChainA or pdb2withChainX&lt;br /&gt;
		then pass myComplex to this script like:&lt;br /&gt;
			interfaceResidues myComlpex, c. A, c. X&lt;br /&gt;
			&lt;br /&gt;
		This script calculates the area of the complex as a whole.  Then,&lt;br /&gt;
		it separates the two chains that you pass in through the arguments&lt;br /&gt;
		cA and cB, alone.  Once it has this, it calculates the difference&lt;br /&gt;
		and any residues ABOVE the cutoff are called interface residues.&lt;br /&gt;
			&lt;br /&gt;
	AUTHOR:&lt;br /&gt;
		Jason Vertrees, 2009.		&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	# Save user's settings, before setting dot_solvent&lt;br /&gt;
	oldDS = cmd.get(&amp;quot;dot_solvent&amp;quot;)&lt;br /&gt;
	cmd.set(&amp;quot;dot_solvent&amp;quot;, 1)&lt;br /&gt;
	&lt;br /&gt;
	# set some string names for temporary objects/selections&lt;br /&gt;
	tempC, selName1 = &amp;quot;tempComplex&amp;quot;, selName+&amp;quot;1&amp;quot;&lt;br /&gt;
	chA, chB = &amp;quot;chA&amp;quot;, &amp;quot;chB&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	# operate on a new object &amp;amp; turn off the original&lt;br /&gt;
	cmd.create(tempC, cmpx)&lt;br /&gt;
	cmd.disable(cmpx)&lt;br /&gt;
	&lt;br /&gt;
	# remove cruft and inrrelevant chains&lt;br /&gt;
	cmd.remove(tempC + &amp;quot; and not (polymer and (%s or %s))&amp;quot; % (cA, cB))&lt;br /&gt;
	&lt;br /&gt;
	# get the area of the complete complex&lt;br /&gt;
	cmd.get_area(tempC, load_b=1)&lt;br /&gt;
	# copy the areas from the loaded b to the q, field.&lt;br /&gt;
	cmd.alter(tempC, 'q=b')&lt;br /&gt;
	&lt;br /&gt;
	# extract the two chains and calc. the new area&lt;br /&gt;
	# note: the q fields are copied to the new objects&lt;br /&gt;
	# chA and chB&lt;br /&gt;
	cmd.extract(chA, tempC + &amp;quot; and (&amp;quot; + cA + &amp;quot;)&amp;quot;)&lt;br /&gt;
	cmd.extract(chB, tempC + &amp;quot; and (&amp;quot; + cB + &amp;quot;)&amp;quot;)&lt;br /&gt;
	cmd.get_area(chA, load_b=1)&lt;br /&gt;
	cmd.get_area(chB, load_b=1)&lt;br /&gt;
	&lt;br /&gt;
	# update the chain-only objects w/the difference&lt;br /&gt;
	cmd.alter( &amp;quot;%s or %s&amp;quot; % (chA,chB), &amp;quot;b=b-q&amp;quot; )&lt;br /&gt;
	&lt;br /&gt;
	# The calculations are done.  Now, all we need to&lt;br /&gt;
	# do is to determine which residues are over the cutoff&lt;br /&gt;
	# and save them.&lt;br /&gt;
	stored.r, rVal, seen = [], [], []&lt;br /&gt;
	cmd.iterate('%s or %s' % (chA, chB), 'stored.r.append((model,resi,b))')&lt;br /&gt;
&lt;br /&gt;
	cmd.enable(cmpx)&lt;br /&gt;
	cmd.select(selName1, None)&lt;br /&gt;
	for (model,resi,diff) in stored.r:&lt;br /&gt;
		key=resi+&amp;quot;-&amp;quot;+model&lt;br /&gt;
		if abs(diff)&amp;gt;=float(cutoff):&lt;br /&gt;
			if key in seen: continue&lt;br /&gt;
			else: seen.append(key)&lt;br /&gt;
			rVal.append( (model,resi,diff) )&lt;br /&gt;
			# expand the selection here; I chose to iterate over stored.r instead of&lt;br /&gt;
			# creating one large selection b/c if there are too many residues PyMOL&lt;br /&gt;
			# might crash on a very large selection.  This is pretty much guaranteed&lt;br /&gt;
			# not to kill PyMOL; but, it might take a little longer to run.&lt;br /&gt;
			cmd.select( selName1, selName1 + &amp;quot; or (%s and i. %s)&amp;quot; % (model,resi))&lt;br /&gt;
&lt;br /&gt;
	# this is how you transfer a selection to another object.&lt;br /&gt;
	cmd.select(selName, cmpx + &amp;quot; in &amp;quot; + selName1)&lt;br /&gt;
	# clean up after ourselves&lt;br /&gt;
	cmd.delete(selName1)&lt;br /&gt;
	cmd.delete(chA)&lt;br /&gt;
	cmd.delete(chB)&lt;br /&gt;
	cmd.delete(tempC)&lt;br /&gt;
	# show the selection&lt;br /&gt;
	cmd.enable(selName)&lt;br /&gt;
	&lt;br /&gt;
	# reset users settings&lt;br /&gt;
	cmd.set(&amp;quot;dot_solvent&amp;quot;, oldDS)&lt;br /&gt;
	&lt;br /&gt;
	return rVal&lt;br /&gt;
&lt;br /&gt;
cmd.extend(&amp;quot;interfaceResidues&amp;quot;, interfaceResidues)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
</feed>