This is a read-only mirror of pymolwiki.org

Difference between revisions of "Get Area"

From PyMOL Wiki
Jump to navigation Jump to search
m
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''get_area''' calculates the surface area in square Angstroms of the selection given.
+
'''get_area''' calculates the surface area in square Angstroms of the selection given. Note that the accessibility is assessed in the context of the object(s) that the selection is part of. So, to get the surface areas of e.g. a component of a complex, you should make a new object containing a copy of just that component and calculate its area.
  
 
===USAGE===
 
===USAGE===
 
<source lang="python">
 
<source lang="python">
get_area sele [,state ]
+
get_area sele [,state[, load_b ]]
 
</source>
 
</source>
  
 
===PYMOL API===
 
===PYMOL API===
 
<source lang="python">
 
<source lang="python">
cmd.get_area(string selection="(all)", state=0 )
+
cmd.get_area(string selection="(all)", load_b=0, state=0 )
 
</source>
 
</source>
  
 
= Example =
 
= Example =
'''Ref: Warren Dalano, PyMol Users List'''.
 
 
 
<source lang="python">
 
<source lang="python">
 
# load components separately
 
# load components separately
Line 44: Line 42:
 
print complex_area
 
print complex_area
 
print (ligand_area + target_area) - complex_area
 
print (ligand_area + target_area) - complex_area
 +
</source>
 +
 +
<source lang="python">
 +
# example usage of load_b
 +
# select some organic small molecule
 +
select ligand, br. first organic
 +
# get its area and load it into it's b-factor column
 +
get_area ligand, load_b=1
 +
# print out the b-factor/areas per atom
 +
iterate ligand, print b
 
</source>
 
</source>
  
 
== See Also ==
 
== See Also ==
[[Surface]], most notably [[Surface#Calculating_a_partial_surface]].
+
* For an example of '''load_b''' in use check out [[FindSurfaceResidues]].
 +
* [[Surface]], most notably [[Surface#Calculating_a_partial_surface]].
  
 
[[Category:Commands|Get Area]]
 
[[Category:Commands|Get Area]]
 
[[Category:Biochemical_Properties|Get Area]]
 
[[Category:Biochemical_Properties|Get Area]]

Revision as of 15:08, 3 February 2011

get_area calculates the surface area in square Angstroms of the selection given. Note that the accessibility is assessed in the context of the object(s) that the selection is part of. So, to get the surface areas of e.g. a component of a complex, you should make a new object containing a copy of just that component and calculate its area.

USAGE

get_area sele [,state[, load_b ]]

PYMOL API

cmd.get_area(string selection="(all)", load_b=0, state=0 )

Example

# load components separately
load my_ligand.pdb
load my_target.pdb

# get hydrogens onto everything (NOTE: must have valid valences on the ligand...)
h_add

# make sure all atoms within an object occlude one another
flag ignore, none

# use solvent-accessible surface with high sampling density
set dot_solvent, 1
set dot_density, 3

# measure the components individually
ligand_area=cmd.get_area("my_ligand")
target_area=cmd.get_area("my_target")

# create the complex
create my_complex, my_ligand my_target

# measure the complex
complex_area=cmd.get_area("my_complex")

# now print results
print ligand_area
print target_area
print complex_area
print (ligand_area + target_area) - complex_area
# example usage of load_b
# select some organic small molecule
select ligand, br. first organic
# get its area and load it into it's b-factor column
get_area ligand, load_b=1
# print out the b-factor/areas per atom
iterate ligand, print b

See Also