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

Class ComplexTraj

source code


Multi-copy trajectory of a protein-protein complex. Quite basic.

ComplexTraj keeps the reference PDBModel of the normal Trajectory but, additionally, knows which chains in the reference belong to the receptor and which chains belong to the ligand. It tries to keep the 2 lists of chain indices ( cr and cl ) up-to-date, even if chains are removed or re-ordered.

Appending of atoms/chains (e.g. with concatAtoms) is currently not considered and will most likely leed to additional chains that are ignored by the complex-specific functions.

Instance Methods [hide private]
  __init__(self, traj=None, recChains=[0], n_members=10, rec=None)
Use:
str version(self)
Version of Dock.Complex
EnsembleTraj ligTraj(self)
Returns ligand part of this Trajectory (copy)
EnsembleTraj recTraj(self)
Returns receptor part of this Trajectory (copy)
PDBModel refRec(self)
Returns copy of the receptor part of the reference model
PDBModel refLig(self)
Returns copy of the ligand part of the reference model
  refCom(self)
Returns Complex
  __getitem__(self, i)
Complex getComplex(self, index)
Use:
  replaceContent(self, traj)
Replace content of this trajectory by content of given traj.
{int:int} __translateChainIndices(self, atomIndices, newChainMap)
Translate current chain indices into what they would look like in a PDBModel containing only the given atoms in the given order.
ComplexTraj takeAtoms(self, indices, returnClass=None)
takeAtoms( indices, [returnClass] ) -> ComplexTraj
ComplexTraj concatAtoms(self, recChains, *traj)
Concatenate 2 trajectories of same (frame) length 'horizontally', i.e.
matrix atomContacts(self, index, cutoff=4.5, rec_mask=None, lig_mask=None)
Use:
matrix averageContacts(self, step=10, cutoff=4.5)
Use:
  plotContactDensity(self, step=1, cutoff=4.5)
Example.

Method Details [hide private]

__init__(self, traj=None, recChains=[0], n_members=10, rec=None)
(Constructor)

source code 

Use:
  ComplexTraj( traj, recChains=[0], n_members=10 )
Parameters:
  • traj (Trajectory) - Trajectory (default: 0)
  • recChains ([int]) - list of chain indices defining receptor (default: [0])
  • n_members (int) - number of ensemble members (for multi-copy MD) (default: 10)
  • rec (PDBModel) - instead of using recChains, autodetect rec chains by comparing traj.ref with the model given as rec (default: None)

version(self)

source code 

Version of Dock.Complex
Returns: str
version of class

ligTraj(self)

source code 
Returns: EnsembleTraj
ligand part of this Trajectory (copy)

recTraj(self)

source code 
Returns: EnsembleTraj
receptor part of this Trajectory (copy)

refRec(self)

source code 
Returns: PDBModel
copy of the receptor part of the reference model

refLig(self)

source code 
Returns: PDBModel
copy of the ligand part of the reference model

refCom(self)

source code 
Returns:
Complex

__getitem__(self, i)
(Indexing operator)

source code 

getComplex(self, index)

source code 

Use:
 getComplex( frame_index ) -> Complex
Parameters:
  • index (int) - frame index
Returns: Complex
Complex

replaceContent(self, traj)

source code 

Replace content of this trajectory by content of given traj. No deep-copying, only references are taken.
Parameters:
  • traj (Trajectory) - Trajectory
Raises:

__translateChainIndices(self, atomIndices, newChainMap)

source code 

Translate current chain indices into what they would look like in a PDBModel containing only the given atoms in the given order.
Parameters:
  • atomIndices ([int]) - indices of atoms
  • newChainMap ([int]) - chain map [0000011133333..]
Returns: {int:int}
{ int:int, .. } map current chain indices to new ones
Raises:

takeAtoms(self, indices, returnClass=None)

source code 

takeAtoms( indices, [returnClass] ) -> ComplexTraj
Parameters:
  • indices ([int]) - atoms to extract
  • returnClass (class) - return type (default: current class)
Returns: ComplexTraj
ComplexTraj
Raises:

concatAtoms(self, recChains, *traj)

source code 

Concatenate 2 trajectories of same (frame) length 'horizontally', i.e. for each frame the coordinates of one are appended to the coordinates of the other. The ref model of the new trajectory is a 'semi-deep' copy of this trajectory's model (see Biskit.PDBModel.take() ).:
 concatAtoms( recChains, traj1 [traj2, traj3..]) -> ComplexTraj
Parameters:
  • recChains ([int]) - chain indices into traj that will be assigned to the receptor; all remaining chains (if any) go to the ligand
  • traj (Trajectory) - trajectories to concatenate
Returns: ComplexTraj
ComplexTraj

Warning: NOT TESTED!!

atomContacts(self, index, cutoff=4.5, rec_mask=None, lig_mask=None)

source code 

Use:
 atomContacts( frame_index ) -> array len_rec x len_lig of 0||1
Parameters:
  • index ([int]) - frame index
  • cutoff (float) - contact cutoff in Angstrom (default: 4.5)
  • rec_mask ([int]) - atom mask
  • lig_mask ([int]) - atom mask
Returns: matrix
contact matrix

averageContacts(self, step=10, cutoff=4.5)

source code 

Use:
 averageContacts( step=1, cutoff=4.5 )
Parameters:
  • step (int) - take only each |step|th frame (default: 10)
  • cutoff (float) - distance cutoff in Angstrom (default: 4.5)
Returns: matrix
contact matrix with frequency of each contact in (thinned) traj.

plotContactDensity(self, step=1, cutoff=4.5)

source code 

Example. plot histogramm of contact density. Somehing wrong??
Raises: