votca 2024.2-dev
Loading...
Searching...
No Matches
spectrum.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_SPECTRUM_H
22#define VOTCA_XTP_SPECTRUM_H
23
24// Standard includes
25#include <cstdio>
26
27// Local VOTCA includes
28#include "votca/xtp/logger.h"
29#include "votca/xtp/qmstate.h"
30#include "votca/xtp/qmtool.h"
31
32namespace votca {
33namespace xtp {
34class Orbitals;
35
36class Spectrum final : public QMTool {
37 public:
38 Spectrum() = default;
39
40 ~Spectrum() = default;
41
42 std::string Identify() const { return "spectrum"; }
43
44 protected:
45 void ParseOptions(const tools::Property& user_options);
46 bool Run();
47
48 private:
49 std::string orbfile_;
50 std::string output_file_ = "spectrum.dat";
51
53
54 double evtonm(double eV);
55 double evtoinvcm(double eV);
56 double nmtoinvcm(double nm);
57 double invcmtonm(double invcm);
58 double nmtoev(double nm);
59
60 double lower_ = 0.0; // in eV
61 double upper_; // in eV
62 Index n_pt_ = 100;
63
65 Index maxexc_ = std::numeric_limits<Index>::max();
66
67 double fwhm_; // in eV
68 double shiftby_ = 0.0;
69
70 std::string spectrum_type_ = "energy";
71 // lineshape functions
72 double Gaussian(double x, double center, double fwhm);
73 double Lorentzian(double x, double center, double fwhm);
74};
75
76} // namespace xtp
77} // namespace votca
78
79#endif // VOTCA_XTP_SPECTRUM_H
class to manage program options with xml serialization functionality
Definition property.h:55
Logger is used for thread-safe output of messages.
Definition logger.h:164
double Lorentzian(double x, double center, double fwhm)
Definition spectrum.cc:201
double invcmtonm(double invcm)
Definition spectrum.cc:219
std::string spectrum_type_
Definition spectrum.h:70
double evtoinvcm(double eV)
Definition spectrum.cc:215
double nmtoinvcm(double nm)
Definition spectrum.cc:217
std::string Identify() const
Calculator name.
Definition spectrum.h:42
double Gaussian(double x, double center, double fwhm)
Definition spectrum.cc:206
std::string output_file_
Definition spectrum.h:50
void ParseOptions(const tools::Property &user_options)
Definition spectrum.cc:35
double nmtoev(double nm)
Definition spectrum.cc:221
std::string orbfile_
Definition spectrum.h:49
double evtonm(double eV)
Definition spectrum.cc:213
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26