[ ligand_pharma | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
public: | |
class | TransformationRecord ; |
TransformationRecord(TransT& trans); | |
void | join(TransformationRecord& record); |
RMSDCluster(); | |
void | cluster(float maxDist, vector< TransT>& trans, vector< TransT>& output); |
template< class ParticleT> void | preProcess(const vector< ParticleT>& particles); |
float | dist2(const TransT& trans1, const TransT& trans2); |
void | useFastClustering(float binSize_); |
~RMSDCluster() ; | |
protected: | |
int | work(float maxDist, vector< TransformationRecord *>& records); |
int | fastWork(float maxDist, vector< TransformationRecord *>& records); |
void | clean(vector< TransformationRecord*>*& records); |
Back to the top of RMSDCluster
Copyright: SAMBA group, Tel-Aviv Univ. Israel, 2001
Back to the top of RMSDCluster
Complexity : preProcessing O(N) Overall complexity is O(N*M^2 * log(M)) (but a small constant ...) where: - N is the number of particles, givan in the pre-processing stage - M is the number of transformations to be clustered
There are actually two different clustering algorithms, one is thorough and one is faster but less accurate. Both algorithms are iterative trying to join pairs of close transformatins using a weighted average heuristic. The difference is that the thorough algorithm calculates the entire distance matrix of all the transformations at once while the faster algorithm divides the transformations first by the picture of the molecule centroid under the transformation and only then checks distances at each bin of separately. After the division is useless run the first algorithm.
The basic algorithm: while something was done create a graph from the transformation left in play. sort the edges (according to the distances). contract every edge smaller than maxDist starting from the shortest BUT ONLY USE EACH VERTEX ONCE.
The faster algorithm: calculate the picture of centroid of the set under each transformation and put in a GeomHash (the size of the cubeSize is given by the user) while something was done foreach bucket cluster the transformations in the bucket call the basic algorithm.
Notes: The distance between two transformations is calculated as the RMSD of the pictures by the two transformations on a set of points supplied by the user.
Back to the top of RMSDCluster
Usage of RMSDCluster is quite simple:
First you have to define the reference set. This is done by invoking
the method void preProcess(vector
Then invoke the Cluster method where the maxDist parameter indicates
the maximal length of edge that will be constracted (i.e. the
maxmimal distance allowed between two transformations in the same
cluster)
For use of the faster algorithm just add:
clusterer.useFastClustering(cubeSize);
before invoking the Cluster method.
Private class intended to hold the TransT objects throughout the
clustering process.
Function is currently defined inline.
default constructor
Function is currently defined inline.
The main function which should be called after the preProcessing
is done
preProcessing of a set of points in order to calculate distances
on them.
Returns the RMSD of the preProcessed set of points under the two
transformations.
Sets the bin size on which the clustering will be done at the
first stage. if not used the class will preform clustering on all
bins at once.
Function is currently defined inline.
The main loop builds the graph of transformations a contract
the edges.
Just like work only handles each bin independently until there is
nothing else to be done this way. Bins size is deremined by SetSpeed
Remove transformations which are not valid.
should be used after each invokation of work.
virtual vector< TransformationRecord *> *clean(vector
class Transformation {
private:
RigidTrans3 rt;
float score;
public{
Transformation() {...}
void join(Transformation& t) {...}
float getScore() const {
return score;
}
void incScore(float s) const {
score += s;
}
const RigidTrans3& rigidTrans() const {
return rigidTrans;
}
};
vector<Transformation> trans;
Molecule<Particle> mol;
RMSDCluster<Transformation> clusterer();
cluseterer.preProcess(mol);
vector<Transformation>& result = cluseterer.Cluster(trans, 5.5);
Back to the top of RMSDCluster
class TransformationRecord {
public:
Back to the top of RMSDCluster
TransformationRecord(TransT& trans);
standard constructor.
inline TransformationRecord(TransT& trans);
Back to the top of RMSDCluster
void join(TransformationRecord& record);
Join the transfromations into this.
record is unchanged.
virtual void join(TransformationRecord& record);
Back to the top of RMSDCluster
RMSDCluster();
Back to the top of RMSDCluster
void cluster(float maxDist, vector< TransT>& trans, vector< TransT>& output);
void cluster(float maxDist, vector< TransT>& trans, vector< TransT>& output);
Back to the top of RMSDCluster
template< class ParticleT> void preProcess(const vector< ParticleT>& particles);
template< class ParticleT>
void preProcess(const vector< ParticleT>& particles);
Back to the top of RMSDCluster
float dist2(const TransT& trans1, const TransT& trans2);
virtual float dist2(const TransT& trans1, const TransT& trans2);
Back to the top of RMSDCluster
void useFastClustering(float binSize_);
void useFastClustering(float binSize_);
Back to the top of RMSDCluster
virtual ~RMSDCluster()
;
Back to the top of RMSDCluster
int work(float maxDist, vector< TransformationRecord *>& records);
virtual int work(float maxDist, vector< TransformationRecord *>& records);
Back to the top of RMSDCluster
int fastWork(float maxDist, vector< TransformationRecord *>& records);
virtual int fastWork(float maxDist, vector< TransformationRecord *>& records);
Back to the top of RMSDCluster
void clean(vector< TransformationRecord*>*& records);
virtual void clean(vector< TransformationRecord*>*& records);
Back to the top of RMSDCluster
All Members
public: class TransformationRecord ; TransformationRecord(TransT& trans); void join(TransformationRecord& record); void cluster(float maxDist, vector< TransT>& trans, vector< TransT>& output); template< class ParticleT> void preProcess(const vector< ParticleT>& particles); float dist2(const TransT& trans1, const TransT& trans2); void useFastClustering(float binSize_); protected: int work(float maxDist, vector< TransformationRecord *>& records); int fastWork(float maxDist, vector< TransformationRecord *>& records); void clean(vector< TransformationRecord*>*& records); Back to the top of RMSDCluster
Ancestors
Class does not inherit from any other class.Back to the top of RMSDCluster
Descendants
Class is not inherited by any others.Back to the top of RMSDCluster
Generated from source by the Cocoon utilities on Mon Dec 21 11:44:48 2009
.