00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_BASE_CHEM_CLASS_HH
00020 #define OST_BASE_CHEM_CLASS_HH
00021
00022 #include <ost/mol/module_config.hh>
00023
00024
00025 namespace ost { namespace mol {
00026
00027 struct DLLEXPORT ChemClass {
00028
00029 const static char PEPTIDE_LINKING ='P';
00030 const static char D_PEPTIDE_LINKING ='D';
00031 const static char L_PEPTIDE_LINKING ='L';
00032 const static char RNA_LINKING ='R';
00033 const static char DNA_LINKING ='S';
00034 const static char NON_POLYMER ='N';
00035 const static char L_SACCHARIDE ='X';
00036 const static char D_SACCHARIDE ='Y';
00037 const static char SACCHARIDE ='Z';
00038 const static char WATER ='W';
00039 const static char UNKNOWN ='U';
00040
00041
00042 const static char PeptideLinking =PEPTIDE_LINKING;
00043 const static char DPeptideLinking =D_PEPTIDE_LINKING;
00044 const static char LPeptideLinking =L_PEPTIDE_LINKING;
00045 const static char RNALinking =RNA_LINKING;
00046 const static char DNALinking =DNA_LINKING;
00047 const static char NonPolymer =NON_POLYMER;
00048 const static char LSaccharide =L_SACCHARIDE;
00049 const static char DSaccharide =D_SACCHARIDE;
00050 const static char Saccharide =SACCHARIDE;
00051 const static char Water =WATER;
00052 const static char Unknown =UNKNOWN;
00053 explicit ChemClass(char chem_class)
00054 : chem_class_(chem_class) {
00055 }
00056
00057 ChemClass()
00058 : chem_class_(UNKNOWN) {
00059 }
00060 bool operator==(const ChemClass& cc) const {
00061 return cc.chem_class_==chem_class_;
00062 }
00063
00064 bool operator!=(const ChemClass& cc) const {
00065 return !this->operator==(cc);
00066 }
00067
00068 bool IsPeptideLinking() const {
00069 return (chem_class_==ChemClass::PEPTIDE_LINKING ||
00070 chem_class_==ChemClass::D_PEPTIDE_LINKING ||
00071 chem_class_==ChemClass::L_PEPTIDE_LINKING);
00072 }
00073 bool IsNucleotideLinking() const {
00074 return (chem_class_==ChemClass::DNA_LINKING ||
00075 chem_class_==ChemClass::RNA_LINKING);
00076 }
00077
00078 bool IsWater() const { return chem_class_==ChemClass::WATER; }
00079 operator char() const {
00080 return chem_class_;
00081 }
00082 private:
00083 char chem_class_;
00084 };
00085
00086 }}
00087 #endif