votca 2024.2-dev
Loading...
Searching...
No Matches
orca.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_ORCA_H
22#define VOTCA_XTP_ORCA_H
23
24// Local VOTCA includes
26#include "votca/xtp/qmpackage.h"
27
28namespace votca {
29namespace xtp {
37class Orbitals;
38class Orca final : public QMPackage {
39 public:
40 std::string getPackageName() const override { return "orca"; }
41
42 bool WriteInputFile(const Orbitals& orbitals) override;
43
44 bool WriteShellScript();
45
46 bool RunDFT() override;
47
48 bool RunActiveDFT() override {
49 throw std::runtime_error(
50 "DFT Embedding cannot be done with Orca.\n Switch qm package to "
51 "xtpdft");
52 }
53
54 void CleanUp() override;
55
56 bool CheckLogFile();
57
58 bool ParseLogFile(Orbitals& orbitals) override;
59
60 bool ParseMOsFile(Orbitals& orbitals) override;
61
62 StaticSegment GetCharges() const override;
63
64 Eigen::Matrix3d GetPolarizability() const override;
65
66 protected:
67 void ParseSpecificOptions(const tools::Property& options) final;
68 const std::array<Index, 49>& ShellMulitplier() const final {
69 return multipliers_;
70 }
71 const std::array<Index, 49>& ShellReorder() const final {
72 return reorderList_;
73 }
74
75 private:
76 // clang-format off
77 std::array<Index,49> multipliers_={{
78 1, //s
79 1,1,1, //p
80 1,1,1,1,1, //d
81 -1,1,1,1,1,1,-1, //f
82 -1,-1,1,1,1,1,1,-1,-1, //g
83 -1,-1,-1,1,1,1,1,1,-1,-1,-1, //h
84 -1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1 //i
85 }};
86 std::array<Index,49> reorderList_{{
87 0, //s
88 0, 1,-1, //p
89 0,1,-1,2,-2, //d
90 0,1,-1,2,-2,3,-3, //f
91 0,1,-1,2,-2,3,-3,4,-4, //g
92 0,1,-1,2,-2,3,-3,4,-4,5,-5, //h
93 0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6 //i
94 }};
95
96 // clang-format on
97 std::string indent(const double& number);
98
99 void WriteBasisset(const QMMolecule& qmatoms, std::string& bs_name,
100 std::string& el_file_name);
101 void WriteCoordinates(std::ofstream& inp_file, const QMMolecule&);
102 void WriteECP(std::ofstream& inp_file, const QMMolecule&);
104
105 void WriteChargeOption() override;
106 template <class T>
107 void GetCoordinates(T& mol, std::string& line,
108 std::ifstream& input_file) const;
109 std::string WriteMethod() const;
110 std::string CreateInputSection(const std::string& key) const;
111 bool KeywordIsSingleLine(const std::string& key) const;
112 std::string GetOrcaFunctionalName() const;
113
114 std::map<std::string, std::string> convergence_map_{
115 {"low", "LooseSCF"},
116 {"normal", "StrongSCF"},
117 {"tight", "TightSCF"},
118 {"verytight", "VeryTightSCF"},
119 {"none", ""}};
120};
121
122} // namespace xtp
123} // namespace votca
124
125#endif // VOTCA_XTP_ORCA_H
class to manage program options with xml serialization functionality
Definition property.h:55
container for molecular orbitals
Definition orbitals.h:46
void GetCoordinates(T &mol, std::string &line, std::ifstream &input_file) const
Definition orca.cc:750
void WriteCoordinates(std::ofstream &inp_file, const QMMolecule &)
Definition orca.cc:104
void CleanUp() override
Definition orca.cc:368
void WriteECP(std::ofstream &inp_file, const QMMolecule &)
Definition orca.cc:122
bool WriteShellScript()
Definition orca.cc:306
void WriteBasisset(const QMMolecule &qmatoms, std::string &bs_name, std::string &el_file_name)
Definition orca.cc:66
std::string GetOrcaFunctionalName() const
Definition orca.cc:923
std::string indent(const double &number)
Definition orca.cc:870
std::string getPackageName() const override
Definition orca.h:40
Eigen::Matrix3d GetPolarizability() const override
Definition orca.cc:460
void WriteChargeOption() override
Definition orca.cc:174
std::map< std::string, std::string > convergence_map_
Definition orca.h:114
bool RunActiveDFT() override
Definition orca.h:48
const std::array< Index, 49 > & ShellMulitplier() const final
Definition orca.h:68
std::array< Index, 49 > reorderList_
Definition orca.h:86
std::string CreateInputSection(const std::string &key) const
Definition orca.cc:883
StaticSegment GetCharges() const override
Definition orca.cc:412
std::string WriteMethod() const
Definition orca.cc:904
void WriteBackgroundCharges()
Definition orca.cc:182
const std::array< Index, 49 > & ShellReorder() const final
Definition orca.h:71
std::array< Index, 49 > multipliers_
Definition orca.h:77
bool CheckLogFile()
Definition orca.cc:786
bool RunDFT() override
Definition orca.cc:337
bool ParseLogFile(Orbitals &orbitals) override
Definition orca.cc:505
void ParseSpecificOptions(const tools::Property &options) final
Definition orca.cc:51
bool ParseMOsFile(Orbitals &orbitals) override
Definition orca.cc:820
bool KeywordIsSingleLine(const std::string &key) const
Definition orca.cc:898
bool WriteInputFile(const Orbitals &orbitals) override
Definition orca.cc:223
base class for all analysis tools
Definition basebead.h:33