[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 |
|
---|
| 30 | class MPQCCommandJobTest;
|
---|
| 31 |
|
---|
| 32 | /** This class calls mpqc for solving a specific Hartree Fock problem.
|
---|
| 33 | *
|
---|
| 34 | */
|
---|
| 35 | class MPQCCommandJob : public SystemCommandJob
|
---|
| 36 | {
|
---|
| 37 | //!> grant unit test access
|
---|
| 38 | friend class MPQCCommandJobTest;
|
---|
| 39 | public:
|
---|
[917be8] | 40 | MPQCCommandJob(const std::string &_inputfile, const JobId_t _JobId, const std::string &_command = std::string("mpqc"));
|
---|
[cc276e] | 41 | ~MPQCCommandJob();
|
---|
| 42 |
|
---|
[545446] | 43 | bool operator==(const MPQCCommandJob &other) const;
|
---|
| 44 |
|
---|
| 45 | bool operator!=(const MPQCCommandJob &other) const {
|
---|
| 46 | return !(*this == other);
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | private:
|
---|
| 50 | //!> private default cstor only for serializatio
|
---|
| 51 | MPQCCommandJob();
|
---|
| 52 |
|
---|
| 53 | friend class boost::serialization::access;
|
---|
| 54 | // serialization
|
---|
| 55 | template <typename Archive>
|
---|
| 56 | void serialize(Archive& ar, const unsigned int version)
|
---|
| 57 | {
|
---|
| 58 | ar & boost::serialization::base_object<SystemCommandJob>(*this);
|
---|
| 59 | ar & data;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
[cc276e] | 62 | private:
|
---|
| 63 | //!> class that contains energy and forces and serialization capabilities
|
---|
| 64 | MPQCData data;
|
---|
| 65 |
|
---|
| 66 | FragmentResult::ptr extractResult(const std::string &resultstring);
|
---|
[306f60] | 67 | static const std::string keyword_hartreefock_energy;
|
---|
| 68 | static const std::string keyword_hartreefock_forces;
|
---|
| 69 | static const std::string keyword_moellerplesset_energy;
|
---|
| 70 | static const std::string keyword_moellerplesset_forces;
|
---|
[cc276e] | 71 | };
|
---|
| 72 |
|
---|
[545446] | 73 | // we need to give this class a unique key for serialization
|
---|
| 74 | // its is only serialized through its base class FragmentJob
|
---|
| 75 | BOOST_CLASS_EXPORT_KEY(MPQCCommandJob)
|
---|
[cc276e] | 76 |
|
---|
| 77 | #endif /* MPQCCOMMANDJOB_HPP_ */
|
---|