Loading...
Searching...
No Matches
peptides.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_PEPTIDES_H
#define BALL_STRUCTURE_PEPTIDES_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_KERNEL_PROTEIN_H
# include <BALL/KERNEL/protein.h>
#endif
#ifndef BALL_DATATYPE_OPTIONS_H
# include <BALL/DATATYPE/options.h>
#endif
#ifndef BALL_CONCEPT_EMBEDDABLE_H
# include <BALL/CONCEPT/embeddable.h>
#endif
namespace BALL
{
namespace Peptides
{
typedef std::list<String> ThreeLetterAASequence;
typedef String OneLetterAASequence;
BALL_EXPORT char OneLetterCode(const String& aa);
BALL_EXPORT String ThreeLetterCode(char aa);
BALL_EXPORT bool IsOneLetterCode(char aa);
BALL_EXPORT bool IsThreeLetterCode(const String& aa);
BALL_EXPORT OneLetterAASequence ThreeLetterToOneLetter(const ThreeLetterAASequence& sequence);
BALL_EXPORT ThreeLetterAASequence OneLetterToThreeLetter(const OneLetterAASequence& sequence);
BALL_EXPORT OneLetterAASequence GetSequence(const Protein& protein);
BALL_EXPORT OneLetterAASequence GetSequence(const Chain& chain);
BALL_EXPORT OneLetterAASequence GetSequence(ResidueConstIterator it);
//
class BALL_EXPORT NameConverter
: public Embeddable
{
public:
BALL_EMBEDDABLE(NameConverter, Embeddable)
static const String VALUE_NA;
struct BALL_EXPORT Option
{
static const char* INIFile;
static const char* PSEUDO_ATOMS_INIFile;
};
struct BALL_EXPORT Default
{
static const String INIFile;
static const String PSEUDO_ATOMS_INIFile;
};
NameConverter();
virtual ~NameConverter() {}
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;
Options options;
protected:
void readConversionTable_();
void readPseudoAtomsConversionTable_();
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_;
//TODO: unse a StringHashMap of amino acid names to simplify the access
};
} // namespace Peptides
} // namespace BALL
#endif // BALL_STRUCTURE_PEPTIDES_H_
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::Chain
Definition chain.h:32
BALL::Embeddable::Embeddable
Embeddable(const String &identifier="<Embeddable>")
BALL::Options
Definition options.h:48
BALL::Peptides::NameConverter::~NameConverter
virtual ~NameConverter()
Destructor.
Definition peptides.h:187
BALL::Peptides::NameConverter::pseudo_conversion_table_
std::vector< std::vector< std::vector< String > > > pseudo_conversion_table_
Definition peptides.h:267
BALL::Peptides::NameConverter::supportsPseudoAtomNamingScheme
bool supportsPseudoAtomNamingScheme(const String &scheme_name) const
BALL::Peptides::NameConverter::readPseudoAtomsConversionTable_
void readPseudoAtomsConversionTable_()
BALL::Peptides::NameConverter::pseudo_conventions_
std::vector< String > pseudo_conventions_
Definition peptides.h:266
BALL::Peptides::NameConverter::conversion_table_
std::vector< std::vector< String > > conversion_table_
Definition peptides.h:264
BALL::Peptides::NameConverter::resolvePseudoAtoms
std::vector< String > resolvePseudoAtoms(const String &amino_acid, const String &atom_name, const String &old_naming_scheme, const String &new_naming_scheme) const
BALL::Peptides::NameConverter::options
Options options
options
Definition peptides.h:248
BALL::Peptides::NameConverter::VALUE_NA
static const String VALUE_NA
Definition peptides.h:160
BALL::Peptides::NameConverter::matches
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
BALL::Peptides::NameConverter::setDefaultOptions
void setDefaultOptions()
BALL::Peptides::NameConverter::supportsNamingScheme
bool supportsNamingScheme(const String &scheme_name) const
BALL::Peptides::NameConverter::conventions_
std::vector< String > conventions_
Definition peptides.h:263
BALL::Peptides::NameConverter::readConversionTable_
void readConversionTable_()
BALL::Peptides::NameConverter::NameConverter
NameConverter()
BALL::Peptides::NameConverter::convertName
String convertName(const String &amino_acid, const String &old_atom_name, const String &old_naming_scheme, const String &new_naming_scheme) const
BALL::Protein
Definition protein.h:30
BALL::String
Definition string.h:57
common.h
embeddable.h
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
BALL::Peptides
Definition peptideBuilder.h:17
BALL::Peptides::ThreeLetterToOneLetter
BALL_EXPORT OneLetterAASequence ThreeLetterToOneLetter(const ThreeLetterAASequence &sequence)
BALL::Peptides::GetSequence
BALL_EXPORT OneLetterAASequence GetSequence(const Protein &protein)
BALL::Peptides::OneLetterCode
BALL_EXPORT char OneLetterCode(const String &aa)
BALL::Peptides::IsOneLetterCode
BALL_EXPORT bool IsOneLetterCode(char aa)
BALL::Peptides::ThreeLetterAASequence
std::list< String > ThreeLetterAASequence
An amino acid sequence in three-letter code.
Definition peptides.h:35
BALL::Peptides::OneLetterToThreeLetter
BALL_EXPORT ThreeLetterAASequence OneLetterToThreeLetter(const OneLetterAASequence &sequence)
BALL::Peptides::IsThreeLetterCode
BALL_EXPORT bool IsThreeLetterCode(const String &aa)
BALL::Peptides::ThreeLetterCode
BALL_EXPORT String ThreeLetterCode(char aa)
BALL::Peptides::OneLetterAASequence
String OneLetterAASequence
An amino acid sequence in one-letter code.
Definition peptides.h:38
BALL
Definition constants.h:13
BALL::ResidueConstIterator
ConstBidirectionalIterator< Composite, Residue, Composite::CompositeIterator, ResidueIteratorTraits > ResidueConstIterator
Definition residueIterator.h:67
options.h
protein.h
BALL::Peptides::NameConverter::Default
Default values for options.
Definition peptides.h:177
BALL::Peptides::NameConverter::Default::PSEUDO_ATOMS_INIFile
static const String PSEUDO_ATOMS_INIFile
Definition peptides.h:179
BALL::Peptides::NameConverter::Default::INIFile
static const String INIFile
Definition peptides.h:178
BALL::Peptides::NameConverter::Option
Option names.
Definition peptides.h:164
BALL::Peptides::NameConverter::Option::PSEUDO_ATOMS_INIFile
static const char * PSEUDO_ATOMS_INIFile
Definition peptides.h:171
BALL::Peptides::NameConverter::Option::INIFile
static const char * INIFile
Definition peptides.h:167