votca 2024-dev
Loading...
Searching...
No Matches
beadtriple.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2019 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#ifndef VOTCA_CSG_BEADTRIPLE_H
19#define VOTCA_CSG_BEADTRIPLE_H
20
21// Standard includes
22#include <tuple>
23
24namespace votca {
25namespace csg {
26
32class BeadTriple : public std::tuple<Bead *, Bead *, Bead *> {
33 public:
34 BeadTriple() = default;
35 BeadTriple(Bead *bead1, Bead *bead2, Bead *bead3, Eigen::Vector3d r12,
36 Eigen::Vector3d r13, Eigen::Vector3d r23)
37 : std::tuple<Bead *, Bead *, Bead *>(bead1, bead2, bead3),
38 r12_(r12),
39 r13_(r13),
40 r23_(r23),
41 dist12_(r12.norm()),
42 dist13_(r13.norm()),
43 dist23_(r23.norm()) {}
44
45 virtual ~BeadTriple() = default;
46
48 const Bead *bead1() { return std::get<0>(*this); }
49 const Bead *bead2() { return std::get<1>(*this); }
50 const Bead *bead3() { return std::get<2>(*this); }
51
53 Eigen::Vector3d &r12() { return r12_; }
54 Eigen::Vector3d &r13() { return r13_; }
55 Eigen::Vector3d &r23() { return r23_; }
57 double &dist12() { return dist12_; }
58 double &dist13() { return dist13_; }
59 double &dist23() { return dist23_; }
60
61 protected:
62 Eigen::Vector3d r12_;
63 Eigen::Vector3d r13_;
64 Eigen::Vector3d r23_;
65 double dist12_;
66 double dist13_;
67 double dist23_;
68};
69
70} // namespace csg
71} // namespace votca
72
73#endif /* VOTCA_CSG_BEADTRIPLE_H */
A triplet of tree Beads.
Definition beadtriple.h:32
BeadTriple(Bead *bead1, Bead *bead2, Bead *bead3, Eigen::Vector3d r12, Eigen::Vector3d r13, Eigen::Vector3d r23)
Definition beadtriple.h:35
virtual ~BeadTriple()=default
double & dist12()
the distance of the beads
Definition beadtriple.h:57
Eigen::Vector3d & r23()
Definition beadtriple.h:55
const Bead * bead2()
Definition beadtriple.h:49
Eigen::Vector3d r23_
Definition beadtriple.h:64
Eigen::Vector3d & r12()
the vector connecting two beads
Definition beadtriple.h:53
const Bead * bead1()
return the beads
Definition beadtriple.h:48
Eigen::Vector3d & r13()
Definition beadtriple.h:54
const Bead * bead3()
Definition beadtriple.h:50
Eigen::Vector3d r12_
Definition beadtriple.h:62
Eigen::Vector3d r13_
Definition beadtriple.h:63
information about a bead
Definition bead.h:50
STL namespace.
base class for all analysis tools
Definition basebead.h:33