- Timestamp:
- Apr 10, 2018, 6:43:31 AM (7 years ago)
- Branches:
- AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
- Children:
- 441d40
- Parents:
- 07d4b1
- git-author:
- Frederik Heber <frederik.heber@…> (08/02/17 20:28:00)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/10/18 06:43:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/ForceAnnealing.hpp
r07d4b1 r90050b 501 501 } 502 502 503 // remove center of weight translation from gathered updates 504 Vector CommonTranslation; 505 for (std::map<atomId_t, Vector>::const_iterator iter = GatheredUpdates.begin(); 506 iter != GatheredUpdates.end(); ++iter) { 507 const Vector &update = iter->second; 508 CommonTranslation += update; 509 } 510 CommonTranslation *= 1./(double)GatheredUpdates.size(); 511 LOG(3, "DEBUG: Subtracting common translation " << CommonTranslation 512 << " from all updates."); 513 503 514 // apply the gathered updates and set remnant gradients for atomic annealing 504 515 for (std::map<atomId_t, Vector>::const_iterator iter = GatheredUpdates.begin(); … … 513 524 walker->setPosition( 514 525 walker->getPositionAtStep(CurrentTimeStep-1>=0 ? CurrentTimeStep - 1 : 0) 515 + update );526 + update - CommonTranslation); 516 527 walker->setAtomicVelocity(update); 517 528 // walker->setAtomicForce( RemnantGradient_per_atom[walker->getId()] );
Note:
See TracChangeset
for help on using the changeset viewer.