28#ifndef _chemistry_qc_dft_integrator_h
29#define _chemistry_qc_dft_integrator_h
31#include <util/state/state.h>
32#include <util/group/thread.h>
33#include <chemistry/qc/dft/functional.h>
34#include <chemistry/qc/basis/extent.h>
35#include <chemistry/qc/wfn/density.h>
67 int n_integration_center_;
69 int compute_potential_integrals_;
77 double *nuclear_gradient);
78 void done_integration();
97 double value()
const {
return value_; }
101 double get_accuracy(
void) {
return accuracy_; }
128 double *nuclear_grad = 0) = 0;
143 void fd_w(
int icenter,
SCVector3 &point,
double *fd_grad_w);
152 void test(
int icenter,
SCVector3 &point);
163 virtual double w(
int center,
SCVector3 &point,
double *grad_w = 0) = 0;
170 int n_integration_centers;
172 double *atomic_radius;
177 void compute_grad_p(
int gc,
int ic,
int wc,
SCVector3&r,
double p,
181 double compute_t(
int ic,
int jc,
SCVector3 &point);
182 double compute_p(
int icenter,
SCVector3&point);
208 virtual int nr()
const = 0;
213 double &multiplier) = 0;
227 virtual int nw(
void)
const = 0;
228 virtual int num_angular_points(
double r_value,
int ir) = 0;
229 virtual double angular_point_cartesian(
int iangular,
double r,
298 double *x_, *y_, *z_, *w_;
315 int num_angular_points(
double r_value,
int ir);
316 double angular_point_cartesian(
int iangular,
double r,
331 double *theta_quad_weights_;
332 double *theta_quad_points_;
334 int get_ntheta(
void)
const;
335 void set_ntheta(
int i);
336 int get_nphi(
void)
const;
337 void set_nphi(
int i);
338 int get_Ktheta(
void)
const;
339 void set_Ktheta(
int i);
340 int get_ntheta_r(
void)
const;
341 void set_ntheta_r(
int i);
342 int get_nphi_r(
void)
const;
343 void set_nphi_r(
int i);
344 int get_Ktheta_r(
void)
const;
345 void set_Ktheta_r(
int i);
347 double sin_theta(
SCVector3 &point)
const;
348 void gauleg(
double x1,
double x2,
int n);
362 int num_angular_points(
double r_value,
int ir);
363 double angular_point_cartesian(
int iangular,
double r,
373 double **Alpha_coeffs_;
375 int **nr_points_, *xcoarse_l_;
376 int npruned_partitions_;
377 double *grid_accuracy_;
437 double *nuclear_gradient = 0);
440 int charge,
int deriv_order);
442 void init_default_grids(
void);
443 int angular_grid_offset(
int i);
444 void set_grids(
void);
445 int get_atomic_row(
int i);
446 void init_parameters(
void);
448 void init_pruning_coefficients(
const Ref<KeyVal>& keyval);
449 void init_pruning_coefficients(
void);
450 void init_alpha_coefficients(
void);
451 int select_dynamic_grid(
void);
An abstract base class for angular integrators.
Definition integrator.h:218
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:168
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:40
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 > &)
Calls the overloaded init routine with a GaussianBasisSet and a Integral object extracted from the gi...
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.
DenIntegrator(StateIn &)
Construct a new DenIntegrator given the StateIn data.
const Ref< Integral > & integral() const
Returns the integral object that defines the basis function ordering, etc.
Definition integrator.h:95
DenIntegrator()
Construct a new DenIntegrator.
const double * alpha_vmat() const
Returns the alpha potential integrals.
Definition integrator.h:107
virtual void init(const Ref< GaussianBasisSet > &, const Ref< Integral > &)
Called before integrate.
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.
bool spin_polarized() const
Return true if the densities are spin polarized.
Definition integrator.h:131
double value() const
Returns the result of the integration.
Definition integrator.h:97
const Ref< GaussianBasisSet > & basis() const
Returns the basis set used for the density.
Definition integrator.h:92
const double * beta_vmat() const
Returns the beta potential integrals.
Definition integrator.h:110
An implementation of a radial integrator using the Euler-Maclaurin weights and grid points.
Definition integrator.h:236
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.
int nr() const
The number of quadrature points (redundant since radial_value takes this as a parameter)
double radial_value(int ir, int nr, double radii, double &multiplier)
returns the radius for the quadrature point ir.
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:323
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:136
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:295
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:370
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:197
virtual int nr() const =0
The number of quadrature points (redundant since radial_value takes this as a parameter)
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual double radial_value(int ir, int nr, double radii, double &multiplier)=0
returns the radius for the quadrature point ir.
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition matrix.h:265
A template class that maintains references counts.
Definition ref.h:361
a 3-element version of SCVector
Definition vector3.h:44
Base class for objects that can save/restore state.
Definition state.h:45
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
Contains all MPQC code up to version 3.
Definition mpqcin.h:14