- Timestamp:
- Apr 10, 2018, 6:43:11 AM (7 years ago)
- Branches:
- AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
- Children:
- 2bb3be
- Parents:
- 216840
- git-author:
- Frederik Heber <frederik.heber@…> (06/27/17 21:10:02)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/10/18 06:43:11)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
r216840 r866dec 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
r216840 r866dec 187 187 //std::cout << "Id of atom is " << (*iter)->getId() << std::endl; 188 188 // (*iter)->VelocityVerletUpdateU((*iter)->getId(), CurrentTimeStep-1, Deltat, IsAngstroem); 189 190 // reset force vector for next step except on final one191 if (currentStep != maxSteps)192 (*iter)->setAtomicForce(zeroVec);193 }194 195 LOG(1, "STATUS: Largest remaining force components at step #"196 << currentStep << " are " << maxComponents);197 198 // are we in final step? Remember to reset static entities199 if (currentStep == maxSteps) {200 LOG(2, "DEBUG: Final step, resetting values");201 reset();202 189 } 203 190 } … … 327 314 if (currentGradient[i] > maxComponents[i]) 328 315 maxComponents[i] = currentGradient[i]; 329 330 // reset force vector for next step except on final one331 if (currentStep != maxSteps)332 (*iter)->setAtomicForce(zeroVec);333 316 } 334 317 // apply the gathered updates … … 340 323 ASSERT( walker != NULL, 341 324 "ForceAnnealing() - walker with id "+toString(atomid)+" has suddenly disappeared."); 325 LOG(3, "DEBUG: Applying update " << update << " to atom #" << atomid 326 << ", namely " << *walker); 342 327 walker->setPosition( walker->getPosition() + update ); 343 walker->setAtomicVelocity(update);344 LOG(3, "DEBUG: Applying update " << update << " to atom " << *walker);345 328 } 346 329 } … … 353 336 currentDeltat = 0.; 354 337 currentStep = 0; 355 356 // reset (artifical) velocities357 for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();358 iter != AtomicForceManipulator<T>::atoms.end(); ++iter)359 (*iter)->setAtomicVelocity(zeroVec);360 338 } 361 339
Note:
See TracChangeset
for help on using the changeset viewer.