Biskit :: Dock :: HexParser :: HexParser :: Class HexParser
[hide private]
[frames] | no frames]

Class HexParser

source code

Parse hex result file and extract Complex objects into a dictionary indexed by the hex solution number. The hex file is only closed when this object is discarded. The HexParser is created with a dictionary containing PCRModel objects for ligand and receptor indexed by hex model number.

Instance Methods [hide private]
  __init__(self, hexFile, rec_dic, lig_dic, forceModel=None)
  __del__(self)
Complex nextComplex(self)
Take list of lines, extract all Hex info about one complex (Solution number, hex energy,..) also extract 16 numbers of the transformation matrix and put them into 4 by 4 numeric array.
[str] _nextBlock(self)
return all lines describing next complex in the Hex output file.
ComplexList parseHex(self)
Create one Complex Object for each paragraph in hex output file.

Method Details [hide private]

__init__(self, hexFile, rec_dic, lig_dic, forceModel=None)
(Constructor)

source code 
Parameters:
  • hexFile (string) - name of hex output file
  • rec_dic ({int:model}) - { int : PCRModel}
  • lig_dic ({int:model}) - same as rec_dic but for ligand PCRModels
  • forceModel (int, int) - force parser to accept model numbers

__del__(self)
(Destructor)

source code 

nextComplex(self)

source code 

Take list of lines, extract all Hex info about one complex (Solution number, hex energy,..) also extract 16 numbers of the transformation matrix and put them into 4 by 4 numeric array.
Returns: Complex
Complex created from the output from Hex

_nextBlock(self)

source code 

return all lines describing next complex in the Hex output file.
Returns: [str]
list of information strings

parseHex(self)

source code 

Create one Complex Object for each paragraph in hex output file.
Returns: ComplexList
ComplexList with all complexes from the Hex output