Changeset 917be8


Ignore:
Timestamp:
Jul 2, 2012, 7:54:13 AM (12 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

MPQCCommandJob now takes command argument to the mpqc executable.

  • This allows to use stand-in mpqc instead of true mpqc executable.
Location:
src/Fragmentation/Automation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Automation/Jobs/MPQCCommandJob.cpp

    rc4f43e r917be8  
    5353 * @param _inputfile string of inputfile contents
    5454 * @param _JobId id of this job
     55 * @param command mpqc command, "mpqc" as default
    5556 */
    56 MPQCCommandJob::MPQCCommandJob(const std::string _inputfile, const JobId_t _JobId) :
    57     SystemCommandJob("mpqc", _inputfile, _JobId)
     57MPQCCommandJob::MPQCCommandJob(
     58    const std::string &_inputfile,
     59    const JobId_t _JobId,
     60    const std::string &command) :
     61    SystemCommandJob(command, _inputfile, _JobId)
    5862{}
    5963
  • src/Fragmentation/Automation/Jobs/MPQCCommandJob.hpp

    rc4f43e r917be8  
    3333  friend class MPQCCommandJobTest;
    3434public:
    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"));
    3636  ~MPQCCommandJob();
    3737
  • src/Fragmentation/Automation/controller.cpp

    rc4f43e r917be8  
    8181 *
    8282 * @param jobs created job is added to this vector
     83 * @param command mpqc command to execute
    8384 * @param filename filename being argument to job
    8485 * @param nextid id for this job
     
    8687void parsejob(
    8788    std::vector<FragmentJob::ptr> &jobs,
     89    const std::string &command,
    8890    const std::string &filename,
    8991    const JobId_t nextid)
     
    9496  std::string output((std::istreambuf_iterator<char>(file)),
    9597      std::istreambuf_iterator<char>());
    96   FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid) );
     98  FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid, command) );
    9799  jobs.push_back(testJob);
    98100  file.close();
     
    229231      case AddJobsIndex:
    230232      {
    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 ...].");
    233235        } else {
    234236          // get an id for every filename
    235           controller.requestIds(argv[1], argv[2], argc-4);
     237          controller.requestIds(argv[1], argv[2], argc-5);
    236238        }
    237239        break;
     
    273275      {
    274276        std::vector<FragmentJob::ptr> jobs;
    275         if (argc < 5) {
     277        if (argc < 6) {
    276278          ELOG(1, "Please add a filename for the MPQCCommandJob.");
    277279        } else {
    278           for (int argcount = 4; argcount < argc; ++argcount) {
     280          const std::string command(argv[4]);
     281          for (int argcount = 5; argcount < argc; ++argcount) {
    279282            const JobId_t next_id = controller.getAvailableId();
    280283            const std::string filename(argv[argcount]);
    281284            LOG(1, "INFO: Creating MPQCCommandJob with filename'"
    282285                +filename+"', and id "+toString(next_id)+".");
    283             parsejob(jobs, filename, next_id);
     286            parsejob(jobs, command, filename, next_id);
    284287          }
    285288          controller.addJobs(jobs);
Note: See TracChangeset for help on using the changeset viewer.