sc::BatchElectronDensity(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’– sc::BatchElectronDensity(3) πŸ’–

okay bestie, this is the MPQC manual page for sc::BatchElectronDensity, and it’s giving β€œhighly optimized electron density, but read the caveats.” No cap, every detail is down below. It Inherits sc::Volume. ✨


πŸ¦‹ NAME πŸ¦‹

sc::BatchElectronDensity β€” this is more highly optimized than ElectronDensity since everything is precomputed.

🌈 SYNOPSIS 🌈

#include <density.h>

Inherits sc::Volume.

✨ Public Types ✨

  • enum { X =0, Y =1, Z =2 } β€” this gives the elements of gradient arrays.
  • enum { XX =0, YX =1, YY =2, ZX =3, ZY =4, ZZ =5 } β€” this gives the elements of hessian arrays.

🫢 Public Member Functions 🫢

  • BatchElectronDensity (const Ref< KeyVal > &)
  • BatchElectronDensity (const Ref< Wavefunction > &, double accuracy=DBL_EPSILON)
  • BatchElectronDensity (const Ref< BatchElectronDensity > &d, bool reference_parent_data=false) β€” this will construct copies of this.
  • virtual void boundingbox (double valuemin, double valuemax, SCVector3 &p1, SCVector3 &p2) β€” returns the bounding box.
  • void clear () β€” this will cause all the stratch storage to be released.
  • void compute_density (const SCVector3 &r, double *alpha_density, double *alpha_density_grad, double *alpha_density_hessian, double *beta_density, double *beta_density_grad, double *beta_density_hessian) β€” this is an alternate to the Volume interface that avoids some of the overhead of that interface.
  • virtual void init (bool initialize_density_matrices=true) β€” this is called to finish initialization of the object.
  • virtual void set_densities (const RefSymmSCMatrix &aden, const RefSymmSCMatrix &bden) β€” this will fill in the internal copies of the density matrices with new values.
  • void set_linear_scaling (bool b) β€” turn linear scaling algorithm on/off.
  • void set_accuracy (double a) β€” sets the accuracy.
  • void set_use_dmat_bound (bool b) β€” turn use of density matrix bounds on/off.

πŸ”₯ DFT Support Members πŸ”₯

These return some of the internal data, and some of it only has value after a density has been computed. This data is needed by the density functional theory code. πŸ’…

  • double * alpha_density_matrix () β€” return the alpha density matrix.
  • double * beta_density_matrix () β€” return the beta density matrix.
  • int ncontrib ()
  • int * contrib ()
  • int ncontrib_bf ()
  • int * contrib_bf ()
  • double * bs_values ()
  • double * bsg_values ()
  • double * bsh_values ()
  • void set_need_basis_gradient (bool b) β€” to ensure that the basis functions gradients are computed, use this.
  • void set_need_basis_hessian (bool b)

🧚 Protected Member Functions 🧚

  • virtual void init_common_data (bool initialize_density_matrices)
  • virtual void init_scratch_data ()
  • void compute_basis_values (const SCVector3 &r)
  • void compute_spin_density (const double *dmat, double *rho, double *grad, double *hess)
  • virtual void compute () β€” recompute at least the results that have compute true and are not already computed.

πŸ“ Protected Attributes πŸ“

  • Ref< Wavefunction > wfn_
  • Ref< GaussianBasisSet > basis_
  • double * alpha_dmat_
  • double * beta_dmat_
  • double * dmat_bound_
  • ShellExtent * extent_
  • GaussianBasisSet::ValueData * valdat_
  • int ncontrib_
  • int * contrib_
  • int ncontrib_bf_
  • int * contrib_bf_
  • double * bs_values_
  • double * bsg_values_
  • double * bsh_values_
  • int nshell_
  • int nbasis_
  • int spin_polarized_
  • int linear_scaling_
  • int use_dmat_bound_
  • bool need_hessian_
  • bool need_gradient_
  • bool need_basis_hessian_
  • bool need_basis_gradient_
  • bool using_shared_data_
  • double accuracy_

🌸 Additional Inherited Members 🌸

This section is here; no extra inherited members are listed under it on this page. 🫢

πŸ‘‘ Detailed Description πŸ‘‘

okay so sc::BatchElectronDensity is more highly optimized than ElectronDensity since everything is precomputed. Iconic, honestly.

⚠️ But it cannot be used if the density and/or geometry might change between computations of the density or bounding box, unless the obsolete member is called. That part is important, bestie β€” do not ignore it. 😭

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

sc::BatchElectronDensity::BatchElectronDensity (const Ref< BatchElectronDensity > & d, bool reference_parent_data = false)

This will construct copies of this. If reference_parent_data is true, then data that does not change, such as the density matrices and shell extent, are referenced rather than copied. In this case, the original object that allocated these items must be valid while copied objects are used to compute densities. Also d must have already been initialized, and the resulting copy is already initialized (and cannot be reinitialized).

If reference_parent_data is false, then init must be called on this object before it is used.

⭐ Member Function Documentation ⭐

virtual void sc::BatchElectronDensity::compute () [protected], [virtual]

Recompute at least the results that have compute true and are not already computed. This should only be called by Result's members.

Implements sc::Volume.

virtual void sc::BatchElectronDensity::init (bool initialize_density_matrices = true) [virtual]

This is called to finish initialization of the object. It must not be called with objects that were created in a way that they share parent data; those objects are initialized when they are constructed. This member is usually called automatically, however, if it will be used to initialize other objects that share parent data, then it must be initialized first and this return is the way to do that. If initialize_density_matrices is false, then the density matrices will be allocated, but not filled in. They must be later filled in with set_densities.

void sc::BatchElectronDensity::set_accuracy (double a) [inline]

Sets the accuracy.

virtual void sc::BatchElectronDensity::set_densities (const RefSymmSCMatrix & aden, const RefSymmSCMatrix & bden) [virtual]

This will fill in the internal copies of the density matrices with new values. aden is the alpha density matrix and bden is the beta density matrix. bden is ignored if the wavefunction is not spin polarized.

void sc::BatchElectronDensity::set_linear_scaling (bool b) [inline]

Turn linear scaling algorithm on/off. The effect of this will be delayed until the next time init() is called.

🫢 Author 🫢

Generated automatically by Doxygen for MPQC from the source code.


okay bestie, that’s the whole page 🫢 β€” sc::BatchElectronDensity(3), Version 2.3.1, dated Sun Oct 4 2020, straight from MPQC’s source-code / Doxygen situation. slay responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from