votca 2024.2-dev
Loading...
Searching...
No Matches
regular_grid.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#pragma once
21#ifndef VOTCA_XTP_REGULAR_GRID_H
22#define VOTCA_XTP_REGULAR_GRID_H
23
24// Local VOTCA includes
25#include "gridbox.h"
26
27namespace votca {
28namespace xtp {
29class QMMolecule;
30class aobasis;
31
33 public:
34 void GridSetup(const Eigen::Array<Index, 3, 1>& steps,
35 const Eigen::Array3d& padding, const QMMolecule& atoms,
36 const AOBasis& basis);
37
38 void GridSetup(const Eigen::Array3d& stepsize, const Eigen::Array3d& padding,
39 const QMMolecule& atoms, const AOBasis& basis);
40
41 Index getGridSize() const { return totalgridsize_; }
42 Index getBoxesSize() const { return Index(grid_boxes_.size()); }
43
44 const GridBox& operator[](Index index) const { return grid_boxes_[index]; }
45 GridBox& operator[](Index index) { return grid_boxes_[index]; }
46
47 std::vector<GridBox>::iterator begin() { return grid_boxes_.begin(); }
48 std::vector<GridBox>::iterator end() { return grid_boxes_.end(); }
49
50 std::vector<GridBox>::const_iterator begin() const {
51 return grid_boxes_.begin();
52 }
53 std::vector<GridBox>::const_iterator end() const { return grid_boxes_.end(); }
54
55 Eigen::Array3d getStepSizes() const { return stepsizes_; }
56
57 Eigen::Vector3d getStartingPoint() const { return startingpoint_; }
58
59 Eigen::Array<Index, 3, 1> getSteps() const { return steps_; }
60
61 private:
63 std::vector<GridBox> grid_boxes_;
64
65 Eigen::Array3d stepsizes_ = Eigen::Array3d::Zero();
66 Eigen::Vector3d startingpoint_ = Eigen::Vector3d::Zero();
67 Eigen::Array<Index, 3, 1> steps_ = Eigen::Array<Index, 3, 1>::Zero();
68};
69
70} // namespace xtp
71} // namespace votca
72#endif // VOTCA_XTP_REGULAR_GRID_H
Container to hold Basisfunctions for all atoms.
Definition aobasis.h:42
const GridBox & operator[](Index index) const
Eigen::Vector3d getStartingPoint() const
Eigen::Array< Index, 3, 1 > getSteps() const
void GridSetup(const Eigen::Array< Index, 3, 1 > &steps, const Eigen::Array3d &padding, const QMMolecule &atoms, const AOBasis &basis)
Eigen::Array3d stepsizes_
Eigen::Array3d getStepSizes() const
std::vector< GridBox > grid_boxes_
std::vector< GridBox >::iterator end()
std::vector< GridBox >::const_iterator end() const
std::vector< GridBox >::const_iterator begin() const
GridBox & operator[](Index index)
Eigen::Vector3d startingpoint_
Eigen::Array< Index, 3, 1 > steps_
std::vector< GridBox >::iterator begin()
Index getBoxesSize() const
Index getGridSize() const
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26