BALL::AtomBijection Class Reference
[Mapping of molecular structures]

#include <BALL/STRUCTURE/atomBijection.h>

Inheritance diagram for BALL::AtomBijection:
Inheritance graph
[legend]

List of all members.

Public Types

Type definitions

typedef std::pair< Atom *, Atom * > AtomPair
typedef std::vector< std::pair
< Atom *, Atom * > > 
PairVector

Public Member Functions

Constructors and Destructors

 AtomBijection ()
 AtomBijection (AtomContainer &A, AtomContainer &B)
virtual ~AtomBijection ()
 Destructor.
Bijection construction

Size assignTrivial (AtomContainer &A, AtomContainer &B)
Size assignByName (AtomContainer &A, AtomContainer &B)
Size assignCAlphaAtoms (AtomContainer &A, AtomContainer &B)
Size assignBackboneAtoms (AtomContainer &A, AtomContainer &B)
Accessors

double calculateRMSD () const
 Calculate the root mean squared deviation of the mapped atoms.

Detailed Description

Atom bijection. 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.

Definition at line 45 of file atomBijection.h.


Member Typedef Documentation

typedef std::pair<Atom*, Atom*> BALL::AtomBijection::AtomPair

A struct for representing an atom pair of the mapping.

Definition at line 54 of file atomBijection.h.

typedef std::vector<std::pair<Atom*, Atom*> > BALL::AtomBijection::PairVector

Definition at line 55 of file atomBijection.h.


Constructor & Destructor Documentation

BALL::AtomBijection::AtomBijection (  )  [inline]

Default constructor

Definition at line 64 of file atomBijection.h.

BALL::AtomBijection::AtomBijection ( AtomContainer A,
AtomContainer B 
)

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

virtual BALL::AtomBijection::~AtomBijection (  )  [inline, virtual]

Destructor.

Definition at line 82 of file atomBijection.h.


Member Function Documentation

Size BALL::AtomBijection::assignBackboneAtoms ( AtomContainer A,
AtomContainer B 
)

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. The number of atom pairs mapped

Size BALL::AtomBijection::assignByName ( AtomContainer A,
AtomContainer B 
)

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). The method constructs a hash map for all atom names, so run time is linear in the number of atoms. The number of atoms mapped is returned.

Size BALL::AtomBijection::assignCAlphaAtoms ( AtomContainer A,
AtomContainer B 
)

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. The number of atom pairs mapped

Size BALL::AtomBijection::assignTrivial ( AtomContainer A,
AtomContainer B 
)

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. This trivial bijection is useful, if the two atom containers correspond to exactly the same structure (i.e. they just differ in their conformations). Care must be taken that the order of atoms is correct. Beware of adding hydrogens, which might mess up atom order in some cases. The number of atoms mapped is returned.

double BALL::AtomBijection::calculateRMSD (  )  const

Calculate the root mean squared deviation of the mapped atoms.

Generated by  doxygen 1.6.3