Loading...
Searching...
No Matches
BALL::AtomBijection Class Reference
Molecular Modeling » Molecular Structure » Mapping of molecular structures

`#include <BALL/STRUCTURE/atomBijection.h>`

Inheritance diagram for BALL::AtomBijection:

## 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, bool limit_to_selection=false)
virtual | ~AtomBijection ()
| Destructor.
Bijection construction
Size | assignTrivial (AtomContainer &A, AtomContainer &B, bool limit_to_selection=false)
Size | assignByName (AtomContainer &A, AtomContainer &B, bool limit_to_selection=false)
Size | assignCAlphaAtoms (AtomContainer &A, AtomContainer &B, bool limit_to_selection=false)
Size | assignBackboneAtoms (AtomContainer &A, AtomContainer &B, bool limit_to_selection=false)
Size | assignAtomsByProperty (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));
BALL::AtomBijection::AtomBijection
AtomBijection()
Definition atomBijection.h:64
BALL::AtomBijection::AtomPair
std::pair< Atom *, Atom * > AtomPair
Definition atomBijection.h:54
BALL::Atom
Definition atom.h:90

`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

## AtomPair

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.

## PairVector

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

Definition at line 55 of file atomBijection.h.

## Constructor & Destructor Documentation

## AtomBijection() [1/2]

BALL::AtomBijection::AtomBijection | ( |  | ) |

inline

Default constructor

Definition at line 64 of file atomBijection.h.

## AtomBijection() [2/2]

BALL::AtomBijection::AtomBijection | ( | AtomContainer & | A,
|  | AtomContainer & | B,
|  | bool | limit_to_selection = false )

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 smaller 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. `If` the flag limit_to_selection is set to true and one of the two given atom containers has selected content, the bijection is limited to this selection. `This` corresponds to calling assignTrivial after default construction

## ~AtomBijection()

virtual BALL::AtomBijection::~AtomBijection | ( |  | ) |

inline virtual

Destructor.

Definition at line 85 of file atomBijection.h.

## Member Function Documentation

## assignAtomsByProperty()

Size BALL::AtomBijection::assignAtomsByProperty | ( | AtomContainer & | A,
|  | AtomContainer & | B )

Assign the atom pairs through a name matching and based on the property "ATOMBIJECTION_RMSD_SELECTION".

See also
  assignTrivial() This is restriction is useful, if the focus of investigation is limited to e.g. a binding pocket.

## assignBackboneAtoms()

Size BALL::AtomBijection::assignBackboneAtoms | ( | AtomContainer & | A,
|  | AtomContainer & | B,
|  | bool | limit_to_selection = false )

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. `If` the flag limit_to_selection is set to true and one of the two given atom containers has selected content, the bijection is limited to this selection. `\return` The number of atom pairs mapped

## assignByName()

Size BALL::AtomBijection::assignByName | ( | AtomContainer & | A,
|  | AtomContainer & | B,
|  | bool | limit_to_selection = false )

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). `If` the flag limit_to_selection is set to true and one of the two given atom containers has selected content, the bijection is limited to this selection. `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.

## assignCAlphaAtoms()

Size BALL::AtomBijection::assignCAlphaAtoms | ( | AtomContainer & | A,
|  | AtomContainer & | B,
|  | bool | limit_to_selection = false )

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.
`If` the flag limit_to_selection is set to true and one of the two given atom containers has selected content, the bijection is limited to this selection. `\return` The number of atom pairs mapped

## assignTrivial()

Size BALL::AtomBijection::assignTrivial | ( | AtomContainer & | A,
|  | AtomContainer & | B,
|  | bool | limit_to_selection = false )

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 smaller 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. `If` the flag limit_to_selection is set to true and one of the two given atom containers has selected content, the bijection is limited to this selection. `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.

## calculateRMSD()

double BALL::AtomBijection::calculateRMSD | ( |  | ) | const

Calculate the root mean squared deviation of the mapped atoms.