Changeset 866dec


Ignore:
Timestamp:
Apr 10, 2018, 6:43:11 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
Children:
2bb3be
Parents:
216840
git-author:
Frederik Heber <frederik.heber@…> (06/27/17 21:10:02)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:11)
Message:

ForceAnnealing no longer resets forces, AnalyseFragmentResults now sets forces.

  • before we added onto force vector in AnalyseFragmentResults.
  • if we do not reset forces in ForceAnnealing we can inspect the force components in the output file along the annealing run.
  • TESTFIX: data files for regression test AnalyseFragmentResults OBC and PBC changed because of modified way of resetting forces.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp

    r216840 r866dec  
    585585}
    586586
    587 static void AddForces(
     587static void SetForces(
    588588    const IndexedVectors::indexedvectors_t &_forces,
    589589    const bool _IsAngstroem)
     
    603603    atom *_atom = World::getInstance().getAtom(AtomById(index));
    604604    if(_atom != NULL)
    605       _atom->setAtomicForce(_atom->getAtomicForce() + ForceVector);
     605      _atom->setAtomicForce(ForceVector);
    606606    else
    607607      ELOG(2, "Could not find atom to id " << index << ".");
     
    687687            shortrangeresults.Result_Force_fused.back()
    688688            ).getVectors();
    689     AddForces(shortrange_forces,IsAngstroem);
     689    SetForces(shortrange_forces,IsAngstroem);
    690690  } else {
    691691    LOG(1, "INFO: Full molecule not loaded, hence will not add forces to atoms.");
     
    760760              longrangeresults.Result_ForcesLongRangeIntegrated_fused.back()
    761761              ).getVectors();
    762       AddForces(longrange_forces,IsAngstroem);
     762      SetForces(longrange_forces,IsAngstroem);
    763763    } else {
    764764      LOG(1, "INFO: Full molecule not loaded, hence will not add forces to atoms.");
  • src/Dynamics/ForceAnnealing.hpp

    r216840 r866dec  
    187187      //std::cout << "Id of atom is " << (*iter)->getId() << std::endl;
    188188//        (*iter)->VelocityVerletUpdateU((*iter)->getId(), CurrentTimeStep-1, Deltat, IsAngstroem);
    189 
    190       // reset force vector for next step except on final one
    191       if (currentStep != maxSteps)
    192         (*iter)->setAtomicForce(zeroVec);
    193     }
    194 
    195     LOG(1, "STATUS: Largest remaining force components at step #"
    196         << currentStep << " are " << maxComponents);
    197 
    198     // are we in final step? Remember to reset static entities
    199     if (currentStep == maxSteps) {
    200       LOG(2, "DEBUG: Final step, resetting values");
    201       reset();
    202189    }
    203190  }
     
    327314        if (currentGradient[i] > maxComponents[i])
    328315          maxComponents[i] = currentGradient[i];
    329 
    330       // reset force vector for next step except on final one
    331       if (currentStep != maxSteps)
    332         (*iter)->setAtomicForce(zeroVec);
    333316    }
    334317    // apply the gathered updates
     
    340323      ASSERT( walker != NULL,
    341324          "ForceAnnealing() - walker with id "+toString(atomid)+" has suddenly disappeared.");
     325      LOG(3, "DEBUG: Applying update " << update << " to atom #" << atomid
     326          << ", namely " << *walker);
    342327      walker->setPosition( walker->getPosition() + update );
    343       walker->setAtomicVelocity(update);
    344       LOG(3, "DEBUG: Applying update " << update << " to atom " << *walker);
    345328    }
    346329  }
     
    353336    currentDeltat = 0.;
    354337    currentStep = 0;
    355 
    356     // reset (artifical) velocities
    357     for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
    358         iter != AtomicForceManipulator<T>::atoms.end(); ++iter)
    359       (*iter)->setAtomicVelocity(zeroVec);
    360338  }
    361339
  • tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/alkane-3.data

    r216840 r866dec  
    11# ATOMDATA      Id      type    x=3     u=3     F=3
    22# Box   20      0       0       0       20      0       0       0       20
    3 1       C       5.89    6.513   5.89    0       0       0       -0.00161434     -0.00490854     -1.10363e-13   
    4 2       C       7.139   5.63    5.89    0       0       0       -0.00299896     0.00787442      -1.50393e-13   
    5 3       H       5.89    7.142   5       0       0       0       -0.00213528     -0.000289904    0.00251064     
    6 4       H       5.89    7.142   6.78    0       0       0       -0.00213528     -0.000289904    -0.00251064     
    7 5       H       7.139   5       5       0       0       0       0.000254991     -0.000726836    0.00279816     
    8 6       H       7.139   5       6.78    0       0       0       0.000254991     -0.000726836    -0.00279816     
    9 7       C       8.388   6.513   5.89    0       0       0       -0.000234367    -0.0118817      -1.63896e-13   
    10 8       C       9.638   5.63    5.89    0       0       0       0.000234232     0.0115391       -1.55075e-13   
    11 9       H       8.388   7.142   5       0       0       0       -5.97387e-05    0.000821868     0.00242643     
    12 10      H       8.388   7.142   6.78    0       0       0       -5.97387e-05    0.000821868     -0.00242643     
    13 11      H       9.638   5       5       0       0       0       5.95858e-05     -0.000650729    0.00254668     
    14 12      H       9.638   5       6.78    0       0       0       5.95858e-05     -0.000650729    -0.00254668     
    15 13      C       10.887  6.513   5.89    0       0       0       0.00299486      -0.00822198     -1.35513e-13   
    16 14      C       12.136  5.63    5.89    0       0       0       0.0016146       0.00459057      -1.39521e-13   
    17 15      H       10.887  7.142   5       0       0       0       -0.00025431     0.000898036     0.00267787     
    18 16      H       10.887  7.142   6.78    0       0       0       -0.00025431     0.000898036     -0.00267787     
    19 17      H       12.136  5       5       0       0       0       0.00213567      0.000462277     0.00263267     
    20 18      H       12.136  5       6.78    0       0       0       0.00213567      0.000462277     -0.00263267     
    21 19      H       5       5.884   5.89    0       0       0       -0.000456201    0.00402573      -9.8489e-16     
    22 20      H       13.026  6.259   5.89    0       0       0       0.00045834      -0.00404705     -5.79475e-16   
     31       C       5.89    6.513   5.89    0       0       0       6.79302e-17     4.11253e-16     4.40629e-17     
     42       C       7.139   5.63    5.89    0       0       0       2.3133e-16      5.5813e-16      7.0776e-16     
     53       H       5.89    7.142   5       0       0       0       -1.19566e-16    2.93752e-16     -7.34381e-18   
     64       H       5.89    7.142   6.78    0       0       0       -1.11626e-15    9.69383e-16     4.70004e-16     
     75       H       7.139   5       5       0       0       0       5.14067e-16     1.29251e-15     -3.0844e-16     
     86       H       7.139   5       6.78    0       0       0       7.01334e-16     5.28754e-16     1.20438e-15     
     97       C       8.388   6.513   5.89    0       0       0       -1.17501e-15    6.46255e-16     4.84691e-16     
     108       C       9.638   5.63    5.89    0       0       0       7.96803e-16     4.99379e-16     4.70004e-16     
     119       H       8.388   7.142   5       0       0       0       -1.37329e-15    -3.52503e-16    1.58626e-15     
     1210      H       8.388   7.142   6.78    0       0       0       4.05745e-16     5.5813e-16      1.08688e-15     
     1311      H       9.638   5       5       0       0       0       7.27037e-16     -0      2.35002e-16     
     1412      H       9.638   5       6.78    0       0       0       -4.70004e-16    -2.35002e-16    5.80161e-16     
     1513      C       10.887  6.513   5.89    0       0       0       1.29251e-15     -2.23252e-15    1.17501e-16     
     1614      C       12.136  5.63    5.89    0       0       0       -7.34381e-16    1.17501e-16     2.20314e-17     
     1715      H       10.887  7.142   5       0       0       0       1.21907e-15     1.17501e-16     2.35002e-16     
     1816      H       10.887  7.142   6.78    0       0       0       5.43442e-16     -5.5813e-16     1.17501e-16     
     1917      H       12.136  5       5       0       0       0       -4.84691e-16    2.35002e-16     7.05006e-16     
     2018      H       12.136  5       6.78    0       0       0       6.60943e-17     9.98758e-16     -2.93752e-16   
     2119      H       5       5.884   5.89    0       0       0       -2.05627e-16    1.70376e-15     5.5813e-16     
     2220      H       13.026  6.259   5.89    0       0       0       -2.93752e-16    -4.77348e-16    5.14067e-17     
  • tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/alkane-3.data

    r216840 r866dec  
    11# ATOMDATA      Id      type    x=3     u=3     F=3
    22# Box   20      0       0       0       20      0       0       0       20
    3 1       C       5.89    6.513   5.89    0       0       0       -0.00161434     -0.00490854     -1.10584e-13   
    4 2       C       7.139   5.63    5.89    0       0       0       -0.00299896     0.00787442      -1.51277e-13   
    5 3       H       5.89    7.142   5       0       0       0       -0.00213528     -0.000289904    0.00251064     
    6 4       H       5.89    7.142   6.78    0       0       0       -0.00213528     -0.000289904    -0.00251064     
    7 5       H       7.139   5       5       0       0       0       0.000254991     -0.000726836    0.00279816     
    8 6       H       7.139   5       6.78    0       0       0       0.000254991     -0.000726836    -0.00279816     
    9 7       C       8.388   6.513   5.89    0       0       0       -0.000234367    -0.0118817      -1.64909e-13   
    10 8       C       9.638   5.63    5.89    0       0       0       0.000234232     0.0115391       -1.55457e-13   
    11 9       H       8.388   7.142   5       0       0       0       -5.97387e-05    0.000821868     0.00242643     
    12 10      H       8.388   7.142   6.78    0       0       0       -5.97387e-05    0.000821868     -0.00242643     
    13 11      H       9.638   5       5       0       0       0       5.95858e-05     -0.000650729    0.00254668     
    14 12      H       9.638   5       6.78    0       0       0       5.95858e-05     -0.000650729    -0.00254668     
    15 13      C       10.887  6.513   5.89    0       0       0       0.00299486      -0.00822198     -1.35631e-13   
    16 14      C       12.136  5.63    5.89    0       0       0       0.0016146       0.00459057      -1.39484e-13   
    17 15      H       10.887  7.142   5       0       0       0       -0.00025431     0.000898036     0.00267787     
    18 16      H       10.887  7.142   6.78    0       0       0       -0.00025431     0.000898036     -0.00267787     
    19 17      H       12.136  5       5       0       0       0       0.00213567      0.000462277     0.00263267     
    20 18      H       12.136  5       6.78    0       0       0       0.00213567      0.000462277     -0.00263267     
    21 19      H       5       5.884   5.89    0       0       0       -0.000456201    0.00402573      -1.63115e-15   
    22 20      H       13.026  6.259   5.89    0       0       0       0.00045834      -0.00404705     -4.39943e-16   
     31       C       5.89    6.513   5.89    0       0       0       6.46255e-16     1.76251e-16     -1.76251e-16   
     42       C       7.139   5.63    5.89    0       0       0       -2.93752e-16    -1.46876e-16    -1.76251e-16   
     53       H       5.89    7.142   5       0       0       0       8.81257e-16     -5.87505e-17    1.17501e-16     
     64       H       5.89    7.142   6.78    0       0       0       -6.31568e-16    3.37815e-16     2.05627e-16     
     75       H       7.139   5       5       0       0       0       1.17501e-16     1.76251e-16     -4.11253e-16   
     86       H       7.139   5       6.78    0       0       0       -3.23128e-16    -0      3.23128e-16     
     97       C       8.388   6.513   5.89    0       0       0       -2.24721e-15    -1.17501e-16    -5.28754e-16   
     108       C       9.638   5.63    5.89    0       0       0       1.90939e-16     1.46876e-17     8.81257e-17     
     119       H       8.388   7.142   5       0       0       0       -1.99752e-15    -5.87505e-16    -1.76251e-16   
     1210      H       8.388   7.142   6.78    0       0       0       -1.32189e-16    7.78444e-16     1.11626e-15     
     1311      H       9.638   5       5       0       0       0       2.35002e-16     -2.35002e-16    -1.76251e-16   
     1412      H       9.638   5       6.78    0       0       0       -4.40629e-17    -2.93752e-17    -8.81257e-17   
     1513      C       10.887  6.513   5.89    0       0       0       1.17501e-15     -2.93752e-17    -0     
     1614      C       12.136  5.63    5.89    0       0       0       1.76251e-16     -3.52503e-16    5.87505e-17     
     1715      H       10.887  7.142   5       0       0       0       1.27782e-15     3.52503e-16     -2.93752e-16   
     1816      H       10.887  7.142   6.78    0       0       0       8.6657e-16      2.93752e-16     2.35002e-16     
     1917      H       12.136  5       5       0       0       0       2.93752e-17     -1.17501e-16    -0     
     2018      H       12.136  5       6.78    0       0       0       -0      -1.46876e-16    -0     
     2119      H       5       5.884   5.89    0       0       0       1.11626e-15     2.05627e-16     -8.81257e-17   
     2220      H       13.026  6.259   5.89    0       0       0       8.81257e-17     -1.46876e-16    1.90939e-16     
Note: See TracChangeset for help on using the changeset viewer.