Package Pmv :: Module fileCommands :: Class MoleculeReader
[hide private]
[frames] | no frames]

Class MoleculeReader

source code

ViewerFramework.VFCommand.Command --+        
                                    |        
                  mvCommand.MVCommand --+    
                                        |    
                           MoleculeLoader --+
                                            |
                                           MoleculeReader

Command to read molecule
    
Package : Pmv
    
Module  : fileCommands
    
Class   : MoleculeReader
    
Command :readMolecule
    
Synopsis:

        mols <- readMolecule(filename,parser=None, **kw)
    
Required Arguments:

    filename --- path to a file describing a molecule

    parser  --- you can specify the parser to use to parse the file has to be one of 'PDB', 'PDBQ', 'PDBQS','PDBQT', 'PQR', 'MOL2'.This is useful when your file doesn't have the correct extension.
    



Instance Methods [hide private]
  __init__(self)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  guiCallback(self, event=None, *args, **kw)
  __call__(self, filename, parser=None, **kw)
mols <- readMolecule(filename,parser=None, **kw) filename --- path to a file describing a molecule parser --- you can specify the parser to use to parse the file has to be one of 'PDB', 'PDBQ', 'PDBQS','PDBQT', 'PQR', 'MOL2'.
  doit(self, filename, parser=None, ask=True)
virtual method.

Inherited from MoleculeLoader: onRemoveObjectFromViewer

Inherited from mvCommand.MVCommand: 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]
  lastDir = None

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self)
(Constructor)

source code 
None
Overrides: MoleculeLoader.__init__

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)

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, event=None, *args, **kw)

source code 
None
Overrides: MoleculeLoader.guiCallback

__call__(self, filename, parser=None, **kw)
(Call operator)

source code 
mols <- readMolecule(filename,parser=None, **kw)
           
filename --- path to a file describing a molecule
           
parser --- you can specify the parser to use to parse the file
                     has to be one of 'PDB', 'PDBQ', 'PDBQS','PDBQT', 'PQR', 'MOL2'.
                     This is useful when your file doesn't have the correct
                     extension.
           

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, filename, parser=None, ask=True)

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

Class Variable Details [hide private]

lastDir

None
Value:
None