Class GB1DMGridGradientFn¶
- Defined in File fns.h
Inheritance Relationships¶
Base Type¶
public GB1DMGridFn
(Class GB1DMGridFn)
Derived Type¶
public GB1DMGridGGAFn
(Class GB1DMGridGGAFn)
Class Documentation¶
-
class
GB1DMGridGradientFn
: public GB1DMGridFn¶ Compute gradient of the electron density on a grid.
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. Content of the argument ‘output’ and the energy derivative in ‘pot’ (at one grid point): [0] Density derivative toward x. [1] Density derivative toward y. [2] Density derivative toward z.
Subclassed by GB1DMGridGGAFn
Public Functions
-
GB1DMGridGradientFn
(long max_shell_type)¶ Construct a GB1DMGridGradientFn object.
- Parameters
max_shell_type
: The maximum shell type in the basis set.
-
GB1DMGridGradientFn
(long max_shell_type, long dim_output)¶ Construct a GB1DMGridGradientFn object.
- Parameters
max_shell_type
: The maximum shell type in the basis set.dim_output
: The number of results for each grid point. This may be different from 3 for derived classes.
-
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 inpoint
(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)
-