- Timestamp:
- Nov 21, 2012, 10:03:24 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:
- f3bc5f
- Parents:
- c74fdb
- git-author:
- Frederik Heber <heber@…> (08/08/12 13:36:24)
- git-committer:
- Frederik Heber <heber@…> (11/21/12 10:03:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
rc74fdb r184943 52 52 #include "Fragmentation/ForceMatrix.hpp" 53 53 #include "Fragmentation/Fragmentation.hpp" 54 #include "Fragmentation/SetValues/Fragment.hpp" 54 55 #include "Fragmentation/SetValues/Histogram.hpp" 55 56 #include "Fragmentation/SetValues/IndexedVectors.hpp" … … 378 379 379 380 template <> 381 void convertMPQCDataTo<MPQCDataFragmentMap_t>( 382 const std::vector<MPQCData> &fragmentData, 383 std::vector<MPQCDataFragmentMap_t> &MPQCData_Fragment_fused) 384 { 385 // fragment 386 MPQCData_Fragment_fused.clear(); 387 MPQCData_Fragment_fused.reserve(fragmentData.size()); 388 for(std::vector<MPQCData>::const_iterator dataiter = fragmentData.begin(); 389 dataiter != fragmentData.end(); ++dataiter) { 390 const MPQCData &extractedData = *dataiter; 391 LOG(2, "DEBUG: Current extracted Data is " << extractedData << "."); 392 MPQCDataFragmentMap_t instance; 393 boost::fusion::at_key<MPQCDataFused::fragment>(instance) = 394 Fragment(extractedData.positions, extractedData.charges); 395 MPQCData_Fragment_fused.push_back(instance); 396 } 397 } 398 399 template <> 380 400 void convertMPQCDataTo<MPQCDataTimeMap_t>( 381 401 const std::vector<MPQCData> &fragmentData, … … 429 449 * @param KeySetFilename filename with keysets to associate forces correctly 430 450 * @param NoAtoms total number of atoms 431 * @param full_sample summed up charge from fragments on return 451 * @param full_sample summed up charge density of electrons from fragments on return 452 * @param full_fragment summed up positions and charges of nuclei from fragments on return 432 453 */ 433 454 bool sumUpChargeDensity( … … 435 456 const std::vector<MPQCData> &fragmentData, 436 457 const std::string &KeySetFilename, 437 SamplingGrid &full_sample) 458 SamplingGrid &full_sample, 459 Fragment &full_fragment) 438 460 { 439 461 // create lookup from job nr to fragment number … … 468 490 SumUpPerLevel<MPQCDataGridMap_t, MPQCDataGridVector_t>( 469 491 fragmentData, jobids, MatrixNrLookup, container, subsetmap)); 492 std::vector<MPQCDataFragmentMap_t> Result_Fragment_fused( 493 SumUpPerLevel<MPQCDataFragmentMap_t, MPQCDataFragmentVector_t>( 494 fragmentData, jobids, MatrixNrLookup, container, subsetmap)); 470 495 // obtain full grid 471 496 full_sample = boost::fusion::at_key<MPQCDataFused::sampled_grid>(Result_Grid_fused.back()); 497 full_fragment = boost::fusion::at_key<MPQCDataFused::fragment>(Result_Fragment_fused.back()); 472 498 473 499 return true; … … 673 699 const FragmentationFragmentationAutomationAction::FragmentationFragmentationAutomationParameters ¶ms, 674 700 const std::vector<MPQCData> &fragmentData, 675 const SamplingGrid &full_sampled_grid) 701 const SamplingGrid &full_sampled_grid, 702 const Fragment &full_fragment) 676 703 { 677 704 std::vector<FragmentJob::ptr> jobs; … … 696 723 // ASSERT( M.determinant() == size*size*size, 697 724 // "createLongRangeJobs() - current domain matrix "+toString(M)+" is not cubic."); 698 const std::vector< std::vector<double> > positions ;699 const std::vector<double> charges ;725 const std::vector< std::vector<double> > positions(full_fragment.getPositions()); 726 const std::vector<double> charges(full_fragment.getCharges()); 700 727 const JobId_t next_id = controller.getAvailableId(); 701 728 LOG(1, "INFO: Creating full VMGJob with " << full_sampled_grid.sampled_grid.size() … … 766 793 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << "."); 767 794 SamplingGrid full_sample; 795 Fragment full_fragment; 768 796 sumUpChargeDensity( 769 797 MPQCresults, 770 798 fragmentData, 771 799 params.path.get(), 772 full_sample); 800 full_sample, 801 full_fragment); 773 802 774 803 // Phase Four: obtain more ids … … 777 806 778 807 // Phase Five: create VMGJobs 779 if (!createLongRangeJobs(controller, params, fragmentData, full_sample ))808 if (!createLongRangeJobs(controller, params, fragmentData, full_sample, full_fragment)) 780 809 return Action::failure; 781 810 RunService(io_service, "Adding VMGJobs");
Note:
See TracChangeset
for help on using the changeset viewer.