Package schrodinger :: Package application :: Package bioluminate :: Package patch_utils :: Module patch_finder :: Class Patch
[hide private]
[frames] | no frames]

Class Patch

object --+
         |
        Patch

Data about a single patch.

Instance Methods [hide private]
 
__init__(self, vertices, patch_type, vertex_coords, all_smoothed, neighboring_triangles, neighboring_vertices, nearest_atom_indices, patch_color)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_calcVertexColors(self, clrscheme, clrvals, vtxValues, alt=False)
calculate the vertex color based on the smoothed vertex value.
float
_calcSize(self, vertices, vertex_coords, neighboring_triangles)
Calculate the surface area of the patch.
int
_calcLabelVertex(self, vertices, vertex_coords, neighboring_vertices)
Calculate the central vertex of the patch, which is the vertex to label in the workspace.
 
_calcSmoothedStats(self, all_smoothed, vertices)
Calculate the minimum, maximum, and average value for patch vertices.
 
__getstate__(self)
 
__eq__(self, other)
list
detailsData(self)
Generate a list describing the details of this patch
str
_resListText(self, res_list)
Generate a string describing the specified list of residues.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  RES_TYPES = OrderedDict([(u'Arginine', u'ARG'), (u'Cysteine', ...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, vertices, patch_type, vertex_coords, all_smoothed, neighboring_triangles, neighboring_vertices, nearest_atom_indices, patch_color)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • vertices (set) - A set of all vertices that belong to this patch
  • patch_type (settings.PatchType) - The type of patch this is
  • vertex_coords (list) - The (x, y, z) coordinates for each surface vertex
  • all_smoothed (list) - The smoothed value for each vertex
  • neighboring_triangles (list) - A list of neighboring triangles for each vertex, where each triangle is represented as a frozenset of three vertex indices.
  • neighboring_vertices (list) - A list of neighboring vertices for each vertex. Neighbors are given as a set.
  • nearest_atom_indices (list) - A list of the nearest atom index for each vertex.
Overrides: object.__init__

_calcVertexColors(self, clrscheme, clrvals, vtxValues, alt=False)

 

calculate the vertex color based on the smoothed vertex value.
Input:
    @clrscheme: tuple/list of color references
    @clrvals:   tuple/list of color reference values
    @vtxValues: tuple/list of smoothed vertex values
    option: (this is future stuff - alternate value set may be stored)
        alt: flag, if alternate smoothing set should be used

Output: list of RGB colors for each in put vertex values based on the
        reference color scheme

_calcSize(self, vertices, vertex_coords, neighboring_triangles)

 

Calculate the surface area of the patch.

Parameters:
  • vertices (set) - A set of all vertices that belong to this patch
  • vertex_coords (list) - The (x, y, z) coordinates for each surface vertex
  • neighboring_triangles () - A list of neighboring triangles for each vertex, where each triangle is represented as a frozenset of three vertex indices.
Returns: float
The surface area of the patch

_calcLabelVertex(self, vertices, vertex_coords, neighboring_vertices)

 

Calculate the central vertex of the patch, which is the vertex to label in the workspace. Rather than using graph eccentricity, we define the central vertex as the vertex with the minimum Euclidean distance to the farthest patch edge vertex.

Parameters:
  • vertices (set) - A set of all vertices that belong to this patch
  • vertex_coords (list) - The (x, y, z) coordinates for each surface vertex
  • neighboring_vertices (list) - A list of neighboring vertices for each vertex. Neighbors are given as a set.
Returns: int
The central vertex index

_calcSmoothedStats(self, all_smoothed, vertices)

 

Calculate the minimum, maximum, and average value for patch vertices. The results will be stored as self.min, self.max, and self.average.

Parameters:
  • all_smoothed (list) - The smoothed value for each vertex
  • vertices (set) - A set of all vertices that belong to this patch

detailsData(self)

 

Generate a list describing the details of this patch

Returns: list
A list of details for the patch, where each detail is a list of [group, category, patch details for that category]

_resListText(self, res_list)

 

Generate a string describing the specified list of residues. The percentage of side chain accessibility will be listed for each residue. "None" will be returned if there are no residues.

Parameters:
  • res_list (list) - A list of ResData objects to describe
Returns: str
A string describing the of residues.

Class Variable Details [hide private]

RES_TYPES

Value:
OrderedDict([(u'Arginine', u'ARG'), (u'Cysteine', u'CYS'), (u'Tryptoph\
an', u'TRP'), (u'Tyrosine', u'TYR')])