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:
Inheritance graph
[legend]

List of all members.

Classes

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

Public Attributes

Public Attributes

Options options
 options

Protected Member Functions

void readConversionTable_ () throw (Exception::FileNotFound())
void readPseudoAtomsConversionTable_ () throw (Exception::FileNotFound())

Protected Attributes

std::vector< Stringconventions_
std::vector< std::vector
< String > > 
conversion_table_
std::vector< Stringpseudo_conventions_
std::vector< std::vector
< std::vector< String > > > 
pseudo_conversion_table_

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< StringresolvePseudoAtoms (const String &amino_acid, const String &atom_name, const String &old_naming_scheme, const String &new_naming_scheme) const

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;
            }
          }

Definition at line 150 of file peptides.h.


Constructor & Destructor Documentation

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

Standard constructor

virtual BALL::Peptides::NameConverter::~NameConverter (  )  [inline, virtual]

Destructor.

Definition at line 187 of file peptides.h.


Member Function Documentation

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.
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.
void BALL::Peptides::NameConverter::readConversionTable_ (  )  throw (Exception::FileNotFound()) [protected]

Read the Conversion table from file.

void BALL::Peptides::NameConverter::readPseudoAtomsConversionTable_ (  )  throw (Exception::FileNotFound()) [protected]

Read the pseudo atoms conversion table from file.

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
void BALL::Peptides::NameConverter::setDefaultOptions (  ) 

Reset the options to default values.

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
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

Definition at line 263 of file peptides.h.

std::vector< std::vector <String> > BALL::Peptides::NameConverter::conversion_table_ [protected]

Definition at line 264 of file peptides.h.

options

Definition at line 248 of file peptides.h.

Definition at line 266 of file peptides.h.

std::vector< std::vector <std::vector <String> > > BALL::Peptides::NameConverter::pseudo_conversion_table_ [protected]

Definition at line 267 of file peptides.h.

Definition at line 160 of file peptides.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3