- Timestamp:
- Nov 21, 2012, 10:14:33 AM (12 years ago)
- 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:
- 358ddb
- Parents:
- f3bc5f
- git-author:
- Frederik Heber <heber@…> (08/08/12 16:54:37)
- git-committer:
- Frederik Heber <heber@…> (11/21/12 10:14:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
rf3bc5f ra0f8d3 163 163 * @param fragmentData on return array filled with extracted MPQCData 164 164 */ 165 void ConvertFragmentResultToMPQCData( 165 template <typename T> 166 void ConvertFragmentResultTo( 166 167 const std::vector<FragmentResult::ptr> &results, 167 std::vector< MPQCData> &fragmentData)168 std::vector<T> &fragmentData) 168 169 { 169 170 // extract results … … 175 176 iter != results.end(); ++iter) { 176 177 //LOG(1, "RESULT: job #"+toString((*iter)->getId())+": "+toString((*iter)->result)); 177 MPQCDataextractedData;178 T extractedData; 178 179 std::stringstream inputstream((*iter)->result); 179 180 LOG(2, "DEBUG: First 50 characters FragmentResult's string: "+(*iter)->result.substr(0, 50)); … … 185 186 186 187 ASSERT( results.size() == fragmentData.size(), 187 "ConvertFragmentResultTo MPQCData() - the number of extracted data differs from the number of results.");188 "ConvertFragmentResultTo() - the number of extracted data differs from the number of results."); 188 189 } 189 190 … … 301 302 } 302 303 303 template <typename T>304 void convert MPQCDataTo(305 const std::vector< MPQCData> &fragmentData,306 std::vector< T> &MPQCData_fused)304 template <typename source, typename dest> 305 void convertDataTo( 306 const std::vector<source> &fragmentData, 307 std::vector<dest> &MPQCData_fused) 307 308 { 308 309 MPQCData_fused.clear(); … … 310 311 311 312 template <> 312 void convert MPQCDataTo<MPQCDataEnergyMap_t>(313 void convertDataTo<MPQCData, MPQCDataEnergyMap_t>( 313 314 const std::vector<MPQCData> &fragmentData, 314 315 std::vector<MPQCDataEnergyMap_t> &MPQCData_Energy_fused) … … 361 362 362 363 template <> 363 void convert MPQCDataTo<MPQCDataGridMap_t>(364 void convertDataTo<MPQCData, MPQCDataGridMap_t>( 364 365 const std::vector<MPQCData> &fragmentData, 365 366 std::vector<MPQCDataGridMap_t> &MPQCData_Grid_fused) … … 379 380 380 381 template <> 381 void convert MPQCDataTo<MPQCDataFragmentMap_t>(382 void convertDataTo<MPQCData, MPQCDataFragmentMap_t>( 382 383 const std::vector<MPQCData> &fragmentData, 383 384 std::vector<MPQCDataFragmentMap_t> &MPQCData_Fragment_fused) … … 398 399 399 400 template <> 400 void convert MPQCDataTo<MPQCDataTimeMap_t>(401 void convertDataTo<MPQCData, MPQCDataTimeMap_t>( 401 402 const std::vector<MPQCData> &fragmentData, 402 403 std::vector<MPQCDataTimeMap_t> &MPQCData_Time_fused) … … 428 429 // place data into boost::fusion::map instance 429 430 std::vector<TypeMap> MPQCData_fused; 430 convert MPQCDataTo<TypeMap>(fragmentData, MPQCData_fused);431 convertDataTo<MPQCData, TypeMap>(fragmentData, MPQCData_fused); 431 432 // instantiate summator 432 433 std::vector<TypeMap> Result_fused(subsetmap->getMaximumSubsetLevel()); … … 786 787 std::vector<FragmentResult::ptr> MPQCresults = controller.getReceivedResults(); 787 788 std::vector<MPQCData> fragmentData; 788 ConvertFragmentResultTo MPQCData(MPQCresults, fragmentData);789 ConvertFragmentResultTo<MPQCData>(MPQCresults, fragmentData); 789 790 790 791 #ifdef HAVE_VMG
Note:
See TracChangeset
for help on using the changeset viewer.