Changeset a1c8fa for src/Fragmentation


Ignore:
Timestamp:
Oct 20, 2016, 8:54:23 PM (8 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, 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_ChronosMutex, Fix_ForceAnnealing, Fix_ParseParticles, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
Children:
72e40d0
Parents:
064b34
git-author:
Frederik Heber <heber@…> (09/27/16 09:58:43)
git-committer:
Frederik Heber <heber@…> (10/20/16 20:54:23)
Message:

FIX: BondedParticleInfo::MaxOrder and ::AdapativeOrder are now stored per trajectory step.

  • adapted uses in AdaptivityMap and Fragmentation as members are now protected.
Location:
src/Fragmentation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/AdaptivityMap.cpp

    r064b34 ra1c8fa  
    154154    Walker = mol->FindAtom((*runner).first);
    155155    if (Walker != NULL) {
    156       //if ((*runner).second.second >= Walker->AdaptiveOrder) { // only insert if this is an "active" root site for the current order
    157       if (Walker->MaxOrder > Walker->AdaptiveOrder) {
     156      //if ((*runner).second.second >= Walker->getAdaptiveOrder()) { // only insert if this is an "active" root site for the current order
     157      if (Walker->getMaxOrder() > Walker->getAdaptiveOrder()) {
    158158        LOG(2, "(" << (*runner).first << ",[" << (*runner).second.first << "," << (*runner).second.second << "])");
    159159        FinalRootCandidates->insert( make_pair( (*runner).second.first, pair<int,int>((*runner).first, (*runner).second.second) ) );
  • src/Fragmentation/Fragmentation.cpp

    r064b34 ra1c8fa  
    286286    atom *Walker = mol->FindAtom(RootKeyNr);
    287287    // check cyclic lengths
    288     //if ((MinimumRingSize[Walker->GetTrueFather()->getNr()] != -1) && (Walker->GetTrueFather()->AdaptiveOrder+1 > MinimumRingSize[Walker->GetTrueFather()->getNr()])) {
    289     //  LOG(0, "Bond order " << Walker->GetTrueFather()->AdaptiveOrder << " of Root " << *Walker << " greater than or equal to Minimum Ring size of " << MinimumRingSize << " found is not allowed.");
     288    //if ((MinimumRingSize[Walker->GetTrueFather()->getNr()] != -1) && (Walker->GetTrueFather()->getAdaptiveOrder()+1 > MinimumRingSize[Walker->GetTrueFather()->getNr()])) {
     289    //  LOG(0, "Bond order " << Walker->GetTrueFather()->getAdaptiveOrder() << " of Root " << *Walker << " greater than or equal to Minimum Ring size of " << MinimumRingSize << " found is not allowed.");
    290290    //} else
    291291    {
    292292      // set adaptive order to desired max order
    293       Walker->GetTrueFather()->AdaptiveOrder = Walker->GetTrueFather()->MaxOrder;
    294       Order = Walker->AdaptiveOrder = Walker->GetTrueFather()->AdaptiveOrder;
     293      Walker->GetTrueFather()->setAdaptiveOrder(Walker->GetTrueFather()->getMaxOrder());
     294      Order = Walker->GetTrueFather()->getAdaptiveOrder();
     295      Walker->setAdaptiveOrder(Order);
    295296
    296297      // allocate memory for all lower level orders
     
    302303      // initialise Order-dependent entries of UniqueFragments structure
    303304      UniqueFragments FragmentSearch(1., FragmentLowerOrdersList[RootNr], Walker);
    304       PowerSetGenerator PSG(&FragmentSearch, Walker->AdaptiveOrder);
     305      PowerSetGenerator PSG(&FragmentSearch, Walker->getAdaptiveOrder());
    305306
    306307      // create top order where nothing is reduced
     
    316317//        NumMolecules = 0;
    317318//      }
    318       // now, we have completely filled each cell of FragmentLowerOrdersList[] for the current Walker->AdaptiveOrder
    319       //NumMoleculesOfOrder[Walker->AdaptiveOrder-1] = NumMolecules;
     319      // now, we have completely filled each cell of FragmentLowerOrdersList[] for the current Walker->getAdaptiveOrder()
     320      //NumMoleculesOfOrder[Walker->getAdaptiveOrder()-1] = NumMolecules;
    320321      TotalNumMolecules += NumMoleculesOfOrder[RootNr];
    321 //      LOG(1, "Number of resulting molecules for Order " << (int)Walker->GetTrueFather()->AdaptiveOrder << " is: " << NumMoleculesOfOrder[RootNr] << ".");
     322//      LOG(1, "Number of resulting molecules for Order " << (int)Walker->GetTrueFather()->getAdaptiveOrder() << " is: " << NumMoleculesOfOrder[RootNr] << ".");
    322323      RootStack.push_back(RootKeyNr); // put back on stack
    323324      RootNr++;
     
    407408      atom * const Walker = *iter;
    408409      if (AtomMask.isTrue(Walker->getNr())) { // skip masked out
    409         Walker->MaxOrder = (Order != 0 ? Order : Walker->MaxOrder+1);
     410        Walker->setMaxOrder((Order != 0 ? Order : Walker->getMaxOrder()+1));
    410411        // remove all that have reached desired order
    411         if (Walker->AdaptiveOrder >= Walker->MaxOrder) // && (Walker->AdaptiveOrder < MinimumRingSize[Walker->getNr()]))
     412        if (Walker->getAdaptiveOrder() >= Walker->getMaxOrder()) // && (Walker->getAdaptiveOrder() < MinimumRingSize[Walker->getNr()]))
    412413          AtomMask.setFalse(Walker->getNr());
    413414        else
     
    451452        ++iter) {
    452453      file << (*iter)->getId()
    453           << "\t" << (int)(*iter)->AdaptiveOrder
    454           << "\t" << (int)(*iter)->MaxOrder << std::endl;
     454          << "\t" << (int)(*iter)->getAdaptiveOrder()
     455          << "\t" << (int)(*iter)->getMaxOrder() << std::endl;
    455456    }
    456457    file.close();
     
    513514    // set atom values
    514515    for(molecule::iterator iter=mol->begin();iter!=mol->end();++iter){
    515       (*iter)->AdaptiveOrder = OrderArray[(*iter)->getNr()];
    516       (*iter)->MaxOrder = OrderArray[(*iter)->getNr()]; //MaxArray.isTrue((*iter)->getNr());
     516      (*iter)->setAdaptiveOrder(OrderArray[(*iter)->getNr()]);
     517      (*iter)->setMaxOrder(OrderArray[(*iter)->getNr()]); //MaxArray.isTrue((*iter)->getNr());
    517518    }
    518519    //SetAtomValueToIndexedArray( OrderArray, &atom::getNr(), &atom::AdaptiveOrder );
  • src/Fragmentation/fragmentation_helpers.cpp

    r064b34 ra1c8fa  
    4545
    4646#include "Atom/atom.hpp"
    47 #include "Fragmentation/AdaptivityMap.hpp"
    4847#include "Fragmentation/AtomMask.hpp"
    4948#include "Fragmentation/Graph.hpp"
     
    103102    RootStack.pop_front();
    104103    Walker = mol->FindAtom(RootKeyNr);
    105     NumLevels = Walker->AdaptiveOrder;
     104    NumLevels = Walker->getAdaptiveOrder();
    106105    ASSERT( NumLevels == FragmentLowerOrdersList[RootNr].size(),
    107106        "CombineAllOrderListIntoOne() - differing size and NumLevels.");
     
    134133    RootStack.pop_front();
    135134    Walker = mol->FindAtom(RootKeyNr);
    136     NumLevels = Walker->AdaptiveOrder;
     135    NumLevels = Walker->getAdaptiveOrder();
    137136    for(int i=0;i<NumLevels;i++) {
    138137      if (FragmentLowerOrdersList[RootNr][i] != NULL) {
Note: See TracChangeset for help on using the changeset viewer.