11 #include <unordered_map>
169 std::array<const Residue*, 256> residue_by_one_letter_code_ = {{
nullptr}};
OpenMS stores a central database of all residues in the ResidueDB. All (unmodified) residues are adde...
Definition: ResidueDB.h:32
const Residue * getModifiedResidue(const String &name)
Returns a pointer to a modified residue given a modification name.
const Residue * getModifiedResidue(const Residue *residue, const ResidueModification *mod)
void addResidue_(Residue *residue)
add residue and add names to lookup
void insertResidueAndAssociateWithResidueSet_(Residue *residue, const std::vector< String > &residue_sets)
creates and adds residues to a lookup table including the residue set
void initResidues_()
initializes all residues by building
static ResidueDB * getInstance()
singleton
void addModifiedResidueNames_(const Residue *)
adds names of single modified residue to the index
bool hasResidue(const Residue *residue) const
returns true if the db contains the residue of the given pointer
std::unordered_map< String, const Residue * > residue_names_
lookup from name to residue
Definition: ResidueDB.h:166
ResidueDB & operator=(const ResidueDB &aa)=delete
assignment operator
Size getNumberOfModifiedResidues() const
returns the number of modified residues stored
ResidueDB()
default constructor
virtual ~ResidueDB()
destructor
Size getNumberOfResidues() const
returns the number of residues stored
std::map< String, std::set< const Residue * > > residues_by_set_
Definition: ResidueDB.h:171
const Residue * getResidue(const String &name) const
returns a pointer to the residue with name, 3 letter code or 1 letter code name
const std::set< const Residue * > getResidues(const String &residue_set="All") const
returns a set of all residues stored in this residue db
std::set< const Residue * > const_residues_
all (unmodified) residues
Definition: ResidueDB.h:158
std::set< const Residue * > const_modified_residues_
all modified residues
Definition: ResidueDB.h:161
const Residue * getResidue(const unsigned char &one_letter_code) const
returns a pointer to the residue with 1 letter code name
bool hasResidue(const String &name) const
returns true if the db contains a residue with the given name
std::map< String, std::map< String, const Residue * > > residue_mod_names_
Definition: ResidueDB.h:155
const std::set< String > getResidueSets() const
returns all residue sets that are registered which this instance
std::set< String > residue_sets_
Definition: ResidueDB.h:163
void addResidueNames_(const Residue *)
adds names of single residue to the index
const Residue * getModifiedResidue(const Residue *residue, const String &name)
Returns a pointer to a modified residue given a residue and a modification name.
ResidueDB(const ResidueDB &residue_db)
copy constructor
Representation of a modification on an amino acid residue.
Definition: ResidueModification.h:53
Representation of an amino acid residue.
Definition: Residue.h:37
A more convenient string class.
Definition: String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
sets the modification of AA at index by providing a pointer to a in the