include/chemicalbasis.h
00001 #ifndef CHEMICALBASIS_H
00002 #define CHEMICALBASIS_H
00003 
00004 #include <map>
00005 #include <vector>
00006 #include "biolcccexception.h"
00007 #include "chemicalgroup.h"
00008 
00009 namespace BioLCCC
00010 {
00011 
00013 class ChemicalBasisException : public BioLCCCException
00014 {
00015 public:
00017     ChemicalBasisException(std::string message);
00018 };
00019 
00021 
00028 enum PolymerModel
00029 {
00037     ROD,
00038 
00042     CHAIN
00043 };
00044 
00046 
00051 enum PredefinedChemicalBasis
00052 {
00054 
00058     RP_ACN_TFA_CHAIN, 
00060 
00065     RP_ACN_FA_ROD 
00066 };
00067 
00069 
00086 class ChemicalBasis
00087 {
00088 public:
00090     ChemicalBasis();
00091 
00093     ChemicalBasis(PredefinedChemicalBasis predefinedChemicalBasisId);
00094 
00096 
00099     std::map<std::string, ChemicalGroup> & chemicalGroups();
00100 
00102 
00105     const std::map<std::string, ChemicalGroup> & chemicalGroups() const;
00106 
00108     const ChemicalGroup & defaultNTerminus() const
00109         throw(ChemicalBasisException);
00110 
00112     const ChemicalGroup & defaultCTerminus() const
00113         throw(ChemicalBasisException);
00114 
00116 
00120     void addChemicalGroup(ChemicalGroup newChemicalGroup);
00121 
00123 
00127     void removeChemicalGroup(std::string label)
00128         throw(ChemicalBasisException);
00129 
00131     void clearChemicalGroups();
00132 
00135     //    Throws ChemicalBasisException if the chemical group is not found.
00136     //    \param label The label of the chemical group to be modified.
00137     //    \param newBindEnergy The new value of the bind energy.
00138     //*/
00139     //void setChemicalGroupBindEnergy(std::string label, double newBindEnergy);
00140 
00142 
00145     double secondSolventBindEnergy() const;
00146 
00148 
00151     void setSecondSolventBindEnergy(double newEnergy);
00152 
00154     void setPolymerModel(PolymerModel newModel);
00155 
00157     const PolymerModel polymerModel() const;
00158 
00160 
00166     double monomerLength() const;
00167 
00169 
00175     void setMonomerLength(double newMonomerLength)
00176         throw(ChemicalBasisException);
00177 
00179 
00196     double kuhnLength() const;
00197 
00199 
00216     void setKuhnLength(double newKuhnLength)
00217         throw(ChemicalBasisException);
00218 
00220 
00227     double adsorptionLayerWidth() const;
00228 
00230 
00237     void setAdsorptionLayerWidth(double newAdsorptionLayerWidth)
00238         throw(ChemicalBasisException);
00239 
00241 
00255     const std::vector<double> & adsorptionLayerFactors() const;
00256 
00258 
00272     void setAdsorptionLayerFactors(
00273         std::vector<double> newAdsorptionLayerFactors);
00274 
00276 
00281     bool snyderApproximation() const;
00282 
00284 
00289     void setSnyderApproximation(bool flag);
00290 
00292     bool specialRodModel() const;
00293     
00295 
00305         void setSpecialRodModel(bool flag);
00306         
00308         bool neglectPartiallyDesorbedStates() const;
00309 
00311 
00323         void setNeglectPartiallyDesorbedStates(bool flag);
00324 
00326     double firstSolventDensity() const;
00327 
00329     void setFirstSolventDensity(double newFirstSolventDensity)
00330         throw(ChemicalBasisException);
00331 
00333     double secondSolventDensity() const;
00334 
00336     void setSecondSolventDensity(double newSecondSolventDensity)
00337         throw(ChemicalBasisException);
00338 
00340     double firstSolventAverageMass() const;
00341 
00343     void setFirstSolventAverageMass(double newFirstSolventAverageMass)
00344         throw(ChemicalBasisException);
00345 
00347     double secondSolventAverageMass() const;
00348 
00350     void setSecondSolventAverageMass(double newSecondSolventAverageMass)
00351         throw(ChemicalBasisException);
00352 
00354     ChemicalBasis setPredefinedChemicalBasis(
00355         PredefinedChemicalBasis predefinedChemicalBasisId);
00356 
00357 private:
00358     std::map<std::string,ChemicalGroup> mChemicalGroups;
00359     double mSecondSolventBindEnergy;
00360     double mMonomerLength;
00361     double mKuhnLength;
00362     double mAdsorptionLayerWidth;
00363     std::vector<double> mAdsorptionLayerFactors;
00364     PolymerModel mPolymerModel;
00365     double mFirstSolventDensity;
00366     double mSecondSolventDensity;
00367     double mFirstSolventAverageMass;
00368     double mSecondSolventAverageMass;
00369     bool mSnyderApproximation;
00370     bool mSpecialRodModel;
00371         bool mNeglectPartiallyDesorbedStates;
00372 };
00373 
00374 }
00375 
00376 #endif
 All Classes Namespaces Functions Variables Enumerations Enumerator