votca 2024.2-dev
Loading...
Searching...
No Matches
iqm.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#pragma once
21#ifndef VOTCA_XTP_IQM_H
22#define VOTCA_XTP_IQM_H
23
24// Third party includes
25#include <boost/filesystem.hpp>
26#include <sys/stat.h>
27
28// VOTCA includes
30
31// Local VOTCA includes
34#include "votca/xtp/gwbse.h"
35#include "votca/xtp/orbitals.h"
37
38namespace votca {
39namespace xtp {
40
51class IQM final : public ParallelXJobCalc<std::vector<Job> > {
52 public:
53 std::string Identify() const { return "iqm"; }
54 Job::JobResult EvalJob(const Topology& top, Job& job, QMThread& opThread);
55 void WriteJobFile(const Topology& top);
56 void ReadJobFile(Topology& top);
57
58 protected:
59 void ParseSpecificOptions(const tools::Property& user_options);
60
61 private:
62 double GetBSECouplingFromProp(const tools::Property& bseprop,
63 const QMState& stateA, const QMState& stateB);
64 double GetDFTCouplingFromProp(const tools::Property& dftprop, Index stateA,
65 Index stateB);
66 void SetJobToFailed(Job::JobResult& jres, Logger& pLog,
67 const std::string& errormessage);
68 void WriteLoggerToFile(const std::string& logfile, Logger& logger);
69 void addLinkers(std::vector<const Segment*>& segments, const Topology& top);
70 bool isLinker(const std::string& name);
71 std::map<std::string, QMState> FillParseMaps(const std::string& Mapstring);
72
73 QMState GetElementFromMap(const std::map<std::string, QMState>& elementmap,
74 const std::string& elementname) const;
75
80
81 // what to do
82 bool do_dft_input_ = false;
83 bool do_dft_run_ = false;
84 bool do_dft_parse_ = false;
85 bool do_dftcoupling_ = false;
86 bool do_gwbse_ = false;
87 bool do_bsecoupling_ = false;
88
89 std::map<std::string, QMState> linkers_;
90
91 // what to write in the storage
92 bool store_dft_ = false;
93 bool store_gw_ = false;
94
95 // parsing options
96 std::map<std::string, QMState> singlet_levels_;
97 std::map<std::string, QMState> triplet_levels_;
98
99 std::map<std::string, QMState> hole_levels_;
100 std::map<std::string, QMState> electron_levels_;
101};
102
103} // namespace xtp
104} // namespace votca
105#endif // VOTCA_XTP_IQM_H
class to manage program options with xml serialization functionality
Definition property.h:55
DFT & GWBSE-based coupling elements.
Definition iqm.h:51
bool do_dft_input_
Definition iqm.h:82
std::map< std::string, QMState > FillParseMaps(const std::string &Mapstring)
Definition iqm.cc:119
void SetJobToFailed(Job::JobResult &jres, Logger &pLog, const std::string &errormessage)
Definition iqm.cc:156
Job::JobResult EvalJob(const Topology &top, Job &job, QMThread &opThread)
Definition iqm.cc:174
tools::Property dftcoupling_options_
Definition iqm.h:79
double GetBSECouplingFromProp(const tools::Property &bseprop, const QMState &stateA, const QMState &stateB)
Definition iqm.cc:630
bool do_bsecoupling_
Definition iqm.h:87
tools::Property dftpackage_options_
Definition iqm.h:76
QMState GetElementFromMap(const std::map< std::string, QMState > &elementmap, const std::string &elementname) const
Definition iqm.cc:652
void WriteJobFile(const Topology &top)
Definition iqm.cc:557
std::map< std::string, QMState > triplet_levels_
Definition iqm.h:97
bool do_dftcoupling_
Definition iqm.h:85
bool store_dft_
Definition iqm.h:92
tools::Property gwbse_options_
Definition iqm.h:77
void ParseSpecificOptions(const tools::Property &user_options)
Definition iqm.cc:44
std::map< std::string, QMState > electron_levels_
Definition iqm.h:100
tools::Property bsecoupling_options_
Definition iqm.h:78
std::string Identify() const
Calculator name.
Definition iqm.h:53
void WriteLoggerToFile(const std::string &logfile, Logger &logger)
Definition iqm.cc:164
std::map< std::string, QMState > singlet_levels_
Definition iqm.h:96
bool isLinker(const std::string &name)
Definition iqm.cc:152
void addLinkers(std::vector< const Segment * > &segments, const Topology &top)
Definition iqm.cc:136
bool do_dft_parse_
Definition iqm.h:84
double GetDFTCouplingFromProp(const tools::Property &dftprop, Index stateA, Index stateB)
Definition iqm.cc:610
std::map< std::string, QMState > hole_levels_
Definition iqm.h:99
bool do_gwbse_
Definition iqm.h:86
std::map< std::string, QMState > linkers_
Definition iqm.h:89
bool do_dft_run_
Definition iqm.h:83
bool store_gw_
Definition iqm.h:93
void ReadJobFile(Topology &top)
Definition iqm.cc:669
Logger is used for thread-safe output of messages.
Definition logger.h:164
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Definition qmstate.h:132
Container for segments and box and atoms.
Definition topology.h:41
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26