Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Static Public Member Functions | Protected Attributes | Friends | List of all members
Residue Class Reference

Representation of a residue. More...

#include <OpenMS/CHEMISTRY/Residue.h>

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 constructor More...
 
 Residue (const Residue &residue)
 copy constructor More...
 
 Residue (const String &name, const String &three_letter_code, const String &one_letter_code, const EmpiricalFormula &formula)
 detailed constructor More...
 
virtual ~Residue ()
 destructor More...
 
Assignment
Residue & operator= (const Residue &residue)
 assignment operator More...
 
void setName (const String &name)
 sets the name of the residue More...
 
const String & getName () const
 returns the name of the residue More...
 
void setShortName (const String &short_name)
 sets the short name of the residue, this name is used in the PeptideSequence for output More...
 
const String & getShortName () const
 returns the short name of the residue More...
 
void setSynonyms (const std::set< String > &synonyms)
 sets the synonyms More...
 
void addSynonym (const String &synonym)
 adds a synonym More...
 
const std::set< String > & getSynonyms () const
 returns the synonyms More...
 
void setThreeLetterCode (const String &three_letter_code)
 sets the name of the residue as three letter code More...
 
const String & getThreeLetterCode () const
 returns the name of the residue as three letter code More...
 
void setOneLetterCode (const String &one_letter_code)
 sets the name as one letter code More...
 
const String & getOneLetterCode () const
 returns the name as one letter code More...
 
void addLossFormula (const EmpiricalFormula &)
 adds a neutral loss formula More...
 
void setLossFormulas (const std::vector< EmpiricalFormula > &)
 sets the neutral loss formulas More...
 
void addNTermLossFormula (const EmpiricalFormula &)
 adds N-terminal losses More...
 
void setNTermLossFormulas (const std::vector< EmpiricalFormula > &)
 sets the N-terminal losses More...
 
const std::vector< EmpiricalFormula > & getLossFormulas () const
 returns the neutral loss formulas More...
 
const std::vector< EmpiricalFormula > & getNTermLossFormulas () const
 returns N-terminal loss formulas More...
 
void setLossNames (const std::vector< String > &name)
 set the neutral loss molecule name More...
 
void setNTermLossNames (const std::vector< String > &name)
 sets the N-terminal loss names More...
 
void addLossName (const String &name)
 add neutral loss molecule name More...
 
void addNTermLossName (const String &name)
 adds a N-terminal loss name More...
 
const std::vector< String > & getLossNames () const
 gets neutral loss name (if there is one, else returns an empty string) More...
 
const std::vector< String > & getNTermLossNames () const
 returns the N-terminal loss names More...
 
void setFormula (const EmpiricalFormula &formula)
 set empirical formula of the residue (must be full, with N and C-terminus) More...
 
EmpiricalFormula getFormula (ResidueType res_type=Full) const
 returns the empirical formula of the residue More...
 
void setAverageWeight (double weight)
 sets average weight of the residue (must be full, with N and C-terminus) More...
 
double getAverageWeight (ResidueType res_type=Full) const
 returns average weight of the residue More...
 
void setMonoWeight (double weight)
 sets mono weight of the residue (must be full, with N and C-terminus) More...
 
double getMonoWeight (ResidueType res_type=Full) const
 returns mono weight of the residue More...
 
void setModification (const String &name)
 sets by the name, this mod should be present in ModificationsDB More...
 
const String & getModification () const
 returns the name of the modification to the modification More...
 
void setLowMassIons (const std::vector< EmpiricalFormula > &low_mass_ions)
 sets the low mass marker ions as a vector of formulas More...
 
const std::vector< EmpiricalFormula > & getLowMassIons () const
 returns a vector of formulas with the low mass markers of the residue More...
 
void setResidueSets (const std::set< String > &residues_sets)
 sets the residue sets the amino acid is contained in More...
 
void addResidueSet (const String &residue_sets)
 adds a residue set to the residue sets More...
 
const std::set< String > & getResidueSets () const
 returns the residue sets this residue is contained in More...
 
Predicates
bool hasNeutralLoss () const
 true if the residue has neutral loss More...
 
bool hasNTermNeutralLosses () const
 true if N-terminal neutral losses are set More...
 
bool operator== (const Residue &residue) const
 equality operator More...
 
bool operator!= (const Residue &residue) const
 inequality operator More...
 
bool operator== (char one_letter_code) const
 equality operator for one letter code More...
 
bool operator!= (char one_letter_code) const
 equality operator for one letter code More...
 
double getPka () const
 returns the pka of the residue More...
 
double getPkb () const
 returns the pkb of the residue More...
 
double getPkc () const
 returns the pkc of the residue if it exists otherwise -1 More...
 
double getPiValue () const
 calculates the isoelectric point using the pk* values More...
 
void setPka (double value)
 sets the pka of the residue More...
 
void setPkb (double value)
 sets the pkb of the residue More...
 
void setPkc (double value)
 sets the pkc of the residue More...
 
double getSideChainBasicity () const
 returns the side chain basicity More...
 
void setSideChainBasicity (double gb_sc)
 sets the side chain basicity More...
 
double getBackboneBasicityLeft () const
 returns the backbone basicitiy if located in N-terminal direction More...
 
void setBackboneBasicityLeft (double gb_bb_l)
 sets the N-terminal direction backbone basicitiy More...
 
double getBackboneBasicityRight () const
 returns the C-terminal direction backbone basicitiy More...
 
void setBackboneBasicityRight (double gb_bb_r)
 sets the C-terminal direction backbone basicity More...
 
bool isModified () const
 true if the residue is a modified one More...
 
bool isInResidueSet (const String &residue_set)
 true if the residue is contained in the set More...
 

Static Public Member Functions

static String getResidueTypeName (const ResidueType res_type)
 returns the ion name given as a residue type More...
 
Typedefs and Constants
static const EmpiricalFormula & getInternalToFull ()
 
static double getInternalToFullAverageWeight ()
 
static double getInternalToFullMonoWeight ()
 
static const EmpiricalFormula & getNTerminalToFull ()
 
static double getNTerminalToFullAverageWeight ()
 
static double getNTerminalToFullMonoWeight ()
 
static const EmpiricalFormula & getCTerminalToFull ()
 
static double getCTerminalToFullAverageWeight ()
 
static double getCTerminalToFullMonoWeight ()
 
static const EmpiricalFormula & getBIonToFull ()
 
static double getBIonToFullAverageWeight ()
 
static double getBIonToFullMonoWeight ()
 
static const EmpiricalFormula & getAIonToFull ()
 
static double getAIonToFullAverageWeight ()
 
static double getAIonToFullMonoWeight ()
 
static const EmpiricalFormula & getYIonToFull ()
 
static double getYIonToFullAverageWeight ()
 
static double getYIonToFullMonoWeight ()
 
static const EmpiricalFormula & getCIonToFull ()
 
static double getCIonToFullAverageWeight ()
 
static double getCIonToFullMonoWeight ()
 
static const EmpiricalFormula & getCIonMinusOneToFull ()
 
static double getCIonMinusOneToFullAverageWeight ()
 
static double getCIonMinusOneToFullMonoWeight ()
 
static const EmpiricalFormula & getCIonPlusOneToFull ()
 
static double getCIonPlusOneToFullAverageWeight ()
 
static double getCIonPlusOneToFullMonoWeight ()
 
static const EmpiricalFormula & getCIonPlusTwoToFull ()
 
static double getCIonPlusTwoToFullAverageWeight ()
 
static double getCIonPlusTwoToFullMonoWeight ()
 
static const EmpiricalFormula & getXIonToFull ()
 
static double getXIonToFullAverageWeight ()
 
static double getXIonToFullMonoWeight ()
 
static const EmpiricalFormula & getZIonToFull ()
 
static double getZIonToFullAverageWeight ()
 
static double getZIonToFullMonoWeight ()
 
static const EmpiricalFormula & getZIonMinusOneToFull ()
 
static double getZIonMinusOneToFullAverageWeight ()
 
static double getZIonMinusOneToFullMonoWeight ()
 
static const EmpiricalFormula & getZIonPlusOneToFull ()
 
static double getZIonPlusOneToFullAverageWeight ()
 
static double getZIonPlusOneToFullMonoWeight ()
 
static const EmpiricalFormula & getZIonPlusTwoToFull ()
 
static double getZIonPlusTwoToFullAverageWeight ()
 
static double getZIonPlusTwoToFullMonoWeight ()
 

Protected Attributes

String name_
 
String short_name_
 
std::set< String > synonyms_
 
String three_letter_code_
 
String one_letter_code_
 
EmpiricalFormula formula_
 
EmpiricalFormula internal_formula_
 
double average_weight_
 
double mono_weight_
 
bool is_modified_
 
String pre_mod_name_
 
String modification_
 
std::vector< String > loss_names_
 
std::vector< EmpiricalFormula > loss_formulas_
 
std::vector< String > NTerm_loss_names_
 
std::vector< EmpiricalFormula > NTerm_loss_formulas_
 
double loss_average_weight_
 
double loss_mono_weight_
 
std::vector< EmpiricalFormula > low_mass_ions_
 
double pka_
 
double pkb_
 
double pkc_
 
double gb_sc_
 
double gb_bb_l_
 
double gb_bb_r_
 
std::set< String > residue_sets_
 

Friends

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

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.

Constructor & Destructor Documentation

Residue ( )

default constructor

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 ( )
inlinestatic
static double getAIonToFullAverageWeight ( )
inlinestatic
static double getAIonToFullMonoWeight ( )
inlinestatic
double getAverageWeight ( ResidueType  res_type = Full) const

returns average weight of the residue

double getBackboneBasicityLeft ( ) const

returns the backbone basicitiy if located in N-terminal direction

double getBackboneBasicityRight ( ) const

returns the C-terminal direction backbone basicitiy

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

returns the empirical formula of the residue

static const EmpiricalFormula& getInternalToFull ( )
inlinestatic
static double getInternalToFullAverageWeight ( )
inlinestatic
static double getInternalToFullMonoWeight ( )
inlinestatic
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

double 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 ( )
inlinestatic
static double getNTerminalToFullAverageWeight ( )
inlinestatic
static double getNTerminalToFullMonoWeight ( )
inlinestatic
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().

double getPiValue ( ) const

calculates the isoelectric point using the pk* values

double getPka ( ) const

returns the pka of the residue

double getPkb ( ) const

returns the pkb of the residue

double 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

double getSideChainBasicity ( ) const

returns the side chain basicity

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

returns the synonyms

const String& getThreeLetterCode ( ) const

returns the name of the residue as three letter code

static const EmpiricalFormula& getXIonToFull ( )
inlinestatic
static double getXIonToFullAverageWeight ( )
inlinestatic
static double getXIonToFullMonoWeight ( )
inlinestatic
static const EmpiricalFormula& getYIonToFull ( )
inlinestatic
static double getYIonToFullAverageWeight ( )
inlinestatic
static double getYIonToFullMonoWeight ( )
inlinestatic
static const EmpiricalFormula& getZIonMinusOneToFull ( )
inlinestatic
static double getZIonMinusOneToFullAverageWeight ( )
inlinestatic
static double getZIonMinusOneToFullMonoWeight ( )
inlinestatic
static const EmpiricalFormula& getZIonPlusOneToFull ( )
inlinestatic
static double getZIonPlusOneToFullAverageWeight ( )
inlinestatic
static double getZIonPlusOneToFullMonoWeight ( )
inlinestatic
static const EmpiricalFormula& getZIonPlusTwoToFull ( )
inlinestatic
static double getZIonPlusTwoToFullAverageWeight ( )
inlinestatic
static double getZIonPlusTwoToFullMonoWeight ( )
inlinestatic
static const EmpiricalFormula& getZIonToFull ( )
inlinestatic
static double getZIonToFullAverageWeight ( )
inlinestatic
static double getZIonToFullMonoWeight ( )
inlinestatic
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== ( const Residue &  residue) const

equality operator

bool operator== ( char  one_letter_code) const

equality operator for one letter code

void setAverageWeight ( double  weight)

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

void setBackboneBasicityLeft ( double  gb_bb_l)

sets the N-terminal direction backbone basicitiy

void setBackboneBasicityRight ( double  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 ( double  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 ( double  value)

sets the pka of the residue

void setPkb ( double  value)

sets the pkb of the residue

void setPkc ( double  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 ( double  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

double average_weight_
protected
EmpiricalFormula formula_
protected
double gb_bb_l_
protected
double gb_bb_r_
protected
double gb_sc_
protected
EmpiricalFormula internal_formula_
protected
bool is_modified_
protected
double loss_average_weight_
protected
std::vector<EmpiricalFormula> loss_formulas_
protected
double loss_mono_weight_
protected
std::vector<String> loss_names_
protected
std::vector<EmpiricalFormula> low_mass_ions_
protected
String modification_
protected
double 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
double pka_
protected
double pkb_
protected
double pkc_
protected
String pre_mod_name_
protected
std::set<String> residue_sets_
protected
String short_name_
protected
std::set<String> synonyms_
protected
String three_letter_code_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Sat May 16 2015 16:14:04 using doxygen 1.8.9.1