This class provides conversion of atom names between naming schemata. More...
#include <BALL/STRUCTURE/peptides.h>
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< String > | conventions_ |
std::vector< std::vector < String > > | conversion_table_ |
std::vector< String > | pseudo_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< String > | resolvePseudoAtoms (const String &amino_acid, const String &atom_name, const String &old_naming_scheme, const String &new_naming_scheme) const |
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 151 of file peptides.h.
BALL::Peptides::NameConverter::NameConverter | ( | ) |
Standard constructor
virtual BALL::Peptides::NameConverter::~NameConverter | ( | ) | [inline, virtual] |
Destructor.
Definition at line 188 of file peptides.h.
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.
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 .
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.
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 |
void BALL::Peptides::NameConverter::setDefaultOptions | ( | ) |
Reset the options to default values.
Determine whether the Converter supports the naming scheme scheme_name.
scheme_name | naming scheme in question |
bool BALL::Peptides::NameConverter::supportsPseudoAtomNamingScheme | ( | const String & | scheme_name | ) | const |
Determine whether the Converter supports the naming scheme scheme_name for pseudo atoms.
scheme_name | naming scheme in question |
std::vector<String> BALL::Peptides::NameConverter::conventions_ [protected] |
Definition at line 264 of file peptides.h.
std::vector< std::vector <String> > BALL::Peptides::NameConverter::conversion_table_ [protected] |
Definition at line 265 of file peptides.h.
options
Definition at line 249 of file peptides.h.
std::vector<String> BALL::Peptides::NameConverter::pseudo_conventions_ [protected] |
Definition at line 267 of file peptides.h.
std::vector< std::vector <std::vector <String> > > BALL::Peptides::NameConverter::pseudo_conversion_table_ [protected] |
Definition at line 268 of file peptides.h.
const String BALL::Peptides::NameConverter::VALUE_NA [static] |
Definition at line 161 of file peptides.h.