Changeset bae7bc for src/Fragmentation
- Timestamp:
- Apr 15, 2013, 10:28:25 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:
- 503acc1
- Parents:
- 4f44ae
- git-author:
- Frederik Heber <heber@…> (03/04/13 14:14:10)
- git-committer:
- Frederik Heber <heber@…> (04/15/13 10:28:25)
- Location:
- src/Fragmentation/Automation
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Fragmentation/Automation/FragmentJobQueue.cpp ¶
r4f44ae rbae7bc 45 45 46 46 #include "Box.hpp" 47 #include "Fragmentation/Automation/parseKeySetFile.hpp" 47 48 #include "Helpers/defs.hpp" 48 49 #include "Jobs/MPQCJob.hpp" … … 89 90 } 90 91 92 bool FragmentJobQueue::addKeySetsFromFiles( 93 const boost::filesystem::path &path, 94 const size_t FragmentCounter, 95 const enum KeySetFileType keysettype 96 ) 97 { 98 const size_t NoJobs = KeySets.KeySets.size(); 99 parseKeySetFile(KeySets, path.string(), FragmentCounter, NonHydrogenKeySets); 100 ASSERT( (KeySets.KeySets.size()-NoJobs) == FragmentCounter, 101 "FragmentJobQueue::addKeySetsFromFiles() - mismatching number of new fragments " 102 +toString(KeySets.KeySets.size()-NoJobs)+" and number of Keyset " 103 +toString(FragmentCounter)+"."); 104 return (KeySets.KeySets.size() > NoJobs); 105 } 106 107 bool FragmentJobQueue::addFullKeySetsFromFiles( 108 const boost::filesystem::path &path, 109 const size_t FragmentCounter, 110 const enum KeySetFileType keysettype 111 ) 112 { 113 const size_t NoJobs = FullKeySets.KeySets.size(); 114 parseKeySetFile(FullKeySets, path.string(), FragmentCounter, NonHydrogenKeySets); 115 ASSERT( (FullKeySets.KeySets.size()-NoJobs) == FragmentCounter, 116 "FragmentJobQueue::addKeySetsFromFiles() - mismatching number of fragments " 117 +toString(FullKeySets.KeySets.size()-NoJobs)+" and number of FullKeyset " 118 +toString(FragmentCounter)+"."); 119 return (FullKeySets.KeySets.size() > NoJobs); 120 } 121 91 122 void FragmentJobQueue::clear() 92 123 { -
TabularUnified src/Fragmentation/Automation/FragmentJobQueue.hpp ¶
r4f44ae rbae7bc 21 21 22 22 #include "Fragmentation/KeySetsContainer.hpp" 23 #include "Fragmentation/Automation/parseKeySetFile.hpp" 23 24 #include "Jobs/MPQCJob.hpp" 24 25 … … 77 78 const unsigned int level); 78 79 80 /** Adds keysets after fragments have been added by file. 81 * 82 */ 83 bool addKeySetsFromFiles( 84 const boost::filesystem::path &path, 85 const size_t FragmentCounter, 86 const enum KeySetFileType keysettype 87 ); 88 89 /** Adds keysets after fragments have been added by file. 90 * 91 */ 92 bool addFullKeySetsFromFiles( 93 const boost::filesystem::path &path, 94 const size_t FragmentCounter, 95 const enum KeySetFileType keysettype 96 ); 97 79 98 /** Getter for the container of all KeySets to the jobs. 80 99 * -
TabularUnified src/Fragmentation/Automation/FragmentationChargeDensity.cpp ¶
r4f44ae rbae7bc 57 57 FragmentationChargeDensity::FragmentationChargeDensity( 58 58 const std::map<JobId_t,MPQCData> &fragmentData, 59 const std::string &KeySetFilename)59 const KeySetsContainer &KeySet) 60 60 { 61 61 // create a vector of all job ids … … 70 70 const std::map< JobId_t, size_t > MatrixNrLookup = 71 71 createMatrixNrLookup(jobids, FragmentCounter); 72 73 // initialise keysets74 KeySetsContainer KeySet;75 parseKeySetFile(KeySet, KeySetFilename, FragmentCounter, NonHydrogenKeySets);76 72 77 73 /// prepare for OrthogonalSummation … … 91 87 } 92 88 89 93 90 std::vector<SamplingGrid> FragmentationChargeDensity::getFullSampledGrid() 94 91 { -
TabularUnified src/Fragmentation/Automation/FragmentationChargeDensity.hpp ¶
r4f44ae rbae7bc 16 16 17 17 #include <map> 18 #include <string>19 18 #include <vector> 20 19 … … 27 26 #include "Jobs/Grid/SamplingGrid.hpp" 28 27 28 class KeySetsContainer; 29 29 30 /** This structure is a container for the summed up charge density per level. 30 31 * … … 35 36 * 36 37 * @param fragmentData MPQCData resulting from the jobs, each associated to a job 37 * @param KeySet Filename filename with keysets to associate forces correctly38 * @param KeySet KeySets of all (non-hydrogen) atoms 38 39 */ 39 40 FragmentationChargeDensity( 40 41 const std::map<JobId_t,MPQCData> &fragmentData, 41 const std::string &KeySetFilename);42 const KeySetsContainer& KeySet); 42 43 43 44 std::vector<SamplingGrid> getFullSampledGrid(); … … 54 55 //!> results per IndexSet of summed up fragment positions and charges 55 56 std::map<IndexSet::ptr, std::pair<MPQCDataFragmentMap_t, MPQCDataFragmentMap_t> > Result_perIndexSet_Fragment; 57 58 private: 59 /** Helper function to call OrthogonalSummation. 60 * 61 * \param fragmentData map of calculated jobs 62 * \param KeySet container of all keysets 63 * \param MatrixNrLookup map with enumerated job ids 64 */ 65 void sumUp( 66 const std::map<JobId_t,MPQCData> &fragmentData, 67 const KeySetsContainer &KeySet, 68 const std::map< JobId_t, size_t > &MatrixNrLookup); 69 56 70 }; 57 71 -
TabularUnified src/Fragmentation/Automation/FragmentationResults.cpp ¶
r4f44ae rbae7bc 58 58 #include "Helpers/defs.hpp" 59 59 60 61 60 FragmentationResults::FragmentationResults( 62 61 const std::map<JobId_t,MPQCData> &fragmentData, 63 62 std::map<JobId_t,VMGData> &longrangeData, 64 const std::string &KeySetFilename) 63 const KeySetsContainer& _KeySet, 64 const KeySetsContainer& _ForceKeySet) : 65 KeySet(_KeySet), 66 ForceKeySet(_ForceKeySet) 65 67 { 66 68 // create lookup from job nr to fragment number … … 74 76 VMGMatrixNrLookup = 75 77 createMatrixNrLookup(vmgjobids, VMGFragmentCounter); 76 77 // initialise keysets78 parseKeySetFile(KeySet, KeySetFilename, MPQCFragmentCounter, NonHydrogenKeySets);79 parseKeySetFile(ForceKeySet, KeySetFilename, MPQCFragmentCounter, HydrogenKeySets);80 81 /// prepare for OrthogonalSummation82 78 83 79 // convert KeySetContainer to IndexSetContainer -
TabularUnified src/Fragmentation/Automation/FragmentationResults.hpp ¶
r4f44ae rbae7bc 16 16 17 17 #include <map> 18 #include <string>19 18 #include <vector> 20 19 … … 42 41 struct FragmentationResults 43 42 { 44 /** Constructor for class FragmentationResults. 45 * 46 * Performs the summation and fills all result vectors. 43 /** Constructor for class FragmentationResults, based on KeySets. 47 44 * 48 45 * @param fragmentData results from short-range fragment calculations 49 46 * @param longrangeData results from long-range fragment calculations 50 * @param fullsolutionData results from long-range full calculations 51 * @param KeySetFilename path to fragment files 52 * @param NoAtoms number of atoms of full system 53 * @param full_sample summed up grid charge 47 * @param _KeySet KeySets of all (non-hydrogen) atoms 48 * @param _ForceKeySet KeySets of all atoms except those added by saturation 54 49 */ 55 50 FragmentationResults( 56 51 const std::map<JobId_t,MPQCData> &fragmentData, 57 52 std::map<JobId_t,VMGData> &longrangeData, 58 const std::string &KeySetFilename); 53 const KeySetsContainer& _KeySet, 54 const KeySetsContainer& _ForceKeySet); 59 55 56 /** Performs the summation and fills all result vectors. 57 * 58 * @param fragmentData results from short-range fragment calculations 59 * @param longrangeData results from long-range fragment calculations 60 * @param fullsolutionData long-range solution 61 * @param full_sample sampled density 62 */ 60 63 void operator()( 61 64 const std::map<JobId_t,MPQCData> &fragmentData,
Note:
See TracChangeset
for help on using the changeset viewer.