OpenMS
ModificationDefinition Class Reference

#include <OpenMS/CHEMISTRY/ModificationDefinition.h>

Collaboration diagram for ModificationDefinition:
[legend]

Public Member Functions

Constructor and Destructors
 ModificationDefinition ()
 default constructor More...
 
 ModificationDefinition (const ModificationDefinition &rhs)
 copy constructor More...
 
 ModificationDefinition (const String &mod, bool fixed=true, UInt max_occur=0)
 detailed constructor specifying the modification by name More...
 
 ModificationDefinition (const ResidueModification &mod, bool fixed=true, UInt max_occur=0)
 direct constructor from a residue modification More...
 
virtual ~ModificationDefinition ()
 destructor More...
 
Accessors
void setFixedModification (bool fixed)
 sets whether this modification definition is fixed or variable (modification must occur vs. can occur) More...
 
bool isFixedModification () const
 returns if the modification if fixed true, else false More...
 
void setMaxOccurrences (UInt num)
 set the maximal number of occurrences per peptide (unbounded if 0) More...
 
UInt getMaxOccurrences () const
 returns the maximal number of occurrences per peptide More...
 
String getModificationName () const
 returns the name of the modification More...
 
void setModification (const String &modification)
 sets the modification, allowed are unique names provided by ModificationsDB More...
 
const ResidueModificationgetModification () const
 Returns the modification. More...
 
Assignment
ModificationDefinitionoperator= (const ModificationDefinition &element)
 assignment operator More...
 

Predicates

const ResidueModificationmod_
 the modification More...
 
bool fixed_modification_
 fixed (true) or variable (false) More...
 
UInt max_occurrences_
 maximal number of occurrences per peptide More...
 
bool operator== (const ModificationDefinition &rhs) const
 equality operator More...
 
bool operator!= (const ModificationDefinition &rhs) const
 inequality operator More...
 
bool operator< (const OpenMS::ModificationDefinition &) const
 less than operator for e.g. usage in maps; only mod FullIds are compared! More...
 

Detailed Description

@brief Representation of modification definition

This class defines a modification type e.g. a input parameter of a search engine.
The modification is defined using an unique name of the modification present
in the modifications DB instance.

Constructor & Destructor Documentation

◆ ModificationDefinition() [1/4]

default constructor

◆ ModificationDefinition() [2/4]

copy constructor

◆ ModificationDefinition() [3/4]

ModificationDefinition ( const String mod,
bool  fixed = true,
UInt  max_occur = 0 
)
explicit

detailed constructor specifying the modification by name

◆ ModificationDefinition() [4/4]

ModificationDefinition ( const ResidueModification mod,
bool  fixed = true,
UInt  max_occur = 0 
)
explicit

direct constructor from a residue modification

◆ ~ModificationDefinition()

virtual ~ModificationDefinition ( )
virtual

destructor

Member Function Documentation

◆ getMaxOccurrences()

UInt getMaxOccurrences ( ) const

returns the maximal number of occurrences per peptide

◆ getModification()

const ResidueModification& getModification ( ) const

Returns the modification.

Exceptions
Exception::InvalidValueif no modification was set

◆ getModificationName()

String getModificationName ( ) const

returns the name of the modification

◆ isFixedModification()

bool isFixedModification ( ) const

returns if the modification if fixed true, else false

◆ operator!=()

bool operator!= ( const ModificationDefinition rhs) const

inequality operator

◆ operator<()

bool operator< ( const OpenMS::ModificationDefinition ) const

less than operator for e.g. usage in maps; only mod FullIds are compared!

◆ operator=()

ModificationDefinition& operator= ( const ModificationDefinition element)

assignment operator

◆ operator==()

bool operator== ( const ModificationDefinition rhs) const

equality operator

◆ setFixedModification()

void setFixedModification ( bool  fixed)

sets whether this modification definition is fixed or variable (modification must occur vs. can occur)

◆ setMaxOccurrences()

void setMaxOccurrences ( UInt  num)

set the maximal number of occurrences per peptide (unbounded if 0)

◆ setModification()

void setModification ( const String modification)

sets the modification, allowed are unique names provided by ModificationsDB

Member Data Documentation

◆ fixed_modification_

bool fixed_modification_
protected

fixed (true) or variable (false)

◆ max_occurrences_

UInt max_occurrences_
protected

maximal number of occurrences per peptide

◆ mod_

const ResidueModification* mod_
protected

the modification