Class GB1DMGridMGGAFn

Inheritance Relationships

Base Type

Class Documentation

class GB1DMGridMGGAFn : public GB1DMGridFn

Compute MGGA properties on a grid: density, gradient, laplacian and kinetic energy density.

Content of work_basis (at one grid point): [0] Basis function value. [1] Basis function derivative toward x. [2] Basis function derivative toward y. [3] Basis function derivative toward z. [4] Basis function Laplacian. Content of the argument ‘output’ and the energy derivative in ‘pot’ (at one grid point): [0] Density. [1] Density derivative toward x. [2] Density derivative toward y. [3] Density derivative toward z. [4] Laplacian of the density. [5] Kinetic energy density.

Public Functions

GB1DMGridMGGAFn(long max_shell_type)

Construct a GB1DMGridMGGAFn object.

Parameters
  • max_shell_type: The maximum shell type in the basis set.

virtual void reset(long shell_type0, const double *r0, const double *point)

Reset calculator for a new contraction.

Parameters
  • shell_type0: Shell type of contraction.
  • r0: Center of the contraction. (size=3)
  • point: Cartesian coordinates of the grid point. (size=3)

virtual void add(double coeff, double alpha0, const double *scales0)

Add contributions to work array for current grid point and given primitive shell.

(See base class for more details.)

virtual void compute_point_from_dm(double *work_basis, double *dm, long nbasis, double *output, double epsilon, double *dmmaxrow)

Compute the final result on one grid point.

Parameters
  • work_basis: Properties of basis functions computed for the current grid point. (Work done by add method.) (size=nbasis*dim_work)
  • dm: The coefficients of the first-order density matrix. (size=nbasis*nbasis)
  • nbasis: The number of basis functions.
  • output: The output array for the current grid point. (size=dim_output)
  • epsilon: A cutoff value used to discard small contributions.
  • dmmaxrow: The maximum value of the density matrix on each row. (size=nbasis)

virtual void compute_fock_from_pot(double *pot, double *work_basis, long nbasis, double *fock)

Add contribution to Fock matrix from one grid point.

The chain rule is used to transform grid potential data (in one point, see reset method) into a Fock matrix contribution.

Parameters
  • pot: The value of the potential at the grid point. This may be multiple values, e.g in case of GGA, this contains four elements: the functional derivative of the energy w.r.t. the density and the components of the gradient. (size=dim_output)
  • work_basis: Properties of the orbital basis in the current grid point, typically the value of the basis function and optionally first or second derivatives toward x, y and z, all evaluated in point (see reset method). (size=nbasis*dim_work)
  • nbasis: The number of basis functions.
  • fock: The Fock matrix to which the result will be added. (size=nbasis*nbasis)