| 123 |
|
painCave.isFatal = 1; |
| 124 |
|
simError(); |
| 125 |
|
} |
| 126 |
< |
std::map<std::string, HydroProp>::iterator iter = hydroPropMap.find(integrableObject->getType()); |
| 127 |
< |
if (iter != hydroPropMap.end()) { |
| 128 |
< |
hydroProps_.push_back(iter->second); |
| 129 |
< |
} else { |
| 130 |
< |
sprintf( painCave.errMsg, |
| 131 |
< |
"Can not find resistance tensor for atom [%s]\n", integrableObject->getType().c_str()); |
| 132 |
< |
painCave.severity = OOPSE_ERROR; |
| 133 |
< |
painCave.isFatal = 1; |
| 134 |
< |
simError(); |
| 126 |
> |
|
| 127 |
> |
for (mol = info->beginMolecule(i); mol != NULL; |
| 128 |
> |
mol = info->nextMolecule(i)) { |
| 129 |
> |
for (integrableObject = mol->beginIntegrableObject(j); |
| 130 |
> |
integrableObject != NULL; |
| 131 |
> |
integrableObject = mol->nextIntegrableObject(j)) { |
| 132 |
> |
|
| 133 |
> |
std::map<std::string, HydroProp>::iterator iter = hydroPropMap.find(integrableObject->getType()); |
| 134 |
> |
if (iter != hydroPropMap.end()) { |
| 135 |
> |
hydroProps_.push_back(iter->second); |
| 136 |
> |
} else { |
| 137 |
> |
sprintf( painCave.errMsg, |
| 138 |
> |
"Can not find resistance tensor for atom [%s]\n", integrableObject->getType().c_str()); |
| 139 |
> |
painCave.severity = OOPSE_ERROR; |
| 140 |
> |
painCave.isFatal = 1; |
| 141 |
> |
simError(); |
| 142 |
> |
} |
| 143 |
> |
} |
| 144 |
|
} |
| 145 |
|
} else { |
| 146 |
|
|
| 300 |
|
currProp.Xirrr(2,1) = tokenizer.nextTokenAsDouble(); |
| 301 |
|
currProp.Xirrr(2,2) = tokenizer.nextTokenAsDouble(); |
| 302 |
|
|
| 303 |
< |
SquareMatrix<double, 6> Xir; |
| 303 |
> |
SquareMatrix<RealType, 6> Xir; |
| 304 |
|
Xir.setSubMatrix(0, 0, currProp.Xirtt); |
| 305 |
|
Xir.setSubMatrix(0, 3, currProp.Xirrt); |
| 306 |
|
Xir.setSubMatrix(3, 0, currProp.Xirtr); |
| 326 |
|
Mat3x3d Atrans; |
| 327 |
|
Vector3d Tb; |
| 328 |
|
Vector3d ji; |
| 329 |
< |
double mass; |
| 329 |
> |
RealType mass; |
| 330 |
|
unsigned int index = 0; |
| 331 |
|
bool doLangevinForces; |
| 332 |
|
bool freezeMolecule; |
| 334 |
|
|
| 335 |
|
fdf = 0; |
| 336 |
|
for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) { |
| 337 |
< |
|
| 337 |
> |
|
| 338 |
> |
doLangevinForces = true; |
| 339 |
> |
freezeMolecule = false; |
| 340 |
> |
|
| 341 |
|
if (sphericalBoundaryConditions_) { |
| 342 |
|
|
| 343 |
|
Vector3d molPos = mol->getCom(); |
| 344 |
< |
double molRad = molPos.length(); |
| 344 |
> |
RealType molRad = molPos.length(); |
| 345 |
|
|
| 346 |
|
doLangevinForces = false; |
| 335 |
– |
freezeMolecule = false; |
| 347 |
|
|
| 348 |
|
if (molRad > langevinBufferRadius_) { |
| 349 |
|
doLangevinForces = true; |
| 424 |
|
ForceManager::postCalculation(); |
| 425 |
|
} |
| 426 |
|
|
| 427 |
< |
void LDForceManager::genRandomForceAndTorque(Vector3d& force, Vector3d& torque, unsigned int index, double variance) { |
| 427 |
> |
void LDForceManager::genRandomForceAndTorque(Vector3d& force, Vector3d& torque, unsigned int index, RealType variance) { |
| 428 |
|
|
| 429 |
|
|
| 430 |
< |
Vector<double, 6> Z; |
| 431 |
< |
Vector<double, 6> generalForce; |
| 430 |
> |
Vector<RealType, 6> Z; |
| 431 |
> |
Vector<RealType, 6> generalForce; |
| 432 |
|
|
| 433 |
|
|
| 434 |
|
Z[0] = randNumGen_.randNorm(0, variance); |