BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
peptides.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_PEPTIDES_H
6 #define BALL_STRUCTURE_PEPTIDES_H
7 
8 #ifndef BALL_COMMON_H
9 # include <BALL/common.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_PROTEIN_H
13 # include <BALL/KERNEL/protein.h>
14 #endif
15 
16 #ifndef BALL_DATATYPE_OPTIONS_H
17 # include <BALL/DATATYPE/options.h>
18 #endif
19 
20 #ifndef BALL_CONCEPT_EMBEDDABLE_H
21 # include <BALL/CONCEPT/embeddable.h>
22 #endif
23 
24 namespace BALL
25 {
26 
27  namespace Peptides
28  {
33 
35  typedef std::list<String> ThreeLetterAASequence;
36 
40 
45 
50  BALL_EXPORT char OneLetterCode(const String& aa);
51 
58 
64  BALL_EXPORT bool IsOneLetterCode(char aa);
65 
71  BALL_EXPORT bool IsThreeLetterCode(const String& aa);
72 
77 
82 
89 
96 
104 
106 //
108 
151  : public Embeddable
152  {
153  public:
155 
156 
159 
160  static const String VALUE_NA;
161 
164  {
167  static const char* INIFile;
168 
171  static const char* PSEUDO_ATOMS_INIFile;
172 
173  };
174 
177  {
178  static const String INIFile;
180  };
181 
184  NameConverter();
185 
187  virtual ~NameConverter() {}
188 
191  void setDefaultOptions();
192 
198  bool supportsNamingScheme(const String& scheme_name) const;
199 
205  bool supportsPseudoAtomNamingScheme(const String& scheme_name) const;
206 
214  String convertName(const String& amino_acid, const String& old_atom_name,
215  const String& old_naming_scheme, const String& new_naming_scheme) const;
216 
226  bool matches(const String& amino_acid, const String& old_atom_name,
227  const String& old_naming_scheme, const String& new_atom_name,
228  const String& new_naming_scheme) const;
229 
241  std::vector<String> resolvePseudoAtoms(const String& amino_acid, const String& atom_name,
242  const String& old_naming_scheme, const String& new_naming_scheme) const;
243 
247 
250 
251  protected:
252 
255  void readConversionTable_()
256  throw (Exception::FileNotFound());
257 
260  void readPseudoAtomsConversionTable_()
261  throw (Exception::FileNotFound());
262 
263  std::vector<String> conventions_;
264  std::vector< std::vector <String> > conversion_table_;
265 
266  std::vector<String> pseudo_conventions_;
267  std::vector< std::vector <std::vector <String> > > pseudo_conversion_table_;
268 
269  //TODO: unse a StringHashMap of amino acid names to simplify the access
270  };
271 
272  } // namespace Peptides
273 
274 } // namespace BALL
275 
276 #endif // BALL_STRUCTURE_PEPTIDES_H_
277 
278