Changeset 8bfb58


Ignore:
Timestamp:
Aug 2, 2017, 8:28:00 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_with_BondGraph_continued
Children:
a78360
Parents:
ac79b2
Message:

tempcommit: Center of weight translation removed from GatheredUpdates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    rac79b2 r8bfb58  
    485485    }
    486486
     487    // remove center of weight translation from gathered updates
     488    Vector CommonTranslation;
     489    for (std::map<atomId_t, Vector>::const_iterator iter = GatheredUpdates.begin();
     490        iter != GatheredUpdates.end(); ++iter) {
     491      const Vector &update = iter->second;
     492      CommonTranslation += update;
     493    }
     494    CommonTranslation *= 1./(double)GatheredUpdates.size();
     495    LOG(3, "DEBUG: Subtracting common translation " << CommonTranslation
     496        << " from all updates.");
     497
    487498    // apply the gathered updates and set remnant gradients for atomic annealing
    488499    for (std::map<atomId_t, Vector>::const_iterator iter = GatheredUpdates.begin();
Note: See TracChangeset for help on using the changeset viewer.