libBioLCCC
Loading...
Searching...
No Matches
chemicalbasis.h
1#ifndef CHEMICALBASIS_H
2#define CHEMICALBASIS_H
3
4#include <map>
5#include <vector>
6#include "biolcccexception.h"
7#include "chemicalgroup.h"
8
9namespace BioLCCC
10{
11
14{
15public:
17 ChemicalBasisException(std::string message);
18};
19
21
29{
38
42 CHAIN
43};
44
46
67
69
87{
88public:
91
93 ChemicalBasis(PredefinedChemicalBasis predefinedChemicalBasisId);
94
96
99 std::map<std::string, ChemicalGroup> & chemicalGroups();
100
102
105 const std::map<std::string, ChemicalGroup> & chemicalGroups() const;
106
108 const ChemicalGroup & defaultNTerminus() const;
109
111 const ChemicalGroup & defaultCTerminus() const;
112
114
118 void addChemicalGroup(ChemicalGroup newChemicalGroup);
119
121
125 void removeChemicalGroup(std::string label);
126
128 void clearChemicalGroups();
129
132 // Throws ChemicalBasisException if the chemical group is not found.
133 // \param label The label of the chemical group to be modified.
134 // \param newBindEnergy The new value of the bind energy.
135 //*/
136 //void setChemicalGroupBindEnergy(std::string label, double newBindEnergy);
137
139
142 double secondSolventBindEnergy() const;
143
145
148 void setSecondSolventBindEnergy(double newEnergy);
149
151 void setPolymerModel(PolymerModel newModel);
152
154 const PolymerModel polymerModel() const;
155
157
163 double monomerLength() const;
164
166
172 void setMonomerLength(double newMonomerLength);
173
175
192 double kuhnLength() const;
193
195
212 void setKuhnLength(double newKuhnLength);
213
215
222 double adsorptionLayerWidth() const;
223
225
232 void setAdsorptionLayerWidth(double newAdsorptionLayerWidth);
233
235
249 const std::vector<double> & adsorptionLayerFactors() const;
250
252
267 std::vector<double> newAdsorptionLayerFactors);
268
270
275 bool snyderApproximation() const;
276
278
283 void setSnyderApproximation(bool flag);
284
286 bool specialRodModel() const;
287
289
299 void setSpecialRodModel(bool flag);
300
303
305
317 void setNeglectPartiallyDesorbedStates(bool flag);
318
320 double firstSolventDensity() const;
321
323 void setFirstSolventDensity(double newFirstSolventDensity);
324
326 double secondSolventDensity() const;
327
329 void setSecondSolventDensity(double newSecondSolventDensity);
330
332 double firstSolventAverageMass() const;
333
335 void setFirstSolventAverageMass(double newFirstSolventAverageMass);
336
338 double secondSolventAverageMass() const;
339
341 void setSecondSolventAverageMass(double newSecondSolventAverageMass);
342
345 PredefinedChemicalBasis predefinedChemicalBasisId);
346
347private:
348 std::map<std::string,ChemicalGroup> mChemicalGroups;
349 double mSecondSolventBindEnergy;
350 double mMonomerLength;
351 double mKuhnLength;
352 double mAdsorptionLayerWidth;
353 std::vector<double> mAdsorptionLayerFactors;
354 PolymerModel mPolymerModel;
355 double mFirstSolventDensity;
356 double mSecondSolventDensity;
357 double mFirstSolventAverageMass;
358 double mSecondSolventAverageMass;
359 bool mSnyderApproximation;
360 bool mSpecialRodModel;
361 bool mNeglectPartiallyDesorbedStates;
362};
363
364}
365
366#endif
Base class for all BioLCCC exceptions. Can be used by itself.
Definition biolcccexception.h:11
This exception is raised when something goes wrong with a ChemicalBasis.
Definition chemicalbasis.h:14
An instance of ChemicalBasis contains a set of BioLCCC constants.
Definition chemicalbasis.h:87
ChemicalBasis setPredefinedChemicalBasis(PredefinedChemicalBasis predefinedChemicalBasisId)
Sets one of predefined chemical basis.
Definition chemicalbasis.cpp:265
void setMonomerLength(double newMonomerLength)
Sets the length of a single monomer in a polymer chain in angstroms.
Definition chemicalbasis.cpp:79
double firstSolventDensity() const
Returns the density of the first solvent in kg/m^3.
Definition chemicalbasis.cpp:203
void clearChemicalGroups()
Removes all chemical groups in a ChemicalBasis.
Definition chemicalbasis.cpp:145
const std::vector< double > & adsorptionLayerFactors() const
Returns the absorption factors of the near-wall layers in CHAIN model.
Definition chemicalbasis.cpp:120
double kuhnLength() const
Returns the Kuhn length of a polymer molecule in angstroms.
Definition chemicalbasis.cpp:90
void setFirstSolventDensity(double newFirstSolventDensity)
Sets the density of the first solvent in kg/m^3.
Definition chemicalbasis.cpp:208
const PolymerModel polymerModel() const
Returns the model of a polymer (CHAIN or ROD).
Definition chemicalbasis.cpp:163
ChemicalBasis()
Constructs an empty ChemicalBasis instance.
Definition chemicalbasis.cpp:8
void setAdsorptionLayerFactors(std::vector< double > newAdsorptionLayerFactors)
Sets the absorption factors of the near-wall layers in CHAIN model.
Definition chemicalbasis.cpp:125
double secondSolventDensity() const
Returns the density of the second solvent in kg/m^3.
Definition chemicalbasis.cpp:218
double monomerLength() const
Returns the length of a single monomer in a polymer chain in angstroms.
Definition chemicalbasis.cpp:74
double secondSolventAverageMass() const
Returns the molecular mass of the second solvent in g/mol.
Definition chemicalbasis.cpp:249
const ChemicalGroup & defaultCTerminus() const
Returns the default C-terminal group.
Definition chemicalbasis.cpp:53
void removeChemicalGroup(std::string label)
Removes a chemical group with the given label;.
Definition chemicalbasis.cpp:136
void setAdsorptionLayerWidth(double newAdsorptionLayerWidth)
Sets the width of a solid phase adsorption layer in ROD model.
Definition chemicalbasis.cpp:110
void setSnyderApproximation(bool flag)
Enables the linear approximation of the energy of binary solvent.
Definition chemicalbasis.cpp:178
void setFirstSolventAverageMass(double newFirstSolventAverageMass)
Sets the molecular mass of the first solvent in g/mol.
Definition chemicalbasis.cpp:238
double adsorptionLayerWidth() const
Returns the width of a solid phase adsorption layer in ROD model.
Definition chemicalbasis.cpp:105
void setPolymerModel(PolymerModel newModel)
Sets the model of a polymer (CHAIN or ROD).
Definition chemicalbasis.cpp:168
std::map< std::string, ChemicalGroup > & chemicalGroups()
Returns the map of all chemical groups. Non-constant version.
Definition chemicalbasis.cpp:31
bool neglectPartiallyDesorbedStates() const
Returns true if partially desorbed states are neglected.
Definition chemicalbasis.cpp:193
void addChemicalGroup(ChemicalGroup newChemicalGroup)
Adds newChemicalGroup to the ChemicalBasis.
Definition chemicalbasis.cpp:131
double firstSolventAverageMass() const
Returns the molecular mass of the first solvent in g/mol.
Definition chemicalbasis.cpp:233
void setNeglectPartiallyDesorbedStates(bool flag)
Excludes partially desorbed states from calculation. FOR MODEL STUDY ONLY.
Definition chemicalbasis.cpp:198
void setSecondSolventBindEnergy(double newEnergy)
Sets newEnergy as the bind energy of the second solvent.
Definition chemicalbasis.cpp:69
void setKuhnLength(double newKuhnLength)
Sets the Kuhn length of a molecule in angstroms.
Definition chemicalbasis.cpp:95
const ChemicalGroup & defaultNTerminus() const
Returns the default N-terminal group.
Definition chemicalbasis.cpp:42
bool snyderApproximation() const
Returns true if the energy of binary solvent is linearly fitted.
Definition chemicalbasis.cpp:173
void setSecondSolventAverageMass(double newSecondSolventAverageMass)
Sets the molecular mass of the second solvent in g/mol.
Definition chemicalbasis.cpp:254
double secondSolventBindEnergy() const
Returns the bind energy of the second solvent.
Definition chemicalbasis.cpp:64
void setSecondSolventDensity(double newSecondSolventDensity)
Sets the density of the second solvent in kg/m^3.
Definition chemicalbasis.cpp:223
bool specialRodModel() const
Returns true if equations for the special case of rod model are used.
Definition chemicalbasis.cpp:183
void setSpecialRodModel(bool flag)
Enables the usage of the special equation for the rod model.
Definition chemicalbasis.cpp:188
A ChemicalGroup instance contains the properties of a group of atoms.
Definition chemicalgroup.h:21
Apart from classes, BioLCCC contains calculation methods and constants.
Definition auxiliary.h:5
PredefinedChemicalBasis
This enum describes the predefined sets of physicochemical constants.
Definition chemicalbasis.h:52
@ RP_ACN_TFA_CHAIN
Reversed phase, ACN, trifluoracetic acid, CHAIN model.
Definition chemicalbasis.h:58
@ RP_ACN_FA_ROD
Reversed phase, ACN, formic acid, ROD model.
Definition chemicalbasis.h:65
PolymerModel
The model of polymer being used in calculations.
Definition chemicalbasis.h:29
@ ROD
Definition chemicalbasis.h:37
@ CHAIN
Definition chemicalbasis.h:42