| 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 |
|
|---|
| 19 | #ifdef HAVE_JOBMARKET
|
|---|
| 20 | #include "JobMarket/Jobs/FragmentJob.hpp"
|
|---|
| 21 | #else
|
|---|
| 22 | #include "Jobs/JobMarket/FragmentJob.hpp"
|
|---|
| 23 | #endif
|
|---|
| 24 |
|
|---|
| 25 | #include "Fragmentation/Summation/SetValues/SamplingGridProperties.hpp"
|
|---|
| 26 | #include "Fragmentation/Summation/Containers/MPQCData.hpp"
|
|---|
| 27 |
|
|---|
| 28 | #include <string>
|
|---|
| 29 |
|
|---|
| 30 | /** This class encapsulates a MPQC Job.
|
|---|
| 31 | *
|
|---|
| 32 | */
|
|---|
| 33 | class MPQCJob : public FragmentJob
|
|---|
| 34 | {
|
|---|
| 35 | public:
|
|---|
| 36 | MPQCJob(
|
|---|
| 37 | const JobId_t _JobId,
|
|---|
| 38 | const std::string &_inputfile,
|
|---|
| 39 | const double _begin[NDIM],
|
|---|
| 40 | const double _end[NDIM],
|
|---|
| 41 | const int _level,
|
|---|
| 42 | const int _verbose);
|
|---|
| 43 | virtual ~MPQCJob();
|
|---|
| 44 |
|
|---|
| 45 | FragmentResult::ptr Work();
|
|---|
| 46 |
|
|---|
| 47 | //!> whether to actually sample the density
|
|---|
| 48 | MPQCData::DoLongrange_t DoLongrange;
|
|---|
| 49 |
|
|---|
| 50 | //!> whether to sample just the valence or the total electron and nuclei density
|
|---|
| 51 | MPQCData::DoValenceOnly_t DoValenceOnly;
|
|---|
| 52 |
|
|---|
| 53 | //!> verbosity level of mpqc: 0 will mute all std out
|
|---|
| 54 | int verbose;
|
|---|
| 55 |
|
|---|
| 56 | private:
|
|---|
| 57 | //!> contents of inputfile
|
|---|
| 58 | const std::string inputfile;
|
|---|
| 59 | //!> information for how to sample the density
|
|---|
| 60 | const SamplingGridProperties grid;
|
|---|
| 61 |
|
|---|
| 62 | private:
|
|---|
| 63 | /** private default cstor for serialization only
|
|---|
| 64 | */
|
|---|
| 65 | MPQCJob();
|
|---|
| 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);
|
|---|
| 73 | ar & DoLongrange;
|
|---|
| 74 | ar & DoValenceOnly;
|
|---|
| 75 | ar & verbose;
|
|---|
| 76 | ar & const_cast<std::string &>(inputfile);
|
|---|
| 77 | ar & const_cast<SamplingGridProperties &>(grid);
|
|---|
| 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_ */
|
|---|