votca 2024.2-dev
Loading...
Searching...
No Matches
vxc_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_VXC_GRID_H
22#define VOTCA_XTP_VXC_GRID_H
23
24// Local VOTCA includes
25#include "grid_containers.h"
26#include "gridbox.h"
27
28namespace votca {
29namespace xtp {
30class LebedevGrid;
31class QMMolecule;
32class aobasis;
33
34class Vxc_Grid {
35 public:
36 void GridSetup(const std::string& type, const QMMolecule& atoms,
37 const AOBasis& basis);
38
39 std::vector<const Eigen::Vector3d*> getGridpoints() const;
40 std::vector<double> getWeightedDensities() const;
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 typename std::vector<GridBox>::iterator begin() {
48 return grid_boxes_.begin();
49 }
50 typename std::vector<GridBox>::iterator end() { return grid_boxes_.end(); }
51
52 typename std::vector<GridBox>::const_iterator begin() const {
53 return grid_boxes_.begin();
54 }
55 typename std::vector<GridBox>::const_iterator end() const {
56 return grid_boxes_.end();
57 }
58
59 private:
60 void FindSignificantShells(const AOBasis& basis);
61
62 double erf1c(double x) const;
63
65 const std::vector<std::vector<GridContainers::Cartesian_gridpoint> >&
66 grid);
67
68 Eigen::MatrixXd CalcInverseAtomDist(const QMMolecule& atoms) const;
69 Index UpdateOrder(LebedevGrid& sphericalgridofElement, Index maxorder,
70 std::vector<double>& PruningIntervals, double r) const;
71
73 const Eigen::Vector3d& atomA_pos,
74 GridContainers::radial_grid& radial_grid,
75 GridContainers::spherical_grid& spherical_grid, Index i_rad,
76 Index i_sph) const;
77
78 Eigen::VectorXd SSWpartition(const Eigen::VectorXd& rq_i,
79 const Eigen::MatrixXd& Rij) const;
81 const QMMolecule& atoms,
82 std::vector<GridContainers::Cartesian_gridpoint>& atomgrid, Index i_atom,
83 const Eigen::MatrixXd& Rij) const;
84 Eigen::MatrixXd CalcDistanceAtomsGridpoints(
85 const QMMolecule& atoms,
86 std::vector<GridContainers::Cartesian_gridpoint>& atomgrid) const;
87
89 std::vector<GridBox> grid_boxes_;
90 bool density_set_ = false;
91};
92
93} // namespace xtp
94} // namespace votca
95#endif // VOTCA_XTP_VXC_GRID_H
Container to hold Basisfunctions for all atoms.
Definition aobasis.h:42
void FindSignificantShells(const AOBasis &basis)
Definition vxc_grid.cc:76
GridContainers::Cartesian_gridpoint CreateCartesianGridpoint(const Eigen::Vector3d &atomA_pos, GridContainers::radial_grid &radial_grid, GridContainers::spherical_grid &spherical_grid, Index i_rad, Index i_sph) const
Definition vxc_grid.cc:176
Eigen::VectorXd SSWpartition(const Eigen::VectorXd &rq_i, const Eigen::MatrixXd &Rij) const
Definition vxc_grid.cc:298
GridBox & operator[](Index index)
Definition vxc_grid.h:45
std::vector< GridBox >::iterator begin()
Definition vxc_grid.h:47
std::vector< double > getWeightedDensities() const
Index getGridSize() const
Definition vxc_grid.h:41
std::vector< GridBox > grid_boxes_
Definition vxc_grid.h:89
std::vector< GridBox >::const_iterator begin() const
Definition vxc_grid.h:52
std::vector< GridBox >::const_iterator end() const
Definition vxc_grid.h:55
std::vector< GridBox >::iterator end()
Definition vxc_grid.h:50
void GridSetup(const std::string &type, const QMMolecule &atoms, const AOBasis &basis)
Definition vxc_grid.cc:229
Index getBoxesSize() const
Definition vxc_grid.h:42
Index UpdateOrder(LebedevGrid &sphericalgridofElement, Index maxorder, std::vector< double > &PruningIntervals, double r) const
Definition vxc_grid.cc:138
void SortGridpointsintoBlocks(const std::vector< std::vector< GridContainers::Cartesian_gridpoint > > &grid)
Definition vxc_grid.cc:31
const GridBox & operator[](Index index) const
Definition vxc_grid.h:44
std::vector< const Eigen::Vector3d * > getGridpoints() const
Definition vxc_grid.cc:113
Eigen::MatrixXd CalcDistanceAtomsGridpoints(const QMMolecule &atoms, std::vector< GridContainers::Cartesian_gridpoint > &atomgrid) const
Definition vxc_grid.cc:192
void SSWpartitionAtom(const QMMolecule &atoms, std::vector< GridContainers::Cartesian_gridpoint > &atomgrid, Index i_atom, const Eigen::MatrixXd &Rij) const
Definition vxc_grid.cc:207
Eigen::MatrixXd CalcInverseAtomDist(const QMMolecule &atoms) const
Definition vxc_grid.cc:125
double erf1c(double x) const
Definition vxc_grid.cc:335
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26