Changeset e0ae58d
- Timestamp:
- Oct 14, 2013, 11:42:04 PM (11 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:
- 955051
- Parents:
- 7d507c
- git-author:
- Frederik Heber <heber@…> (09/26/13 16:17:59)
- git-committer:
- Frederik Heber <heber@…> (10/14/13 23:42:04)
- Location:
- src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
r7d507c re0ae58d 354 354 } 355 355 356 FragmentationShortRangeResults shortrangeresults(shortrangedata, keysets, forcekeysets); 356 std::vector<bool> ValueMask(shortrangedata.size(), true); 357 FragmentationShortRangeResults shortrangeresults(shortrangedata, keysets, forcekeysets, ValueMask); 357 358 shortrangeresults(shortrangedata); 358 359 printReceivedShortResults(shortrangeresults); -
src/Fragmentation/Summation/Containers/FragmentationChargeDensity.cpp
r7d507c re0ae58d 69 69 // create lookup from job nr to fragment number 70 70 size_t FragmentCounter = 0; 71 std::vector<bool> ValueMask(fragmentData.size(), true); 71 72 const std::map< JobId_t, size_t > MatrixNrLookup = 72 createMatrixNrLookup(jobids, FragmentCounter );73 createMatrixNrLookup(jobids, FragmentCounter, ValueMask); 73 74 74 75 /// prepare for OrthogonalSummation -
src/Fragmentation/Summation/Containers/FragmentationLongRangeResults.cpp
r7d507c re0ae58d 81 81 { 82 82 // create lookup from job nr to fragment number 83 size_t MPQCFragmentCounter = 0; 84 const std::vector<JobId_t> mpqcjobids = extractJobIds<MPQCData>(fragmentData); 85 MPQCMatrixNrLookup = 86 createMatrixNrLookup(mpqcjobids, MPQCFragmentCounter); 87 88 size_t VMGFragmentCounter = 0; 89 const std::vector<JobId_t> vmgjobids = extractJobIds<VMGData>(longrangeData); 90 VMGMatrixNrLookup = 91 createMatrixNrLookup(vmgjobids, VMGFragmentCounter); 83 { 84 size_t MPQCFragmentCounter = 0; 85 std::vector<bool> ValueMask(fragmentData.size(), true); 86 const std::vector<JobId_t> mpqcjobids = extractJobIds<MPQCData>(fragmentData); 87 MPQCMatrixNrLookup = 88 createMatrixNrLookup(mpqcjobids, MPQCFragmentCounter, ValueMask); 89 } 90 91 { 92 size_t VMGFragmentCounter = 0; 93 std::vector<bool> ValueMask(longrangeData.size(), true); 94 const std::vector<JobId_t> vmgjobids = extractJobIds<VMGData>(longrangeData); 95 VMGMatrixNrLookup = 96 createMatrixNrLookup(vmgjobids, VMGFragmentCounter, ValueMask); 97 } 92 98 } 93 99 -
src/Fragmentation/Summation/Containers/FragmentationShortRangeResults.cpp
r7d507c re0ae58d 62 62 const std::map<JobId_t,MPQCData> &fragmentData, 63 63 const KeySetsContainer& _KeySet, 64 const KeySetsContainer& _ForceKeySet) : 64 const KeySetsContainer& _ForceKeySet, 65 std::vector<bool> &_ValueMask) : 65 66 KeySet(_KeySet), 66 67 ForceKeySet(_ForceKeySet) 67 68 { 68 initLookups(fragmentData );69 initLookups(fragmentData,_ValueMask); 69 70 70 71 // convert KeySetContainer to IndexSetContainer … … 75 76 76 77 void FragmentationShortRangeResults::initLookups( 77 const std::map<JobId_t,MPQCData> &fragmentData) 78 const std::map<JobId_t,MPQCData> &fragmentData, 79 std::vector<bool> &_ValueMask) 78 80 { 79 81 // create lookup from job nr to fragment number … … 81 83 const std::vector<JobId_t> mpqcjobids = extractJobIds<MPQCData>(fragmentData); 82 84 MPQCMatrixNrLookup = 83 createMatrixNrLookup(mpqcjobids, MPQCFragmentCounter );85 createMatrixNrLookup(mpqcjobids, MPQCFragmentCounter, _ValueMask); 84 86 } 85 87 -
src/Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp
r7d507c re0ae58d 47 47 * @param _KeySet KeySets of all (non-hydrogen) atoms 48 48 * @param _ForceKeySet KeySets of all atoms except those added by saturation 49 * @param _ValueMask masks whether to use a value (true) or not (false), 50 * default is true for all values 49 51 */ 50 52 FragmentationShortRangeResults( 51 53 const std::map<JobId_t,MPQCData> &fragmentData, 52 54 const KeySetsContainer& _KeySet, 53 const KeySetsContainer& _ForceKeySet); 55 const KeySetsContainer& _ForceKeySet, 56 std::vector<bool> &_ValueMask); 54 57 55 58 /** Performs the summation and fills all result vectors. … … 78 81 private: 79 82 void initLookups( 80 const std::map<JobId_t,MPQCData> &fragmentData); 83 const std::map<JobId_t,MPQCData> &fragmentData, 84 std::vector<bool> &_ValueMask); 81 85 82 86 private: -
src/Fragmentation/Summation/Containers/createMatrixNrLookup.cpp
r7d507c re0ae58d 45 45 std::map< JobId_t, size_t > createMatrixNrLookup( 46 46 const std::vector<JobId_t> &jobids, 47 size_t &FragmentCounter) 47 size_t &FragmentCounter, 48 std::vector<bool> &ValueMask) 48 49 { 49 50 // align fragments 50 51 std::map< JobId_t, size_t > MatrixNrLookup; 51 52 FragmentCounter = 0; 53 ASSERT( ValueMask.size() == jobids.size(), 54 "createMatrixNrLookup() - jobids and ValueMask differ in size"); 55 std::vector<bool>::const_iterator maskiter = ValueMask.begin(); 52 56 for (std::vector<JobId_t>::const_iterator iter = jobids.begin(); 53 iter != jobids.end(); ++iter ) {57 iter != jobids.end(); ++iter, ++maskiter) { 54 58 LOG(3, "DEBUG: Inserting (" << *iter << "," << FragmentCounter << ")."); 55 59 #ifndef NDEBUG 56 60 std::pair< std::map< JobId_t, size_t >::iterator, bool> inserter = 57 61 #endif 58 MatrixNrLookup.insert( std::make_pair(*iter, FragmentCounter++) ); 62 // we either set to FragmentCounter or to -1 which is always outside 63 // of range and hence skipped by (Orthogonal)Summator. 64 MatrixNrLookup.insert( 65 std::make_pair( 66 *iter, 67 (*maskiter ? FragmentCounter : (size_t)-1) 68 ) 69 ); 59 70 ASSERT( inserter.second, 60 71 "createMatrixNrLookup() - two results have same id " 61 72 +toString(*iter)+"."); 73 ++FragmentCounter; // in any case needs to be increased to skip the result 62 74 } 63 75 LOG(1, "INFO: There are " << FragmentCounter << " fragments."); -
src/Fragmentation/Summation/Containers/createMatrixNrLookup.hpp
r7d507c re0ae58d 32 32 std::map< JobId_t, size_t > createMatrixNrLookup( 33 33 const std::vector<JobId_t> &jobids, 34 size_t &FragmentCounter); 34 size_t &FragmentCounter, 35 std::vector<bool> &ValueMask); 35 36 36 37 #endif /* CREATEMATRIXNRLOOKUP_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.