Loading...
Searching...
No Matches
BALL::Peptides::NameConverter Class Reference

This class provides conversion of atom names between naming schemata. More...

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

Inheritance diagram for BALL::Peptides::NameConverter:

## Classes

struct | Option
| Option names. More...
struct | Default
| Default values for options. More...

## Constant Definitions

static const String | VALUE_NA
| NameConverter ()
virtual | ~NameConverter ()
| Destructor.
void | setDefaultOptions ()
bool | supportsNamingScheme (const String &scheme_name) const
bool | supportsPseudoAtomNamingScheme (const String &scheme_name) const
String | convertName (const String &amino_acid, const String &old_atom_name, const String &old_naming_scheme, const String &new_naming_scheme) const
bool | matches (const String &amino_acid, const String &old_atom_name, const String &old_naming_scheme, const String &new_atom_name, const String &new_naming_scheme) const
std::vector< String > | resolvePseudoAtoms (const String &amino_acid, const String &atom_name, const String &old_naming_scheme, const String &new_naming_scheme) const

## Public Attributes

Options | options
| options
std::vector< String > | conventions_
std::vector< std::vector< String > > | conversion_table_
std::vector< String > | pseudo_conventions_
std::vector< std::vector< std::vector< String > > > | pseudo_conversion_table_
void | readConversionTable_ ()
void | readPseudoAtomsConversionTable_ ()

## Additional Inherited Members

Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
Public Member Functions inherited from BALL::Embeddable
| Embeddable (const String &identifier="<Embeddable>")
| Embeddable (const Embeddable &embeddable)
virtual | ~Embeddable ()
void | setIdentifier (const String &identifier)
const String & | getIdentifier () const
void | unregisterThis ()
virtual void | registerThis ()
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance)
static void | unregisterInstance_ (const Embeddable *instance)
static Size | countInstances_ (const std::type_info &type)
static Embeddable * | getInstance_ (const std::type_info &type, Position index)
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier)

## Detailed Description

This class provides conversion of atom names between naming schemata.

Name Converter class.

Converts hydrogen atom names between naming systems. The original version of this table was created by Charles Hoogstraten. The default ini file allows conversion between BMRB, SC, PDB, UCSF, MSI, XPLOR, SYBYL*, MIDAS*, and DIANA.

If no new atom name can be found the old name is returned.

Example code:

NameConverter converter();
if ( converter.supportsNamingScheme("BMRB")
&& converter.supportsNamingScheme("PDB"))
{
...
String atom_name = "HB2";
String pdb_name = converter.convertName("ALA", atom_name, "BMRB", "PDB");
...
}
if ( converter.supportsPseudoAtomNamingScheme("NMRSTAR")
&& converter.supportsPseudoAtomNamingScheme("PDB"))
{
std::vector<String> result = converter.resolvePseudoAtoms("R", "HB", "NMRSTAR", "PDB");
cout << "pseudo atom HB of residue R can be matched to " << result.size() << " PDB atoms." << endl;
Atom* atom = ...;
if (converter.matches(atom->getResidue()->getName(), atom->getName(), "PDB", "HG2", "NMRSTAR"))
{
cout << "atom " << atom->getName() << " is a HG2 pseudo atom." << endl;
}
}
BALL::Atom
Definition atom.h:90
BALL::Peptides::NameConverter::NameConverter
NameConverter()
BALL::String
Definition string.h:57

Definition at line 150 of file peptides.h.

## Constructor & Destructor Documentation

## NameConverter()

BALL::Peptides::NameConverter::NameConverter | ( |  | ) |

Standard constructor

## ~NameConverter()

virtual BALL::Peptides::NameConverter::~NameConverter | ( |  | ) |

inline virtual

Destructor.

Definition at line 187 of file peptides.h.

## Member Function Documentation

## convertName()

String BALL::Peptides::NameConverter::convertName | ( | const String & | amino_acid,
|  | const String & | old_atom_name,
|  | const String & | old_naming_scheme,
|  | const String & | new_naming_scheme ) const

Convert atom name between two naming schemes.

If one of the naming schemes is unknown, or the name was not found, the old name is returned.

Returns
  String - the converted name.

## matches()

bool BALL::Peptides::NameConverter::matches | ( | const String & | amino_acid,
|  | const String & | old_atom_name,
|  | const String & | old_naming_scheme,
|  | const String & | new_atom_name,
|  | const String & | new_naming_scheme ) const

Test whether two names for an atom are equivalent in different naming schemes.

The match can either be according the the conversion as defined in the INIFile or one atom is a pseudo atom and matches the other one according the PSEUDO_ATOMS_INIFile .

Returns
  bool - true if the atom names can be matched, false otherwise.

## readConversionTable_()

void BALL::Peptides::NameConverter::readConversionTable_ | ( |  | ) |

protected

Read the Conversion table from file.

Exceptions

  BALL::Exception::FileNotFound |

## readPseudoAtomsConversionTable_()

void BALL::Peptides::NameConverter::readPseudoAtomsConversionTable_ | ( |  | ) |

protected

Read the pseudo atoms conversion table from file.

Exceptions

  BALL::Exception::FileNotFound |

## resolvePseudoAtoms()

std::vector< String > BALL::Peptides::NameConverter::resolvePseudoAtoms | ( | const String & | amino_acid,
|  | const String & | atom_name,
|  | const String & | old_naming_scheme,
|  | const String & | new_naming_scheme ) const

Resolve pseudo atoms among naming schemes.

If the input is a pseudo atom in the given naming scheme, convert it into the list of atoms in the desired naming scheme.

Parameters

  amino_acid | the amino acid type of the atom
  atom_name | the atom name to test
  old_naming_scheme | the naming scheme of the input
  new_naming_scheme | the desired naming scheme

Returns
  const std::vector<String>& - the list of atoms this atom resolves to

## setDefaultOptions()

void BALL::Peptides::NameConverter::setDefaultOptions | ( |  | ) |

Reset the options to default values.

## supportsNamingScheme()

bool BALL::Peptides::NameConverter::supportsNamingScheme | ( | const String & | scheme_name | ) | const

Determine whether the Converter supports the naming scheme scheme_name.

Parameters

  scheme_name | naming scheme in question

Returns
  bool - true if the naming scheme is supported, false otherwise

## supportsPseudoAtomNamingScheme()

bool BALL::Peptides::NameConverter::supportsPseudoAtomNamingScheme | ( | const String & | scheme_name | ) | const

Determine whether the Converter supports the naming scheme scheme_name for pseudo atoms.

Parameters

  scheme_name | naming scheme in question

Returns
  bool - true if the naming scheme is supported, false otherwise

## Member Data Documentation

## conventions_

std::vector<String> BALL::Peptides::NameConverter::conventions_

protected

Definition at line 263 of file peptides.h.

## conversion_table_

std::vector< std::vector <String> > BALL::Peptides::NameConverter::conversion_table_

protected

Definition at line 264 of file peptides.h.

## options

Options BALL::Peptides::NameConverter::options

options

Definition at line 248 of file peptides.h.

## pseudo_conventions_

std::vector<String> BALL::Peptides::NameConverter::pseudo_conventions_

protected

Definition at line 266 of file peptides.h.

## pseudo_conversion_table_

std::vector< std::vector <std::vector <String> > > BALL::Peptides::NameConverter::pseudo_conversion_table_

protected

Definition at line 267 of file peptides.h.

## VALUE_NA

const String BALL::Peptides::NameConverter::VALUE_NA

static

Definition at line 160 of file peptides.h.