665 |
|
Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
666 |
|
DataStorage* config = &(curSnapshot->atomData); |
667 |
|
DataStorage* cgConfig = &(curSnapshot->cgData); |
668 |
+ |
|
669 |
|
|
670 |
|
//calculate the center of mass of cutoff group |
671 |
|
|
710 |
|
RealType dVdFQ1(0.0); |
711 |
|
RealType dVdFQ2(0.0); |
712 |
|
potVec longRangePotential(0.0); |
713 |
+ |
potVec reciprocalPotential(0.0); |
714 |
|
potVec workPot(0.0); |
715 |
|
potVec exPot(0.0); |
716 |
|
Vector3d eField1(0.0); |
771 |
|
rgrpsq = d_grp.lengthSquare(); |
772 |
|
|
773 |
|
if (rgrpsq < rCutSq) { |
772 |
– |
|
774 |
|
if (iLoop == PAIR_LOOP) { |
775 |
|
vij = 0.0; |
776 |
|
fij.zero(); |
827 |
|
|
828 |
|
r = sqrt( *(idat.r2) ); |
829 |
|
idat.rij = &r; |
830 |
< |
|
830 |
> |
|
831 |
|
if (iLoop == PREPAIR_LOOP) { |
832 |
|
interactionMan_->doPrePair(idat); |
833 |
|
} else { |
927 |
|
// collects pairwise information |
928 |
|
fDecomp_->collectData(); |
929 |
|
if (cutoffMethod_ == EWALD_FULL) { |
930 |
< |
interactionMan_->doReciprocalSpaceSum(); |
930 |
> |
interactionMan_->doReciprocalSpaceSum(reciprocalPotential); |
931 |
|
} |
932 |
|
|
933 |
|
if (info_->requiresSelfCorrection()) { |
941 |
|
fDecomp_->collectSelfData(); |
942 |
|
|
943 |
|
longRangePotential = *(fDecomp_->getEmbeddingPotential()) + |
944 |
< |
*(fDecomp_->getPairwisePotential()); |
944 |
> |
*(fDecomp_->getPairwisePotential()) + reciprocalPotential; |
945 |
|
|
946 |
|
curSnapshot->setLongRangePotential(longRangePotential); |
947 |
|
|
950 |
|
|
951 |
|
} |
952 |
|
|
952 |
– |
|
953 |
|
void ForceManager::postCalculation() { |
954 |
|
|
955 |
|
vector<Perturbation*>::iterator pi; |