Changeset 917be8
- Timestamp:
- Jul 2, 2012, 7:54:13 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:
- 23d10f
- Parents:
- c4f43e
- git-author:
- Frederik Heber <heber@…> (04/23/12 11:43:07)
- git-committer:
- Frederik Heber <heber@…> (07/02/12 07:54:13)
- Location:
- src/Fragmentation/Automation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Automation/Jobs/MPQCCommandJob.cpp
rc4f43e r917be8 53 53 * @param _inputfile string of inputfile contents 54 54 * @param _JobId id of this job 55 * @param command mpqc command, "mpqc" as default 55 56 */ 56 MPQCCommandJob::MPQCCommandJob(const std::string _inputfile, const JobId_t _JobId) : 57 SystemCommandJob("mpqc", _inputfile, _JobId) 57 MPQCCommandJob::MPQCCommandJob( 58 const std::string &_inputfile, 59 const JobId_t _JobId, 60 const std::string &command) : 61 SystemCommandJob(command, _inputfile, _JobId) 58 62 {} 59 63 -
src/Fragmentation/Automation/Jobs/MPQCCommandJob.hpp
rc4f43e r917be8 33 33 friend class MPQCCommandJobTest; 34 34 public: 35 MPQCCommandJob(const std::string _inputfile, const JobId_t _JobId);35 MPQCCommandJob(const std::string &_inputfile, const JobId_t _JobId, const std::string &_command = std::string("mpqc")); 36 36 ~MPQCCommandJob(); 37 37 -
src/Fragmentation/Automation/controller.cpp
rc4f43e r917be8 81 81 * 82 82 * @param jobs created job is added to this vector 83 * @param command mpqc command to execute 83 84 * @param filename filename being argument to job 84 85 * @param nextid id for this job … … 86 87 void parsejob( 87 88 std::vector<FragmentJob::ptr> &jobs, 89 const std::string &command, 88 90 const std::string &filename, 89 91 const JobId_t nextid) … … 94 96 std::string output((std::istreambuf_iterator<char>(file)), 95 97 std::istreambuf_iterator<char>()); 96 FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid ) );98 FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid, command) ); 97 99 jobs.push_back(testJob); 98 100 file.close(); … … 229 231 case AddJobsIndex: 230 232 { 231 if (argc < 5) {232 ELOG(1, " Please add a filename for the MPQCCommandJob.");233 if (argc < 6) { 234 ELOG(1, "'addjobs' requires at least two options: [mpqc] [list of input files ...]."); 233 235 } else { 234 236 // get an id for every filename 235 controller.requestIds(argv[1], argv[2], argc- 4);237 controller.requestIds(argv[1], argv[2], argc-5); 236 238 } 237 239 break; … … 273 275 { 274 276 std::vector<FragmentJob::ptr> jobs; 275 if (argc < 5) {277 if (argc < 6) { 276 278 ELOG(1, "Please add a filename for the MPQCCommandJob."); 277 279 } else { 278 for (int argcount = 4; argcount < argc; ++argcount) { 280 const std::string command(argv[4]); 281 for (int argcount = 5; argcount < argc; ++argcount) { 279 282 const JobId_t next_id = controller.getAvailableId(); 280 283 const std::string filename(argv[argcount]); 281 284 LOG(1, "INFO: Creating MPQCCommandJob with filename'" 282 285 +filename+"', and id "+toString(next_id)+"."); 283 parsejob(jobs, filename, next_id);286 parsejob(jobs, command, filename, next_id); 284 287 } 285 288 controller.addJobs(jobs);
Note:
See TracChangeset
for help on using the changeset viewer.