votca 2024.1-dev
Loading...
Searching...
No Matches
gaussianwriter.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2021 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_GAUSSIANWRITER_H
22#define VOTCA_XTP_GAUSSIANWRITER_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 {
34 public:
35 GaussianWriter(Logger& log) : log_(log) { gaussianMultipliers.fill(-1); }
36
37 ~GaussianWriter() = default;
38
39 void WriteFile(const std::string& basename, const Orbitals& orbitals,
41 0, false),
42 bool diff2gs = false) const;
43
44 private:
46 Index toGaussianL(L l) const;
47 std::string reorderedMOCoefficients(const Orbitals& orbitals) const;
48 std::string densityMatrixToString(const Orbitals& orbitals,
49 const QMState& state, bool diff2gs) const;
50 // Setup the reordering parameters
51 std::array<Index, 49> gaussianMultipliers;
52 // clang-format off
53 // the ordering of the m quantumnumbers for every shell in gaussian
54 std::array<Index, 49> gaussianOrder={{
55 0, //s
56 1,-1,0, //p
57 0,1,-1,2,-2, //d
58 0,1,-1,2,-2,3,-3, //f
59 0,1,-1,2,-2,3,-3,4,-4, //g
60 0,1,-1,2,-2,3,-3,4,-4,5,-5, // h
61 0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6 // i
62 }};
63 // clang-format on
64};
65
66} // namespace xtp
67} // namespace votca
68
69#endif
std::array< Index, 49 > gaussianMultipliers
std::string densityMatrixToString(const Orbitals &orbitals, const QMState &state, bool diff2gs) const
std::array< Index, 49 > gaussianOrder
std::string reorderedMOCoefficients(const Orbitals &orbitals) const
void WriteFile(const std::string &basename, const Orbitals &orbitals, const QMState state=QMState(QMStateType::statetype::Gstate, 0, false), bool diff2gs=false) const
Logger is used for thread-safe output of messages.
Definition logger.h:164
container for molecular orbitals
Definition orbitals.h:46
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Definition qmstate.h:132
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26