votca 2026-dev
Loading...
Searching...
No Matches
kmclifetime.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2026 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_KMCLIFETIME_H
22#define VOTCA_XTP_KMCLIFETIME_H
23
24// Standard includes
25#include <cstdint>
26#include <string>
27#include <vector>
28
29// Local VOTCA includes
31#include "votca/xtp/logger.h"
33#include "votca/xtp/tofgraph.h"
34
35namespace votca {
36namespace xtp {
37
45class KMCLifetime final : public QMCalculator {
46 public:
47 KMCLifetime() = default;
48 ~KMCLifetime() override = default;
49
50 std::string Identify() const override { return "kmclifetime"; }
51 bool WriteToStateFile() const override { return false; }
52
53 protected:
54 void ParseOptions(const tools::Property& options) override;
55 bool Evaluate(Topology& top) override;
56
57 private:
60 double temperature_ = 0.0; // kT in Hartree
61 std::string injection_pattern_ = "*";
62 std::string ignore_types_;
65 bool exact_ = true;
66 bool carrierenergy_ = false;
67 double alpha_ = 0.05;
68 std::string waitingtime_ = "exponential";
69 std::string lifetimefile_;
70 std::string trajectoryfile_;
71 std::string ratefile_;
72 std::string occfile_;
73 std::string probfile_;
74 std::string energyfile_;
75 std::string resultfile_;
76
77 std::vector<double> ReadDecayRates(const ToFGraph& graph) const;
78 void WriteRates(const Topology& top);
79 void WriteDecayProbabilities(const ToFGraph& graph,
80 const std::vector<double>& decay,
83};
84
85} // namespace xtp
86} // namespace votca
87
88#endif // VOTCA_XTP_KMCLIFETIME_H
class to manage program options with xml serialization functionality
Definition property.h:55
std::string trajectoryfile_
Definition kmclifetime.h:70
~KMCLifetime() override=default
void WriteDecayProbabilities(const ToFGraph &graph, const std::vector< double > &decay, const LifetimeSimulation::Result *kmc, const LifetimeSimulation::ExactResult *exact)
std::vector< double > ReadDecayRates(const ToFGraph &graph) const
std::string lifetimefile_
Definition kmclifetime.h:69
void WriteRates(const Topology &top)
std::string injection_pattern_
Definition kmclifetime.h:61
std::string ignore_types_
Definition kmclifetime.h:62
bool Evaluate(Topology &top) override
std::string Identify() const override
Calculator name.
Definition kmclifetime.h:50
bool WriteToStateFile() const override
Definition kmclifetime.h:51
LifetimeSimulation::Settings settings_
Definition kmclifetime.h:63
void ParseOptions(const tools::Property &options) override
Logger is used for thread-safe output of messages.
Definition logger.h:164
Hopping graph for time-of-flight (ToF) transport.
Definition tofgraph.h:77
Container for segments and box and atoms.
Definition topology.h:41
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26