belka.geom
Class RigidFinder

java.lang.Object
  extended by belka.geom.RigidFinder

public class RigidFinder
extends Object

Objects of this class perform separation of a structure into several rigid blocks.

Author:
Alexej Abyzov

Constructor Summary
RigidFinder()
          Object constructor.
RigidFinder(Chain[] chains1, Chain[] chains2)
          Object constructor.
RigidFinder(Chain chain1, Chain chain2)
          Object constructor.
 
Method Summary
 int findRigids()
          Returns number of rigid blocks the structure can be split in.
 int findRigids(double deltaDist)
          Returns number of rigid blocks the structure can be split in.
 int findRigids(double deltaDist, boolean ref, boolean clus, File file)
          Returns number of rigid blocks the structure can be split in.
 int getNRigids()
          Returns number of found rigid blocks.
 double getSpentTime()
          Returns time in seconds spent on last call to function findRigids(double,boolean,boolean,File).
 StringBuffer print(Chain[] chains1, Chain[] chains2)
          Function prints information about rigid blocks into a string and returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RigidFinder

public RigidFinder()
Object constructor.


RigidFinder

public RigidFinder(Chain chain1,
                   Chain chain2)
Object constructor. Both submitted chains must have structure. The resdiue correspondance is derived from alignment.


RigidFinder

public RigidFinder(Chain[] chains1,
                   Chain[] chains2)
Object constructor. Arrays must be of the same length. Chains are considered to be correspoding if they have the same indexes in arrays. All submitted chains must have structure. The resdiue correspondance is derived from alignment.

Method Detail

findRigids

public int findRigids()
Returns number of rigid blocks the structure can be split in. Calculations are performed with the default value of the delta distance parameter defining degree of interresidue conservation within rigid block. Blocks are refined and small framgnets are clustered with larger ones. See findRigids(double,boolean,boolean,File).

Returns:
number of rigid blocks the structure can be split in.

findRigids

public int findRigids(double deltaDist)
Returns number of rigid blocks the structure can be split in. Calculations are performed with the given value of the delta distance parameter defining degree of interresidue conservation within rigid block. Blocks are refined and small framgnets are clustered with larger ones. See findRigids(double,boolean,boolean,File).

Returns:
number of rigid blocks the structure can be split in.

findRigids

public int findRigids(double deltaDist,
                      boolean ref,
                      boolean clus,
                      File file)
Returns number of rigid blocks the structure can be split in. Calculations are performed with the given value of the delta distance parameter defining degree of interresidue conservation within rigid block. Blocks can be refined and small framgnets can be clustered with larger ones.

Parameters:
deltaDist - maximal allowed deviation of interresidue distance within rigid body.
ref - flag to specify whether blocks has to be refined.
clus - flag to specify whether clustering of small fragmnet has to be made.
file - file to save output.
Returns:
number of rigid blocks the structure can be split in.

getSpentTime

public double getSpentTime()
Returns time in seconds spent on last call to function findRigids(double,boolean,boolean,File).

Returns:
time in seconds spent on last call to function findRigids(double,boolean,boolean,File).

print

public StringBuffer print(Chain[] chains1,
                          Chain[] chains2)
Function prints information about rigid blocks into a string and returns it. Each line contains information about fragments in one rigid block. The inforamtion about rigid blocks is stored in the following format (c1c2, start1,start2,length), where c1c2 -- chains id of aligned chains, start1 -- is the residues serial number in the first chain, start2 -- is the serial number of corresponding residue in the second chain, and length -- is the length of the fragments.

Parameters:
chains1 - first set of chains.
chains2 - second set of chains.
Returns:
string representation of rigid blocks.

getNRigids

public int getNRigids()
Returns number of found rigid blocks. Negative if no search was made.

Returns:
number of found rigid blocks.