| 281 |
|
} |
| 282 |
|
|
| 283 |
|
void InteractionManager::doPrePair(InteractionData idat){ |
| 284 |
< |
|
| 285 |
< |
if (!initialized_) initialize(); |
| 284 |
> |
printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__); |
| 285 |
> |
/* if (!initialized_) initialize(); |
| 286 |
|
|
| 287 |
|
// excluded interaction, so just return |
| 288 |
|
if (idat.excluded) return; |
| 294 |
|
if ((*it)->getFamily() == METALLIC_FAMILY) { |
| 295 |
|
dynamic_cast<MetallicInteraction*>(*it)->calcDensity(idat); |
| 296 |
|
} |
| 297 |
< |
} |
| 297 |
> |
}*/ |
| 298 |
|
|
| 299 |
|
return; |
| 300 |
|
} |
| 301 |
|
|
| 302 |
+ |
void InteractionManager::initializeOMP() { |
| 303 |
+ |
if (!initialized_) initialize(); |
| 304 |
+ |
} |
| 305 |
+ |
|
| 306 |
+ |
void InteractionManager::doPrePairOMP(InteractionDataPrv idatThread){ |
| 307 |
+ |
InteractionData idat; |
| 308 |
+ |
// excluded interaction, so just return |
| 309 |
+ |
if (idat.excluded) return; |
| 310 |
+ |
|
| 311 |
+ |
wrapData(idatThread, idat); |
| 312 |
+ |
|
| 313 |
+ |
set<NonBondedInteraction*>::iterator it; |
| 314 |
+ |
|
| 315 |
+ |
for (it = interactions_[ idat.atypes ].begin(); |
| 316 |
+ |
it != interactions_[ idat.atypes ].end(); ++it){ |
| 317 |
+ |
if ((*it)->getFamily() == METALLIC_FAMILY) { |
| 318 |
+ |
dynamic_cast<MetallicInteraction*>(*it)->calcDensity(idat); |
| 319 |
+ |
} |
| 320 |
+ |
} |
| 321 |
+ |
|
| 322 |
+ |
return; |
| 323 |
+ |
} |
| 324 |
+ |
|
| 325 |
|
void InteractionManager::doPreForce(SelfData sdat){ |
| 326 |
|
|
| 327 |
|
if (!initialized_) initialize(); |
| 339 |
|
} |
| 340 |
|
|
| 341 |
|
void InteractionManager::doPair(InteractionData idat){ |
| 342 |
< |
|
| 343 |
< |
if (!initialized_) initialize(); |
| 342 |
> |
printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__); |
| 343 |
> |
/*if (!initialized_) initialize(); |
| 344 |
|
|
| 345 |
|
set<NonBondedInteraction*>::iterator it; |
| 346 |
|
|
| 353 |
|
if (!idat.excluded || (*it)->getFamily() == ELECTROSTATIC_FAMILY) { |
| 354 |
|
(*it)->calcForce(idat); |
| 355 |
|
} |
| 356 |
< |
} |
| 356 |
> |
}*/ |
| 357 |
|
|
| 358 |
|
return; |
| 359 |
|
} |
| 360 |
|
|
| 361 |
+ |
void InteractionManager::wrapData(InteractionDataPrv &src, InteractionData &dst) { |
| 362 |
+ |
dst.A1 = src.A1; |
| 363 |
+ |
dst.A2 = src.A2; |
| 364 |
+ |
dst.atypes = src.atypes; |
| 365 |
+ |
dst.d = &src.d; |
| 366 |
+ |
dst.dfrho1 = src.dfrho1; |
| 367 |
+ |
dst.dfrho2 = src.dfrho2; |
| 368 |
+ |
dst.eFrame1 = src.eFrame1; |
| 369 |
+ |
dst.eFrame2 = src.eFrame2; |
| 370 |
+ |
dst.electroMult = &src.electroMult; |
| 371 |
+ |
dst.excluded = src.excluded; |
| 372 |
+ |
dst.f1 = &src.f1; |
| 373 |
+ |
dst.frho1 = src.frho1; |
| 374 |
+ |
dst.frho2 = src.frho2; |
| 375 |
+ |
dst.particlePot1 = src.particlePot1; |
| 376 |
+ |
dst.particlePot2 = src.particlePot2; |
| 377 |
+ |
dst.pot = &src.pot; |
| 378 |
+ |
dst.r2 = &src.r2; |
| 379 |
+ |
dst.rcut = &src.rcut; |
| 380 |
+ |
dst.rho1 = src.rho1; |
| 381 |
+ |
dst.rho2 = src.rho2; |
| 382 |
+ |
dst.rij = &src.rij; |
| 383 |
+ |
dst.shiftedForce = src.shiftedForce; |
| 384 |
+ |
dst.shiftedPot = src.shiftedPot; |
| 385 |
+ |
dst.skippedCharge1 = src.skippedCharge1; |
| 386 |
+ |
dst.skippedCharge2 = src.skippedCharge2; |
| 387 |
+ |
dst.sw = &src.sw; |
| 388 |
+ |
dst.t1 = src.t1; |
| 389 |
+ |
dst.t2 = src.t2; |
| 390 |
+ |
dst.topoDist = src.topoDist; |
| 391 |
+ |
dst.vdwMult = &src.vdwMult; |
| 392 |
+ |
dst.vpair = &src.vpair; |
| 393 |
+ |
} |
| 394 |
+ |
|
| 395 |
+ |
void InteractionManager::doPairOMP(InteractionDataPrv &idatThread){ |
| 396 |
+ |
set<NonBondedInteraction*>::iterator it; |
| 397 |
+ |
InteractionData idat; |
| 398 |
+ |
|
| 399 |
+ |
wrapData(idatThread, idat); |
| 400 |
+ |
|
| 401 |
+ |
for (it = interactions_[ idat.atypes ].begin(); |
| 402 |
+ |
it != interactions_[ idat.atypes ].end(); ++it) { |
| 403 |
+ |
|
| 404 |
+ |
// electrostatics still has to worry about indirect |
| 405 |
+ |
// contributions from excluded pairs of atoms: |
| 406 |
+ |
|
| 407 |
+ |
if (!idat.excluded || (*it)->getFamily() == ELECTROSTATIC_FAMILY) { |
| 408 |
+ |
(*it)->calcForce(idat); |
| 409 |
+ |
} |
| 410 |
+ |
} |
| 411 |
+ |
|
| 412 |
+ |
return; |
| 413 |
+ |
} |
| 414 |
+ |
|
| 415 |
|
void InteractionManager::doSelfCorrection(SelfData sdat){ |
| 416 |
|
|
| 417 |
|
if (!initialized_) initialize(); |