Biskit :: WhatIf :: WhatIf :: Class WhatIf
[hide private]
[frames] | no frames]

Class WhatIf

source code


WhatIf

Run WhatIf accessibility calculation

Result

A WhatIf log file containing the accessibilities (in square Angstrom) per residue. The ASA is specified for the entire residue as well for the backbone and side chain.

Reference

http://swift.cmbi.kun.nl/whatif/


Note: WhatIf is not free software, therefore the calculations performed by this class can now also be performed by the freeware program SurfaceRacer, see Biskit.SurfaceRacer .

Instance Methods [hide private]
  __init__(self, model, **kw)
  prepare(self)
Overrides Executor method.
  __prepareModel(self, m, f_pdb_out)
Prepare a model that WhatIf likes.
  cleanup(self)
Tidy up the mess you created.
  isFailed(self)
Overrides Executor method
  finish(self)
Overrides Executor method
array __read_residueASA(self)
Read solvent accessibility calculated with WHATIF and return array of ASA-values.
dict of dict __read_relativeASA(self)
Read the relative ASA data.
[1|0] __exposedResidues(self, ASA_values, sidechainCut=0.0, backboneCut=0.0, totalCut=0.0)
Decide what is a surface exposed residue and what is not.
array, array, [1|0] parse_whatif(self)
Takes a PDBModel and returns three lists:
[float] __asaAtomList(self, relativeASA)
convert ASA dict to list of values with len == atom number

Class Variables [hide private]
  whatif_script = """SOUP \nINISOU GETMOL \n%(f_pdb)s \nTEST ACCESS \n...

Method Details [hide private]

__init__(self, model, **kw)
(Constructor)

source code 
Parameters:
  • model () - PDBModel
  • kw (key=value pairs :
     debug    - 0|1, keep all temporary files (default: 0)
     verbose  - 0|1, print progress messages to log (log != STDOUT)
     node     - str, host for calculation (None->local) NOT TESTED
                     (default: None)
     nice     - int, nice level (default: 0)
     log      - Biskit.LogFile, program log (None->STOUT) (default: None)
    
    ) - additional key=value parameters for Executor:

prepare(self)

source code 

Overrides Executor method.

__prepareModel(self, m, f_pdb_out)

source code 

Prepare a model that WhatIf likes.
  • consecutive numbering of residues
  • remove hydrogens (will be deleted anyway)
Parameters:
  • m (PDBModel) - model
  • f_pdb_out (str) - name of pdb file to write

cleanup(self)

source code 

Tidy up the mess you created.

isFailed(self)

source code 

Overrides Executor method

finish(self)

source code 

Overrides Executor method

__read_residueASA(self)

source code 

Read solvent accessibility calculated with WHATIF and return array of ASA-values. First column is the total ASA, second column the ASA of the backbone, the third column is the ASA of the side-chain.
Returns: array
array (3 x len(residues)) with ASA values

__read_relativeASA(self)

source code 

Read the relative ASA data. Return dic indexed by resNumber with atom and relative accessibility (%)
Returns: dict of dict
relative atom ASA dictionary. e.g:
        { 1: { 'N':34.6, 'CA':81.5 .. }, 2 : {.. }.... }

__exposedResidues(self, ASA_values, sidechainCut=0.0, backboneCut=0.0, totalCut=0.0)

source code 

Decide what is a surface exposed residue and what is not. sidechainCut, backboneCut, totalCut - float, cutoff value for what will be considered as a exposed residue. All three values have to pass the test.
Parameters:
  • ASA_values (array) - array with ASA values for side chains, backbone and total calculated in __read_residueASA.
  • sidechainCut (float) - cutoff ASA value for considering the side chain to consider thew residue being exposed (default: 0.0)
  • backboneCut (float) - cutoffvalue for back bone ASA
  • totalCut (float) - cutoff for total ASA
Returns: [1|0]
residue mask, where 0 = burried

parse_whatif(self)

source code 

Takes a PDBModel and returns three lists:
 relativeASA - a list of atom relative accessibilities
               (in %  - compared to the resideu in a
               Gly-XXX-Gly tripeptide, an approximation
               of the unfolded state)

             -> N.array( 1 x N_atoms )

 residueASA  - array 3 x N_residues of float
               acc.surf.area per res: sidechain, backbone, total


 burriedResidues - a burried atom mask
                   note: cutoff values set above

                 ->  [0, 1, 0, 0, 1, 1, 1, 0 ...]
Returns: array, array, [1|0]
relative accessibility, residue ASA and burried atom mask

__asaAtomList(self, relativeASA)

source code 

convert ASA dict to list of values with len == atom number
Parameters:
  • relativeASA (dict) - see __read_relativeASA()
Returns: [float]
relative accessibilities e.g. [ 98.0, 0.0, 12.0, .. ], Numpy array 1 x N(atoms)

Class Variable Details [hide private]

whatif_script

Value:
"""SOUP  \nINISOU

GETMOL  \n%(f_pdb)s  \nTEST

ACCESS  \nINIACC
SETACC  \nALL  \n0   \n     

DOLOG  \n%(f_relativeASA)s  \n0
...