<?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=CalcArea</id>
	<title>CalcArea - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=CalcArea"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CalcArea&amp;action=history"/>
	<updated>2026-06-18T12:24:42Z</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=CalcArea&amp;diff=4364&amp;oldid=prev</id>
		<title>Pyadmin: 2 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CalcArea&amp;diff=4364&amp;oldid=prev"/>
		<updated>2014-03-28T01:31:17Z</updated>

		<summary type="html">&lt;p&gt;2 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:31, 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=CalcArea&amp;diff=4363&amp;oldid=prev</id>
		<title>Speleo3 at 07:31, 9 June 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CalcArea&amp;diff=4363&amp;oldid=prev"/>
		<updated>2011-06-09T07:31:57Z</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;=Overview=&lt;br /&gt;
This code will calculate the area of a given selection.  If you have a bunch of disparate selections, or one selection made up of various objects then you can use this to find the area.&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;
def calcArea(sel, ASA=0, density=3, quiet=1):&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
    Calculate the area of an object or selection (as if it were one complete object).&lt;br /&gt;
&lt;br /&gt;
ARGUMENTS&lt;br /&gt;
&lt;br /&gt;
    sel = string: atom selection&lt;br /&gt;
&lt;br /&gt;
    ASA = 0/1: solvent excluded or solvent accessible surface area&lt;br /&gt;
&lt;br /&gt;
    density = int: sampling quality {default: 3}&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	tName = &amp;quot;__temp__for__doArea__&amp;quot;&lt;br /&gt;
	cmd.create(tName, sel)&lt;br /&gt;
	cmd.flag(&amp;quot;ignore&amp;quot;, tName, &amp;quot;clear&amp;quot;)&lt;br /&gt;
	cmd.set(&amp;quot;dot_solvent&amp;quot;, int(ASA), tName)&lt;br /&gt;
	cmd.set(&amp;quot;dot_density&amp;quot;, int(density), tName)&lt;br /&gt;
	theArea = cmd.get_area(tName)&lt;br /&gt;
	cmd.delete(tName)&lt;br /&gt;
	if not int(quiet):&lt;br /&gt;
		print 'Area (solvent %s): %.3f Angstroms^2' % (['excluded',&lt;br /&gt;
			'accessible'][int(ASA)], theArea)&lt;br /&gt;
	return theArea&lt;br /&gt;
&lt;br /&gt;
cmd.extend('calcArea', calcArea)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* [[Get_Area]]&lt;br /&gt;
* [[Set]]&lt;br /&gt;
* [[Flag]]&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[Delete]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
</feed>