#include <atomBijection.h>
Public Types | |
Type definitions | |
typedef std::pair< Atom *, Atom * > | AtomPair |
A struct for representing an atom pair of the mapping. | |
typedef std::vector< std::pair< Atom *, Atom * > > | PairVector |
Public Member Functions | |
Constructors and Destructors | |
AtomBijection () | |
Default constructor. | |
AtomBijection (AtomContainer &A, AtomContainer &B) | |
Construct a trivial bijection between to atom containers. | |
virtual | ~AtomBijection () |
Destructor. | |
Bijection construction | |
Size | assignTrivial (AtomContainer &A, AtomContainer &B) |
Assign all atoms in the two atom containers in order. | |
Size | assignByName (AtomContainer &A, AtomContainer &B) |
Assign the atom pairs through a name matching. | |
Size | assignCAlphaAtoms (AtomContainer &A, AtomContainer &B) |
Assign the C-alpha atoms ordered by sequence. | |
Size | assignBackboneAtoms (AtomContainer &A, AtomContainer &B) |
Assign the backbone atoms ordered by sequence. | |
Accessors | |
double | calculateRMSD () const |
Calculate the root mean squared deviation of the mapped atoms. |
This class implements a mapping of two sets of atoms onto each other. It is used by the StructurMapper class and the RMSDMinimizer classes to define which atoms are mapped onto each other. There
are a few methods for general mappings (based on atom order, atom names, etc.) that should suffice for most applications. If you want to match proteins based on particular mappings (e.g. based on a pairwise alignment), you should create the mapping yourself. This is easily done by pushing an AtomPair into the vector:
Atom* atom1 = ...; Atom* atom2 = ...; // Create an empty bijection AtomBijection bijection; // Map atom1 onto atom2. bijection.push_back(AtomBijection::AtomPair(atom1, atom2));
The
class behaves more or less like the vector of atom pointer pairs it truly is. In particular, the STL container interface has been fully implemented.
|
A struct for representing an atom pair of the mapping.
|
|
Construct a trivial bijection between to atom containers.
Construct a simple bijection mapping the atoms of the two atom containers onto each other. The mapping iterates over the atoms and stops assigning pairs of atoms as soon as the smalles of the two atom sets is fully assigned. The larger of the two atom container can thus contain unassigned atoms. No checking with respect to atom names, elements or the like are being made. This corresponds to calling assignTrivial after default construction |
|
Assign the backbone atoms ordered by sequence.
This method iterated over all residues and assigns the backbone atoms (i.e. all atoms named "CA", "C", "N", "H", and "O" in every residue with the property AMINO_ACID) of the two proteins in the order they are traversed. The mapping terminates, if the traversal of the residues in one of the two atom containers terminates. |
|
Assign the atom pairs through a name matching.
This method creates a mapping based on the atom names. If the atom is contained in a Residue/Protein, the name consists of the fully qualified name (<chain>:<residue name="">:<residue id="">:<atom name="">). If no pair of atoms could by matched this way, it will try to match by atom names only (not considering residues, chains or the like). |
|
Assign the C-alpha atoms ordered by sequence.
This method iterated over all residues and assigns the C-alpha atoms (i.e. all atoms named "CA" in a residue with the property AMINO_ACID) of the two proteins in the order they are traversed. The size of the mapping corresponds to the minimum of the number of C-alpha atoms of both atom containers. |
|
Assign all atoms in the two atom containers in order.
Construct a simple bijection mapping the atoms of the two atom containers onto each other. The mapping iterates over the atoms and stops assigning pairs of atoms as soon as the smalles of the two atom sets is fully assigned. The larger of the two atom container can thus contain unassigned atoms. No checking with respect to atom names, elements or the like are being made. |