Changeset 07d4b1 for src/Dynamics
- Timestamp:
- Apr 10, 2018, 6:43:30 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:
- 90050b
- Parents:
- f433ec
- git-author:
- Frederik Heber <frederik.heber@…> (08/02/17 20:25:57)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/10/18 06:43:30)
- Location:
- src/Dynamics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/BondVectors.cpp
rf433ec r07d4b1 287 287 Vector BondVectors::getRemnantGradientForAtomAtStep( 288 288 const atom &_walker, 289 const Vector &_walkerGradient, 289 290 const std::vector<Vector> _BondVectors, 290 291 const BondVectors::weights_t &_weights, … … 292 293 forcestore_t _forcestore) const 293 294 { 294 const Vector &walkerGradient = _walker.getAtomicForceAtStep(_step);295 295 BondVectors::weights_t::const_iterator weightiter = _weights.begin(); 296 296 std::vector<Vector>::const_iterator vectoriter = _BondVectors.begin(); … … 303 303 const Vector &BondVector = *vectoriter; 304 304 305 const double temp = (*weightiter)* walkerGradient.ScalarProduct(BondVector);305 const double temp = (*weightiter)*_walkerGradient.ScalarProduct(BondVector); 306 306 _forcestore(_walker, current_bond, _step, temp); 307 307 LOG(4, "DEBUG: BondVector " << BondVector << " receives projected force of " 308 << temp);308 << (*weightiter) << "*" << _walkerGradient << "*" << BondVector << " = " << temp); 309 309 forcesum += temp * BondVector; 310 310 } … … 314 314 "BondVectors::getRemnantGradientForAtomAtStep() - vectoriter is not at end when it should be."); 315 315 316 return walkerGradient-forcesum;316 return _walkerGradient-forcesum; 317 317 } 318 318 -
src/Dynamics/BondVectors.hpp
rf433ec r07d4b1 129 129 * 130 130 * \param _walker atom to get BondVectors for 131 * \param _walkerGradient gradient of atom to get BondVectors for 131 132 * \param _BondVectors precalculated bond vectors for given \a _walker 132 133 * \param _weights weight per bond vector (as it is a frame, not a basis) … … 137 138 Vector getRemnantGradientForAtomAtStep( 138 139 const atom &_walker, 140 const Vector &_walkerGradient, 139 141 const std::vector<Vector> _BondVectors, 140 142 const BondVectors::weights_t &_weights, -
src/Dynamics/ForceAnnealing.hpp
rf433ec r07d4b1 122 122 if (_UseBondgraph) 123 123 annealWithBondGraph(_CurrentTimeStep, _offset, maxComponents); 124 anneal(_CurrentTimeStep, _offset, maxComponents); 124 // cannot store RemnantGradient in Atom's Force as it ruins BB stepwidth calculation 125 else 126 anneal(_CurrentTimeStep, _offset, maxComponents); 125 127 } 126 128 … … 368 370 boost::cref(bv), boost::ref(projected_forces)); 369 371 const Vector RemnantGradient = bv.getRemnantGradientForAtomAtStep( 370 walker, BondVectors, weights, timestep, forcestoring372 walker, walkerGradient, BondVectors, weights, timestep, forcestoring 371 373 ); 372 374 RemnantGradient_per_atom.insert( std::make_pair(walker.getId(), RemnantGradient) ); … … 513 515 + update); 514 516 walker->setAtomicVelocity(update); 515 walker->setAtomicForce( RemnantGradient_per_atom[walker->getId()] );517 // walker->setAtomicForce( RemnantGradient_per_atom[walker->getId()] ); 516 518 } 517 519 }
Note:
See TracChangeset
for help on using the changeset viewer.