55 std::istringstream iss(newValue);
66 description <<
" marker : " << marker <<
G4endl;
67 G4Exception(
"G4MoleculeTableMessenger::SetNewValue",
72 iss >> speciesDefName;
85 iss >> diffusion_coefficient;
91 iss >> VanDerVaalsRadius;
99 if(VanDerVaalsRadius != 0)
101 pConf->SetVanDerVaalsRadius(VanDerVaalsRadius * nm);
103 if(diffusion_coefficient != 0)
105 pConf->SetDiffusionCoefficient(diffusion_coefficient * (m2 / s));
112 if(particleDef !=
nullptr)
116 particleDef, charge);
117 if(molConf ==
nullptr)
120 description <<
"This molecule has not been defined" <<
G4endl;
121 G4Exception(
"G4MoleculeTableMessenger::SetNewValue",
124 molConf->UnFinalize();
125 if(VanDerVaalsRadius != 0)
127 molConf->SetVanDerVaalsRadius(VanDerVaalsRadius * nm);
129 if(diffusion_coefficient != 0)
131 molConf->SetDiffusionCoefficient(diffusion_coefficient * (m2 / s));
134 auto usedName = molConf->GetUserID();
135 if(!usedName.empty())
137 molConf->PrintState();
139 description <<
"This molecule has been defined by the name : "
140 << usedName <<
" . Please, use this name." <<
G4endl;
141 G4Exception(
"G4MoleculeTableMessenger::SetNewValue",
146 molConf->SetUserID(speciesName);
153 diffusion_coefficient * (m * m / s),
156 VanDerVaalsRadius * nm);
157 G4bool alreadyCreated(
false);
159 speciesName, speciesDef, alreadyCreated);
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()