449 |
|
Molecule::CutoffGroupIterator ci; |
450 |
|
CutoffGroup* cg; |
451 |
|
|
452 |
< |
// forces are zeroed here, before any are accumulated. |
452 |
> |
// forces and potentials are zeroed here, before any are |
453 |
> |
// accumulated. |
454 |
|
|
455 |
+ |
Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot(); |
456 |
+ |
|
457 |
+ |
snap->setBondPotential(0.0); |
458 |
+ |
snap->setBendPotential(0.0); |
459 |
+ |
snap->setTorsionPotential(0.0); |
460 |
+ |
snap->setInversionPotential(0.0); |
461 |
+ |
|
462 |
+ |
potVec zeroPot(0.0); |
463 |
+ |
snap->setLongRangePotential(zeroPot); |
464 |
+ |
snap->setExcludedPotentials(zeroPot); |
465 |
+ |
|
466 |
+ |
snap->setRestraintPotential(0.0); |
467 |
+ |
snap->setRawPotential(0.0); |
468 |
+ |
|
469 |
|
for (mol = info_->beginMolecule(mi); mol != NULL; |
470 |
|
mol = info_->nextMolecule(mi)) { |
471 |
|
for(atom = mol->beginAtom(ai); atom != NULL; |
623 |
|
curSnapshot->setTorsionPotential(torsionPotential); |
624 |
|
curSnapshot->setInversionPotential(inversionPotential); |
625 |
|
|
626 |
< |
RealType shortRangePotential = bondPotential + bendPotential + |
627 |
< |
torsionPotential + inversionPotential; |
626 |
> |
// RealType shortRangePotential = bondPotential + bendPotential + |
627 |
> |
// torsionPotential + inversionPotential; |
628 |
|
|
629 |
< |
curSnapshot->setShortRangePotential(shortRangePotential); |
629 |
> |
// curSnapshot->setShortRangePotential(shortRangePotential); |
630 |
|
} |
631 |
|
|
632 |
|
void ForceManager::longRangeInteractions() { |
675 |
|
InteractionData idat; |
676 |
|
SelfData sdat; |
677 |
|
RealType mf; |
663 |
– |
RealType lrPot; |
678 |
|
RealType vpair; |
679 |
|
RealType dVdFQ1(0.0); |
680 |
|
RealType dVdFQ2(0.0); |
868 |
|
|
869 |
|
fDecomp_->collectIntermediateData(); |
870 |
|
|
871 |
< |
for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |
871 |
> |
for (unsigned int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |
872 |
|
fDecomp_->fillSelfData(sdat, atom1); |
873 |
|
interactionMan_->doPreForce(sdat); |
874 |
|
} |
883 |
|
fDecomp_->collectData(); |
884 |
|
|
885 |
|
if (info_->requiresSelfCorrection()) { |
886 |
< |
for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |
886 |
> |
for (unsigned int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |
887 |
|
fDecomp_->fillSelfData(sdat, atom1); |
888 |
|
interactionMan_->doSelfCorrection(sdat); |
889 |
|
} |
895 |
|
longRangePotential = *(fDecomp_->getEmbeddingPotential()) + |
896 |
|
*(fDecomp_->getPairwisePotential()); |
897 |
|
|
898 |
< |
curSnapshot->setLongRangePotentialFamilies(longRangePotential); |
885 |
< |
|
886 |
< |
lrPot = longRangePotential.sum(); |
887 |
< |
|
888 |
< |
//store the long range potential |
889 |
< |
curSnapshot->setLongRangePotential(lrPot); |
898 |
> |
curSnapshot->setLongRangePotential(longRangePotential); |
899 |
|
|
900 |
|
curSnapshot->setExcludedPotentials(*(fDecomp_->getExcludedSelfPotential()) + |
901 |
|
*(fDecomp_->getExcludedPotential())); |
909 |
|
Molecule::RigidBodyIterator rbIter; |
910 |
|
RigidBody* rb; |
911 |
|
Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
912 |
< |
|
912 |
> |
|
913 |
|
// collect the atomic forces onto rigid bodies |
914 |
|
|
915 |
|
for (mol = info_->beginMolecule(mi); mol != NULL; |