28#ifndef _chemistry_qc_dft_integrator_h
29#define _chemistry_qc_dft_integrator_h
35#include <util/state/state.h>
36#include <util/group/thread.h>
37#include <chemistry/qc/dft/functional.h>
38#include <chemistry/qc/basis/extent.h>
39#include <chemistry/qc/wfn/density.h>
69 int n_integration_center_;
71 int compute_potential_integrals_;
79 double *nuclear_gradient);
80 void done_integration();
96 double value()
const {
return value_; }
100 double get_accuracy(
void) {
return accuracy_; }
122 double *nuclear_grad = 0) = 0;
161 int n_integration_centers;
163 double *atomic_radius;
168 void compute_grad_p(
int gc,
int ic,
int wc,
SCVector3&r,
double p,
198 virtual int nr()
const = 0;
199 virtual double radial_value(
int ir,
int nr,
double radii,
200 double &multiplier) = 0;
214 virtual int nw(
void)
const = 0;
215 virtual int num_angular_points(
double r_value,
int ir) = 0;
216 virtual double angular_point_cartesian(
int iangular,
double r,
236 double radial_value(
int ir,
int nr,
double radii,
double &multiplier);
285 double *x_, *y_, *z_, *w_;
302 int num_angular_points(
double r_value,
int ir);
303 double angular_point_cartesian(
int iangular,
double r,
318 double *theta_quad_weights_;
319 double *theta_quad_points_;
321 int get_ntheta(
void)
const;
322 void set_ntheta(
int i);
323 int get_nphi(
void)
const;
324 void set_nphi(
int i);
325 int get_Ktheta(
void)
const;
326 void set_Ktheta(
int i);
327 int get_ntheta_r(
void)
const;
328 void set_ntheta_r(
int i);
329 int get_nphi_r(
void)
const;
330 void set_nphi_r(
int i);
331 int get_Ktheta_r(
void)
const;
332 void set_Ktheta_r(
int i);
335 void gauleg(
double x1,
double x2,
int n);
349 int num_angular_points(
double r_value,
int ir);
350 double angular_point_cartesian(
int iangular,
double r,
360 double **Alpha_coeffs_;
362 int **nr_points_, *xcoarse_l_;
363 int npruned_partitions_;
364 double *grid_accuracy_;
424 double *nuclear_gradient = 0);
427 int charge,
int deriv_order);
429 void init_default_grids(
void);
430 int angular_grid_offset(
int i);
431 void set_grids(
void);
432 int get_atomic_row(
int i);
433 void init_parameters(
void);
435 void init_pruning_coefficients(
const Ref<KeyVal>& keyval);
436 void init_pruning_coefficients(
void);
437 void init_alpha_coefficients(
void);
438 int select_dynamic_grid(
void);
An abstract base class for angular integrators.
Definition: integrator.h:205
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Implements Becke's integration weight scheme.
Definition: integrator.h:159
double w(int center, SCVector3 &point, double *grad_w=0)
Computes the weight for a given center at a given point in space.
void init(const Ref< Molecule > &, double tolerance)
Initialize the integration weight object.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void done()
Called when finished with the integration weight object.
An abstract base class for integrating the electron density.
Definition: integrator.h:44
void set_accuracy(double a)
Sets the accuracy to use in the integration.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
DenIntegrator(const Ref< KeyVal > &)
Construct a new DenIntegrator given the KeyVal input.
virtual void init(const Ref< Wavefunction > &)
Called before integrate.
virtual void integrate(const Ref< DenFunctional > &, const RefSymmSCMatrix &densa=0, const RefSymmSCMatrix &densb=0, double *nuclear_grad=0)=0
Performs the integration of the given functional using the given alpha and beta density matrices.
Ref< Wavefunction > wavefunction() const
Returns the wavefunction used for the integration.
Definition: integrator.h:94
DenIntegrator(StateIn &)
Construct a new DenIntegrator given the StateIn data.
DenIntegrator()
Construct a new DenIntegrator.
const double * alpha_vmat() const
Returns the alpha potential integrals.
Definition: integrator.h:106
virtual void done()
Must be called between calls to init.
void set_compute_potential_integrals(int)
Call with non zero if the potential integrals are to be computed.
double value() const
Returns the result of the integration.
Definition: integrator.h:96
const double * beta_vmat() const
Returns the beta potential integrals.
Definition: integrator.h:109
An implementation of a radial integrator using the Euler-Maclaurin weights and grid points.
Definition: integrator.h:223
void print(std::ostream &=ExEnv::out0()) const
Print the object.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
EulerMaclaurinRadialIntegrator(const Ref< KeyVal > &)
Constructs a EulerMaclaurinRadialIntegrator from KeyVal input.
static std::ostream & out0()
Return an ostream that writes from node 0.
An implementation of an angular integrator using the Gauss-Legendre weights and grid points.
Definition: integrator.h:310
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print(std::ostream &=ExEnv::out0()) const
Print the object.
GaussLegendreAngularIntegrator(const Ref< KeyVal > &)
Contract a GaussLegendreAngularIntegrator from KeyVal input.
An abstract base class for computing grid weights.
Definition: integrator.h:127
virtual double w(int center, SCVector3 &point, double *grad_w=0)=0
Computes the weight for a given center at a given point in space.
virtual void done()
Called when finished with the integration weight object.
virtual void init(const Ref< Molecule > &, double tolerance)
Initialize the integration weight object.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
An implementation of a Lebedev angular integrator.
Definition: integrator.h:282
LebedevLaikovIntegrator(const Ref< KeyVal > &)
Construct a LebedevLaikovIntegrator using the given KeyVal input.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print(std::ostream &=ExEnv::out0()) const
Print the object.
An implementation of an integrator using any combination of a RadialIntegrator and an AngularIntegrat...
Definition: integrator.h:357
void integrate(const Ref< DenFunctional > &, const RefSymmSCMatrix &densa=0, const RefSymmSCMatrix &densb=0, double *nuclear_gradient=0)
Performs the integration of the given functional using the given alpha and beta density matrices.
void print(std::ostream &=ExEnv::out0()) const
Print the object.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
RadialAngularIntegrator(const Ref< KeyVal > &)
Construct a RadialAngularIntegrator from KeyVal input.
An abstract base class for radial integrators.
Definition: integrator.h:188
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:261
A template class that maintains references counts.
Definition: ref.h:332
Base class for objects that can save/restore state.
Definition: state.h:46
Restores objects that derive from SavableState.
Definition: statein.h:70
Serializes objects that derive from SavableState.
Definition: stateout.h:61