- Timestamp:
- Jun 20, 2018, 8:21:14 AM (7 years ago)
- Branches:
- Candidate_v1.6.1, ChemicalSpaceEvaluator, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph_contraction-expansion
- Children:
- bd19c1
- Parents:
- 8c0ac9
- git-author:
- Frederik Heber <frederik.heber@…> (06/15/18 20:07:50)
- git-committer:
- Frederik Heber <frederik.heber@…> (06/20/18 08:21:14)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/ForceAnnealing.hpp
r8c0ac9 r06536b 438 438 const Vector PositionDifference = currentPosition - oldPosition; 439 439 const Vector GradientDifference = (currentGradient - oldGradient); 440 double stepwidth = 0.; 441 if (GradientDifference.Norm() > MYEPSILON) 442 stepwidth = fabs(PositionDifference.ScalarProduct(GradientDifference))/ 443 GradientDifference.NormSquared(); 444 if (fabs(stepwidth) < 1e-10) { 445 // dont' warn in first step, deltat usage normal 446 if (currentStep != 1) 447 ELOG(1, "INFO: Barzilai-Borwein stepwidth is zero, using deltat " << currentDeltat << " instead."); 448 stepwidth = currentDeltat; 449 } 440 double stepwidth = getBarzilaiBorweinStepwidth(PositionDifference, GradientDifference); 450 441 Vector PositionUpdate = stepwidth * currentGradient; 451 442 // cap updates (if non-zero) at 0.2 angstroem. BB tends to overshoot.
Note:
See TracChangeset
for help on using the changeset viewer.