Changeset 3a5de5
- Timestamp:
- Jul 20, 2017, 9:38:38 AM (8 years ago)
- Branches:
- ForceAnnealing_with_BondGraph_continued
- Children:
- b7fe6e
- Parents:
- 6dfa37
- git-author:
- Frederik Heber <frederik.heber@…> (06/27/17 21:10:02)
- git-committer:
- Frederik Heber <frederik.heber@…> (07/20/17 09:38:38)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
r6dfa37 r3a5de5 585 585 } 586 586 587 static void AddForces(587 static void SetForces( 588 588 const IndexedVectors::indexedvectors_t &_forces, 589 589 const bool _IsAngstroem) … … 603 603 atom *_atom = World::getInstance().getAtom(AtomById(index)); 604 604 if(_atom != NULL) 605 _atom->setAtomicForce( _atom->getAtomicForce() +ForceVector);605 _atom->setAtomicForce(ForceVector); 606 606 else 607 607 ELOG(2, "Could not find atom to id " << index << "."); … … 687 687 shortrangeresults.Result_Force_fused.back() 688 688 ).getVectors(); 689 AddForces(shortrange_forces,IsAngstroem);689 SetForces(shortrange_forces,IsAngstroem); 690 690 } else { 691 691 LOG(1, "INFO: Full molecule not loaded, hence will not add forces to atoms."); … … 760 760 longrangeresults.Result_ForcesLongRangeIntegrated_fused.back() 761 761 ).getVectors(); 762 AddForces(longrange_forces,IsAngstroem);762 SetForces(longrange_forces,IsAngstroem); 763 763 } else { 764 764 LOG(1, "INFO: Full molecule not loaded, hence will not add forces to atoms."); -
src/Dynamics/ForceAnnealing.hpp
r6dfa37 r3a5de5 197 197 //std::cout << "Id of atom is " << (*iter)->getId() << std::endl; 198 198 // (*iter)->VelocityVerletUpdateU((*iter)->getId(), CurrentTimeStep-1, Deltat, IsAngstroem); 199 200 // reset force vector for next step except on final one201 if (currentStep != maxSteps)202 (*iter)->setAtomicForce(zeroVec);203 }204 205 LOG(1, "STATUS: Largest remaining force components at step #"206 << currentStep << " are " << maxComponents);207 208 // are we in final step? Remember to reset static entities209 if (currentStep == maxSteps) {210 LOG(2, "DEBUG: Final step, resetting values");211 reset();212 199 } 213 200 } … … 503 490 if (currentGradient[i] > maxComponents[i]) 504 491 maxComponents[i] = currentGradient[i]; 505 506 // reset force vector for next step except on final one507 if (currentStep != maxSteps)508 walker.setAtomicForce(zeroVec);509 492 } 510 493 … … 517 500 ASSERT( walker != NULL, 518 501 "ForceAnnealing() - walker with id "+toString(atomid)+" has suddenly disappeared."); 502 LOG(3, "DEBUG: Applying update " << update << " to atom #" << atomid 503 << ", namely " << *walker); 519 504 walker->setPosition( walker->getPosition() + update ); 520 walker->setAtomicVelocity(update);521 LOG(3, "DEBUG: Applying update " << update << " to atom " << *walker);522 505 } 523 506 } … … 530 513 currentDeltat = 0.; 531 514 currentStep = 0; 532 533 // reset (artifical) velocities534 for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();535 iter != AtomicForceManipulator<T>::atoms.end(); ++iter)536 (*iter)->setAtomicVelocity(zeroVec);537 515 } 538 516
Note:
See TracChangeset
for help on using the changeset viewer.