| 271 |
|
} |
| 272 |
|
|
| 273 |
|
void InteractionManager::setCutoffRadius(RealType rcut) { |
| 274 |
+ |
|
| 275 |
|
electrostatic_->setCutoffRadius(rcut); |
| 276 |
|
eam_->setCutoffRadius(rcut); |
| 277 |
|
} |
| 284 |
|
|
| 285 |
|
if (!initialized_) initialize(); |
| 286 |
|
|
| 287 |
+ |
// excluded interaction, so just return |
| 288 |
+ |
if (idat.excluded) return; |
| 289 |
+ |
|
| 290 |
|
set<NonBondedInteraction*>::iterator it; |
| 291 |
|
|
| 292 |
|
for (it = interactions_[ idat.atypes ].begin(); |
| 318 |
|
void InteractionManager::doPair(InteractionData idat){ |
| 319 |
|
|
| 320 |
|
if (!initialized_) initialize(); |
| 321 |
< |
|
| 321 |
> |
|
| 322 |
|
set<NonBondedInteraction*>::iterator it; |
| 323 |
|
|
| 324 |
|
for (it = interactions_[ idat.atypes ].begin(); |
| 325 |
< |
it != interactions_[ idat.atypes ].end(); ++it) |
| 322 |
< |
(*it)->calcForce(idat); |
| 323 |
< |
|
| 324 |
< |
return; |
| 325 |
< |
} |
| 325 |
> |
it != interactions_[ idat.atypes ].end(); ++it) { |
| 326 |
|
|
| 327 |
< |
void InteractionManager::doSkipCorrection(InteractionData idat){ |
| 327 |
> |
// electrostatics still has to worry about indirect |
| 328 |
> |
// contributions from excluded pairs of atoms: |
| 329 |
|
|
| 330 |
< |
if (!initialized_) initialize(); |
| 331 |
< |
|
| 331 |
< |
set<NonBondedInteraction*>::iterator it; |
| 332 |
< |
|
| 333 |
< |
for (it = interactions_[ idat.atypes ].begin(); |
| 334 |
< |
it != interactions_[ idat.atypes ].end(); ++it){ |
| 335 |
< |
if ((*it)->getFamily() == ELECTROSTATIC_FAMILY) { |
| 336 |
< |
dynamic_cast<ElectrostaticInteraction*>(*it)->calcSkipCorrection(idat); |
| 330 |
> |
if (!idat.excluded || (*it)->getFamily() == ELECTROSTATIC_FAMILY) { |
| 331 |
> |
(*it)->calcForce(idat); |
| 332 |
|
} |
| 333 |
|
} |
| 334 |
|
|