108 |
|
|
109 |
|
Globals* simParams_ = info_->getSimParams(); |
110 |
|
ForceFieldOptions& forceFieldOptions_ = forceField_->getForceFieldOptions(); |
111 |
+ |
int mdFileVersion; |
112 |
|
|
113 |
+ |
if (simParams_->haveMDfileVersion()) |
114 |
+ |
mdFileVersion = simParams_->getMDfileVersion(); |
115 |
+ |
else |
116 |
+ |
mdFileVersion = 0; |
117 |
+ |
|
118 |
+ |
|
119 |
|
if (simParams_->haveCutoffRadius()) { |
120 |
|
rCut_ = simParams_->getCutoffRadius(); |
121 |
|
} else { |
589 |
|
bool update_nlist = fDecomp_->checkNeighborList(); |
590 |
|
if (update_nlist) |
591 |
|
neighborList = fDecomp_->buildNeighborList(); |
592 |
< |
} |
593 |
< |
|
592 |
> |
} |
593 |
> |
|
594 |
|
for (vector<pair<int, int> >::iterator it = neighborList.begin(); |
595 |
|
it != neighborList.end(); ++it) { |
596 |
|
|
600 |
|
cuts = fDecomp_->getGroupCutoffs(cg1, cg2); |
601 |
|
|
602 |
|
d_grp = fDecomp_->getIntergroupVector(cg1, cg2); |
603 |
+ |
|
604 |
|
curSnapshot->wrapVector(d_grp); |
605 |
|
rgrpsq = d_grp.lengthSquare(); |
598 |
– |
|
606 |
|
rCutSq = cuts.second; |
607 |
|
|
608 |
|
if (rgrpsq < rCutSq) { |
617 |
|
|
618 |
|
atomListRow = fDecomp_->getAtomsInGroupRow(cg1); |
619 |
|
atomListColumn = fDecomp_->getAtomsInGroupColumn(cg2); |
620 |
+ |
|
621 |
|
|
622 |
|
for (vector<int>::iterator ia = atomListRow.begin(); |
623 |
|
ia != atomListRow.end(); ++ia) { |
626 |
|
for (vector<int>::iterator jb = atomListColumn.begin(); |
627 |
|
jb != atomListColumn.end(); ++jb) { |
628 |
|
atom2 = (*jb); |
629 |
< |
|
629 |
> |
|
630 |
|
if (!fDecomp_->skipAtomPair(atom1, atom2)) { |
631 |
|
vpair = 0.0; |
632 |
|
workPot = 0.0; |
648 |
|
idat.d = &d; |
649 |
|
idat.r2 = &r2; |
650 |
|
} |
651 |
< |
|
651 |
> |
|
652 |
|
r = sqrt( *(idat.r2) ); |
653 |
|
idat.rij = &r; |
654 |
|
|
657 |
|
} else { |
658 |
|
interactionMan_->doPair(idat); |
659 |
|
fDecomp_->unpackInteractionData(idat, atom1, atom2); |
660 |
+ |
|
661 |
|
vij += vpair; |
662 |
|
fij += f1; |
654 |
– |
cerr << "ats = " << atom1 << " " << atom2 << "d = " << *(idat.d) << " f1 = " << f1 << "\n"; |
663 |
|
tau -= outProduct( *(idat.d), f1); |
664 |
|
} |
665 |
|
} |
713 |
|
} |
714 |
|
} |
715 |
|
} |
716 |
< |
//if (!SIM_uses_AtomicVirial) { |
716 |
> |
//if (!info_->usesAtomicVirial()) { |
717 |
|
// tau -= outProduct(d_grp, fij); |
718 |
|
//} |
719 |
|
} |
734 |
|
|
735 |
|
} |
736 |
|
} |
729 |
– |
|
737 |
|
} |
738 |
|
|
739 |
|
fDecomp_->collectData(); |