BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Protected Attributes | Private Member Functions
BALL::NMRStarFile::BALLToBMRBMapper Class Reference

#include <BALL/FORMAT/NMRStarFile.h>

List of all members.

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
const ChaingetChain () const
 Get the chain.
void setChain (Chain const &chain)
 Set the chain.
void setNMRStarFile (NMRStarFile const &nmrfile)
 Set the NMRStar file.
const NMRStarFilegetNMRStarFile () 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 NMRAtomDataSetgetNMRAtomDataSet () const
BALLToBMRBMappinggetBALLToBMRBMapping ()
 Return the mapping.
const BALLToBMRBMappinggetBALLToBMRBMapping () const
 Return the mapping.
BMRBToBALLMappinggetBMRBToBALLMapping ()
 Return the mapping.
const BMRBToBALLMappinggetBMRBToBALLMapping () 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 AtomgetBALLAtom (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 ()

Protected Attributes

Peptides::NameConverter name_converter_
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 Chainchain_
const NMRStarFilenmr_data_
const NMRAtomDataSetnmr_atom_data_set_
Position nmr_atom_data_set_index_
int num_mismatches_
int num_gaps_
bool valid_

Private Member Functions

const AtomfindNMRAtom_ (const NMRAtomData &atom) const

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 449 of file NMRStarFile.h.


Member Typedef Documentation

Definition at line 461 of file NMRStarFile.h.

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

Definition at line 460 of file NMRStarFile.h.

Definition at line 462 of file NMRStarFile.h.


Constructor & Destructor Documentation

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

Detailed constructor

Parameters:
chainthe chain to be mapped to a shift reference set
nmr_datathe NMRStarFile provinding the chemical shifts for chain
chemical_unitthe name of the molecular system (chemical unit) storing the atom shifts

Destructor.

Definition at line 481 of file NMRStarFile.h.


Member Function Documentation

Clear the object.

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_sequencethe aligned protein or chain aminoacid sequence
aligned_nmrstar_sequencethe aligned aminoacid sequence of the NMRStar atoms
Returns:
bool - true if creating the mapping was possible

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
const Atom* BALL::NMRStarFile::BALLToBMRBMapper::findNMRAtom_ ( const NMRAtomData atom) const [private]

Return the atom mapped to the given NMRAtom.

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

Return the mapping.

Definition at line 514 of file NMRStarFile.h.

Return the mapping.

Definition at line 517 of file NMRStarFile.h.

Return the mapping.

Definition at line 520 of file NMRStarFile.h.

Return the mapping.

Definition at line 523 of file NMRStarFile.h.

Get the chain.

Definition at line 489 of file NMRStarFile.h.

Definition at line 511 of file NMRStarFile.h.

Get the NMRStar file.

Definition at line 502 of file NMRStarFile.h.

Return the number of mismatches in the current mapping.

Definition at line 529 of file NMRStarFile.h.

Return the number of mismatches in the current mapping.

Definition at line 526 of file NMRStarFile.h.

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

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
BMRBIndex BALL::NMRStarFile::BALLToBMRBMapper::operator() ( const Atom atom)

Return the mapping of the given atom.

void BALL::NMRStarFile::BALLToBMRBMapper::setChain ( Chain const &  chain) [inline]

Set the chain.

Definition at line 492 of file NMRStarFile.h.

void BALL::NMRStarFile::BALLToBMRBMapper::setNMRAtomDataSet ( NMRAtomDataSet const &  nmr_atom_data_set) [inline]

Set the NMRAtomDataSet.

Definition at line 505 of file NMRStarFile.h.

Set the NMRAtomDataSet by chemical unit name.

Set the NMRStar file.

Definition at line 497 of file NMRStarFile.h.


Member Data Documentation

map BALL atoms to NMR atom data

Definition at line 585 of file NMRStarFile.h.

map NMR atom data to BALL atoms

Definition at line 588 of file NMRStarFile.h.

Definition at line 591 of file NMRStarFile.h.

Definition at line 578 of file NMRStarFile.h.

Definition at line 593 of file NMRStarFile.h.

Definition at line 594 of file NMRStarFile.h.

Definition at line 592 of file NMRStarFile.h.

Definition at line 596 of file NMRStarFile.h.

Definition at line 595 of file NMRStarFile.h.

Definition at line 597 of file NMRStarFile.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines