Ignore:
Timestamp:
Apr 10, 2018, 6:43:30 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
Children:
825d33
Parents:
2f3905
git-author:
Frederik Heber <frederik.heber@…> (06/29/17 14:40:12)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:30)
Message:

BondVectors now return subset of BondVectors for a given atom.

  • functionality extracted from ForceAnnealing::annealWithBondgraph().
  • also the mapped_t type is now kept up-to-date internally as we need it for returning the subset efficiently over a number of atoms, e.g. all in the given range.
  • also moved a few simple implementations over to _impl module.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r2f3905 r9861d0  
    301301          << ", and CurrentStep is " << CurrentStep);
    302302
    303       // get all bond vectors for this time step (from the perspective of the
    304       // bonds taken from the currentStep)
    305       const BondVectors::mapped_t bondvectors = bv.getBondVectorsAtStep(CurrentStep);
    306 
    307303      for(typename AtomSetMixin<T>::const_iterator iter = AtomicForceManipulator<T>::atoms.begin();
    308304          iter != AtomicForceManipulator<T>::atoms.end(); ++iter) {
     
    317313
    318314          // gather subset of BondVectors for the current atom
    319           std::vector<Vector> BondVectors;
    320           for(BondList::const_iterator bonditer = ListOfBonds.begin();
    321               bonditer != ListOfBonds.end(); ++bonditer) {
    322             const bond::ptr &current_bond = *bonditer;
    323             const BondVectors::mapped_t::const_iterator bviter =
    324                 bondvectors.find(current_bond);
    325             ASSERT( bviter != bondvectors.end(),
    326                 "ForceAnnealing() - cannot find current_bond ?");
    327             ASSERT( bviter != bondvectors.end(),
    328                 "ForceAnnealing - cannot find current bond "+toString(*current_bond)
    329                 +" in bonds.");
    330             BondVectors.push_back(bviter->second);
    331           }
    332           LOG(4, "DEBUG: BondVectors for atom #" << walker.getId() << ": " << BondVectors);
     315          std::vector<Vector> BondVectors = bv.getAtomsBondVectorsAtStep(walker, CurrentStep);
    333316
    334317          // go through all its bonds and calculate what magnitude is represented
Note: See TracChangeset for help on using the changeset viewer.