Package Biskit :: Module IcmCad :: Class IcmCad
[hide private]
[frames] | no frames]

Class IcmCad

source code


CAD calculation

Calculate ContactAreaDifference between a reference structure and one or many other structures. Described in Abagyan and Totrov, 1997.

Example usage

>>> x = IcmCad( ref_model, [ m1, m2 ], verbose=1 )
>>> result = x.run()
IcmCad writes temporary pdb files, calls the icmbrowser program, and parses the result from the STDOUT pipe. The result values are then in x.result (if x is the IcmCad instance). As recommended, the value is multiplied by factor 1.8 which puts it into a range from 0 (identical) to 100 (completely different). This scaling is not recommended for docking solutions.


To Do: Not speed-optimized!

Note: Command configuration in: biskit/external/defaults/exe_icmbrowser.da

Instance Methods [hide private]
  __init__(self, ref_model, models, **kw)
  __prepareModel(self, model, f_out)
Prepare a model that ICM likes.
  prepare(self)
Overrides Executor method.
  cleanup(self)
Tidy up the mess you created.
[str] parse_icm(self, output)
Extract CAD value from icm output.
  isFailed(self)
Overrides Executor method
  finish(self)
Overrides Executor method
[str] generateInp(self)
Has to be overridden to support head / segment / tail structure.

Class Variables [hide private]
  inp_head = """ call _startup read pdb unix cat \"%(f_ref)s\" co...
  inp_tail = "quit\n"
  inp_calc = """ read pdb unix cat \"%(f_pdb)s\" copy a_ \"mol2\"...

Method Details [hide private]

__init__(self, ref_model, models, **kw)
(Constructor)

source code 
Parameters:
  • ref_model (PDBModel) - reference
  • models ([PDBModel]) - structures to be compared with reference
  • 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:

__prepareModel(self, model, f_out)

source code 

Prepare a model that ICM likes.
  • consecutive numbering of residues
  • no chain identifier
Parameters:
  • model (PDBModel) - model
  • f_out (str) - name of pdb file to write

prepare(self)

source code 

Overrides Executor method.

cleanup(self)

source code 

Tidy up the mess you created.

parse_icm(self, output)

source code 

Extract CAD value from icm output.
Parameters:
  • output ([str]) - STDOUT result of ICM run
Returns: [str]
ICM result
Raises:

isFailed(self)

source code 

Overrides Executor method

finish(self)

source code 

Overrides Executor method

generateInp(self)

source code 

Has to be overridden to support head / segment / tail structure. Replace formatstr place holders in inp by fields of this class.
Returns: [str]
ICM input script
Raises:
  • TemplateError - if template not found

Class Variable Details [hide private]

inp_head

Value:
"""
call _startup
read pdb unix cat \"%(f_ref)s\"
copy a_ \"mol1\"
"""                                                                    
      

inp_tail

Value:
"quit\n"                                                               
      

inp_calc

Value:
"""
read pdb unix cat \"%(f_pdb)s\"
copy a_ \"mol2\" delete
1.8*Cad( a_mol1./* a_mol2./* )
"""