Changeset ea63cb for src/Actions


Ignore:
Timestamp:
Nov 4, 2016, 9:37:51 AM (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_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, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
Children:
d03800
Parents:
9445081
git-author:
Frederik Heber <heber@…> (10/04/16 08:25:40)
git-committer:
Frederik Heber <heber@…> (11/04/16 09:37:51)
Message:

Edges per Fragment passed on to FragmentationShortRangeResults.

Location:
src/Actions/FragmentationAction
Files:
2 edited

Legend:

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

    r9445081 rea63cb  
    6464#include "Atom/atom.hpp"
    6565#include "Element/element.hpp"
     66#include "Fragmentation/EdgesPerFragment.hpp"
    6667#include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
    6768#include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
     
    309310  const KeySetsContainer &Indices = shortrangeresults.getKeySet();
    310311  const KeySetsContainer &ForceIndices = shortrangeresults.getForceKeySet();
     312  const FragmentationEdges::edges_per_fragment_t &edges_per_fragment =
     313      shortrangeresults.getEdgesPerFragment();
    311314  if (Indices.KeySets.size() != ForceIndices.KeySets.size()) {
    312315    ELOG(1, "appendToHomologies() - Indices (" << Indices.KeySets.size()
    313316        << ") and ForceIndices (" << ForceIndices.KeySets.size() << ") sizes differ.");
     317    return false;
     318  }
     319  if (Indices.KeySets.size() != edges_per_fragment.size()) {
     320    ELOG(1, "appendToHomologies() - Indices (" << Indices.KeySets.size()
     321        << ") and edges_per_fragment (" << edges_per_fragment.size() << ") sizes differ.");
    314322    return false;
    315323  }
     
    500508    const KeySetsContainer &forcekeysets,
    501509    const KeySetsContainer &cycles,
     510    const FragmentationShortRangeResults::edges_per_fragment_t &edges_per_fragment,
    502511    const FragmentationShortRangeResults &shortrangeresults)
    503512{
     
    559568        << localValueMask << ".");
    560569    // create FragmentationShortRangeResults
    561     FragmentationShortRangeResults localresults(shortrangedata, keysets, forcekeysets, localValueMask);
     570    FragmentationShortRangeResults localresults(
     571        shortrangedata, keysets, forcekeysets, edges_per_fragment, localValueMask);
    562572    // and perform summation
    563573    localresults(shortrangedata);
     
    605615  const KeySetsContainer &keysets = container.getKeySets();
    606616  const KeySetsContainer &forcekeysets = container.getForceKeySets();
     617  const FragmentationResultContainer::edges_per_fragment_t edges_per_fragment =
     618      container.getEdgesPerFragment();
    607619  const bool DoLongrange = container.areFullRangeResultsPresent();
    608620  const bool IsAngstroem = true;
     
    616628  /// respective bond order.
    617629  std::vector<bool> ValueMask(shortrangedata.size(), true);
    618   FragmentationShortRangeResults shortrangeresults(shortrangedata, keysets, forcekeysets, ValueMask);
     630  FragmentationShortRangeResults shortrangeresults(
     631      shortrangedata, keysets, forcekeysets, edges_per_fragment, ValueMask);
    619632  shortrangeresults(shortrangedata);
    620633  printReceivedShortResults(shortrangeresults);
     
    662675        forcekeysets,
    663676        cycles,
     677        edges_per_fragment,
    664678        shortrangeresults);
    665679  }
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r9445081 rea63cb  
    229229  const KeySetsContainer& keysets = FragmentJobQueue::getInstance().getKeySets();
    230230  const KeySetsContainer& forcekeysets = FragmentJobQueue::getInstance().getFullKeySets();
     231  const FragmentJobQueue::edges_per_fragment_t &edges_per_fragment =
     232      FragmentJobQueue::getInstance().getEdgesPerFragment();
    231233
    232234  size_t Exitflag = 0;
     
    496498  }
    497499  container.clear();
    498   container.addFullResults(keysets, forcekeysets, shortrangedata, longrangedata);
     500  container.addFullResults(keysets, forcekeysets, edges_per_fragment, shortrangedata, longrangedata);
    499501  } else {
    500502    container.clear();
    501     container.addShortRangeResults(keysets, forcekeysets, shortrangedata);
     503    container.addShortRangeResults(keysets, forcekeysets, edges_per_fragment, shortrangedata);
    502504  }
    503505#else
    504506  container.clear();
    505   container.addShortRangeResults(keysets, forcekeysets, shortrangedata);
     507  container.addShortRangeResults(keysets, forcekeysets, edges_per_fragment, shortrangedata);
    506508#endif
    507509
Note: See TracChangeset for help on using the changeset viewer.