Changeset adb5cda for src/Dynamics


Ignore:
Timestamp:
Dec 28, 2011, 3:25:49 PM (13 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
401f90
Parents:
afa9d8
git-author:
Frederik Heber <heber@…> (12/23/11 15:17:07)
git-committer:
Frederik Heber <heber@…> (12/28/11 15:25:49)
Message:

Removed typedef molecule::atomSet and some commented-out, deprecated sections.

Location:
src/Dynamics
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/LinearInterpolationBetweenSteps.hpp

    rafa9d8 radb5cda  
    5555    if (!MapByIdentity) {
    5656      LOG(1, "STATUS: Constructing atom mapping from start to end position.");
    57       molecule::atomSet atoms_list;
    58       for (typename AtomSetMixin<Set>::const_iterator iter = atoms.begin();
    59           iter != atoms.end(); ++iter)
    60         atoms_list.insert(*iter);
    61       MinimiseConstrainedPotential Minimiser(atoms_list, PermutationMap);
     57      MinimiseConstrainedPotential Minimiser(atoms, PermutationMap);
    6258      Minimiser(startstep, endstep, IsAngstroem);
    6359    } else {
  • src/Dynamics/MinimiseConstrainedPotential.cpp

    rafa9d8 radb5cda  
    4040
    4141MinimiseConstrainedPotential::MinimiseConstrainedPotential(
    42     molecule::atomSet &_atoms,
     42    World::AtomComposite &_atoms,
    4343    std::map<atom*, atom *> &_PermutationMap) :
    4444  atoms(_atoms),
     
    5959  PermutationMap.clear();
    6060  DoubleList.clear();
    61   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     61  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    6262    DistanceList[*iter].clear();
    6363  }
     
    9090    LOG(2, "Starting round " << ++round << ", at current potential " << OldPotential << " ... ");
    9191    OlderPotential = OldPotential;
    92     molecule::atomSet::const_iterator iter;
     92    World::AtomComposite::const_iterator iter;
    9393    do {
    9494      iter = atoms.begin();
     
    105105        //LOG(2, "Current Walker: " << *(*iter) << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[(*iter)]->second << ".");
    106106        // find source of the new target
    107         molecule::atomSet::const_iterator runner = atoms.begin();
     107        World::AtomComposite::const_iterator runner = atoms.begin();
    108108        for (; runner != atoms.end(); ++runner) { // find the source whose toes we might be stepping on (Walker's new target should be in use by another already)
    109109          if (PermutationMap[(*runner)] == DistanceIterators[(*iter)]->second) {
     
    165165void MinimiseConstrainedPotential::FillDistanceList()
    166166{
    167   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    168     for (molecule::atomSet::const_iterator runner = atoms.begin(); runner != atoms.end(); ++runner) {
     167  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     168    for (World::AtomComposite::const_iterator runner = atoms.begin(); runner != atoms.end(); ++runner) {
    169169      DistanceList[(*iter)].insert( DistancePair((*iter)->getPositionAtStep(startstep).distance((*runner)->getPositionAtStep(endstep)), (*runner)) );
    170170    }
     
    174174void MinimiseConstrainedPotential::CreateInitialLists()
    175175{
    176   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     176  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    177177    StepList[(*iter)] = DistanceList[(*iter)].begin();    // stores the step to the next iterator that could be a possible next target
    178178    PermutationMap[(*iter)] = DistanceList[(*iter)].begin()->second;   // always pick target with the smallest distance
     
    185185void MinimiseConstrainedPotential::MakeInjectivePermutation()
    186186{
    187   molecule::atomSet::const_iterator iter = atoms.begin();
     187  World::AtomComposite::const_iterator iter = atoms.begin();
    188188  DistanceMap::iterator NewBase;
    189189  double Potential = fabs(ConstrainedPotential());
     
    204204    Potential = TryNextNearestNeighbourForInjectivePermutation((*iter), Potential);
    205205  }
    206   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     206  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    207207    // now each single entry in the DoubleList should be <=1
    208208    if (DoubleList[*iter] > 1) {
     
    216216unsigned int MinimiseConstrainedPotential::CalculateDoubleList()
    217217{
    218   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter)
     218  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter)
    219219    DoubleList[*iter] = 0;
    220220  unsigned int doubles = 0;
    221   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter)
     221  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter)
    222222      DoubleList[ PermutationMap[*iter] ]++;
    223   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter)
     223  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter)
    224224    if (DoubleList[*iter] > 1)
    225225      doubles++;
     
    235235  zeile1 << "PermutationMap: ";
    236236  zeile2 << "                ";
    237   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     237  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    238238    zeile1 << (*iter)->getName() << " ";
    239239    zeile2 << (PermutationMap[*iter])->getName() << " ";
    240240  }
    241   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     241  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    242242    std::map<atom *, unsigned int>::const_iterator value_iter = DoubleList.find(*iter);
    243243    if (value_iter->second > (unsigned int)1)
     
    255255  // go through every atom
    256256  atom *Runner = NULL;
    257   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     257  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    258258    // first term: distance to target
    259259    Runner = PermutationMap[(*iter)];   // find target point
     
    299299{
    300300  double result = 0.;
    301   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     301  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    302302    if ((PermutationMap[Walker] == PermutationMap[(*iter)]) && (Walker < (*iter))) {
    303303//    atom *Sprinter = PermutationMap[Walker->nr];
     
    324324  double Norm1, Norm2, tmp, result = 0.;
    325325
    326   for (molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     326  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    327327    if ((*iter) == Walker) // hence, we only go up to the Walker, not beyond (similar to i=0; i<j; i++)
    328328      break;
     
    407407  /// evaluate forces (only the distance to target dependent part) with the final PermutationMap
    408408  LOG(1, "Calculating forces and adding onto ForceMatrix ... ");
    409   for(molecule::atomSet::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     409  for(World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
    410410    atom *Sprinter = PermutationMap[(*iter)];
    411411    // set forces
  • src/Dynamics/MinimiseConstrainedPotential.hpp

    rafa9d8 radb5cda  
    1919#include <map>
    2020
    21 #include "molecule.hpp"
     21#include "World.hpp"
    2222
    2323/** Structure to contain parameters needed for evaluation of constraint potential.
     
    3333   * @return
    3434   */
    35   MinimiseConstrainedPotential(molecule::atomSet &_atoms, std::map<atom*, atom *> &_PermutationMap);
     35  MinimiseConstrainedPotential(World::AtomComposite &_atoms, std::map<atom*, atom *> &_PermutationMap);
    3636
    3737  /** Destructor.
     
    7979  typedef std::pair < DistanceMap::iterator, bool> DistanceTestPair;
    8080
    81   molecule::atomSet atoms;
     81  World::AtomComposite atoms;
    8282  int startstep; //!< start configuration (MDStep in atom::trajectory)
    8383  int endstep; //!< end configuration (MDStep in atom::trajectory)
  • src/Dynamics/VerletForceIntegration.hpp

    rafa9d8 radb5cda  
    9898      // calculate forces and potential
    9999      std::map<atom *, atom*> PermutationMap;
    100       molecule::atomSet atoms_list;
    101       for (typename AtomSetMixin<T>::const_iterator iter = atoms.begin();
    102           iter != atoms.end(); ++iter)
    103         atoms_list.insert(*iter);
    104       MinimiseConstrainedPotential Minimiser(atoms_list, PermutationMap);
     100      MinimiseConstrainedPotential Minimiser(atoms, PermutationMap);
    105101      //double ConstrainedPotentialEnergy =
    106102      Minimiser(DoConstrainedMD, 0, IsAngstroem);
Note: See TracChangeset for help on using the changeset viewer.