ERKALE
ERKALE - DFT from Hel
 All Classes Functions Variables Friends Pages
stockholder.h
1 /*
2  * This source code is part of
3  *
4  * E R K A L E
5  * -
6  * HF/DFT from Hel
7  *
8  * Written by Susi Lehtola, 2010-2013
9  * Copyright (c) 2010-2013, Susi Lehtola
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  */
16 
17 #ifndef ERKALE_STOCKHOLDER
18 #define ERKALE_STOCKHOLDER
19 
20 #include "hirshfeld.h"
21 #include "basis.h"
22 
32  size_t atind;
34  std::vector< std::vector<double> > rho;
36  std::vector< std::vector<double> > weights;
38  std::vector< std::vector<coords_t> > grid;
39 
41  void compute(const BasisSet & basis, const arma::mat & P, const std::vector<double> & shran, const std::vector<size_t> & compute_shells, double dr, size_t irad, int lmax);
42 
44  double average(const Hirshfeld & hirsh, size_t irad) const;
45 
46  public:
51 
53  void fill_adaptive(const BasisSet & basis, const arma::mat & P, const Hirshfeld & hirsh, size_t atind, double dr, int nrad, int lmax, double tol, bool verbose);
55  void fill_static(const BasisSet & basis, const arma::mat & P, size_t atind, double dr, int nrad, int l, bool verbose);
56 
58  void update(const Hirshfeld & hirsh, std::vector<double> & rho);
59 };
60 
62 class Stockholder {
64  std::vector<StockholderAtom> atoms;
66  std::vector<coords_t> cen;
67 
70 
71  public:
73  Stockholder(const BasisSet & basis, const arma::mat & P, double tol=1e-5, double dr=0.01, int nrad=851, int l0=3, int lmax=131, bool verbose=true);
75  ~Stockholder();
76 
78  Hirshfeld get() const;
79 };
80 
81 #endif
std::vector< std::vector< double > > rho
List of molecular densities.
Definition: stockholder.h:34
std::vector< StockholderAtom > atoms
Atomic grids.
Definition: stockholder.h:64
Hirshfeld ISA
Spherical atoms.
Definition: stockholder.h:69
Stockholder grid.
Definition: stockholder.h:62
~StockholderAtom()
Destructor.
Definition: stockholder.cpp:29
std::vector< coords_t > cen
Atom centers.
Definition: stockholder.h:66
void fill_static(const BasisSet &basis, const arma::mat &P, size_t atind, double dr, int nrad, int l, bool verbose)
Static fill of the grid.
Definition: stockholder.cpp:204
std::vector< std::vector< double > > weights
and weights
Definition: stockholder.h:36
void update(const Hirshfeld &hirsh, std::vector< double > &rho)
Compute a new radial density.
Definition: stockholder.cpp:278
size_t atind
Atom index.
Definition: stockholder.h:32
~Stockholder()
Destructor.
Definition: stockholder.cpp:451
void compute(const BasisSet &basis, const arma::mat &P, const std::vector< double > &shran, const std::vector< size_t > &compute_shells, double dr, size_t irad, int lmax)
Compute molecular density on radial shell.
Definition: stockholder.cpp:32
Basis set.
Definition: basis.h:187
void fill_adaptive(const BasisSet &basis, const arma::mat &P, const Hirshfeld &hirsh, size_t atind, double dr, int nrad, int lmax, double tol, bool verbose)
Adaptively fill the grid.
Definition: stockholder.cpp:109
std::vector< std::vector< coords_t > > grid
and grid points
Definition: stockholder.h:38
StockholderAtom()
Constructor.
Definition: stockholder.cpp:26
Hirshfeld atomic densities.
Definition: hirshfeld.h:59
double average(const Hirshfeld &hirsh, size_t irad) const
Compute average.
Definition: stockholder.cpp:259
Stockholder(const BasisSet &basis, const arma::mat &P, double tol=1e-5, double dr=0.01, int nrad=851, int l0=3, int lmax=131, bool verbose=true)
Constructor. Tolerance for change in the integral .
Definition: stockholder.cpp:291
Definition: stockholder.h:30