votca 2024.2-dev
Loading...
Searching...
No Matches
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_GRID_H
22#define VOTCA_XTP_GRID_H
23
24// Standard includes
25#include <string>
26#include <vector>
27
28// Local VOTCA includes
29#include "logger.h"
30#include "qmatom.h"
31#include "qmmolecule.h"
39namespace votca {
40namespace xtp {
41
42class Grid {
43 public:
44 const std::vector<Eigen::Vector3d> &getGridPositions() const {
45 return gridpoints_;
46 }
47
48 Eigen::VectorXd &getGridValues() { return gridvalues_; }
49 const Eigen::VectorXd &getGridValues() const { return gridvalues_; }
50 Index size() { return Index(gridpoints_.size()); }
51
52 void printGridtoxyzfile(std::string filename);
53
54 void setupCHELPGGrid(const QMMolecule &Atomlist) {
55 padding_ = 3 * tools::conv::ang2bohr; // Additional distance from molecule
56 // to set up grid according to CHELPG
57 // paper [Journal of Computational
58 // Chemistry 11, 361, 1990]
60 0.3 * tools::conv::ang2bohr; // Grid spacing according to same paper
62 setupgrid(Atomlist);
63 }
64
65 private:
66 void setupgrid(const QMMolecule &Atomlist);
67 std::vector<Eigen::Vector3d> gridpoints_;
68 Eigen::VectorXd gridvalues_;
69
70 double cutoff_;
72 double padding_;
73};
74
75} // namespace xtp
76} // namespace votca
77
78#endif // VOTCA_XTP_GRID_H
double gridspacing_
Definition grid.h:71
std::vector< Eigen::Vector3d > gridpoints_
Definition grid.h:67
Eigen::VectorXd gridvalues_
Definition grid.h:68
double cutoff_
Definition grid.h:70
void setupgrid(const QMMolecule &Atomlist)
Definition grid.cc:48
void setupCHELPGGrid(const QMMolecule &Atomlist)
Definition grid.h:54
double padding_
Definition grid.h:72
Eigen::VectorXd & getGridValues()
Definition grid.h:48
void printGridtoxyzfile(std::string filename)
Definition grid.cc:33
Index size()
Definition grid.h:50
const std::vector< Eigen::Vector3d > & getGridPositions() const
Definition grid.h:44
const Eigen::VectorXd & getGridValues() const
Definition grid.h:49
const double ang2bohr
Definition constants.h:48
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26