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

Class ComplexEvolving

source code


Complex that keeps track of its previous versions. The object behaves like a normal Biskit.Dock.Complex but encapsulates a Biskit.Dock.ComplexList with older versions/conformations of this Complex.

Instance Methods [hide private]
  __init__(self, rec_model, lig_model, com_0=None, ligMatrix=None, info={})
Create a new ComplexEvolving from a previous Complex or ComplexEvolving and a new set of receptor, ligand conformation and transformation.
str version(self)
Version of class.
  __iter__()
for k in self
  __len__(self)
length of self
Dock.Complex getComplex(self, i, copy=0)
Return one version as Complex.
dict __getitem__(self, k)
Get a Complex OR a info key value for a Complex specified Complex OR info dic value.
PDBModel __syncModel(self, new_model, old_model)
Connect new rec or lig model to old one, to minimize storage.
  sortHistory(self)
Sort by date
ComplexList toList(self)
Returns all historic complexes plus current one as Complex
[Complex] toSimpleList(self)
Returns all historic complexes plus current one as Complex
Complex toComplex(self, copy=0)
Copy of latest version as a normal Complex.
[any] valuesOf(self, infoKey, default=None)
Get info values from all versions of this complex (oldest first).

Inherited from Complex.Complex: __contains__, __delitem__, __getstate__, __setitem__, __setstate__, atomContacts, compareAtoms, compress, conservationScore, contPairScore, contactResDistribution, contactResPairs, contactTypeDistribution, contactsDiff, contactsOverlap, contactsShared, equalAtoms, extractLigandMatrix, foldXEnergy, fractionNativeContacts, fractionNativeSurface, get, getInfo, has_key, interfaceArea, keys, lig, ligMatrix, loadResContacts, model, prosa2003Energy, rec, resContacts, resPairCounts, rmsInterface, rmsLig, rtTuple2matrix, setLigMatrix, slim, take, values, writeComplex, writeLigand, writeReceptor


Method Details [hide private]

__init__(self, rec_model, lig_model, com_0=None, ligMatrix=None, info={})
(Constructor)

source code 

Create a new ComplexEvolving from a previous Complex or ComplexEvolving and a new set of receptor, ligand conformation and transformation.
Parameters:
  • rec_model (PDBModel) - PDBModel/PCRModel, receptor conformation
  • lig_model (PDBModel) - PDBModel/PCRModel, ligand conformation
  • com_0 (Complex OR ComplexEvolving) - Complex /ComplexEvolving, previous version(s) of this com
  • ligMatrix (4x4 array) - transformation matrix of ligand versus receptor
  • info (dict) - {'info_key': value, ..}, additional infos
Overrides: Complex.Complex.__init__

version(self)

source code 

Version of class.
Returns: str
version of class
Overrides: Complex.Complex.version

__iter__()

source code 

for k in self

__len__(self)
(Length operator)

source code 

length of self

getComplex(self, i, copy=0)

source code 

Return one version as Complex. -1 returns a copy of the latest version. By default the info dictionary remains connected but other fields don't. I.e. replacing rec_model in the copy does not affect the original complex.
Parameters:
  • i (int) - index in complex history, -1 returns toComplex()
  • copy (1|0) - copy info dictionary in case of i==-1 (changes in c.getComplex( -1 ).info will not appear in c.info [0]
Returns: Dock.Complex
complex

__getitem__(self, k)
(Indexing operator)

source code 

Get a Complex OR a info key value for a Complex specified Complex OR info dic value.
Parameters:
  • k (any OR Complex) - tuple OR int OR str
Returns: dict
C.info[ key ]
Overrides: Complex.Complex.__getitem__

__syncModel(self, new_model, old_model)

source code 

Connect new rec or lig model to old one, to minimize storage.
Parameters:
  • new_model (PDBModel) - PDBModel / PCRModel
  • old_model (PDBModel) - PDBModel / PCRModel
Returns: PDBModel
PDBModel / PCRModel, new model that only keeps changes relative to old, the old model becomes the source of the new, if possible

sortHistory(self)

source code 

Sort by date

toList(self)

source code 
Returns: ComplexList
all historic complexes plus current one as Complex

toSimpleList(self)

source code 
Returns: [Complex]
all historic complexes plus current one as Complex

toComplex(self, copy=0)

source code 

Copy of latest version as a normal Complex.
Parameters:
  • copy (1|0) - also disconnect info dict (default: 0)
Returns: Complex
Complex

valuesOf(self, infoKey, default=None)

source code 

Get info values from all versions of this complex (oldest first).
Parameters:
  • infoKey (str) - info dic key
  • default (any) - default value, if key is not present
Returns: [any]
list of values