- Timestamp:
- Nov 27, 2012, 8:35:34 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:
- ffe057
- Parents:
- 3dd32f
- git-author:
- Frederik Heber <heber@…> (08/27/12 16:00:03)
- git-committer:
- Frederik Heber <heber@…> (11/27/12 08:35:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r3dd32f r343401 211 211 for (std::vector<JobId_t>::const_iterator iter = jobids.begin(); 212 212 iter != jobids.end(); ++iter) { 213 LOG(3, "DEBUG: Inserting (" << *iter << "," << FragmentCounter << ")."); 213 214 #ifndef NDEBUG 214 215 std::pair< std::map< JobId_t, size_t >::iterator, bool> inserter = … … 503 504 } 504 505 506 template <typename T> 507 std::vector<JobId_t> extractJobIds(const std::map<JobId_t, T> &iddata) 508 { 509 // create a vector of all job ids 510 std::vector<JobId_t> jobids; 511 std::transform(iddata.begin(),iddata.end(), 512 std::back_inserter(jobids), 513 boost::bind(&std::map<JobId_t,T>::value_type::first, boost::lambda::_1 ) 514 ); 515 return jobids; 516 } 517 505 518 /** Print MPQCData from received results. 506 519 * … … 520 533 SamplingGrid &full_sample) 521 534 { 522 // create a vector of all job ids523 std::vector<JobId_t> jobids;524 std::transform(fragmentData.begin(),fragmentData.end(),525 std::back_inserter(jobids),526 boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )527 );528 529 535 // create lookup from job nr to fragment number 530 size_t FragmentCounter = 0; 531 const std::map< JobId_t, size_t > MatrixNrLookup = 532 createMatrixNrLookup(jobids, FragmentCounter); 536 size_t MPQCFragmentCounter = 0; 537 const std::vector<JobId_t> mpqcjobids = extractJobIds<MPQCData>(fragmentData); 538 const std::map< JobId_t, size_t > MPQCMatrixNrLookup = 539 createMatrixNrLookup(mpqcjobids, MPQCFragmentCounter); 540 541 size_t VMGFragmentCounter = 0; 542 const std::vector<JobId_t> vmgjobids = extractJobIds<VMGData>(longrangeData); 543 const std::map< JobId_t, size_t > VMGMatrixNrLookup = 544 createMatrixNrLookup(vmgjobids, VMGFragmentCounter); 533 545 534 546 // initialise keysets … … 539 551 std::stringstream filename; 540 552 filename << FRAGMENTPREFIX << KEYSETFILE; 541 if (!KeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;553 if (!KeySet.ParseKeySets(KeySetFilename, filename.str(), MPQCFragmentCounter)) return false; 542 554 } 543 555 … … 546 558 std::stringstream filename; 547 559 filename << FRAGMENTPREFIX << FORCESFILE; 548 if (!ForceKeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;560 if (!ForceKeySet.ParseKeySets(KeySetFilename, filename.str(), MPQCFragmentCounter)) return false; 549 561 } 550 562 … … 561 573 std::vector<MPQCDataEnergyMap_t> Result_Energy_fused( 562 574 OrthogonalSumUpPerLevel<MPQCDataEnergyMap_t, MPQCDataEnergyVector_t>( 563 fragmentData, M atrixNrLookup, container, subsetmap));575 fragmentData, MPQCMatrixNrLookup, container, subsetmap)); 564 576 std::vector<MPQCDataGridMap_t> Result_Grid_fused( 565 577 OrthogonalSumUpPerLevel<MPQCDataGridMap_t, MPQCDataGridVector_t>( 566 fragmentData, M atrixNrLookup, container, subsetmap));578 fragmentData, MPQCMatrixNrLookup, container, subsetmap)); 567 579 std::vector<MPQCDataTimeMap_t> Result_Time_fused( 568 580 SumUpPerLevel<MPQCDataTimeMap_t, MPQCDataTimeVector_t>( 569 fragmentData, M atrixNrLookup, container, subsetmap));581 fragmentData, MPQCMatrixNrLookup, container, subsetmap)); 570 582 std::vector<MPQCDataFragmentMap_t> Result_Fragment_fused( 571 583 OrthogonalSumUpPerLevel<MPQCDataFragmentMap_t, MPQCDataFragmentVector_t>( 572 fragmentData, M atrixNrLookup, container, subsetmap));584 fragmentData, MPQCMatrixNrLookup, container, subsetmap)); 573 585 574 586 // force has extra converter … … 580 592 MPQCData_Force_fused, 581 593 container->getContainer(), 582 M atrixNrLookup,594 MPQCMatrixNrLookup, 583 595 Result_Force_fused); 584 596 boost::mpl::for_each<MPQCDataForceVector_t>(boost::ref(forceSummer)); … … 591 603 VMGData_Potential_fused, 592 604 container->getContainer(), 593 MatrixNrLookup);605 VMGMatrixNrLookup); 594 606 potentialSummer(subsetmap->getMaximumSubsetLevel()); 595 607 OrthogonalFullSummator<VMGDataMap_t, VMGDataFused::energy_potential> epotentialSummer( … … 597 609 VMGData_Potential_fused, 598 610 container->getContainer(), 599 MatrixNrLookup);611 VMGMatrixNrLookup); 600 612 epotentialSummer(subsetmap->getMaximumSubsetLevel()); 601 613 SamplingGrid full_sample = fullsolutionData.sampled_potential; … … 609 621 VMGData_Potential_fused, 610 622 container->getContainer(), 611 MatrixNrLookup);623 VMGMatrixNrLookup); 612 624 elongSummer(subsetmap->getMaximumSubsetLevel()); 613 625 double e_long = fullsolutionData.e_long;
Note:
See TracChangeset
for help on using the changeset viewer.