votca 2025.1-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// Standard includes
23#include <cassert>
24
25// Local VOTCA includes
26#include "eigen.h"
27
28namespace votca {
29namespace xtp {
30
31class GNode;
32class GLink {
33
34 public:
35 GLink(GNode* dest, double rate, const Eigen::Vector3d& dr)
36 : destination(dest), rate_(rate), dr_(dr) {};
37
38 GLink(double rate) : rate_(rate), decayevent_(true) {};
39
40 double getValue() const { return rate_; }
41 double getRate() const { return rate_; }
43 assert(!decayevent_ && "Decay event has no destination");
44 return destination;
45 }
46 const Eigen::Vector3d& getDeltaR() const { return dr_; }
47 bool isDecayEvent() const { return decayevent_; }
48
49 private:
50 GNode* destination = nullptr;
51 double rate_ = 0.0;
52 Eigen::Vector3d dr_ = Eigen::Vector3d::Zero();
53 bool decayevent_ = false;
54};
55} // namespace xtp
56} // namespace votca
57
58#endif // VOTCA_XTP_GLINK_H
Provides a means for comparing floating point numbers.
Definition basebead.h:33