votca 2024.2-dev
Loading...
Searching...
No Matches
xtpdft.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2022 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_XTPDFT_H
22#define VOTCA_XTP_XTPDFT_H
23
24// Standard includes
25#include <string>
26
27// Local VOTCA includes
28#include "votca/xtp/dftengine.h"
29#include "votca/xtp/orbitals.h"
31#include "votca/xtp/polarsite.h"
32#include "votca/xtp/qmpackage.h"
33
34namespace votca {
35namespace xtp {
36
43class XTPDFT final : public QMPackage {
44 public:
45 std::string getPackageName() const final { return "xtp"; }
46
47 bool WriteInputFile(const Orbitals& orbitals) final;
48
49 bool RunDFT() final;
50
51 bool RunActiveDFT() final;
52
53 void CleanUp() final;
54
56
57 bool ParseLogFile(Orbitals& orbitals) final;
58
59 bool ParseMOsFile(Orbitals& orbitals) final;
60
61 StaticSegment GetCharges() const final {
62 throw std::runtime_error(
63 "If you want partial charges just run the 'partialcharges' calculator");
64 }
65
66 Eigen::Matrix3d GetPolarizability() const final {
67 throw std::runtime_error(
68 "GetPolarizability() is not implemented for xtpdft");
69 }
70
71 protected:
72 void ParseSpecificOptions(const tools::Property& options) final;
73 const std::array<Index, 49>& ShellMulitplier() const final {
74 return multipliers_;
75 }
76 const std::array<Index, 49>& ShellReorder() const final {
77 return reorderList_;
78 }
79
80 private:
81 // clang-format off
82 std::array<Index,49> multipliers_={{
83 1, //s
84 1,1,1, //p
85 1,1,1,1,1, //d
86 1,1,1,1,1,1,1, //f
87 1,1,1,1,1,1,1,1,1, //g
88 1,1,1,1,1,1,1,1,1,1,1, //h
89 1,1,1,1,1,1,1,1,1,1,1,1,1 //i
90 }};
91 std::array<Index,49> reorderList_={{
92 0, //s
93 0,0,0, //p
94 0,0,0,0,0, //d
95 0,0,0,0,0,0,0, //f
96 0,0,0,0,0,0,0,0,0, //g
97 0,0,0,0,0,0,0,0,0,0,0, //h
98 0,0,0,0,0,0,0,0,0,0,0,0,0, //i
99 }};
100 // clang-format on
101
102 void WriteChargeOption() final { return; }
104
106};
107
108} // namespace xtp
109} // namespace votca
110
111#endif // VOTCA_XTP_XTPDFT_H
class to manage program options with xml serialization functionality
Definition property.h:55
container for molecular orbitals
Definition orbitals.h:46
Wrapper for the internal XTP DFT engine.
Definition xtpdft.h:43
void WriteChargeOption() final
Definition xtpdft.h:102
bool ParseLogFile(Orbitals &orbitals) final
Definition xtpdft.cc:109
Orbitals orbitals_
Definition xtpdft.h:105
const std::array< Index, 49 > & ShellMulitplier() const final
Definition xtpdft.h:73
Eigen::Matrix3d GetPolarizability() const final
Definition xtpdft.h:66
const std::array< Index, 49 > & ShellReorder() const final
Definition xtpdft.h:76
bool RunDFT() final
Definition xtpdft.cc:54
void ParseSpecificOptions(const tools::Property &options) final
Definition xtpdft.cc:39
void CleanUp() final
Definition xtpdft.cc:88
std::string getPackageName() const final
Definition xtpdft.h:45
bool WriteInputFile(const Orbitals &orbitals) final
writes a coordinate file WITHOUT taking into account PBCs
Definition xtpdft.cc:45
tools::Property xtpdft_options_
Definition xtpdft.h:103
bool ParseMOsFile(Orbitals &orbitals) final
Definition xtpdft.cc:107
StaticSegment GetCharges() const final
Definition xtpdft.h:61
std::array< Index, 49 > reorderList_
Definition xtpdft.h:91
std::array< Index, 49 > multipliers_
Definition xtpdft.h:82
bool RunActiveDFT() final
Definition xtpdft.cc:70
base class for all analysis tools
Definition basebead.h:33