votca 2024.2-dev
Loading...
Searching...
No Matches
beadmotif.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#pragma once
19#ifndef VOTCA_CSG_BEADMOTIF_H
20#define VOTCA_CSG_BEADMOTIF_H
21
22// VOTCA includes
24
25// Local VOTCA includes
26#include "basebead.h"
27#include "beadstructure.h"
28
29namespace votca {
30namespace csg {
31
111class BeadMotif : public BeadStructure {
112 public:
123
124 BeadMotif() = default;
125
126 BeadMotif(const BeadStructure &structure) : BeadStructure(structure) {};
127
130
139 bool isMotifSimple();
140
150 void ConnectBeads(const Index &bead1_id, const Index &bead2_id) final;
151
152 private:
154 bool junctionsUpToDate_ = false;
155 bool type_up_to_date_ = false;
156
157 std::vector<Index> junctions_;
159
160 void UpdateOnBeadAddition_() final;
161 void InitializeGraph_();
162 bool junctionExist_();
163 void CalculateType_();
164 bool isSingle_() const noexcept;
165 bool isLine_();
166 bool isLoop_();
167 bool isFusedRing_();
168};
169} // namespace csg
170} // namespace votca
171
172#endif // VOTCA_CSG_BEADMOTIF_H
Designed determine what kind of structure a beadstructure has.
Definition beadmotif.h:111
bool isSingle_() const noexcept
Definition beadmotif.cc:72
void ConnectBeads(const Index &bead1_id, const Index &bead2_id) final
Adds a new connection to the motif.
Definition beadmotif.cc:208
MotifType getType()
Gets the motif type, calculates it first if it is not yet known.
Definition beadmotif.cc:191
bool isMotifSimple()
Determines if the motif type is a simple type.
Definition beadmotif.cc:199
tools::ReducedGraph reduced_graph_
Definition beadmotif.h:158
void UpdateOnBeadAddition_() final
Definition beadmotif.cc:181
std::vector< Index > junctions_
Definition beadmotif.h:157
BeadMotif(const BeadStructure &structure)
Definition beadmotif.h:126
Designed to determine if the structure beads passed in.
Contains a graph that consits of vertices with degree of 1 or greater than 3.
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26