Changeset bd19c1 for src/Dynamics


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:
0682c2
Parents:
06536b
git-author:
Frederik Heber <frederik.heber@…> (06/15/18 20:08:26)
git-committer:
Frederik Heber <frederik.heber@…> (06/20/18 08:21:14)
Message:

Capping BB update step at 0.2 and general BB stepwidth at maximum of 1.

  • TESTFIX: Python regression tests on ForceAnnealing for five carbon have been modified. With bondgraph results are not as good as before.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r06536b rbd19c1  
    177177      stepwidth = currentDeltat;
    178178    }
    179     return stepwidth;
     179    return std::min(1., stepwidth);
    180180  }
    181181
     
    308308
    309309    Vector maxComponents;
    310     bool deltat_decreased = false;
    311310    for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
    312311        iter != AtomicForceManipulator<T>::atoms.end(); ++iter) {
     
    443442      for (size_t i=0;i<NDIM;++i)
    444443        if (fabs(PositionUpdate[i]) > MYEPSILON)
    445           PositionUpdate[i] = std::min(0.5, fabs(PositionUpdate[i]))*PositionUpdate[i]/fabs(PositionUpdate[i]);
     444          PositionUpdate[i] = std::min(0.2, fabs(PositionUpdate[i]))*PositionUpdate[i]/fabs(PositionUpdate[i]);
    446445      LOG(3, "DEBUG: Update would be " << stepwidth << "*" << currentGradient << " = " << PositionUpdate);
    447446
     
    493492        // stronger if either wants a different thing
    494493        const double &temp = forcelist[index];
    495         sides.push_back( -1.*temp/fabs(temp) ); // BondVectors has exactly opposite sign for sides decision
     494        if (fabs(temp) < MYEPSILON)
     495          sides.push_back(1);
     496        else
     497          sides.push_back( -1.*temp/fabs(temp) ); // BondVectors has exactly opposite sign for sides decision
     498        ASSERT( (sides.back() == 1) || (sides.back() == -1),
     499            "ForceAnnealing() - sides is not in {-1,1}.");
    496500        const double sum =
    497501            projected_forces[BondVectors::leftside][index]+projected_forces[BondVectors::rightside][index];
Note: See TracChangeset for help on using the changeset viewer.