Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4DNAMolecularReactionData Class Reference

#include <G4DNAMolecularReactionTable.hh>

Collaboration diagram for G4DNAMolecularReactionData:

Public Types

typedef std::function< double(double)> RateParam
 

Public Member Functions

 G4DNAMolecularReactionData (G4double reactionRate, G4MolecularConfiguration *reactive1, G4MolecularConfiguration *reactive2)
 
 G4DNAMolecularReactionData (G4double reactionRate, const G4String &reactive1, const G4String &reactive2)
 
 ~G4DNAMolecularReactionData ()
 
int GetReactionID () const
 
void SetReactionID (int ID)
 
std::pair
< G4MolecularConfiguration
*, G4MolecularConfiguration * > 
GetReactants ()
 
G4MolecularConfigurationGetReactant1 () const
 
G4MolecularConfigurationGetReactant2 () const
 
void SetObservedReactionRateConstant (G4double rate)
 
G4double GetObservedReactionRateConstant () const
 
G4double GetEffectiveReactionRadius () const
 
void SetEffectiveReactionRadius (G4double radius)
 
void SetReactant1 (G4MolecularConfiguration *reactive)
 
void SetReactant2 (G4MolecularConfiguration *reactive)
 
void SetReactants (G4MolecularConfiguration *reactive1, G4MolecularConfiguration *reactive2)
 
void AddProduct (G4MolecularConfiguration *molecule)
 
void SetReactant1 (const G4String &reactive)
 
void SetReactant2 (const G4String &reactive)
 
void SetReactants (const G4String &reactive1, const G4String &reactive2)
 
void AddProduct (const G4String &molecule)
 
G4int GetNbProducts () const
 
G4MolecularConfigurationGetProduct (G4int i) const
 
const std::vector
< G4MolecularConfiguration * > * 
GetProducts () const
 
void RemoveProducts ()
 
void SetPolynomialParameterization (const std::vector< double > &P)
 
void SetArrehniusParameterization (double A0, double E_R)
 
void SetScaledParameterization (double temperature_K, double rateCste)
 
void ScaleForNewTemperature (double temp_K)
 

Static Public Member Functions

static double PolynomialParam (double temp_K, std::vector< double > P)
 
static double ArrehniusParam (double temp_K, std::vector< double > P)
 
static double ScaledParameterization (double temp_K, double temp_init, double rateCste_init)
 

Protected Member Functions

 G4DNAMolecularReactionData ()
 

Protected Attributes

G4MolecularConfigurationfReactant1
 
G4MolecularConfigurationfReactant2
 
G4double fObservedReactionRate
 
G4double fEffectiveReactionRadius
 
std::vector
< G4MolecularConfiguration * > * 
fProducts
 
RateParam fRateParam
 
int fReactionID
 

Detailed Description

G4DNAMolecularReactionData contains the information relative to a given reaction (eg : °OH + °OH -> H2O2)

Definition at line 67 of file G4DNAMolecularReactionTable.hh.

Member Typedef Documentation

Definition at line 165 of file G4DNAMolecularReactionTable.hh.

Constructor & Destructor Documentation

G4DNAMolecularReactionData::G4DNAMolecularReactionData ( G4double  reactionRate,
G4MolecularConfiguration reactive1,
G4MolecularConfiguration reactive2 
)

Definition at line 70 of file G4DNAMolecularReactionTable.cc.

72  :
73  fProducts(0)
74 {
75  fObservedReactionRate = reactionRate;
76  SetReactant1(reactant1);
77  SetReactant2(reactant2);
78 
79  G4double sumDiffCoeff(0.);
80 
81  if (reactant1 == reactant2)
82  {
83  sumDiffCoeff = reactant1->GetDiffusionCoefficient();
85  / (4 * pi * sumDiffCoeff * Avogadro);
86  }
87  else
88  {
89  sumDiffCoeff = reactant1->GetDiffusionCoefficient()
90  + reactant2->GetDiffusionCoefficient();
92  (4 * pi * sumDiffCoeff * Avogadro);
93  }
94  fReactionID = 0;
95 }
void SetReactant1(G4MolecularConfiguration *reactive)
static constexpr double Avogadro
std::vector< G4MolecularConfiguration * > * fProducts
void SetReactant2(G4MolecularConfiguration *reactive)
static constexpr double pi
Definition: G4SIunits.hh:75
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4DNAMolecularReactionData::G4DNAMolecularReactionData ( G4double  reactionRate,
const G4String reactive1,
const G4String reactive2 
)

Definition at line 100 of file G4DNAMolecularReactionTable.cc.

102  :
103  fProducts(0)
104 {
105  fObservedReactionRate = reactionRate;
106  SetReactant1(reactant1);
107  SetReactant2(reactant2);
108 
109  G4double sumDiffCoeff(0.);
110 
111  if (fReactant1 == fReactant2)
112  {
113  sumDiffCoeff = fReactant1->GetDiffusionCoefficient();
115  / (4 * pi * sumDiffCoeff * Avogadro);
116  }
117  else
118  {
119  sumDiffCoeff = fReactant1->GetDiffusionCoefficient()
122  (4 * pi * sumDiffCoeff * Avogadro);
123  }
124  fReactionID = 0;
125 }
void SetReactant1(G4MolecularConfiguration *reactive)
static constexpr double Avogadro
G4MolecularConfiguration * fReactant1
std::vector< G4MolecularConfiguration * > * fProducts
void SetReactant2(G4MolecularConfiguration *reactive)
G4MolecularConfiguration * fReactant2
static constexpr double pi
Definition: G4SIunits.hh:75
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4DNAMolecularReactionData::~G4DNAMolecularReactionData ( )

Definition at line 127 of file G4DNAMolecularReactionTable.cc.

128 {
129  if (fProducts)
130  {
131  fProducts->clear();
132  delete fProducts;
133  fProducts = 0;
134  }
135 }
std::vector< G4MolecularConfiguration * > * fProducts
G4DNAMolecularReactionData::G4DNAMolecularReactionData ( )
protected

Definition at line 57 of file G4DNAMolecularReactionTable.cc.

57  :
58  fReactant1(),
59  fReactant2(),
62  fProducts(0)
63 {
64  fReactionID = 0;
65 }
G4MolecularConfiguration * fReactant1
std::vector< G4MolecularConfiguration * > * fProducts
G4MolecularConfiguration * fReactant2

Member Function Documentation

void G4DNAMolecularReactionData::AddProduct ( G4MolecularConfiguration molecule)

Definition at line 155 of file G4DNAMolecularReactionTable.cc.

156 {
157  if (!fProducts) fProducts = new std::vector<G4MolecularConfiguration*>();
158  fProducts->push_back(molecule);
159 }
std::vector< G4MolecularConfiguration * > * fProducts

Here is the caller graph for this function:

void G4DNAMolecularReactionData::AddProduct ( const G4String molecule)

Definition at line 176 of file G4DNAMolecularReactionTable.cc.

177 {
178  if (!fProducts) fProducts = new std::vector<G4MolecularConfiguration*>();
179  fProducts->push_back(G4MoleculeTable::Instance()->GetConfiguration(molecule));
180 }
static G4MoleculeTable * Instance()
std::vector< G4MolecularConfiguration * > * fProducts

Here is the call graph for this function:

double G4DNAMolecularReactionData::ArrehniusParam ( double  temp_K,
std::vector< double >  P 
)
static

Definition at line 193 of file G4DNAMolecularReactionTable.cc.

194  {
195  return P[0]*G4Exp(P[1]/temp_K)*
196  (1e-3 * CLHEP::m3 / (CLHEP::mole * CLHEP::s));
197  }
static constexpr double m3
static double P[]
static constexpr double s
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static constexpr double mole

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4DNAMolecularReactionData::GetEffectiveReactionRadius ( ) const
inline

Definition at line 112 of file G4DNAMolecularReactionTable.hh.

113  {
115  }

Here is the caller graph for this function:

G4int G4DNAMolecularReactionData::GetNbProducts ( ) const
inline

Definition at line 137 of file G4DNAMolecularReactionTable.hh.

138  {
139  if(fProducts) return fProducts->size();
140  return 0;
141  }
std::vector< G4MolecularConfiguration * > * fProducts

Here is the caller graph for this function:

G4double G4DNAMolecularReactionData::GetObservedReactionRateConstant ( ) const
inline

Definition at line 107 of file G4DNAMolecularReactionTable.hh.

108  {
109  return fObservedReactionRate;
110  }

Here is the caller graph for this function:

G4MolecularConfiguration* G4DNAMolecularReactionData::GetProduct ( G4int  i) const
inline

Definition at line 143 of file G4DNAMolecularReactionTable.hh.

144  {
145  if(fProducts) return (*fProducts)[i];
146  return 0;
147  }
std::vector< G4MolecularConfiguration * > * fProducts

Here is the caller graph for this function:

const std::vector<G4MolecularConfiguration*>* G4DNAMolecularReactionData::GetProducts ( ) const
inline

Definition at line 149 of file G4DNAMolecularReactionTable.hh.

150  {
151  return fProducts;
152  }
std::vector< G4MolecularConfiguration * > * fProducts
G4MolecularConfiguration* G4DNAMolecularReactionData::GetReactant1 ( ) const
inline

Definition at line 93 of file G4DNAMolecularReactionTable.hh.

94  {
95  return fReactant1;
96  }
G4MolecularConfiguration * fReactant1

Here is the caller graph for this function:

G4MolecularConfiguration* G4DNAMolecularReactionData::GetReactant2 ( ) const
inline

Definition at line 97 of file G4DNAMolecularReactionTable.hh.

98  {
99  return fReactant2;
100  }
G4MolecularConfiguration * fReactant2

Here is the caller graph for this function:

std::pair<G4MolecularConfiguration*, G4MolecularConfiguration*> G4DNAMolecularReactionData::GetReactants ( )
inline

Definition at line 88 of file G4DNAMolecularReactionTable.hh.

89  {
90  return std::make_pair(fReactant1, fReactant2);
91  }
G4MolecularConfiguration * fReactant1
G4MolecularConfiguration * fReactant2
int G4DNAMolecularReactionData::GetReactionID ( ) const
inline
double G4DNAMolecularReactionData::PolynomialParam ( double  temp_K,
std::vector< double >  P 
)
static

Definition at line 183 of file G4DNAMolecularReactionTable.cc.

184  {
185  double inv_temp = 1. / temp_K;
186 
187  return pow(10,
188  P[0] + P[1] * inv_temp + P[2] * pow(inv_temp, 2)
189  + P[3] * pow(inv_temp, 3) + P[4] * pow(inv_temp, 4))
190  * (1e-3 * CLHEP::m3 / (CLHEP::mole * CLHEP::s));
191  }
static constexpr double m3
static double P[]
static constexpr double s
static constexpr double mole

Here is the caller graph for this function:

void G4DNAMolecularReactionData::RemoveProducts ( )
inline

Definition at line 154 of file G4DNAMolecularReactionTable.hh.

155  {
156  if(fProducts)
157  {
158  fProducts->clear();
159  delete fProducts;
160  }
161  }
std::vector< G4MolecularConfiguration * > * fProducts
double G4DNAMolecularReactionData::ScaledParameterization ( double  temp_K,
double  temp_init,
double  rateCste_init 
)
static

Definition at line 199 of file G4DNAMolecularReactionTable.cc.

202  {
203  double D0 = G4MolecularConfiguration::DiffCoeffWater(temp_init);
204  double Df = G4MolecularConfiguration::DiffCoeffWater(temp_K);
205  return Df*rateCste_init/D0;
206  }
static double DiffCoeffWater(double temperature_K)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4DNAMolecularReactionData::ScaleForNewTemperature ( double  temp_K)

Definition at line 726 of file G4DNAMolecularReactionTable.cc.

727 {
728  if(fRateParam)
729  {
731 
732 // G4cout <<"PROD RATE = " << fProductionRate << G4endl;
733 //
734 // if(fProductionRate != DBL_MAX && fProductionRate !=0)
735 // {
736 // SetPartiallyDiffusionControlledReactionByActivation(fObservedReactionRate,
737 // fProductionRate);
738 // }
739  }
740 }
void SetObservedReactionRateConstant(G4double rate)

Here is the call graph for this function:

void G4DNAMolecularReactionData::SetArrehniusParameterization ( double  A0,
double  E_R 
)

Definition at line 689 of file G4DNAMolecularReactionTable.cc.

691 {
692  std::vector<double> P = {A0, E_R};
693 
694  G4cout << "ici = " << P[0] << G4endl;
695  G4cout << "A0 = " << A0 << G4endl;
696 
697  fRateParam = std::bind(ArrehniusParam, std::placeholders::_1, P);
698 }
static double P[]
G4GLOB_DLL std::ostream G4cout
static double ArrehniusParam(double temp_K, std::vector< double > P)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void G4DNAMolecularReactionData::SetEffectiveReactionRadius ( G4double  radius)
inline

Definition at line 117 of file G4DNAMolecularReactionTable.hh.

118  {
119  fEffectiveReactionRadius = radius;
120  }
void G4DNAMolecularReactionData::SetObservedReactionRateConstant ( G4double  rate)
inline

Definition at line 102 of file G4DNAMolecularReactionTable.hh.

103  {
104  fObservedReactionRate = rate;
105  }

Here is the caller graph for this function:

void G4DNAMolecularReactionData::SetPolynomialParameterization ( const std::vector< double > &  P)

Definition at line 682 of file G4DNAMolecularReactionTable.cc.

683 {
684  fRateParam = std::bind(PolynomialParam, std::placeholders::_1, P);
685 }
static double PolynomialParam(double temp_K, std::vector< double > P)
static double P[]

Here is the call graph for this function:

Here is the caller graph for this function:

void G4DNAMolecularReactionData::SetReactant1 ( G4MolecularConfiguration reactive)

Definition at line 137 of file G4DNAMolecularReactionTable.cc.

138 {
139  fReactant1 = reactive;
140 }
G4MolecularConfiguration * fReactant1

Here is the caller graph for this function:

void G4DNAMolecularReactionData::SetReactant1 ( const G4String reactive)

Definition at line 161 of file G4DNAMolecularReactionTable.cc.

162 {
164 }
static G4MoleculeTable * Instance()
G4MolecularConfiguration * fReactant1
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)

Here is the call graph for this function:

void G4DNAMolecularReactionData::SetReactant2 ( G4MolecularConfiguration reactive)

Definition at line 143 of file G4DNAMolecularReactionTable.cc.

144 {
145  fReactant2 = reactive;
146 }
G4MolecularConfiguration * fReactant2

Here is the caller graph for this function:

void G4DNAMolecularReactionData::SetReactant2 ( const G4String reactive)

Definition at line 165 of file G4DNAMolecularReactionTable.cc.

166 {
168 }
static G4MoleculeTable * Instance()
G4MolecularConfiguration * fReactant2
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)

Here is the call graph for this function:

void G4DNAMolecularReactionData::SetReactants ( G4MolecularConfiguration reactive1,
G4MolecularConfiguration reactive2 
)

Definition at line 148 of file G4DNAMolecularReactionTable.cc.

150 {
151  fReactant1 = reactant1;
152  fReactant2 = reactant2;
153 }
G4MolecularConfiguration * fReactant1
G4MolecularConfiguration * fReactant2
void G4DNAMolecularReactionData::SetReactants ( const G4String reactive1,
const G4String reactive2 
)

Definition at line 169 of file G4DNAMolecularReactionTable.cc.

171 {
174 }
static G4MoleculeTable * Instance()
G4MolecularConfiguration * fReactant1
G4MolecularConfiguration * fReactant2
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)

Here is the call graph for this function:

void G4DNAMolecularReactionData::SetReactionID ( int  ID)
inline
void G4DNAMolecularReactionData::SetScaledParameterization ( double  temperature_K,
double  rateCste 
)

Definition at line 702 of file G4DNAMolecularReactionTable.cc.

704 {
705  fRateParam = std::bind(ScaledParameterization,
706  std::placeholders::_1,
707  temperature_K,
708  rateCste);
709 }
static double ScaledParameterization(double temp_K, double temp_init, double rateCste_init)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4double G4DNAMolecularReactionData::fEffectiveReactionRadius
protected

Definition at line 186 of file G4DNAMolecularReactionTable.hh.

G4double G4DNAMolecularReactionData::fObservedReactionRate
protected

Definition at line 185 of file G4DNAMolecularReactionTable.hh.

std::vector<G4MolecularConfiguration*>* G4DNAMolecularReactionData::fProducts
protected

Definition at line 188 of file G4DNAMolecularReactionTable.hh.

RateParam G4DNAMolecularReactionData::fRateParam
protected

Definition at line 190 of file G4DNAMolecularReactionTable.hh.

G4MolecularConfiguration* G4DNAMolecularReactionData::fReactant1
protected

Definition at line 183 of file G4DNAMolecularReactionTable.hh.

G4MolecularConfiguration* G4DNAMolecularReactionData::fReactant2
protected

Definition at line 184 of file G4DNAMolecularReactionTable.hh.

int G4DNAMolecularReactionData::fReactionID
protected

Definition at line 191 of file G4DNAMolecularReactionTable.hh.


The documentation for this class was generated from the following files: