Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Static Public Member Functions | Protected Attributes | Friends

Residue Class Reference
[Chemistry]

Representation of a residue. More...

#include <OpenMS/CHEMISTRY/Residue.h>

List of all members.

Public Types

Enums

enum  ResidueType {
  Full = 0, Internal, NTerminal, CTerminal,
  AIon, BIon, CIonMinusOne, CIon,
  CIonPlusOne, CIonPlusTwo, XIon, YIon,
  ZIonMinusOne, ZIon, ZIonPlusOne, ZIonPlusTwo,
  SizeOfResidueType
}

Public Member Functions

Constructors

 Residue ()
 default contructor
 Residue (const Residue &residue)
 copy constructor
 Residue (const String &name, const String &three_letter_code, const String &one_letter_code, const EmpiricalFormula &formula)
 detailed constructor
virtual ~Residue ()
 destructor
Assignment

Residueoperator= (const Residue &residue)
 assignment operator

void setName (const String &name)
 sets the name of the residue
const StringgetName () const
 returns the name of the residue
void setShortName (const String &short_name)
 sets the short name of the residue, this name is used in the PeptideSequence for output
const StringgetShortName () const
 returns the short name of the residue
void setSynonyms (const std::set< String > &synonyms)
 sets the synonyms
void addSynonym (const String &synonym)
 adds a synonym
const std::set< String > & getSynonyms () const
 returns the sysnonyms
void setThreeLetterCode (const String &three_letter_code)
 sets the name of the residue as three letter code
const StringgetThreeLetterCode () const
 returns the name of the residue as three letter code
void setOneLetterCode (const String &one_letter_code)
 sets the name as one letter code
const StringgetOneLetterCode () const
 returns the name as one letter code
void addLossFormula (const EmpiricalFormula &)
 adds a neutral loss formula
void setLossFormulas (const std::vector< EmpiricalFormula > &)
 sets the neutral loss formulas
void addNTermLossFormula (const EmpiricalFormula &)
 adds N-terminal losses
void setNTermLossFormulas (const std::vector< EmpiricalFormula > &)
 sets the N-terminal losses
const std::vector
< EmpiricalFormula > & 
getLossFormulas () const
 returns the neutral loss formulas
const std::vector
< EmpiricalFormula > & 
getNTermLossFormulas () const
 returns N-terminal loss formulas
void setLossNames (const std::vector< String > &name)
 set the neutral loss molecule name
void setNTermLossNames (const std::vector< String > &name)
 sets the N-terminal loss names
void addLossName (const String &name)
 add neutral loss molecule name
void addNTermLossName (const String &name)
 adds a N-terminal loss name
const std::vector< String > & getLossNames () const
 gets neutral loss name (if there is one, else returns an empty string)
const std::vector< String > & getNTermLossNames () const
 returns the N-terminal loss names
void setFormula (const EmpiricalFormula &formula)
 set empirical formula of the residue (must be full, with N and C-terminus)
EmpiricalFormula getFormula (ResidueType res_type=Full) const
 returns the empirical formula of the residue
void setAverageWeight (DoubleReal weight)
 sets average weight of the residue (must be full, with N and C-terminus)
DoubleReal getAverageWeight (ResidueType res_type=Full) const
 returns average weight of the residue
void setMonoWeight (DoubleReal weight)
 sets mono weight of the residue (must be full, with N and C-terminus)
DoubleReal getMonoWeight (ResidueType res_type=Full) const
 returns mono weight of the residue
void setModification (const String &name)
 sets by the name, this mod should be present in ModificationsDB
const StringgetModification () const
 returns the name of the modification to the modification
void setLowMassIons (const std::vector< EmpiricalFormula > &low_mass_ions)
 sets the low mass marker ions as a vector of formulas
const std::vector
< EmpiricalFormula > & 
getLowMassIons () const
 returns a vector of formulas with the low mass markers of the residue
void setResidueSets (const std::set< String > &residues_sets)
 sets the residue sets the amino acid is contained in
void addResidueSet (const String &residue_sets)
 adds a residue set to the residue sets
const std::set< String > & getResidueSets () const
 returns the residue sets this residue is contained in
Predicates

bool hasNeutralLoss () const
 true if the residue has neutral loss
bool hasNTermNeutralLosses () const
 true if N-terminal neutral losses are set
bool operator== (const Residue &residue) const
 equality operator
bool operator!= (const Residue &residue) const
 inequality operator
bool operator== (char one_letter_code) const
 equality operator for one letter code
bool operator!= (char one_letter_code) const
 equality operator for one letter code
DoubleReal getPka () const
 returns the pka of the residue
DoubleReal getPkb () const
 returns the pkb of the residue
DoubleReal getPkc () const
 returns the pkc of the residue if it exists otherwise -1
DoubleReal getPiValue () const
 calculates the isoelectric point using the pk* values
void setPka (DoubleReal value)
 sets the pka of the residue
void setPkb (DoubleReal value)
 sets the pkb of the residue
void setPkc (DoubleReal value)
 sets the pkc of the residue
DoubleReal getSideChainBasicity () const
 returns the side chain basicity
void setSideChainBasicity (DoubleReal gb_sc)
 sets the side chain basicity
DoubleReal getBackboneBasicityLeft () const
 returns the backbone basicitiy if located in N-terminal direction
void setBackboneBasicityLeft (DoubleReal gb_bb_l)
 sets the N-terminal direction backbone basicitiy
DoubleReal getBackboneBasicityRight () const
 returns the C-terminal direction backbone basicitiy
void setBackboneBasicityRight (DoubleReal gb_bb_r)
 sets the C-terminal direction backbone basicity
bool isModified () const
 true if the residue is a modified one
bool isInResidueSet (const String &residue_set)
 true if the residue is contained in the set

Static Public Member Functions

static String getResidueTypeName (const ResidueType res_type)
 returns the ion name given as a residue type
Typedefs and Constants

static const EmpiricalFormulagetInternalToFull ()
static DoubleReal getInternalToFullAverageWeight ()
static DoubleReal getInternalToFullMonoWeight ()
static const EmpiricalFormulagetNTerminalToFull ()
static DoubleReal getNTerminalToFullAverageWeight ()
static DoubleReal getNTerminalToFullMonoWeight ()
static const EmpiricalFormulagetCTerminalToFull ()
static DoubleReal getCTerminalToFullAverageWeight ()
static DoubleReal getCTerminalToFullMonoWeight ()
static const EmpiricalFormulagetBIonToFull ()
static DoubleReal getBIonToFullAverageWeight ()
static DoubleReal getBIonToFullMonoWeight ()
static const EmpiricalFormulagetAIonToFull ()
static DoubleReal getAIonToFullAverageWeight ()
static DoubleReal getAIonToFullMonoWeight ()
static const EmpiricalFormulagetYIonToFull ()
static DoubleReal getYIonToFullAverageWeight ()
static DoubleReal getYIonToFullMonoWeight ()
static const EmpiricalFormulagetCIonToFull ()
static DoubleReal getCIonToFullAverageWeight ()
static DoubleReal getCIonToFullMonoWeight ()
static const EmpiricalFormulagetCIonMinusOneToFull ()
static DoubleReal getCIonMinusOneToFullAverageWeight ()
static DoubleReal getCIonMinusOneToFullMonoWeight ()
static const EmpiricalFormulagetCIonPlusOneToFull ()
static DoubleReal getCIonPlusOneToFullAverageWeight ()
static DoubleReal getCIonPlusOneToFullMonoWeight ()
static const EmpiricalFormulagetCIonPlusTwoToFull ()
static DoubleReal getCIonPlusTwoToFullAverageWeight ()
static DoubleReal getCIonPlusTwoToFullMonoWeight ()
static const EmpiricalFormulagetXIonToFull ()
static DoubleReal getXIonToFullAverageWeight ()
static DoubleReal getXIonToFullMonoWeight ()
static const EmpiricalFormulagetZIonToFull ()
static DoubleReal getZIonToFullAverageWeight ()
static DoubleReal getZIonToFullMonoWeight ()
static const EmpiricalFormulagetZIonMinusOneToFull ()
static DoubleReal getZIonMinusOneToFullAverageWeight ()
static DoubleReal getZIonMinusOneToFullMonoWeight ()
static const EmpiricalFormulagetZIonPlusOneToFull ()
static DoubleReal getZIonPlusOneToFullAverageWeight ()
static DoubleReal getZIonPlusOneToFullMonoWeight ()
static const EmpiricalFormulagetZIonPlusTwoToFull ()
static DoubleReal getZIonPlusTwoToFullAverageWeight ()
static DoubleReal getZIonPlusTwoToFullMonoWeight ()

Protected Attributes

String name_
String short_name_
std::set< Stringsynonyms_
String three_letter_code_
String one_letter_code_
EmpiricalFormula formula_
EmpiricalFormula internal_formula_
DoubleReal average_weight_
DoubleReal mono_weight_
bool is_modified_
String pre_mod_name_
String modification_
std::vector< Stringloss_names_
std::vector< EmpiricalFormulaloss_formulas_
std::vector< StringNTerm_loss_names_
std::vector< EmpiricalFormulaNTerm_loss_formulas_
DoubleReal loss_average_weight_
DoubleReal loss_mono_weight_
std::vector< EmpiricalFormulalow_mass_ions_
DoubleReal pka_
DoubleReal pkb_
DoubleReal pkc_
DoubleReal gb_sc_
DoubleReal gb_bb_l_
DoubleReal gb_bb_r_
std::set< Stringresidue_sets_

Friends

std::ostream & operator<< (std::ostream &os, const Residue &residue)
 ostream iterator to write the residue to a stream

Detailed Description

Representation of a residue.

This class represents residues. Residues can have many different attributes, like the formula physico-chemical values of properties and so on.

A very important property of residues are their modifications. By default no modification is present. Any modification which is present in the ModificationsDB can be applied, if appropriate.


Member Enumeration Documentation

Enumerator:
Full 
Internal 
NTerminal 
CTerminal 
AIon 
BIon 
CIonMinusOne 
CIon 
CIonPlusOne 
CIonPlusTwo 
XIon 
YIon 
ZIonMinusOne 
ZIon 
ZIonPlusOne 
ZIonPlusTwo 
SizeOfResidueType 
Todo:
add c+1, z+1, z+2 ion types (Andreas)

Constructor & Destructor Documentation

Residue (  ) 

default contructor

Residue ( const Residue residue  ) 

copy constructor

Residue ( const String name,
const String three_letter_code,
const String one_letter_code,
const EmpiricalFormula formula 
)

detailed constructor

virtual ~Residue (  )  [virtual]

destructor


Member Function Documentation

void addLossFormula ( const EmpiricalFormula  ) 

adds a neutral loss formula

void addLossName ( const String name  ) 

add neutral loss molecule name

void addNTermLossFormula ( const EmpiricalFormula  ) 

adds N-terminal losses

void addNTermLossName ( const String name  ) 

adds a N-terminal loss name

void addResidueSet ( const String residue_sets  ) 

adds a residue set to the residue sets

void addSynonym ( const String synonym  ) 

adds a synonym

static const EmpiricalFormula& getAIonToFull (  )  [inline, static]
static DoubleReal getAIonToFullAverageWeight (  )  [inline, static]
static DoubleReal getAIonToFullMonoWeight (  )  [inline, static]
DoubleReal getAverageWeight ( ResidueType  res_type = Full  )  const

returns average weight of the residue

DoubleReal getBackboneBasicityLeft (  )  const

returns the backbone basicitiy if located in N-terminal direction

DoubleReal getBackboneBasicityRight (  )  const

returns the C-terminal direction backbone basicitiy

static const EmpiricalFormula& getBIonToFull (  )  [inline, static]
static DoubleReal getBIonToFullAverageWeight (  )  [inline, static]
static DoubleReal getBIonToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getCIonMinusOneToFull (  )  [inline, static]
static DoubleReal getCIonMinusOneToFullAverageWeight (  )  [inline, static]
static DoubleReal getCIonMinusOneToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getCIonPlusOneToFull (  )  [inline, static]
static DoubleReal getCIonPlusOneToFullAverageWeight (  )  [inline, static]
static DoubleReal getCIonPlusOneToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getCIonPlusTwoToFull (  )  [inline, static]
static DoubleReal getCIonPlusTwoToFullAverageWeight (  )  [inline, static]
static DoubleReal getCIonPlusTwoToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getCIonToFull (  )  [inline, static]
static DoubleReal getCIonToFullAverageWeight (  )  [inline, static]
static DoubleReal getCIonToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getCTerminalToFull (  )  [inline, static]
static DoubleReal getCTerminalToFullAverageWeight (  )  [inline, static]
static DoubleReal getCTerminalToFullMonoWeight (  )  [inline, static]
EmpiricalFormula getFormula ( ResidueType  res_type = Full  )  const

returns the empirical formula of the residue

static const EmpiricalFormula& getInternalToFull (  )  [inline, static]
static DoubleReal getInternalToFullAverageWeight (  )  [inline, static]
static DoubleReal getInternalToFullMonoWeight (  )  [inline, static]
const std::vector<EmpiricalFormula>& getLossFormulas (  )  const

returns the neutral loss formulas

const std::vector<String>& getLossNames (  )  const

gets neutral loss name (if there is one, else returns an empty string)

const std::vector<EmpiricalFormula>& getLowMassIons (  )  const

returns a vector of formulas with the low mass markers of the residue

const String& getModification (  )  const

returns the name of the modification to the modification

DoubleReal getMonoWeight ( ResidueType  res_type = Full  )  const

returns mono weight of the residue

const String& getName (  )  const

returns the name of the residue

static const EmpiricalFormula& getNTerminalToFull (  )  [inline, static]
static DoubleReal getNTerminalToFullAverageWeight (  )  [inline, static]
static DoubleReal getNTerminalToFullMonoWeight (  )  [inline, static]
const std::vector<EmpiricalFormula>& getNTermLossFormulas (  )  const

returns N-terminal loss formulas

const std::vector<String>& getNTermLossNames (  )  const

returns the N-terminal loss names

const String& getOneLetterCode (  )  const

returns the name as one letter code

Referenced by AAIndex::calculateGB().

DoubleReal getPiValue (  )  const

calculates the isoelectric point using the pk* values

DoubleReal getPka (  )  const

returns the pka of the residue

DoubleReal getPkb (  )  const

returns the pkb of the residue

DoubleReal getPkc (  )  const

returns the pkc of the residue if it exists otherwise -1

const std::set<String>& getResidueSets (  )  const

returns the residue sets this residue is contained in

static String getResidueTypeName ( const ResidueType  res_type  )  [static]

returns the ion name given as a residue type

const String& getShortName (  )  const

returns the short name of the residue

DoubleReal getSideChainBasicity (  )  const

returns the side chain basicity

const std::set<String>& getSynonyms (  )  const

returns the sysnonyms

const String& getThreeLetterCode (  )  const

returns the name of the residue as three letter code

static const EmpiricalFormula& getXIonToFull (  )  [inline, static]
static DoubleReal getXIonToFullAverageWeight (  )  [inline, static]
static DoubleReal getXIonToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getYIonToFull (  )  [inline, static]
static DoubleReal getYIonToFullAverageWeight (  )  [inline, static]
static DoubleReal getYIonToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getZIonMinusOneToFull (  )  [inline, static]
static DoubleReal getZIonMinusOneToFullAverageWeight (  )  [inline, static]
static DoubleReal getZIonMinusOneToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getZIonPlusOneToFull (  )  [inline, static]
static DoubleReal getZIonPlusOneToFullAverageWeight (  )  [inline, static]
static DoubleReal getZIonPlusOneToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getZIonPlusTwoToFull (  )  [inline, static]
static DoubleReal getZIonPlusTwoToFullAverageWeight (  )  [inline, static]
static DoubleReal getZIonPlusTwoToFullMonoWeight (  )  [inline, static]
static const EmpiricalFormula& getZIonToFull (  )  [inline, static]
static DoubleReal getZIonToFullAverageWeight (  )  [inline, static]
static DoubleReal getZIonToFullMonoWeight (  )  [inline, static]
bool hasNeutralLoss (  )  const

true if the residue has neutral loss

bool hasNTermNeutralLosses (  )  const

true if N-terminal neutral losses are set

bool isInResidueSet ( const String residue_set  ) 

true if the residue is contained in the set

bool isModified (  )  const

true if the residue is a modified one

bool operator!= ( const Residue residue  )  const

inequality operator

bool operator!= ( char  one_letter_code  )  const

equality operator for one letter code

Residue& operator= ( const Residue residue  ) 

assignment operator

bool operator== ( char  one_letter_code  )  const

equality operator for one letter code

bool operator== ( const Residue residue  )  const

equality operator

void setAverageWeight ( DoubleReal  weight  ) 

sets average weight of the residue (must be full, with N and C-terminus)

void setBackboneBasicityLeft ( DoubleReal  gb_bb_l  ) 

sets the N-terminal direction backbone basicitiy

void setBackboneBasicityRight ( DoubleReal  gb_bb_r  ) 

sets the C-terminal direction backbone basicity

void setFormula ( const EmpiricalFormula formula  ) 

set empirical formula of the residue (must be full, with N and C-terminus)

void setLossFormulas ( const std::vector< EmpiricalFormula > &   ) 

sets the neutral loss formulas

void setLossNames ( const std::vector< String > &  name  ) 

set the neutral loss molecule name

void setLowMassIons ( const std::vector< EmpiricalFormula > &  low_mass_ions  ) 

sets the low mass marker ions as a vector of formulas

void setModification ( const String name  ) 

sets by the name, this mod should be present in ModificationsDB

void setMonoWeight ( DoubleReal  weight  ) 

sets mono weight of the residue (must be full, with N and C-terminus)

void setName ( const String name  ) 

sets the name of the residue

Accessors

void setNTermLossFormulas ( const std::vector< EmpiricalFormula > &   ) 

sets the N-terminal losses

void setNTermLossNames ( const std::vector< String > &  name  ) 

sets the N-terminal loss names

void setOneLetterCode ( const String one_letter_code  ) 

sets the name as one letter code

void setPka ( DoubleReal  value  ) 

sets the pka of the residue

void setPkb ( DoubleReal  value  ) 

sets the pkb of the residue

void setPkc ( DoubleReal  value  ) 

sets the pkc of the residue

void setResidueSets ( const std::set< String > &  residues_sets  ) 

sets the residue sets the amino acid is contained in

void setShortName ( const String short_name  ) 

sets the short name of the residue, this name is used in the PeptideSequence for output

void setSideChainBasicity ( DoubleReal  gb_sc  ) 

sets the side chain basicity

void setSynonyms ( const std::set< String > &  synonyms  ) 

sets the synonyms

void setThreeLetterCode ( const String three_letter_code  ) 

sets the name of the residue as three letter code


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Residue residue 
) [friend]

ostream iterator to write the residue to a stream


Member Data Documentation

DoubleReal gb_bb_l_ [protected]
DoubleReal gb_bb_r_ [protected]
DoubleReal gb_sc_ [protected]
bool is_modified_ [protected]
std::vector<EmpiricalFormula> loss_formulas_ [protected]
std::vector<String> loss_names_ [protected]
std::vector<EmpiricalFormula> low_mass_ions_ [protected]
String modification_ [protected]
DoubleReal mono_weight_ [protected]
String name_ [protected]
std::vector<EmpiricalFormula> NTerm_loss_formulas_ [protected]
std::vector<String> NTerm_loss_names_ [protected]
String one_letter_code_ [protected]
DoubleReal pka_ [protected]
DoubleReal pkb_ [protected]
DoubleReal pkc_ [protected]
String pre_mod_name_ [protected]
std::set<String> residue_sets_ [protected]
String short_name_ [protected]
std::set<String> synonyms_ [protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1