votca 2024.2-dev
Loading...
Searching...
No Matches
nblistgrid_3body.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_NBLISTGRID_3BODY_H
19#define VOTCA_CSG_NBLISTGRID_3BODY_H
20
21// Standard includes
22#include <vector>
23
24// Local VOTCA includes
25#include "nblist_3body.h"
26
27namespace votca {
28namespace csg {
29
31 public:
32 void Generate(BeadList &list1, BeadList &list2, BeadList &list3,
33 bool do_exclusions = true) override;
34 void Generate(BeadList &list1, BeadList &list2,
35 bool do_exclusions = true) override;
36 void Generate(BeadList &list, bool do_exclusions = true) override;
37
38 protected:
45
46 Eigen::Vector3d box_a_, box_b_, box_c_;
47 Eigen::Vector3d norm_a_, norm_b_, norm_c_;
49
50 std::vector<cell_t> grid_;
51
52 void InitializeGrid(const Eigen::Matrix3d &box);
53
54 cell_t &getCell(const Eigen::Vector3d &r);
55 cell_t &getCell(const Index &a, const Index &b, const Index &c);
56
57 void TestBead(const Topology &top, cell_t &cell, Bead *bead);
58};
59
61 const Index &b,
62 const Index &c) {
63 return grid_[a + box_Na_ * b + box_Na_ * box_Nb_ * c];
64}
65
66} // namespace csg
67} // namespace votca
68
69#endif /* VOTCA_CSG_NBLISTGRID_3BODY_H */
information about a bead
Definition bead.h:50
std::vector< cell_t > grid_
cell_t & getCell(const Eigen::Vector3d &r)
void InitializeGrid(const Eigen::Matrix3d &box)
void TestBead(const Topology &top, cell_t &cell, Bead *bead)
void Generate(BeadList &list1, BeadList &list2, BeadList &list3, bool do_exclusions=true) override
Neighbour list class for 3 body interactions.
topology of the whole system
Definition topology.h:81
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26