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

Class PDBWriter

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       PDBWriter
Known Subclasses:
PDBQSWriter, PDBQTWriter, PDBQWriter, PQRWriter


    Command to write the given molecule or the given subset of atoms
    of one molecule as PDB file.
    
Package : Pmv
    
Module  : fileCommands
    
Class   : PDBWriter 
    
Command : writePDB
    
Synopsis:

        None <- writePDB( nodes, filename=None, sort=True,
                          pdbRec=['ATOM', 'HETATM', 'CONECT'],
                          bondOrigin='all', ssOrigin=None, **kw)
    
Required Arguments:
    
        nodes --- TreeNodeSet holding the current selection
    
Optional Arguments:

        filename --- name of the PDB file (default=None). If None is given
                  The name of the molecule plus the .pdb extension will be used

        sort --- Boolean flag to either sort or not the nodes before writing
                  the PDB file (default=True)

        pdbRec --- List of the PDB Record to save in the PDB file.
                  (default: ['ATOM', 'HETATM', 'CONECT']

        bondOrigin --- string or list specifying the origin of the bonds to save
                    as CONECT records in the PDB file. Can be 'all' or a tuple


        ssOrigin --- Flag to specify the origin of the secondary structure
                    information to be saved in the HELIX, SHEET and TURN
                    record. Can either be None, File or Stride.

    



Instance Methods [hide private]
  __init__(self, func=None)
  doit(self, nodes, filename=None, sort=True, transformed=False, pdbRec=['ATOM','HETATM','CONECT'], bondOrigin='all', ssOrigin=None)
virtual method.
  setNewCoords(self, mol)
set the current conformation to be 1
  __call__(self, nodes, filename=None, sort=True, transformed=False, pdbRec=['ATOM','HETATM','CONECT'], bondOrigin='all', ssOrigin=None, **kw)
None <- writePDB( nodes, filename=None, sort=True, pdbRec=['ATOM', 'HETATM', 'CONECT'], bondOrigin='all', ssOrigin=None, **kw) Required Argument: nodes --- TreeNodeSet holding the current selection Optional Arguments: filename --- name of the PDB file (default=None).
  dismiss_cb(self)
  showPDBHelp(self)
  add_cb(self)
  remove_cb(self)
  setEntry_cb(self, filename)
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  guiCallback(self)

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, onAddCmdToViewer, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, setupUndoBefore, showForm, tkCb, updateGeom, warningMsg


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self, func=None)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

doit(self, nodes, filename=None, sort=True, transformed=False, pdbRec=['ATOM','HETATM','CONECT'], bondOrigin='all', ssOrigin=None)

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

setNewCoords(self, mol)

source code 
set the current conformation to be 1

__call__(self, nodes, filename=None, sort=True, transformed=False, pdbRec=['ATOM','HETATM','CONECT'], bondOrigin='all', ssOrigin=None, **kw)
(Call operator)

source code 
None <- writePDB( nodes, filename=None, sort=True,
                          pdbRec=['ATOM', 'HETATM', 'CONECT'],
                          bondOrigin='all', ssOrigin=None, **kw)
        
Required Argument:

        nodes --- TreeNodeSet holding the current selection
        
Optional Arguments:

        filename --- name of the PDB file (default=None). If None is given
                  The name of the molecule plus the .pdb extension will be used

        sort --- Boolean flag to either sort or not the nodes before writing
                  the PDB file (default=True)

        pdbRec --- List of the PDB Record to save in the PDB file.
                  (default: ['ATOM', 'HETATM', 'CONECT']

        bondOrigin --- string or list specifying the origin of the bonds to save
                    as CONECT records in the PDB file. Can be 'all' or a tuple


        ssOrigin --- Flag to specify the origin of the secondary structure
                    information to be saved in the HELIX, SHEET and TURN
                    record. Can either be None, File or Stride.

        

Overrides: ViewerFramework.VFCommand.Command.__call__

dismiss_cb(self)

source code 
None

showPDBHelp(self)

source code 
None

add_cb(self)

source code 
None

remove_cb(self)

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 
None
Overrides: mvCommand.MVCommand.guiCallback