source: src/Jobs/MPQCCommandJob.hpp@ 5fea7d

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes
Last change on this file since 5fea7d was d6a7b9, checked in by Frederik Heber <heber@…>, 11 years ago

Specifying executable and suffix in SystemCommandJob with MPQCCommandFragmentController.

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[cc276e]1/*
2 * MPQCJob.hpp
3 *
4 * Created on: Feb 05, 2012
5 * Author: heber
6 */
7
8#ifndef MPQCCOMMANDJOB_HPP_
9#define MPQCCOMMANDJOB_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
[545446]16#include <boost/serialization/export.hpp>
17
[cc276e]18#include <string>
19
[1dfe00]20#ifdef HAVE_JOBMARKET
[a10cc0]21#include "JobMarket/Results/FragmentResult.hpp"
22#include "JobMarket/Jobs/SystemCommandJob.hpp"
[1dfe00]23#else
24#include "Jobs/JobMarket/FragmentResult.hpp"
25#include "Jobs/JobMarket/SystemCommandJob.hpp"
26#endif
[cc276e]27
[fbf143]28#include "Fragmentation/Summation/Containers/MPQCData.hpp"
[cc276e]29
30class MPQCCommandJobTest;
[d6a7b9]31class MPQCCommandFragmentController;
[cc276e]32
33/** This class calls mpqc for solving a specific Hartree Fock problem.
34 *
35 */
36class MPQCCommandJob : public SystemCommandJob
37{
38 //!> grant unit test access
39 friend class MPQCCommandJobTest;
[d6a7b9]40 //!> grant access to controller
41 friend class MPQCCommandFragmentController;
[cc276e]42public:
[917be8]43 MPQCCommandJob(const std::string &_inputfile, const JobId_t _JobId, const std::string &_command = std::string("mpqc"));
[cc276e]44 ~MPQCCommandJob();
45
[545446]46 bool operator==(const MPQCCommandJob &other) const;
47
48 bool operator!=(const MPQCCommandJob &other) const {
49 return !(*this == other);
50 }
51
52private:
[d6a7b9]53 //!> Allow controller access to changing the commands
54 void setCommand(const std::string &_command)
55 { command = _command; }
56
57 //!> Allow controller access to changing the suffix
58 void setSuffix(const std::string &_suffix)
59 { suffix = _suffix; }
60
[545446]61 //!> private default cstor only for serializatio
62 MPQCCommandJob();
63
64 friend class boost::serialization::access;
65 // serialization
66 template <typename Archive>
67 void serialize(Archive& ar, const unsigned int version)
68 {
69 ar & boost::serialization::base_object<SystemCommandJob>(*this);
70 ar & data;
71 }
72
[cc276e]73private:
74 //!> class that contains energy and forces and serialization capabilities
75 MPQCData data;
76
77 FragmentResult::ptr extractResult(const std::string &resultstring);
[306f60]78 static const std::string keyword_hartreefock_energy;
79 static const std::string keyword_hartreefock_forces;
80 static const std::string keyword_moellerplesset_energy;
81 static const std::string keyword_moellerplesset_forces;
[cc276e]82};
83
[545446]84// we need to give this class a unique key for serialization
85// its is only serialized through its base class FragmentJob
86BOOST_CLASS_EXPORT_KEY(MPQCCommandJob)
[cc276e]87
88#endif /* MPQCCOMMANDJOB_HPP_ */
Note: See TracBrowser for help on using the repository browser.