Changeset 06536b for src


Ignore:
Timestamp:
Jun 20, 2018, 8:21:14 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
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)
Message:

annealWithBondGraph_BarzilaiBorwein() is using getBBStepWidth(), too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r8c0ac9 r06536b  
    438438      const Vector PositionDifference = currentPosition - oldPosition;
    439439      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);
    450441      Vector PositionUpdate = stepwidth * currentGradient;
    451442      // cap updates (if non-zero) at 0.2 angstroem. BB tends to overshoot.
Note: See TracChangeset for help on using the changeset viewer.