- Timestamp:
- Apr 15, 2013, 10:28:22 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:
- 4f44ae
- Parents:
- dd0c8f
- git-author:
- Frederik Heber <heber@…> (03/04/13 13:54:11)
- git-committer:
- Frederik Heber <heber@…> (04/15/13 10:28:22)
- Location:
- src
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAction.cpp
rdd0c8f rac9ca4 39 39 #include "CodePatterns/Log.hpp" 40 40 #include "Fragmentation/Exporters/ExportGraph_ToFiles.hpp" 41 #ifdef HAVE_JOBMARKET 42 #include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp" 43 #endif 41 44 #include "Fragmentation/Fragmentation.hpp" 42 45 #include "Fragmentation/Graph.hpp" … … 167 170 } 168 171 169 // store molecule's fragment to file170 172 { 171 173 const enum HydrogenSaturation saturation = params.DoSaturation.get() ? DoSaturate : DontSaturate; 172 174 const enum HydrogenTreatment treatment = params.HowtoTreatHydrogen.get() ? ExcludeHydrogen : IncludeHydrogen; 173 ExportGraph_ToFiles exporter(TotalGraph, treatment, saturation); 174 exporter.setPrefix(params.prefix.get()); 175 exporter.setOutputTypes(params.types.get()); 176 exporter(); 175 if (params.types.get().size() != 0) { 176 // store molecule's fragment to file 177 ExportGraph_ToFiles exporter(TotalGraph, treatment, saturation); 178 exporter.setPrefix(params.prefix.get()); 179 exporter.setOutputTypes(params.types.get()); 180 exporter(); 181 } else { 182 #ifdef HAVE_JOBMARKET 183 // store molecule's fragment in FragmentJobQueue 184 ExportGraph_ToJobs exporter(TotalGraph, treatment, saturation); 185 exporter.setLevel(params.level.get()); 186 exporter(); 187 #else 188 ELOG(1, "No output file types specified and JobMarket support is not compiled in."); 189 return Action::failure; 190 #endif 191 } 177 192 } 178 193 -
src/Actions/FragmentationAction/FragmentationAction.def
rdd0c8f rac9ca4 13 13 #include "Parameters/Validators/DummyValidator.hpp" 14 14 #include "Parameters/Validators/GenericValidators.hpp" 15 #include "Parameters/Validators/RangeValidator.hpp" 15 16 #include "Parameters/Validators/STLVectorValidator.hpp" 16 17 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp" … … 20 21 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 21 22 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 22 #define paramtypes (std::string)(double)(unsigned int)(bool)(bool)(std::vector<std::string>) 23 #define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("ExcludeHydrogen")("output-types") 24 #define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("whether to exclude hydrogen in the bond graph dissection or not")("type(s) of parsers that output fragment config files") 25 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(true))( PARAM_DEFAULT(std::vector<std::string>(1, std::string("pcp"))))26 #define paramreferences (prefix)(distance)(order)(DoSaturation)(HowtoTreatHydrogen)(types) 23 #define paramtypes (std::string)(double)(unsigned int)(bool)(bool)(std::vector<std::string>)(unsigned int) 24 #define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("ExcludeHydrogen")("output-types")("grid-level") 25 #define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("whether to exclude hydrogen in the bond graph dissection or not")("type(s) of parsers that output fragment config files")("resolution of density sampling multigrid") 26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(true))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5)) 27 #define paramreferences (prefix)(distance)(order)(DoSaturation)(HowtoTreatHydrogen)(types)(level) 27 28 #define paramvalids \ 28 29 (DummyValidator< std::string >()) \ … … 31 32 (DummyValidator< bool >()) \ 32 33 (DummyValidator< bool >()) \ 33 (STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator())) 34 (STLVectorValidator< std::vector<std::string> >(0, 10, ParserTypeValidator())) \ 35 (RangeValidator< unsigned int >(1, 10)) 34 36 35 37 #undef statetypes -
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
rdd0c8f rac9ca4 57 57 #include "Fragmentation/Automation/extractJobIds.hpp" 58 58 #include "Fragmentation/Automation/FragmentationChargeDensity.hpp" 59 #include "Fragmentation/Automation/FragmentJobQueue.hpp" 59 60 #include "Fragmentation/Automation/FragmentationResults.hpp" 60 61 #include "Fragmentation/Automation/MPQCFragmentController.hpp" … … 478 479 // TODO: Have io_service run in second thread and merge with current again eventually 479 480 481 // check some things prior to work 482 enum OutputType_t { 483 ToFiles, 484 ToJobs, 485 ToNone 486 }; 487 enum OutputType_t outputtype = ToNone; 488 if (params.jobfiles.get().size() != 0) { 489 // we got no job files, hence we use FragmentJobQueue 490 if (params.path.get().size() == 0) { 491 ELOG(1, "Missing path to fragment files."); 492 return Action::failure; 493 } 494 outputtype = ToFiles; 495 496 // parse in fragment-jobs if given 497 if(!FragmentJobQueue::getInstance().addJobsFromFiles( 498 params.jobfiles.get(), 499 params.level.get())) 500 return Action::failure; 501 } else { 502 if (params.path.get().size() != 0) { 503 ELOG(2, "Path to fragment given although we use FragmentJobQueue."); 504 } 505 outputtype = ToJobs; 506 } 507 480 508 size_t Exitflag = 0; 481 509 std::map<JobId_t, MPQCData> fragmentData; 482 510 { 511 const size_t NumberJobs = FragmentJobQueue::getInstance().size(); 483 512 MPQCFragmentController mpqccontroller(io_service); 484 513 mpqccontroller.setHost(params.host.get()); 485 514 mpqccontroller.setPort(params.port.get()); 486 mpqccontroller.setLevel(params.level.get());487 515 // Phase One: obtain ids 488 std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get(); 489 mpqccontroller.requestIds(jobfiles.size()); 490 491 // Phase Two: create and add MPQCJobs 492 if (!mpqccontroller.addJobsFromFiles(params.executable.get().string(), jobfiles)) 493 return Action::failure; 516 mpqccontroller.requestIds(NumberJobs); 517 518 // Phase Two: add MPQCJobs and send 519 mpqccontroller.addJobsFromQueue(); 520 mpqccontroller.run(); 494 521 495 522 // Phase Three: calculate result 496 mpqccontroller.waitforResults( jobfiles.size());523 mpqccontroller.waitforResults(NumberJobs); 497 524 mpqccontroller.getResults(fragmentData); 498 525 … … 572 599 573 600 // append all keysets to homology file 574 if ( Exitflag == 0) {601 if ((Exitflag == 0) && (!params.homology_file.get().empty())) { 575 602 const boost::filesystem::path &homology_file = params.homology_file.get(); 576 603 if (homology_file.string() != "") { -
src/Actions/FragmentationAction/FragmentationAutomationAction.def
rdd0c8f rac9ca4 24 24 #define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("homology-file") 25 25 #define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("path to file containing homology containerto append to") 26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))( PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("")) 27 27 #define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(homology_file) 28 28 #define paramvalids \ -
src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def
rdd0c8f rac9ca4 20 20 #define paramtokens ("store-saturated-fragment")("DoSaturate")("output-types") 21 21 #define paramdescriptions ("name of fragment file")("do saturate dangling bonds with hydrogen")("type(s) of parsers that output fragment config files") 22 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))( PARAM_DEFAULT(std::vector<std::string>(1, std::string("pcp"))))22 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(NOPARAM_DEFAULT) 23 23 #define paramreferences (prefix)(DoSaturation)(types) 24 24 #define paramvalids \ -
src/Fragmentation/Automation/MPQCFragmentController.cpp
rdd0c8f rac9ca4 45 45 #include "Box.hpp" 46 46 #include "Helpers/defs.hpp" 47 #include "Fragmentation/Automation/FragmentJobQueue.hpp" 47 48 #include "Jobs/MPQCJob.hpp" 48 49 #include "LinearAlgebra/RealSpaceMatrix.hpp" 49 50 #include "World.hpp" 50 51 51 bool MPQCFragmentController::addJobsFromFiles( 52 const std::string &executable, 53 const std::vector< boost::filesystem::path > &jobfiles) 52 bool MPQCFragmentController::addJobsFromQueue() 54 53 { 55 std::vector<FragmentJob::ptr> jobs; 56 for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles.begin(); 57 iter != jobfiles .end(); ++iter) { 58 const std::string &filename = (*iter).string(); 59 if (boost::filesystem::exists(filename)) { 60 const JobId_t next_id = getAvailableId(); 61 LOG(1, "INFO: Creating MPQCCommandJob with filename'" 62 +filename+"', and id "+toString(next_id)+"."); 63 parsejob(jobs, executable, filename, next_id); 64 } else { 65 ELOG(1, "Fragment job "+filename+" does not exist."); 66 return false; 67 } 54 // give them all valid ids 55 std::vector<FragmentJob::ptr> newjobs = FragmentJobQueue::getInstance().getJobs(); 56 for (std::vector<FragmentJob::ptr>::iterator jobiter = newjobs.begin(); 57 jobiter != newjobs.end(); 58 ++jobiter) { 59 changeJobId((*jobiter), getAvailableId()); 68 60 } 69 addJobs(jobs); 61 // add the jobs 62 addJobs(newjobs); 63 64 return (newjobs.size() != 0); 65 } 66 67 void MPQCFragmentController::run() 68 { 69 // take jobs from queue and add them 70 70 sendJobs(host, port); 71 71 RunService("Adding MPQCJobs"); 72 73 return true;74 72 } 75 76 /** Creates a MPQCCommandJob with argument \a filename.77 *78 * @param jobs created job is added to this vector79 * @param command mpqc command to execute80 * @param filename filename being argument to job81 * @param nextid id for this job82 */83 void MPQCFragmentController::parsejob(84 std::vector<FragmentJob::ptr> &jobs,85 const std::string &command,86 const std::string &filename,87 const JobId_t nextid)88 {89 std::ifstream file;90 file.open(filename.c_str());91 ASSERT( file.good(), "parsejob() - file "+filename+" does not exist.");92 std::string output((std::istreambuf_iterator<char>(file)),93 std::istreambuf_iterator<char>());94 double begin[NDIM] = { 0., 0., 0. };95 RealSpaceMatrix M = World::getInstance().getDomain().getM();96 M *= 1./AtomicLengthToAngstroem; // scale to atomic length units97 const double size = M.at(0,0);98 double end[NDIM] = { size, size, size };99 ASSERT( M.determinant() == size*size*size,100 "parsejob() - current domain matrix "+toString(M)+" is not cubic.");101 FragmentJob::ptr testJob( new MPQCJob(nextid, output, begin, end, level) );102 jobs.push_back(testJob);103 file.close();104 LOG(1, "INFO: Added MPQCCommandJob from file "+filename+".");105 } -
src/Fragmentation/Automation/MPQCFragmentController.hpp
rdd0c8f rac9ca4 34 34 public: 35 35 MPQCFragmentController(boost::asio::io_service &io_service) : 36 SpecificFragmentController(io_service), 37 level(5) 36 SpecificFragmentController(io_service) 38 37 {} 39 38 virtual ~MPQCFragmentController() 40 39 {} 41 40 42 bool addJobsFromFiles( 43 const std::string &executable, 44 const std::vector< boost::filesystem::path > &jobfiles); 41 /** Command Controller to fill its hold of jobs from FragmentJobQueue. 42 * 43 * \return true - jobs obtained, false - queue empty 44 */ 45 bool addJobsFromQueue(); 46 47 /** Get results map of calculated jobs. 48 * 49 * \param fragmentData contains map of results on output 50 */ 45 51 void getResults(std::map<JobId_t, MPQCData> &fragmentData) { 46 52 SpecificFragmentController::getResults<MPQCData>(fragmentData); 47 53 } 48 54 49 void setLevel(const size_t _level) { level = _level; } 50 51 private: 52 void parsejob( 53 std::vector<FragmentJob::ptr> &jobs, 54 const std::string &command, 55 const std::string &filename, 56 const JobId_t nextid); 57 58 private: 59 //!> resolution of sampled electron density as \f$2^{\mathrm{level}}\f$ 60 size_t level; 55 /** Runs the service. 56 * 57 * Here, we finalize each job's id and push them to the server. 58 */ 59 void run(); 61 60 }; 62 61 -
src/Fragmentation/Automation/Makefile.am
rdd0c8f rac9ca4 6 6 Fragmentation/Automation/FragmentationChargeDensity.cpp \ 7 7 Fragmentation/Automation/FragmentationResults.cpp \ 8 Fragmentation/Automation/FragmentJobQueue.cpp \ 8 9 Fragmentation/Automation/MPQCFragmentController.cpp \ 9 10 Fragmentation/Automation/parseKeySetFile.cpp \ … … 21 22 Fragmentation/Automation/FragmentationChargeDensity.hpp \ 22 23 Fragmentation/Automation/FragmentationResults.hpp \ 24 Fragmentation/Automation/FragmentJobQueue.hpp \ 23 25 Fragmentation/Automation/MPQCFragmentController.hpp \ 24 26 Fragmentation/Automation/parseKeySetFile.hpp \ -
src/Fragmentation/Exporters/ExportGraph.cpp
rdd0c8f rac9ca4 81 81 BondFragments.ListOfMolecules.erase(iter); 82 82 } 83 }84 85 void ExportGraph::operator()()86 {87 if (BondFragments.ListOfMolecules.size() == 0)88 prepareMolecule();89 83 } 90 84 -
src/Fragmentation/Exporters/ExportGraph.hpp
rdd0c8f rac9ca4 46 46 typedef boost::shared_ptr<SaturatedFragment> SaturatedFragment_ptr; 47 47 48 virtual void operator()() ;48 virtual void operator()()=0; 49 49 50 50 /** Returns a saturated fragment for immediate use only. -
src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp
rdd0c8f rac9ca4 103 103 void ExportGraph_ToFiles::operator()() 104 104 { 105 LOG(1, "INFO: Writing " << TotalGraph.size() << " possible bond fragmentation configs ");105 LOG(1, "INFO: Writing " << TotalGraph.size() << " possible bond fragmentation configs."); 106 106 size_t FragmentCounter = 0; 107 107 char *FragmentNumber = NULL; -
src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp
rdd0c8f rac9ca4 33 33 #endif 34 34 35 // boost asio required before MemDebug due to placement new 36 #include <boost/asio.hpp> 37 35 38 #include "CodePatterns/MemDebug.hpp" 36 39 37 40 #include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp" 38 41 42 #include <algorithm> 43 44 #include "Box.hpp" 45 #include "Fragmentation/KeySet.hpp" 46 #include "Fragmentation/Automation/FragmentJobQueue.hpp" 47 #include "Fragmentation/Automation/MPQCFragmentController.hpp" 48 #include "Helpers/defs.hpp" 49 #include "Jobs/MPQCJob.hpp" 50 #include "LinearAlgebra/RealSpaceMatrix.hpp" 51 #include "Parser/FormatParserStorage.hpp" 39 52 #include "World.hpp" 40 53 … … 43 56 const enum HydrogenTreatment _treatment, 44 57 const enum HydrogenSaturation _saturation) : 45 ExportGraph(_graph, _treatment, _saturation) 58 ExportGraph(_graph, _treatment, _saturation), 59 level(5) 46 60 {} 47 61 … … 51 65 void ExportGraph_ToJobs::operator()() 52 66 { 53 ExportGraph::operator()(); 67 std::vector<FragmentJob::ptr> jobs; 68 KeySetsContainer KeySets; 69 KeySetsContainer FullKeySets; 70 jobs.reserve(TotalGraph.size()); 71 LOG(1, "INFO: Creating " << TotalGraph.size() << " possible bond fragmentation jobs."); 72 73 // gather info about the domain 74 double begin[NDIM] = { 0., 0., 0. }; 75 RealSpaceMatrix M = World::getInstance().getDomain().getM(); 76 M *= 1./AtomicLengthToAngstroem; // scale to atomic length units 77 const double size = M.at(0,0); 78 double end[NDIM] = { size, size, size }; 79 const ParserTypes jobtype = 80 FormatParserStorage::getInstance().getTypeFromName("mpqc"); 81 82 // go through all fragments, output to stream and create job therefrom 83 ExportGraph::SaturatedFragment_ptr CurrentFragment = getNextFragment(); 84 for (; (CurrentFragment != NULL) && (CurrentFragment->getKeySet() != ExportGraph::EmptySet); 85 CurrentFragment = getNextFragment()) { 86 const KeySet &set = CurrentFragment->getKeySet(); 87 LOG(2, "INFO: Creating bond fragment job for set " << set << "."); 88 // store config in stream 89 { 90 std::stringstream output; 91 // save to stream 92 CurrentFragment->OutputConfig(output, jobtype); 93 // create job and insert 94 FragmentJob::ptr testJob( new MPQCJob(JobId::IllegalJob, output.str(), begin, end, level) ); 95 jobs.push_back(testJob); 96 97 // order is the same as the number of non-hydrogen atoms 98 const KeySet &keyset = CurrentFragment->getKeySet(); 99 const size_t order = keyset.size(); 100 const KeySet &fullmolecule = CurrentFragment->getFullMolecule(); 101 const KeySet &saturationhydrogens = CurrentFragment->getSaturationHydrogens(); 102 KeySetsContainer::IntVector indices(keyset.begin(), keyset.end()); 103 KeySetsContainer::IntVector forceindices(fullmolecule.begin(), fullmolecule.end()); 104 { 105 // replace all saturated hydrogen indices by "-1" 106 for (KeySetsContainer::IntVector::iterator iter = forceindices.begin(); 107 iter != forceindices.end(); 108 ++iter) 109 if (saturationhydrogens.find(*iter) != saturationhydrogens.end()) 110 *iter = -1; 111 } 112 KeySets.insert(indices, order); 113 FullKeySets.insert(forceindices, order); 114 } 115 // store force index reference file 116 // explicitly release fragment 117 CurrentFragment.reset(); 118 } 119 if (CurrentFragment == NULL) { 120 ELOG(1, "Some error while obtaining the next fragment occured."); 121 return; 122 } 123 124 // push final jobs 125 FragmentJobQueue::getInstance().addJobs(jobs, KeySets, FullKeySets); 54 126 } -
src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp
rdd0c8f rac9ca4 28 28 { 29 29 public: 30 /** Constructor for ExportGraph_ToJobs. 31 * 32 * Sets default level. 33 * 34 * \param _graph Graph with all KeySet's 35 * \param _treatment whether hydrogen is excluded in the _graph or not 36 * \param _saturation whether we saturate dangling bonds or not 37 */ 30 38 ExportGraph_ToJobs( 31 39 const Graph &_graph, … … 36 44 void operator()(); 37 45 46 /** Sets the level for the sampling of the density. 47 * 48 * \param _level level to set 49 */ 50 void setLevel(const size_t _level) { level = _level; } 51 52 private: 53 //!> resolution of sampled electron density as \f$2^{\mathrm{level}}\f$ 54 size_t level; 38 55 }; 39 56 -
src/Fragmentation/KeySetsContainer.cpp
rdd0c8f rac9ca4 233 233 return true; 234 234 } 235 236 void KeySetsContainer::clear() 237 { 238 KeySets.clear(); 239 OrderSet.clear(); 240 AtomCounter.clear(); 241 FragmentCounter = 0; 242 Order = 0; 243 FragmentsPerOrder.clear(); 244 } 245 246 void KeySetsContainer::insert(const KeySetsContainer &other) 247 { 248 KeySets.reserve(KeySets.size()+other.KeySets.size()); 249 AtomCounter.reserve(AtomCounter.size()+other.AtomCounter.size()); 250 for (ArrayOfIntVectors::const_iterator iter = other.KeySets.begin(); 251 iter != other.KeySets.end(); ++iter) 252 insert(*iter, iter->size()); 253 } 254 255 void KeySetsContainer::insert(const IntVector &indices, const size_t order) 256 { 257 KeySets.push_back(indices); 258 AtomCounter.push_back(indices.size()); 259 if (order > OrderSet.size() ) 260 OrderSet.resize(order); 261 OrderSet[order-1].push_back(FragmentCounter); 262 if (order > FragmentsPerOrder.size()) 263 FragmentsPerOrder.resize(order); 264 ++(FragmentsPerOrder[order-1]); 265 ++FragmentCounter; 266 } -
src/Fragmentation/KeySetsContainer.hpp
rdd0c8f rac9ca4 45 45 } 46 46 47 void clear(); 48 49 void insert(const KeySetsContainer &other); 50 51 void insert(const IntVector &set, const size_t order); 52 47 53 private: 48 54 friend class boost::serialization::access; -
src/Fragmentation/Makefile.am
rdd0c8f rac9ca4 72 72 libMolecuilderFragmentation_getFromKeyset_la_includedir = $(includedir)/MoleCuilder/Fragmentation/ 73 73 libMolecuilderFragmentation_getFromKeysetStub_la_includedir = $(includedir)/MoleCuilder/Fragmentation/ 74 libMolecuilderFragmentation_la_CPPFLAGS = $(AM_CPPFLAGS) 75 libMolecuilderFragmentation_la_LDFLAGS = $(AM_LDFLAGS) 76 libMolecuilderFragmentation_la_LIBADD = 77 if CONDJOBMARKET 78 libMolecuilderFragmentation_la_CPPFLAGS += ${JobMarket_CFLAGS} 79 libMolecuilderFragmentation_la_LDFLAGS += $(JobMarket_LDFLAGS) 80 libMolecuilderFragmentation_la_LIBADD += $(JobMarket_LIBS) 81 endif 74 82 75 83 nobase_libMolecuilderFragmentation_la_include_HEADERS = ${FRAGMENTATIONHEADER}
Note:
See TracChangeset
for help on using the changeset viewer.