[ ligand_pharma | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
public: | |
class | ParticleMatch ; |
// Contructors | |
FMatch(); | |
FMatch(const RigidTrans3& rt); | |
FMatch(const FMatch& m); | |
// Destructor | |
~FMatch(); | |
// Match construction and refinement methods. | |
bool | add(const unsigned int modelParticle, const unsigned int sceneParticle, bool test ); |
// Inspection methods. | |
short | size() const; |
float | rmsd() const; |
const RigidTrans3& | rigidTrans() const; |
int | sceneParticle(const unsigned int model) const; |
int | modelParticle(const unsigned int scene) const; |
const ParticleMatch& | operator[](const unsigned int index) const; |
template < class ParticleT> void | calculateBestFit(const Molecule< ParticleT>& model, const Molecule< ParticleT>& scene); |
void | clear() ; |
friend ostream& | operator<<(ostream& s, const FMatch& m); |
typedef vector< ParticleMatch> | MatchList; |
protected: | |
MatchList | pairs; |
float | rms; |
RigidTrans3 | trans; |
Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1997.
Special attention should be given to the add method. This method lets the user add a pair to the match. If a different pair is added, one that clashes with the first pair no checks are done.
Becasue of the difficulty in determinig how a match should be constucted and built the non-public members of this class were left protected. This allows a user to write Match descendants that best fit his needs.
Match M; for (int i=0; i<1000; i++) { for (int j=0; j<200; j++) { // randomly pick pair unsigned int modelParticle = model.size()*drand48(); unsigned int sceneParticle = scene.size()*drand48(); // add pair M.add(modelParticle, sceneParticle); } // j M.calculateBestFit(model, scene); // every 200 random pairs recalc cout << M.rigidTrans() << '\n'; // rig. trans. and print it. } // i int matchingParticle; for(int i=0; i<model.size(); i++) if ((matchingParticle = M.sceneParticle(i)) >= 0) cout << i << '\t' << matchingParticle << '\n';
Comment: Generally, it is expected (By me at least) that if a very large linear match infact exists between model and scene (e.g. try model=scene) the calculated rigid transformation will probablistically tend to such a match.
ParticleMatch is used by the class implementation to store matching pairs within an STL vector.
class ParticleMatch { public: ParticleMatch();
Construct a new match.
FMatch();
FMatch(const RigidTrans3& rt);
Contruct a new Match object using the candidate rigid transformation used to match the two sets of points. This rigid transformation may be further enhanced after a set of matching pairs is added using the calculateBestFit method.
FMatch(const RigidTrans3& rt);
Match copy contructor. Implicitely declared to make sure that all data referred to by the Match object is actually copied.
FMatch(const FMatch& m);
~FMatch();
bool add(const unsigned int modelParticle, const unsigned int sceneParticle, bool test );
bool add(const unsigned int modelParticle, const unsigned int sceneParticle, bool test=false);
Returns the match size.
short size() const;
After calculating the best linear transformation using calculateBestFit this method will return the RMSD of the match.
float rmsd() const;
const RigidTrans3& rigidTrans() const;
At any point, the rigid transformation currently used by the match will be returned.
const RigidTrans3& rigidTrans() const;
int sceneParticle(const unsigned int model) const;
Given a model particle returns the matching scene particle. If no such particle is found the method will return a negative value.
int sceneParticle(const unsigned int model) const;
int modelParticle(const unsigned int scene) const;
Given a scene particle returns the matching model particle. If no such particle is found the method will return a negative value.
int modelParticle(const unsigned int scene) const;
const ParticleMatch& operator[](const unsigned int index) const;
Return information about the pair indexed by index in the match in the form of a ParticleMatch object reference.
const ParticleMatch& operator[](const unsigned int index) const;
Calculate the best rigid transformation to minimize the inter-point RMSD. The method accepts the two molecules from which the particles are taken from and from which it will get the particles positions. See the Molecule class documentation documentation.
template < class ParticleT> void calculateBestFit(const Molecule< ParticleT>& model, const Molecule< ParticleT>& scene);
void clear() ;
Function is currently defined inline.
friend ostream& operator<<(ostream& s, const FMatch& m);
friend ostream& operator<<(ostream& s, const FMatch& m);
typedef vector< ParticleMatch> MatchList;
A vector of ParticleMatch is used to store the matching pairs of particles
typedef vector< ParticleMatch> MatchList; //!!!
MatchList pairs;
float rms;
RigidTrans3 trans;
public: | ||
---|---|---|
class | ParticleMatch ; | |
// Match construction and refinement methods. | ||
bool | add(const unsigned int modelParticle, const unsigned int sceneParticle, bool test ); | |
// Inspection methods. | ||
short | size() const; | |
float | rmsd() const; | |
const RigidTrans3& | rigidTrans() const; | |
int | sceneParticle(const unsigned int model) const; | |
int | modelParticle(const unsigned int scene) const; | |
const ParticleMatch& | operator[](const unsigned int index) const; | |
template < class ParticleT> void | calculateBestFit(const Molecule< ParticleT>& model, const Molecule< ParticleT>& scene); | |
void | clear() ; | |
friend ostream& | operator<<(ostream& s, const FMatch& m); | |
typedef vector< ParticleMatch> | MatchList; | |
protected: | ||
MatchList | pairs; | |
float | rms; | |
RigidTrans3 | trans; |
Report problems to jkotula@unimax.com