votca
2024.2-dev
Loading...
Searching...
No Matches
xtp
include
votca
xtp
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
"
27
#include "
votca/xtp/orbreorder.h
"
28
#include "
votca/xtp/qmtool.h
"
29
#include <fstream>
30
31
namespace
votca
{
32
namespace
xtp {
33
class
GaussianWriter
{
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,
40
const
QMState
state =
QMState
(
QMStateType::statetype::Gstate
,
41
0,
false
),
42
bool
diff2gs =
false
)
const
;
43
44
private
:
45
Logger
&
log_
;
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
votca::xtp::GaussianWriter
Definition
gaussianwriter.h:33
votca::xtp::GaussianWriter::~GaussianWriter
~GaussianWriter()=default
votca::xtp::GaussianWriter::gaussianMultipliers
std::array< Index, 49 > gaussianMultipliers
Definition
gaussianwriter.h:51
votca::xtp::GaussianWriter::densityMatrixToString
std::string densityMatrixToString(const Orbitals &orbitals, const QMState &state, bool diff2gs) const
Definition
gaussianwriter.cc:69
votca::xtp::GaussianWriter::gaussianOrder
std::array< Index, 49 > gaussianOrder
Definition
gaussianwriter.h:54
votca::xtp::GaussianWriter::reorderedMOCoefficients
std::string reorderedMOCoefficients(const Orbitals &orbitals) const
Definition
gaussianwriter.cc:45
votca::xtp::GaussianWriter::log_
Logger & log_
Definition
gaussianwriter.h:45
votca::xtp::GaussianWriter::toGaussianL
Index toGaussianL(L l) const
Definition
gaussianwriter.cc:34
votca::xtp::GaussianWriter::WriteFile
void WriteFile(const std::string &basename, const Orbitals &orbitals, const QMState state=QMState(QMStateType::statetype::Gstate, 0, false), bool diff2gs=false) const
Definition
gaussianwriter.cc:102
votca::xtp::GaussianWriter::GaussianWriter
GaussianWriter(Logger &log)
Definition
gaussianwriter.h:35
votca::xtp::Logger
Logger is used for thread-safe output of messages.
Definition
logger.h:164
votca::xtp::Orbitals
container for molecular orbitals
Definition
orbitals.h:46
votca::xtp::QMStateType::Gstate
@ Gstate
Definition
qmstate.h:40
votca::xtp::QMState
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Definition
qmstate.h:132
logger.h
votca::xtp::L
L
Definition
basisset.h:37
votca
base class for all analysis tools
Definition
basebead.h:33
votca::Index
Eigen::Index Index
Definition
types.h:26
orbitals.h
orbreorder.h
qmtool.h
Generated by
1.12.0