votca 2024.2-dev
Loading...
Searching...
No Matches
kmccalculator.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#pragma once
19#ifndef VOTCA_XTP_KMCCALCULATOR_H
20#define VOTCA_XTP_KMCCALCULATOR_H
21
22// VOTCA includes
23#include <votca/tools/globals.h>
24#include <votca/tools/random.h>
26
27// Local VOTCA includes
28#include "chargecarrier.h"
29#include "gnode.h"
30#include "logger.h"
31#include "qmcalculator.h"
32#include "qmstate.h"
33
34namespace votca {
35namespace xtp {
36class QMNBList;
38 public:
39 ~KMCCalculator() override = default;
40
41 void ParseOptions(const tools::Property& options) final {
42 ParseCommonOptions(options);
43 ParseSpecificOptions(options);
44 }
45
46 protected:
47 virtual void ParseSpecificOptions(const tools::Property& options) = 0;
48
50
51 void LoadGraph(Topology& top);
52 virtual void RunVSSM() = 0;
53
54 void ParseCommonOptions(const tools::Property& options);
55
56 double Promotetime(double cumulated_rate);
57 void ResetForbiddenlist(std::vector<GNode*>& forbiddenid) const;
58 void AddtoForbiddenlist(GNode& node, std::vector<GNode*>& forbiddenid) const;
59 bool CheckForbidden(const GNode& node,
60 const std::vector<GNode*>& forbiddenlist) const;
61 bool CheckSurrounded(const GNode& node,
62 const std::vector<GNode*>& forbiddendests) const;
63 const GLink& ChooseHoppingDest(const GNode& node);
64 Chargecarrier* ChooseAffectedCarrier(double cumulated_rate);
65
66 void WriteOccupationtoFile(double simtime, std::string filename);
67 void WriteRatestoFile(std::string filename, const QMNBList& nblist);
68
71 std::vector<GNode> nodes_;
72 std::vector<Chargecarrier> carriers_;
73
75 std::string injection_name_;
76 std::string injectionmethod_;
79 Eigen::Vector3d field_ = Eigen::Vector3d::Zero();
81 std::string trajectoryfile_;
82 std::string ratefile_;
83 std::string occfile_;
84 std::string ignoresegments_;
85
87
89};
90
91} // namespace xtp
92} // namespace votca
93
94#endif // VOTCA_XTP_KMCCALCULATOR_H
class to manage program options with xml serialization functionality
Definition property.h:55
void ResetForbiddenlist(std::vector< GNode * > &forbiddenid) const
void LoadGraph(Topology &top)
std::vector< Chargecarrier > carriers_
void WriteRatestoFile(std::string filename, const QMNBList &nblist)
double Promotetime(double cumulated_rate)
virtual void ParseSpecificOptions(const tools::Property &options)=0
Chargecarrier * ChooseAffectedCarrier(double cumulated_rate)
const GLink & ChooseHoppingDest(const GNode &node)
void AddtoForbiddenlist(GNode &node, std::vector< GNode * > &forbiddenid) const
virtual void RunVSSM()=0
void RandomlyAssignCarriertoSite(Chargecarrier &Charge)
void ParseCommonOptions(const tools::Property &options)
~KMCCalculator() override=default
void ParseOptions(const tools::Property &options) final
bool CheckSurrounded(const GNode &node, const std::vector< GNode * > &forbiddendests) const
tools::Random RandomVariable_
std::vector< GNode > nodes_
void WriteOccupationtoFile(double simtime, std::string filename)
bool CheckForbidden(const GNode &node, const std::vector< GNode * > &forbiddenlist) const
Logger is used for thread-safe output of messages.
Definition logger.h:164
Container for segments and box and atoms.
Definition topology.h:41
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26