| [28e894] | 1 | /*
|
|---|
| 2 | * MPQCJob.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Jul 10, 2012
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef MPQCJOB_HPP_
|
|---|
| 9 | #define MPQCJOB_HPP_
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | // include config.h
|
|---|
| 13 | #ifdef HAVE_CONFIG_H
|
|---|
| 14 | #include <config.h>
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | #include "boost/serialization/export.hpp"
|
|---|
| 18 |
|
|---|
| [1dfe00] | 19 | #ifdef HAVE_JOBMARKET
|
|---|
| [28e894] | 20 | #include "JobMarket/Jobs/FragmentJob.hpp"
|
|---|
| [1dfe00] | 21 | #else
|
|---|
| 22 | #include "Jobs/JobMarket/FragmentJob.hpp"
|
|---|
| 23 | #endif
|
|---|
| [28e894] | 24 |
|
|---|
| [fbf143] | 25 | #include "Fragmentation/Summation/SetValues/SamplingGridProperties.hpp"
|
|---|
| 26 | #include "Fragmentation/Summation/Containers/MPQCData.hpp"
|
|---|
| [28c025] | 27 |
|
|---|
| [28e894] | 28 | #include <string>
|
|---|
| 29 |
|
|---|
| 30 | /** This class encapsulates a MPQC Job.
|
|---|
| 31 | *
|
|---|
| 32 | */
|
|---|
| 33 | class MPQCJob : public FragmentJob
|
|---|
| 34 | {
|
|---|
| 35 | public:
|
|---|
| [d12d621] | 36 | MPQCJob(
|
|---|
| 37 | const JobId_t _JobId,
|
|---|
| 38 | const std::string &_inputfile,
|
|---|
| [ec1aae] | 39 | const double _begin[NDIM],
|
|---|
| 40 | const double _end[NDIM],
|
|---|
| [6294b6] | 41 | const int _level,
|
|---|
| 42 | const int _verbose);
|
|---|
| [a9558f] | 43 | virtual ~MPQCJob();
|
|---|
| [28e894] | 44 |
|
|---|
| 45 | FragmentResult::ptr Work();
|
|---|
| 46 |
|
|---|
| [503acc1] | 47 | //!> whether to actually sample the density
|
|---|
| 48 | MPQCData::DoLongrange_t DoLongrange;
|
|---|
| 49 |
|
|---|
| [6ff62c] | 50 | //!> whether to sample just the valence or the total electron and nuclei density
|
|---|
| 51 | MPQCData::DoValenceOnly_t DoValenceOnly;
|
|---|
| 52 |
|
|---|
| [6294b6] | 53 | //!> verbosity level of mpqc: 0 will mute all std out
|
|---|
| 54 | int verbose;
|
|---|
| 55 |
|
|---|
| [28e894] | 56 | private:
|
|---|
| [28c025] | 57 | //!> contents of inputfile
|
|---|
| [28e894] | 58 | const std::string inputfile;
|
|---|
| [28c025] | 59 | //!> information for how to sample the density
|
|---|
| 60 | const SamplingGridProperties grid;
|
|---|
| [28e894] | 61 |
|
|---|
| 62 | private:
|
|---|
| 63 | /** private default cstor for serialization only
|
|---|
| 64 | */
|
|---|
| [a9558f] | 65 | MPQCJob();
|
|---|
| [28e894] | 66 |
|
|---|
| 67 | friend class boost::serialization::access;
|
|---|
| 68 | // serialization
|
|---|
| 69 | template <typename Archive>
|
|---|
| 70 | void serialize(Archive& ar, const unsigned int version)
|
|---|
| 71 | {
|
|---|
| 72 | ar & boost::serialization::base_object<FragmentJob>(*this);
|
|---|
| [503acc1] | 73 | ar & DoLongrange;
|
|---|
| [6ff62c] | 74 | ar & DoValenceOnly;
|
|---|
| [6294b6] | 75 | ar & verbose;
|
|---|
| [28e894] | 76 | ar & const_cast<std::string &>(inputfile);
|
|---|
| [28c025] | 77 | ar & const_cast<SamplingGridProperties &>(grid);
|
|---|
| [28e894] | 78 | }
|
|---|
| 79 | };
|
|---|
| 80 |
|
|---|
| 81 | // we need to give this class a unique key for serialization
|
|---|
| 82 | // its is only serialized through its base class FragmentJob
|
|---|
| 83 | BOOST_CLASS_EXPORT_KEY(MPQCJob)
|
|---|
| 84 |
|
|---|
| 85 | #endif /* MPQCJOB_HPP_ */
|
|---|