votca 2024.2-dev
Loading...
Searching...
No Matches
glink.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_GLINK_H
20#define VOTCA_XTP_GLINK_H
21
22// Local VOTCA includes
23#include "eigen.h"
24
25namespace votca {
26namespace xtp {
27
28class GNode;
29class GLink {
30
31 public:
32 GLink(GNode* dest, double rate, const Eigen::Vector3d& dr)
33 : destination(dest), rate_(rate), dr_(dr) {};
34
35 GLink(double rate) : rate_(rate), decayevent_(true) {};
36
37 double getValue() const { return rate_; }
38 double getRate() const { return rate_; }
40 assert(!decayevent_ && "Decay event has no destination");
41 return destination;
42 }
43 const Eigen::Vector3d& getDeltaR() const { return dr_; }
44 bool isDecayEvent() const { return decayevent_; }
45
46 private:
47 GNode* destination = nullptr;
48 double rate_ = 0.0;
49 Eigen::Vector3d dr_ = Eigen::Vector3d::Zero();
50 bool decayevent_ = false;
51};
52} // namespace xtp
53} // namespace votca
54
55#endif // VOTCA_XTP_GLINK_H
base class for all analysis tools
Definition basebead.h:33