Changeset ccbdf4
- Timestamp:
- Aug 2, 2017, 8:25:57 PM (8 years ago)
- Branches:
- ForceAnnealing_with_BondGraph_continued
- Children:
- c4a725
- Parents:
- 90e540
- Location:
- src/Dynamics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/BondVectors.cpp
r90e540 rccbdf4 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
r90e540 rccbdf4 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
r90e540 rccbdf4 352 352 boost::cref(bv), boost::ref(projected_forces)); 353 353 const Vector RemnantGradient = bv.getRemnantGradientForAtomAtStep( 354 walker, BondVectors, weights, timestep, forcestoring354 walker, walkerGradient, BondVectors, weights, timestep, forcestoring 355 355 ); 356 356 RemnantGradient_per_atom.insert( std::make_pair(walker.getId(), RemnantGradient) );
Note:
See TracChangeset
for help on using the changeset viewer.