<?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=Contact_Surface</id>
	<title>Contact Surface - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Contact_Surface"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Contact_Surface&amp;action=history"/>
	<updated>2026-05-09T04:44: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=Contact_Surface&amp;diff=5230&amp;oldid=prev</id>
		<title>Pyadmin: 4 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5230&amp;oldid=prev"/>
		<updated>2014-03-28T01:43:28Z</updated>

		<summary type="html">&lt;p&gt;4 revisions&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:43, 28 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5229&amp;oldid=prev</id>
		<title>MartinChristen: /* The Code */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5229&amp;oldid=prev"/>
		<updated>2013-02-15T15:11:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The Code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:11, 15 February 2013&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-l121&quot; &gt;Line 121:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&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;The contact areas between &amp;quot;+receptor+&amp;quot; and &amp;quot;+ligand+&amp;quot; [states 1 - &amp;quot;+str(states)+&amp;quot;] are (A^2):&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;		print &amp;quot;The contact areas between &amp;quot;+receptor+&amp;quot; and &amp;quot;+ligand+&amp;quot; [states 1 - &amp;quot;+str(states)+&amp;quot;] are (A^2):&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;		#start looping&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;		#start looping&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;		#for s in range(1,cmd.count_states(ligand)+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;div&gt;		for s in range(1,states+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;		for s in range(1,states+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;			#create complex&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 complex&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MartinChristen</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5228&amp;oldid=prev</id>
		<title>MartinChristen at 15:11, 15 February 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5228&amp;oldid=prev"/>
		<updated>2013-02-15T15:11:12Z</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 15:11, 15 February 2013&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-l14&quot; &gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&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;:: Note that this may be another protein!&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;:: Note that this may be another protein!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'''receptor''' ''(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;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;:: The name of the selection/object representing the receptor protein&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;	&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;'''states''' ''(integer)'', default: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;'''states''' ''(integer)'', default: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;:: Calculate contact surface between the receptor and the first n states of the ligand.&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;:: Calculate contact surface between the receptor and the first n states of the ligand.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MartinChristen</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5227&amp;oldid=prev</id>
		<title>MartinChristen at 15:10, 15 February 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5227&amp;oldid=prev"/>
		<updated>2013-02-15T15:10:45Z</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 15:10, 15 February 2013&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-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;= Overview =&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;= Overview =&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;This script calculates individual or global contact areas between a receptor molecule and a (multimodel) bundle of docked ligand structures.&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;This script calculates individual or global contact areas between a receptor molecule and a (multimodel) bundle of docked ligand structures.&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;The exact contact surface area values (in Angstrom^2) are printed to the screen and also appended to a file called contactareas.txt&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;The exact contact surface area values (in Angstrom^2) are printed to the screen and also appended to a file called contactareas.txt&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 only a single global contact surface is calculated, a selection named &amp;quot;contact&amp;quot; is created that includes all receptor atoms within 3.9A of any ligand atom to illustrate the ''approximate'' contact surface.&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 only a single global contact surface is calculated, a selection named &amp;quot;contact&amp;quot; is created that includes all receptor atoms within 3.9A of any ligand atom to illustrate the ''approximate'' contact surface.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MartinChristen</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5226&amp;oldid=prev</id>
		<title>MartinChristen: Script to calculate and display the contact surface area between a receptor and one or more ligand molecules. ~~~~</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Contact_Surface&amp;diff=5226&amp;oldid=prev"/>
		<updated>2013-02-15T15:10:05Z</updated>

		<summary type="html">&lt;p&gt;Script to calculate and display the contact surface area between a receptor and one or more ligand molecules. ~~~~&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Overview =&lt;br /&gt;
This script calculates individual or global contact areas between a receptor molecule and a (multimodel) bundle of docked ligand structures.&lt;br /&gt;
The exact contact surface area values (in Angstrom^2) are printed to the screen and also appended to a file called contactareas.txt&lt;br /&gt;
If only a single global contact surface is calculated, a selection named &amp;quot;contact&amp;quot; is created that includes all receptor atoms within 3.9A of any ligand atom to illustrate the ''approximate'' contact surface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The parameters are:&lt;br /&gt;
&lt;br /&gt;
'''receptor''' ''(string)''&lt;br /&gt;
:: The name of the selection/object representing the receptor protein&lt;br /&gt;
&lt;br /&gt;
'''ligand''' ''(string)''&lt;br /&gt;
:: The name of the selection/object representing the ligand&lt;br /&gt;
:: Note that this may be another protein!&lt;br /&gt;
&lt;br /&gt;
'''receptor''' ''(string)''&lt;br /&gt;
:: The name of the selection/object representing the receptor protein&lt;br /&gt;
	&lt;br /&gt;
'''states''' ''(integer)'', default:0&lt;br /&gt;
:: Calculate contact surface between the receptor and the first n states of the ligand.&lt;br /&gt;
:: If states = 0, the script calculates a global contact surface which takes  all possible ligand states into account.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
contact_surface receptor, ligand, [states=0]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&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;
#contact_surface v.3.0&lt;br /&gt;
#Copyleft Martin Christen, 2013&lt;br /&gt;
&lt;br /&gt;
from pymol import cmd,stored&lt;br /&gt;
def contact_surface(receptor,ligand,states=0):&lt;br /&gt;
&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	AUTHOR&lt;br /&gt;
	Martin Christen&lt;br /&gt;
	&lt;br /&gt;
	DESCRIPTION&lt;br /&gt;
	This script calculates individual or global contact surfaces between a&lt;br /&gt;
	receptor molecule and a bundle of docked ligand structures (which have&lt;br /&gt;
	to be loaded into PyMOL as a multimodel object).&lt;br /&gt;
	&lt;br /&gt;
	The exact contact surface area values (in Angstrom^2) are printed to&lt;br /&gt;
	the screen and also appended to a file called contactareas.txt&lt;br /&gt;
	&lt;br /&gt;
	If only a single global contact surface is calculated, a selection&lt;br /&gt;
	named &amp;quot;contact&amp;quot; is created that includes all receptor atoms within&lt;br /&gt;
	3.9A of any ligand atom.&lt;br /&gt;
	&lt;br /&gt;
	USAGE&lt;br /&gt;
	contact_surface receptor, ligand, [states=0]&lt;br /&gt;
	&lt;br /&gt;
	PARAMETERS&lt;br /&gt;
	&lt;br /&gt;
	receptor (string)&lt;br /&gt;
	The name of the selection/object representing the receptor protein&lt;br /&gt;
	&lt;br /&gt;
	ligand (string)&lt;br /&gt;
	The name of the selection/object representing the ligand.&lt;br /&gt;
	Note that this may be another protein!&lt;br /&gt;
	&lt;br /&gt;
	states (integer)&lt;br /&gt;
	Calculate contact surface between the receptor and the first n states&lt;br /&gt;
	of the ligand. If states = 0 (default), the script calculates a global&lt;br /&gt;
	contact surface which takes  all possible ligand states into account.&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	# sanity check the number of states&lt;br /&gt;
	states = abs(int(states))&lt;br /&gt;
	&lt;br /&gt;
	# make sure all atoms within an object occlude one another&lt;br /&gt;
	cmd.flag('ignore','none')&lt;br /&gt;
	&lt;br /&gt;
	# use solvent-accessible surface with high sampling density&lt;br /&gt;
	cmd.set('dot_solvent','1')&lt;br /&gt;
	cmd.set('dot_density','3')&lt;br /&gt;
	&lt;br /&gt;
	#if the 'states' parameter = 0 create a superposition of all ligand states&lt;br /&gt;
	if states == 0:&lt;br /&gt;
		cmd.split_states(ligand)&lt;br /&gt;
		cmd.group('ligandtemp',ligand+&amp;quot;_*&amp;quot;)&lt;br /&gt;
		cmd.create(ligand+&amp;quot;_all&amp;quot;,'ligandtemp')&lt;br /&gt;
		cmd.delete('ligandtemp')&lt;br /&gt;
		&lt;br /&gt;
		#create complex&lt;br /&gt;
		cmd.create('complextemp',ligand+&amp;quot;_all &amp;quot;+receptor)&lt;br /&gt;
	&lt;br /&gt;
		#measure area&lt;br /&gt;
		ligand_area=cmd.get_area(ligand+&amp;quot;_all&amp;quot;)&lt;br /&gt;
		receptor_area=cmd.get_area(receptor)&lt;br /&gt;
		complex_area=cmd.get_area('complextemp')&lt;br /&gt;
		#normalize since the area is counted TWICE (once on receptor and once on ligand)&lt;br /&gt;
		contact_area=((ligand_area + receptor_area) - complex_area) / 2&lt;br /&gt;
		#delete complex&lt;br /&gt;
		cmd.delete('complextemp')&lt;br /&gt;
		&lt;br /&gt;
		#create the contact surface&lt;br /&gt;
		cmd.select('contact',&amp;quot;(&amp;quot;+receptor+&amp;quot; and (&amp;quot;+ligand+&amp;quot;_all around 3.9))&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
		#print contact surface area&lt;br /&gt;
		f=open('contactareas.txt','a')&lt;br /&gt;
		print &amp;quot;%s - %s : &amp;quot; % (receptor,ligand),&lt;br /&gt;
		print &amp;gt;&amp;gt;f, &amp;quot;%-s\t%-s\t&amp;quot; % (receptor,ligand),&lt;br /&gt;
		print &amp;gt;&amp;gt;f, &amp;quot;%-s&amp;quot; % (contact_area)&lt;br /&gt;
		print contact_area&lt;br /&gt;
		f.close()&lt;br /&gt;
		print &amp;quot;The GLOBAL contact area between &amp;quot;+receptor+ &amp;quot; and &amp;quot;+ligand+&amp;quot; is (A^2):&amp;quot;&lt;br /&gt;
		print ((ligand_area + receptor_area) - complex_area) / 2&lt;br /&gt;
	&lt;br /&gt;
	#If 'states' &amp;lt;&amp;gt; 0 calculate the contact areas to the first 'states' ligand states.&lt;br /&gt;
	#No individual contact surface objects are created to avoid overloading PyMOL.&lt;br /&gt;
	else:&lt;br /&gt;
		#create an object for each ligand state&lt;br /&gt;
		cmd.split_states(ligand)&lt;br /&gt;
		&lt;br /&gt;
		#sanity check: do not exceed that maximum number of states&lt;br /&gt;
		if states &amp;gt; cmd.count_states(ligand):&lt;br /&gt;
			states = cmd.count_states(ligand)&lt;br /&gt;
		&lt;br /&gt;
		#calculate contact surface area&lt;br /&gt;
		print &amp;quot;The contact areas between &amp;quot;+receptor+&amp;quot; and &amp;quot;+ligand+&amp;quot; [states 1 - &amp;quot;+str(states)+&amp;quot;] are (A^2):&amp;quot;&lt;br /&gt;
		#start looping&lt;br /&gt;
		#for s in range(1,cmd.count_states(ligand)+1):&lt;br /&gt;
		for s in range(1,states+1):&lt;br /&gt;
			#create complex&lt;br /&gt;
			cmd.create(&amp;quot;tmp&amp;quot;,ligand,s,1)&lt;br /&gt;
			cmd.create('complextemp',&amp;quot;tmp &amp;quot;+receptor)&lt;br /&gt;
			#measure areas&lt;br /&gt;
			ligand_area=cmd.get_area('tmp')&lt;br /&gt;
			receptor_area=cmd.get_area(receptor)&lt;br /&gt;
			complex_area=cmd.get_area('complextemp')&lt;br /&gt;
			#normalize since the area is counted TWICE (once on receptor and once on ligand)&lt;br /&gt;
			contact_area=((ligand_area + receptor_area) - complex_area)/2&lt;br /&gt;
			#delete temporary files&lt;br /&gt;
			cmd.delete('tmp')&lt;br /&gt;
			cmd.delete(ligand+&amp;quot;_*&amp;quot;)&lt;br /&gt;
			cmd.delete('complextemp')&lt;br /&gt;
			#print contact surface area&lt;br /&gt;
			f=open('contactareas.txt','a')&lt;br /&gt;
			print &amp;quot;%s - %s_%-5s: &amp;quot; % (receptor,ligand,s),&lt;br /&gt;
			print &amp;gt;&amp;gt;f, &amp;quot;%-s\t%-s_%-5s\t&amp;quot; % (receptor,ligand,s),&lt;br /&gt;
			print &amp;gt;&amp;gt;f, &amp;quot;%-s&amp;quot; % (contact_area)&lt;br /&gt;
			print contact_area&lt;br /&gt;
			f.close()&lt;br /&gt;
&lt;br /&gt;
cmd.extend(&amp;quot;contact_surface&amp;quot;,contact_surface)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>MartinChristen</name></author>
	</entry>
</feed>