Skip to content

Handling of linear dependences #436

@agoetz

Description

@agoetz

Revisit how basis set linear dependences are handled by QUICK. Along the way clean up and refactor code that computes the overlap matrix and the transformation matrix for canonical orthogonalization. The corresponding code is in quick_overlap_module.f90.

A few initial points to note:

  • For CUDA, we call cuda_diag to diagonalize the overlap matrix. It works technically because we pass a unit matrix as "transformation matrix" but we should not call this function (see below) and instead do just a diagonalization.
  • We appear to use a rather large threshold (overlap matrix eigenvalues smaller than 1e-4) to remove (near) linear dependencies.
  • We should check the code for computing the transformation matrix.

The cuda_diag function was written to solve a generalized eigenvalue problem in non-orthogonal basis. It does all of the following

  • Upload operator and transformation matrices O and X to GPU
  • Symmetric orthogonalization of operator matrix O' = X(T) O X
  • Diagonalize O' to obtain eigenvectors C' and eigenvalues
  • Transform back eigenvectors C = X C' X(T)

Our code should implement

  • check for small eigenvalues of overlap matrix
  • check of condition number of overlap matrix
  • robust default settings for small eigenvalue or condition number
  • user input of those thresholds
  • canonical orthogonalization (project onto linear independent subspace)

Our code should report

  • smallest eigenvalue
  • condition number
  • what was done (i.e. how many functions were ignored or projected out)

Metadata

Metadata

Labels

Code cleanupCode cleanup or refactoringDefault settings updateA change in the value of constants or default settings

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions