votca 2024.2-dev
Loading...
Searching...
No Matches
molden.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_MOLDEN_H
22#define VOTCA_XTP_MOLDEN_H
23
24// Local VOTCA includes
25#include "votca/xtp/logger.h"
26#include "votca/xtp/orbitals.h"
28#include "votca/xtp/qmtool.h"
29#include <fstream>
30
31namespace votca {
32namespace xtp {
33class Molden {
34 public:
35 Molden(Logger& log) : log_(log) {};
36
37 ~Molden() = default;
38
39 void WriteFile(const std::string& filename, const Orbitals& orbitals) const;
40
41 void setBasissetInfo(const std::string& basisset_name,
42 const std::string& aux_basisset_name = "") {
43 basisset_name_ = basisset_name;
44 aux_basisset_name_ = aux_basisset_name;
45 }
46
47 void parseMoldenFile(const std::string& filename, Orbitals& orbitals) const;
48
49 private:
50 // clang-format off
52
53 std::array<Index,49> multipliers_={{
54 1, //s
55 1,1,1, //p
56 1,1,1,1,1, //d
57 -1,1,1,1,1,1,-1, //f
58 -1,-1,1,1,1,1,1,-1,-1, //g
59 -1,-1,-1,1,1,1,1,1,-1,-1,-1, //h
60 -1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1 //i
61 }};
62 std::array<Index, 49> reorderList_={{
63 0, //s
64 1,-1,0, //p
65 0,1,-1,2,-2, //d
66 0,1,-1,2,-2,3,-3, //f
67 0,1,-1,2,-2,3,-3,4,-4, //g
68 0,1,-1,2,-2,3,-3,4,-4,5,-5, //h
69 0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6 //i
70 }};
71 // clang-format on
72 std::string basisset_name_ = "";
73 std::string aux_basisset_name_ = "";
74
75 void writeAtoms(const Orbitals& orbitals, std::ofstream& outFile) const;
76 void writeMOs(const Orbitals& orbitals, std::ofstream& outFile) const;
77 void writeBasisSet(const Orbitals& orbitals, std::ofstream& outFile) const;
78
79 std::string readAtoms(QMMolecule& mol, const std::string& units,
80 std::ifstream& input_file) const;
81 std::string readMOs(Orbitals& orbitals, std::ifstream& input_file) const;
82 void addBasissetInfo(Orbitals& orbitals) const;
83};
84
85} // namespace xtp
86} // namespace votca
87
88#endif // VOTCA_XTP_MOLDEN_H
Logger is used for thread-safe output of messages.
Definition logger.h:164
std::string readMOs(Orbitals &orbitals, std::ifstream &input_file) const
Definition molden.cc:130
Molden(Logger &log)
Definition molden.h:35
std::string basisset_name_
Definition molden.h:72
void WriteFile(const std::string &filename, const Orbitals &orbitals) const
Definition molden.cc:64
std::string aux_basisset_name_
Definition molden.h:73
std::string readAtoms(QMMolecule &mol, const std::string &units, std::ifstream &input_file) const
Definition molden.cc:97
void writeAtoms(const Orbitals &orbitals, std::ofstream &outFile) const
Definition molden.cc:10
void writeMOs(const Orbitals &orbitals, std::ofstream &outFile) const
Definition molden.cc:20
void addBasissetInfo(Orbitals &orbitals) const
Definition molden.cc:238
Logger & log_
Definition molden.h:51
void parseMoldenFile(const std::string &filename, Orbitals &orbitals) const
Definition molden.cc:245
void writeBasisSet(const Orbitals &orbitals, std::ofstream &outFile) const
Definition molden.cc:40
void setBasissetInfo(const std::string &basisset_name, const std::string &aux_basisset_name="")
Definition molden.h:41
std::array< Index, 49 > reorderList_
Definition molden.h:62
std::array< Index, 49 > multipliers_
Definition molden.h:53
container for molecular orbitals
Definition orbitals.h:46
base class for all analysis tools
Definition basebead.h:33