votca 2024.2-dev
Loading...
Searching...
No Matches
nblistgrid.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_H
19#define VOTCA_CSG_NBLISTGRID_H
20
21// Standard includes
22#include <vector>
23
24// VOTCA includes
25#include <votca/tools/eigen.h>
26
27// Local VOTCA includes
28#include "nblist.h"
30
31namespace votca {
32namespace csg {
33
34class NBListGrid : public NBList {
35 public:
36 void Generate(BeadList &list1, BeadList &list2,
37 bool do_exclusions = true) override;
38 void Generate(BeadList &list, bool do_exclusions = true) override;
39
40 protected:
41 struct cell_t {
43 std::vector<cell_t *> neighbours_;
44 };
45
46 Eigen::Vector3d box_a_, box_b_, box_c_;
47 Eigen::Vector3d norm_a_, norm_b_, norm_c_;
49
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 void TestCell(const Topology &top, cell_t &cell, Bead *bead);
59};
60
61} // namespace csg
62} // namespace votca
63
64#endif /* VOTCA_CSG_NBLISTGRID_H */
information about a bead
Definition bead.h:50
Eigen::Vector3d box_a_
Definition nblistgrid.h:46
void TestBead(const Topology &top, cell_t &cell, Bead *bead)
tools::NDimVector< cell_t, 3 > grid_
Definition nblistgrid.h:50
Eigen::Vector3d norm_a_
Definition nblistgrid.h:47
void TestCell(const Topology &top, cell_t &cell, Bead *bead)
Eigen::Vector3d norm_c_
Definition nblistgrid.h:47
Eigen::Vector3d norm_b_
Definition nblistgrid.h:47
cell_t & getCell(const Eigen::Vector3d &r)
Eigen::Vector3d box_c_
Definition nblistgrid.h:46
void InitializeGrid(const Eigen::Matrix3d &box)
Definition nblistgrid.cc:71
Eigen::Vector3d box_b_
Definition nblistgrid.h:46
void Generate(BeadList &list1, BeadList &list2, bool do_exclusions=true) override
Generate the neighbour list based on two bead lists (e.g. bead types)
Definition nblistgrid.cc:28
cell_t & getCell(const Index &a, const Index &b, const Index &c)
Neighbour list class.
Definition nblist.h:39
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
std::vector< cell_t * > neighbours_
Definition nblistgrid.h:43