Loading...
Searching...
No Matches
BALL::NMRStarFile::BALLToBMRBMapper Class Reference

`#include <BALL/FORMAT/NMRStarFile.h>`

## Public Types

Type definitions
typedef std::pair< Position, Position > | BMRBIndex
typedef std::map< Atom const *, BMRBIndex > | BALLToBMRBMapping
typedef std::map< const NMRAtomData *, Atom const * > | BMRBToBALLMapping

## Public Member Functions

Constructors and Destructors
| BALLToBMRBMapper ()
| BALLToBMRBMapper (Chain const &chain, const NMRStarFile &nmr_data, const String &chemical_unit)
virtual | ~BALLToBMRBMapper ()
| Destructor.

## Access methods

Peptides::NameConverter | name_converter_
const Chain * | getChain () const
| Get the chain.
void | setChain (Chain const &chain)
| Set the chain.
void | setNMRStarFile (NMRStarFile const &nmrfile)
| Set the NMRStar file.
const NMRStarFile * | getNMRStarFile () const
| Get the NMRStar file.
void | setNMRAtomDataSet (NMRAtomDataSet const &nmr_atom_data_set)
| Set the NMRAtomDataSet.
bool | setNMRAtomDataSetByName (String const &chemical_unit_name)
| Set the NMRAtomDataSet by chemical unit name.
const NMRAtomDataSet * | getNMRAtomDataSet () const
BALLToBMRBMapping & | getBALLToBMRBMapping ()
| Return the mapping.
const BALLToBMRBMapping & | getBALLToBMRBMapping () const
| Return the mapping.
BMRBToBALLMapping & | getBMRBToBALLMapping ()
| Return the mapping.
const BMRBToBALLMapping & | getBMRBToBALLMapping () const
| Return the mapping.
int | getNumberOfMismatches ()
| Return the number of mismatches in the current mapping.
int | getNumberOfGaps ()
| Return the number of mismatches in the current mapping.
bool | isMapped (const NMRAtomData &nmr_atom) const
| Test whether the given nmr atom data is mapped to a structure atom.
const Atom * | getBALLAtom (const NMRAtomData &nmr_atom) const
bool | isMapped (Atom const *atom) const
BMRBIndex | operator() (const Atom *atom)
| Return the mapping of the given atom.
bool | createTrivialMapping ()
bool | createMapping (const String &aligned_ball_sequence, const String &aligned_nmrstar_sequence)
void | clear ()

## Atributes

BALLToBMRBMapping | ball_to_bmrb_map_
| map BALL atoms to NMR atom data
BMRBToBALLMapping | bmrb_to_ball_map_
| map NMR atom data to BALL atoms
const Chain * | chain_
const NMRStarFile * | nmr_data_
const NMRAtomDataSet * | nmr_atom_data_set_
Position | nmr_atom_data_set_index_
int | num_mismatches_
int | num_gaps_
bool | valid_

## Detailed Description

Mapper class between BALL atoms and NMRStar file atom entries.

The main reason for the existence of this class (instead of maps to atompointer,position,position) is the python interface, which is greatly simplified.

Definition at line 445 of file NMRStarFile.h.

## Member Typedef Documentation

## BALLToBMRBMapping

typedef std::map<Atom const* , BMRBIndex> BALL::NMRStarFile::BALLToBMRBMapper::BALLToBMRBMapping

Definition at line 457 of file NMRStarFile.h.

## BMRBIndex

typedef std::pair<Position, Position> BALL::NMRStarFile::BALLToBMRBMapper::BMRBIndex

BMRMIndex stores the savaframe id and the index of the atom in the NMRAtomDataSet.

Definition at line 456 of file NMRStarFile.h.

## BMRBToBALLMapping

typedef std::map<const NMRAtomData*, Atom const*> BALL::NMRStarFile::BALLToBMRBMapper::BMRBToBALLMapping

Definition at line 458 of file NMRStarFile.h.

## Constructor & Destructor Documentation

## BALLToBMRBMapper() [1/2]

BALL::NMRStarFile::BALLToBMRBMapper::BALLToBMRBMapper | ( |  | ) |

## BALLToBMRBMapper() [2/2]

BALL::NMRStarFile::BALLToBMRBMapper::BALLToBMRBMapper | ( | Chain const & | chain,
|  | const NMRStarFile & | nmr_data,
|  | const String & | chemical_unit )

Detailed constructor

Parameters

  chain | the chain to be mapped to a shift reference set
  nmr_data | the NMRStarFile provinding the chemical shifts for chain
  chemical_unit | the name of the molecular system (chemical unit) storing the atom shifts

## ~BALLToBMRBMapper()

virtual BALL::NMRStarFile::BALLToBMRBMapper::~BALLToBMRBMapper | ( |  | ) |

inline virtual

Destructor.

Definition at line 477 of file NMRStarFile.h.

## Member Function Documentation

## clear()

void BALL::NMRStarFile::BALLToBMRBMapper::clear | ( |  | ) |

Clear the object.

## createMapping()

bool BALL::NMRStarFile::BALLToBMRBMapper::createMapping | ( | const String & | aligned_ball_sequence,
|  | const String & | aligned_nmrstar_sequence )

Create a mapping between the given chain and the molecular system named chemical_unit of the given NMRStar file atoms based on the given alignment. The alignmed sequences should be given in OneLetterCode, where '-' denotes a gap.

Parameters

  aligned_ball_sequence | the aligned protein or chain aminoacid sequence
  aligned_nmrstar_sequence | the aligned aminoacid sequence of the NMRStar atoms

Returns
  bool - true if creating the mapping was possible

## createTrivialMapping()

bool BALL::NMRStarFile::BALLToBMRBMapper::createTrivialMapping | ( |  | ) |

Create a trivial mapping between the given chain and the NMRStar file atoms.

NOTE: this mapping only works for very simple cases as we assume no gaps.

Returns
  bool - true if creating the mapping was possible

## getBALLAtom()

const Atom * BALL::NMRStarFile::BALLToBMRBMapper::getBALLAtom | ( | const NMRAtomData & | nmr_atom | ) | const

Return the atom mapped to the given NMRAtom.

Parameters

  atom | the NMRAtom

Returns
  the mapped BALL atom. If no atom can be matched a NULL pointer is returned.

## getBALLToBMRBMapping() [1/2]

BALLToBMRBMapping & BALL::NMRStarFile::BALLToBMRBMapper::getBALLToBMRBMapping | ( |  | ) |

inline

Return the mapping.

Definition at line 510 of file NMRStarFile.h.

## getBALLToBMRBMapping() [2/2]

const BALLToBMRBMapping & BALL::NMRStarFile::BALLToBMRBMapper::getBALLToBMRBMapping | ( |  | ) | const

inline

Return the mapping.

Definition at line 513 of file NMRStarFile.h.

## getBMRBToBALLMapping() [1/2]

BMRBToBALLMapping & BALL::NMRStarFile::BALLToBMRBMapper::getBMRBToBALLMapping | ( |  | ) |

inline

Return the mapping.

Definition at line 516 of file NMRStarFile.h.

## getBMRBToBALLMapping() [2/2]

const BMRBToBALLMapping & BALL::NMRStarFile::BALLToBMRBMapper::getBMRBToBALLMapping | ( |  | ) | const

inline

Return the mapping.

Definition at line 519 of file NMRStarFile.h.

## getChain()

const Chain * BALL::NMRStarFile::BALLToBMRBMapper::getChain | ( |  | ) | const

inline

Get the chain.

Definition at line 485 of file NMRStarFile.h.

## getNMRAtomDataSet()

const NMRAtomDataSet * BALL::NMRStarFile::BALLToBMRBMapper::getNMRAtomDataSet | ( |  | ) | const

inline

Definition at line 507 of file NMRStarFile.h.

## getNMRStarFile()

const NMRStarFile * BALL::NMRStarFile::BALLToBMRBMapper::getNMRStarFile | ( |  | ) | const

inline

Get the NMRStar file.

Definition at line 498 of file NMRStarFile.h.

## getNumberOfGaps()

int BALL::NMRStarFile::BALLToBMRBMapper::getNumberOfGaps | ( |  | ) |

inline

Return the number of mismatches in the current mapping.

Definition at line 525 of file NMRStarFile.h.

## getNumberOfMismatches()

int BALL::NMRStarFile::BALLToBMRBMapper::getNumberOfMismatches | ( |  | ) |

inline

Return the number of mismatches in the current mapping.

Definition at line 522 of file NMRStarFile.h.

## isMapped() [1/2]

bool BALL::NMRStarFile::BALLToBMRBMapper::isMapped | ( | Atom const * | atom | ) | const

Test, whether an atom is matched to NMRAtom data entry

Returns
  true if the given atom is mapped to an atom in the NMRStar file,else otherwise

## isMapped() [2/2]

bool BALL::NMRStarFile::BALLToBMRBMapper::isMapped | ( | const NMRAtomData & | nmr_atom | ) | const

Test whether the given nmr atom data is mapped to a structure atom.

## operator()()

BMRBIndex BALL::NMRStarFile::BALLToBMRBMapper::operator() | ( | const Atom * | atom | ) |

Return the mapping of the given atom.

## setChain()

void BALL::NMRStarFile::BALLToBMRBMapper::setChain | ( | Chain const & | chain | ) |

inline

Set the chain.

Definition at line 488 of file NMRStarFile.h.

## setNMRAtomDataSet()

void BALL::NMRStarFile::BALLToBMRBMapper::setNMRAtomDataSet | ( | NMRAtomDataSet const & | nmr_atom_data_set | ) |

inline

Set the NMRAtomDataSet.

Definition at line 501 of file NMRStarFile.h.

## setNMRAtomDataSetByName()

bool BALL::NMRStarFile::BALLToBMRBMapper::setNMRAtomDataSetByName | ( | String const & | chemical_unit_name | ) |

Set the NMRAtomDataSet by chemical unit name.

## setNMRStarFile()

void BALL::NMRStarFile::BALLToBMRBMapper::setNMRStarFile | ( | NMRStarFile const & | nmrfile | ) |

inline

Set the NMRStar file.

Definition at line 493 of file NMRStarFile.h.

## Member Data Documentation

## ball_to_bmrb_map_

BALLToBMRBMapping BALL::NMRStarFile::BALLToBMRBMapper::ball_to_bmrb_map_

protected

map BALL atoms to NMR atom data

Definition at line 581 of file NMRStarFile.h.

## bmrb_to_ball_map_

BMRBToBALLMapping BALL::NMRStarFile::BALLToBMRBMapper::bmrb_to_ball_map_

protected

map NMR atom data to BALL atoms

Definition at line 584 of file NMRStarFile.h.

## chain_

const Chain* BALL::NMRStarFile::BALLToBMRBMapper::chain_

protected

Definition at line 587 of file NMRStarFile.h.

## name_converter_

Peptides::NameConverter BALL::NMRStarFile::BALLToBMRBMapper::name_converter_

protected

Definition at line 574 of file NMRStarFile.h.

## nmr_atom_data_set_

const NMRAtomDataSet* BALL::NMRStarFile::BALLToBMRBMapper::nmr_atom_data_set_

protected

Definition at line 589 of file NMRStarFile.h.

## nmr_atom_data_set_index_

Position BALL::NMRStarFile::BALLToBMRBMapper::nmr_atom_data_set_index_

protected

Definition at line 590 of file NMRStarFile.h.

## nmr_data_

const NMRStarFile* BALL::NMRStarFile::BALLToBMRBMapper::nmr_data_

protected

Definition at line 588 of file NMRStarFile.h.

## num_gaps_

int BALL::NMRStarFile::BALLToBMRBMapper::num_gaps_

protected

Definition at line 592 of file NMRStarFile.h.

## num_mismatches_

int BALL::NMRStarFile::BALLToBMRBMapper::num_mismatches_

protected

Definition at line 591 of file NMRStarFile.h.

## valid_

bool BALL::NMRStarFile::BALLToBMRBMapper::valid_

protected

Definition at line 593 of file NMRStarFile.h.