import __init__
class MSMS(MOLSRF) def __init__(self, coords=None, radii=None, atnames=None, filename=None, name='msms', maxnat=0) string __module__ = '__init__' def buriedSurfaceArea(self, component=None, mode=msmsc.MS_SEMI_ANALYTICAL) def buriedVertices(self, coords, component=None) def compute(self, probe_radius=1.5, density=1.0) def compute_numeric_area_vol(self, component=None, mode=msmsc.MS_SEMI_ANALYTICAL) def compute_rs(self, probe_radius=1.5, allComponents=0, atoms=None) def compute_ses(self, component=None) def compute_ses_area(self) def detailed_info(self) def getBuriedSurfaceTriangles(self, cut=1) def getColorByType(self, component=None) def getTriangles(self, atomIndices=None, base=0, component=0) def info(self) def initUpdateSurface(self, cut=15.0, cleanup_ses=0) def resetBuriedVertexArea(self, component=None) def resetBuriedVertexFlags(self, component=None) def triangulate(self, density=1.0, component=None) def triangulate_one_component(self, rs, density=1.0) def update(self, mode=msms.FULL, density=None, nup=0) def updateCoordsFromFile(self, filename, max=-1) def updateSpheres(self, coords, indices) def updateSurface(self, mode=msms.FULL, density=1.0, update=0) def updateSurfaceArea(self) def write_ses_area(self, filename, component=None) def write_triangulation(self, filename, no_header=1, component=None, format=msms.MS_TSES_ASCII ) # Methods inherited by MSMS from MOLSRFPtr def __del__(self,msmsc=msmsc) def __getattr__(self,name) def __repr__(self) def __setattr__(self,name,value) def findBuriedVertices(self, *_args, **_kwargs) def get_atm(self, *_args, **_kwargs)
Such an object can be built by passing wither a filename, an array of Nx4 coordinates or an array of Nx3 centers and an array of N radii. The class provide methods to compute: one or several reduced surface components (RS), the corresponding analytical models of the solvent excluded surface (SES) and triangulations of these models. In addition, methods to compute analytical and numerical surface areas for the SES and SAS are available. This object also provides methods to compute numerically patches of a SES component buried by a second set of spheres. Finally, methods allowing to assign new coordinates toa subset of atoms and re-compute the surface partially are available.
MSMS <- MSMS(coords=None, radii=None, atnames=None, filename=None,
name=msms
, maxnat=0)
This class can be instantiated int a number of ways:
additional parameters are: name: string to name that surface atnames: array of N atom names maxnat: maximum number of atoms in the molecule. This number needs to be larger than largest number of atoms that surface will ever have.
buriedSurfaceArea(component=None,mode=msmsc.MS_SEMI_ANALYTICAL)
Compute the surface area corresponding to the buried vertices. If component is None, this operation is performed on all components. Components are specified using 0-based integers, 0 being the external one mode can be one of the following:
buriedVertices(coords, component=None)
tags all vertices of an SES trianuglated component that are buried by a set of spheres. coords has to be an Mx4 array of floats describing the centers and radii of the set of spheres used to check if the surface is burried. If component is None, this operation is performed on all components. Components are specified using 0-based integers, 0 being the external one
err <- self.compute(probe_radius=1.5, density=1.0)
Compute the external component of the reduced surface with the specified probe_radius, then compute the solvent exclude surface and triangulate it with the specified density. Return MS_OK upon successfull completion or MS_ERR when it fails. In the latter case an error message is available in MS_ERR_MSG
compute_numeric_area_vol(component=None,mode=msmsc.MS_SEMI_ANALYTICAL)
compute the surface area using the triangulated surface. If component is None, all components are calculated. Components are specified using 0-based integers, 0 being the external component. mode can be one of the following:
self.compute_rs(probe_radius=1.5, allComponents=0, atoms=None)
Compute the external component of the reduced surface. probe_radius: should be larger than 0.1. allComponents: can be either 0 or 1. When it is 1 all surface components are looked for and the complexity becomes N^2 atoms: list of 3 0-based atom indices used to seed the RS calculation. This is useful to compute a specific component
self.compute_ses(component=None)
Compute the analytical SES for the specified component correponding to a user specified component of the reduced surface. if component is None, all components are calculated. Components are specified using 0-based integers, 0 being the external component
err <- compute_ses_area()
Compute the surface area of all faces of the analytical SES model. after that computation, each SESF has its a_ses_area member set and the SES has the members a_reent_area, a_toric_area, a_contact_area and a_ses_area and a_sas_area set.
string <- detailed_info(()
return a string describing this molecular surface
vfloat, vint, tri = getBuriedSurfaceTriangles(cut=1)
Return the triangles of the external SES component for which at least cut
vertices are buried. Obviously 0 < cut < 4.
vfloat and vint hold the data for all vertices of the surface. tri contains the subset of the triangles that are buried.
colors <- getColorByType(component=None)
Compute the surface area corresponding to the buried vertices. If component is None, this operation is performed on all components. Components are specified using 0-based integers, 0 being the external one it returns a list of (r,g,b) tuples for each component
vfloat, vint, tri <- getTriangles(atomIndices=None, base=0, component=0) Return numeric arrays for vertices floating point (vfloat) and integer (vint) data and triangles data (tri). For each vertex vfloat provides (x,y,z,nx,ny,nz,sesA,sasA) for each vertex vint provides (type, closestAtomindex, buried), where type can be -1 for SESV, -2 for SESE and the SESF number for vertices inside faces; closestAtomindex is the 1 based index of the atom closest to that vertex and buried is 0 or 1 if this vertex is buried. For each triangles tri provides (i, j, k, type, SESF_num), where type can be 1:contact, 2:reentrant, 3:toroidal, 4:full torus and 5:full torus with radial singlarity. The triple (i,j,k) describing the triangle's connectivity can be 0-based or 1-based according to the value of base (0 or 1). Components are specified using 0-based integers, 0 being the external component
string <- info(()
return a string describing this molecular surface
initUpdateSurface(cut=15.0, cleanup_ses=0)
Call the initialize the data structure before the first partial recomputation can be performed. cut: is used as a radius to select probes in fixed positions close to the moving atoms cleanup_ses: this flag has to be set to 1 in order for the genus of the updated SES to make sense.
resetBuriedVertexArea(component=None)
Reset the surface area assigned to each vertex in a triangulated SES component. If component is None, this operation is performed on all components. Components are specified using 0-based integers, 0 being the external one
resetBuriedVertexFlags(component=None)
Reset the buried flag on all SES triangulation vertices. If component is None, this operation is performed on all components. Components are specified using 0-based integers, 0 being the external one
triangulate(self, density=1.0, component=None)
Triangulate analytical SES models using a user specified density. If component is None, all components are calculated. Components are specified using 0-based integers, 0 being the external component
Triangulate a given solvent excluded component, with the specified density
updateCoordsFromFile(filename, max=-1)
Read a set of new coordinates from a file and assign them to the atoms. max can be -1 for all atoms specified in the file to be used of any integer smaller than the number of atoms in the file.
err <- updateSpheres(coords, indices)
Not tested coords: Nx4 array of floats indiced: indices of moving atoms
err <- updateSurface(mode=mslib.FULL, density=1.0, update=0)
Recompute the surface after a subset of atoms assume new coordinates. mode can be one of the following: FULL : the surface is rebuilt completely TORIC : only toric faces are triangulated ALL_WITH_DENSITY : all rebuilt faces are triangulated with the given density define NO_TRIANGULATION : no triangulation at all density: density of the reconstructed surface patches update: update number
updateSurfaceArea()
Update the surface areas after the surface's geometry has been re-computed.
write_ses_area(filename, component=None)
Write the surface areas to an output files. Results are written by atom. If component is None, each component is wrtten to a file. Components are specified using 0-based integers, 0 being the external component.
write_triangulation(filename, no_header=1, component=None, format=msms.MS_TSES_ASCII)
Write the solvent excluded surface to a file. no_header allows to add/remove the header lines to these files If component is None, all components are calculated. Components are specified using 0-based integers, 0 being the external component format can be one of the following: MS_TSES_ASCII : Triangulated surface in ASCII format MS_ASES_ASCII : Analytical surface in ASCII format. This is actually a discrete representation of the analytical model. MS_TSES_ASCII_AVS : Triangulated surface in ASCII with AVS header MS_ASES_ASCII_AVS : Analytical surface in ASCII format with AVS header
Copyright © M. Sanner
All Rights Reserved
Comments to author: sanner@scripps.edu
Generated: Fri Sep 1 2000