| 281 |
|
} |
| 282 |
|
|
| 283 |
|
void InteractionManager::doPrePair(InteractionData idat){ |
| 284 |
< |
printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__); |
| 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 |
|
} |
| 336 |
|
} |
| 337 |
|
|
| 338 |
|
return; |
| 339 |
+ |
} |
| 340 |
+ |
|
| 341 |
+ |
void InteractionManager::initNonbondedForces() { |
| 342 |
+ |
pair<AtomType*, AtomType*> key; |
| 343 |
+ |
set<AtomType*> simTypes = info_->getSimulatedAtomTypes(); |
| 344 |
+ |
set<AtomType*>::iterator it, jt; |
| 345 |
+ |
set<NonBondedInteraction*>::iterator kt; |
| 346 |
+ |
AtomType* atype1; |
| 347 |
+ |
AtomType* atype2; |
| 348 |
+ |
|
| 349 |
+ |
for (it = simTypes.begin(); it != simTypes.end(); ++it) { |
| 350 |
+ |
atype1 = (*it); |
| 351 |
+ |
for (jt = it; jt != simTypes.end(); ++jt) { |
| 352 |
+ |
atype2 = (*jt); |
| 353 |
+ |
key = make_pair(atype1, atype2); |
| 354 |
+ |
|
| 355 |
+ |
for (kt = interactions_[ key ].begin(); |
| 356 |
+ |
kt != interactions_[ key ].end(); ++kt) { |
| 357 |
+ |
|
| 358 |
+ |
(*kt)->initForce(); |
| 359 |
+ |
} |
| 360 |
+ |
} |
| 361 |
+ |
} |
| 362 |
+ |
|
| 363 |
+ |
/* lj_->initForce(); |
| 364 |
+ |
electrostatic_->initForce(); |
| 365 |
+ |
sticky_->initForce(); |
| 366 |
+ |
eam_->initForce(); |
| 367 |
+ |
sc_->initForce(); |
| 368 |
+ |
gb_->initForce();*/ |
| 369 |
+ |
|
| 370 |
+ |
return; |
| 371 |
|
} |
| 372 |
|
|
| 373 |
|
void InteractionManager::doPair(InteractionData idat){ |
| 374 |
< |
printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__); |
| 375 |
< |
/*if (!initialized_) initialize(); |
| 374 |
> |
// printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__); |
| 375 |
> |
if (!initialized_) initialize(); |
| 376 |
|
|
| 377 |
|
set<NonBondedInteraction*>::iterator it; |
| 378 |
|
|
| 385 |
|
if (!idat.excluded || (*it)->getFamily() == ELECTROSTATIC_FAMILY) { |
| 386 |
|
(*it)->calcForce(idat); |
| 387 |
|
} |
| 388 |
< |
}*/ |
| 388 |
> |
} |
| 389 |
|
|
| 390 |
|
return; |
| 391 |
|
} |