427 |
|
if (iLoop == PREPAIR_LOOP) { |
428 |
|
if (info_->requiresPrepair()) { |
429 |
|
fDecomp_->collectIntermediateData(); |
430 |
< |
atomListLocal = fDecomp_->getAtomList(); |
431 |
< |
for (vector<int>::iterator ia = atomListLocal.begin(); |
432 |
< |
ia != atomListLocal.end(); ++ia) { |
433 |
< |
atom1 = (*ia); |
430 |
> |
|
431 |
> |
for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |
432 |
|
sdat = fDecomp_->fillSelfData(atom1); |
433 |
|
interactionMan_->doPreForce(sdat); |
434 |
|
} |
435 |
+ |
|
436 |
|
fDecomp_->distributeIntermediateData(); |
437 |
|
} |
438 |
|
} |
441 |
|
|
442 |
|
fDecomp_->collectData(); |
443 |
|
|
444 |
< |
if (info_->requiresSkipCorrection() || info_->requiresSelfCorrection()) { |
445 |
< |
atomListLocal = fDecomp_->getAtomList(); |
446 |
< |
for (vector<int>::iterator ia = atomListLocal.begin(); |
448 |
< |
ia != atomListLocal.end(); ++ia) { |
449 |
< |
atom1 = (*ia); |
444 |
> |
if ( info_->requiresSkipCorrection() ) { |
445 |
> |
|
446 |
> |
for (int atom1 = 0; atom1 < fDecomp_->getNAtomsInRow(); atom1++) { |
447 |
|
|
448 |
< |
if (info_->requiresSkipCorrection()) { |
449 |
< |
vector<int> skipList = fDecomp_->getSkipsForAtom(atom1); |
450 |
< |
for (vector<int>::iterator jb = skipList.begin(); |
451 |
< |
jb != skipList.end(); ++jb) { |
452 |
< |
atom2 = (*jb); |
453 |
< |
idat = fDecomp_->fillSkipData(atom1, atom2); |
454 |
< |
interactionMan_->doSkipCorrection(idat); |
455 |
< |
} |
448 |
> |
vector<int> skipList = fDecomp_->getSkipsForRowAtom( atom1 ); |
449 |
> |
|
450 |
> |
for (vector<int>::iterator jb = skipList.begin(); |
451 |
> |
jb != skipList.end(); ++jb) { |
452 |
> |
|
453 |
> |
atom2 = (*jb); |
454 |
> |
idat = fDecomp_->fillSkipData(atom1, atom2); |
455 |
> |
interactionMan_->doSkipCorrection(idat); |
456 |
> |
|
457 |
|
} |
460 |
– |
|
461 |
– |
if (info_->requiresSelfCorrection()) { |
462 |
– |
sdat = fDecomp_->fillSelfData(atom1); |
463 |
– |
interactionMan_->doSelfCorrection(sdat); |
464 |
– |
} |
458 |
|
} |
459 |
|
} |
460 |
+ |
|
461 |
+ |
if (info_->requiresSelfCorrection()) { |
462 |
|
|
463 |
+ |
for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |
464 |
+ |
sdat = fDecomp_->fillSelfData(atom1); |
465 |
+ |
interactionMan_->doSelfCorrection(sdat); |
466 |
+ |
} |
467 |
+ |
|
468 |
+ |
} |
469 |
+ |
|
470 |
|
// dangerous to iterate over enums, but we'll live on the edge: |
471 |
|
for (int i = NO_FAMILY; i != N_INTERACTION_FAMILIES; ++i){ |
472 |
|
lrPot += longRangePotential[i]; //Quick hack |