Package Pmv :: Module msmsCommands :: Class SaveMSMS
[hide private]
[frames] | no frames]

Class SaveMSMS

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       SaveMSMS

The SaveMSMS commands allows the user to save a chosen MSMS surface (tri-angulated solvant excluded surface) resulting from a calculation.

    Package : Pmv

    Module  : msmsCommands

    Class   : SaveMSMS

    Command name : saveMSMS

    
Description:

    Two files will be created, one for
    vertices     (.vert) and one for faces (.face). 
    If the component number is 0, files called filename.vert and filename.face
    are created.
    For other components, the component number is inserted in the file name,
    for example for the component number 3 the files are called
    filename_3.vert and filename_3.face.

    The face file contains three header lines followed by one triangle per
    line. The first header line provides a comment and the filename of the
    sphere set.
    The second header line holds comments about the content of the third line.
    The third header line provides the number of triangles, the number of
    spheres in the set, the triangulation density and the probe sphere radius.
    The first three numbers are (1 based) vertex indices. The next field
    can be: 1 for a triangle in a toric reentrant face, 2 for a triangle in
    a spheric reentrant face and 3 for a triangle in a contact face.
    The last number on the line is the (1 based) face number in the
    analytical description of the solvent excluded surface. These values
    are written in the following format ''%6d %6d %6d %2d %6d''.

    The vertex file contains three header lines (similar to the header
    in the .face file) followed by one vertex per line and provides the
    coordinates (x,y,z) and the normals (nx,ny,nz) followed by the number of
    the face (in the analytical description of the solvent excluded surface)
    to which the vertex belongs.
    The vertices of the analytical surface have a value 0 in that field and
    the vertices lying on edges of this surface have nega tive values.
    The next field holds the (1 based) index of the closest sphere.
    The next field is 1 for vertices which belong to toric reentrant faces
    (including vertices of the analytical surface), 2 for vertices inside
    reentrant faces and 3 for vertices inside contact faces.
    Finally, if atom names were present in the input file, the name of the
    closest atom is written for each vertex. These values are written in
    the following format
    ''%9.3f %9.3f %9.3f %9.3f %9.3f %9.3f %7d %7d %2d %s''.


    
Synopsis:

    None <- saveMSMS(filename, mol, surfacename, withHeader=1, component=0,
                     format='MS_TSES_ASCII', **kw)

    filename : name of the output file

    mol      : molecule associated with the surface

    surfacename : name of the surface to save

    withHeader  : flag to either write the headers or not

    component   : specifies which component of the surface to write out

    format      : specifies in which format to save the surface. 
                  It 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


    



Instance Methods [hide private]
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  setDial_cb(self, value)
  setEntry_cb(self, filename)
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  guiCallback(self)
Default callback function called by the gui
  doit(self, filename, molName, surfName, withHeader=True, component=0, format="MS_TSES_ASCII")
virtual method.
  __call__(self, filename, molName, surfName, withHeader=True, component=None, format="MS_TSES_ASCII", **kw)
None <--- mv.saveMSMS(filename, mol, surface, withHeader=True,component=None, format='MS_TSES_ASCII', **kw) Required Arguments: filename --- path to the output file without an extension two files will be created filename.face and a filename.vert mol --- Protein associated to the surface surface --- surface name Optional Arguments: withHeader --- True Boolean flag to specify whether or not to write the headers in the .face and the .vert files component --- msms component to save by default None format --- format in which the surface will be saved.

Inherited from mvCommand.MVCommand: __init__, strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, checkDependencies, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLastUsedValues, getLogArgs, getValNamedArgs, log, logString, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, setupUndoBefore, showForm, tkCb, updateGeom, warningMsg


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

onAddCmdToViewer(self)

source code 
method called when an instance of this command is added to the viewer. This enable viewer-addition time initializations
Overrides: ViewerFramework.VFCommand.Command.onAddCmdToViewer
(inherited documentation)

setDial_cb(self, value)

source code 
None

setEntry_cb(self, filename)

source code 
None

buildFormDescr(self, formName)

source code 
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command. This is where the inputFormDescr is created and the description of the widgets appended. If a command has several inputForm buildFormDescr should build all the inputFormDescr and you do a if / elif check to know which one to create. formName : string name of the form corresponding to this descr.
Overrides: ViewerFramework.VFCommand.Command.buildFormDescr
(inherited documentation)

guiCallback(self)

source code 
Default callback function called by the gui
Overrides: mvCommand.MVCommand.guiCallback

doit(self, filename, molName, surfName, withHeader=True, component=0, format="MS_TSES_ASCII")

source code 
virtual method. Has to be implemented by the sub classes
Overrides: ViewerFramework.VFCommand.Command.doit
(inherited documentation)

__call__(self, filename, molName, surfName, withHeader=True, component=None, format="MS_TSES_ASCII", **kw)
(Call operator)

source code 
None <--- mv.saveMSMS(filename, mol, surface, withHeader=True,component=None, format='MS_TSES_ASCII', **kw)

        
Required Arguments:

        filename --- path to the output file without an extension two files will be created filename.face and a filename.vert
 
        mol      --- Protein associated to the surface

        surface  --- surface name


        
Optional Arguments:

        withHeader --- True Boolean flag to specify whether or not to write the headers in the .face and the .vert files

        component  --- msms component to save by default None

        format     --- format in which the surface will be saved. It can be,
        
        MS_TSES_ASCII: Triangulated surface in ASCII format.

        MS_ASES_ASCII: Analytical surface in ASCII format.This is 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

        
        

Overrides: ViewerFramework.VFCommand.Command.__call__