Skip to content

Linear Dependency in Overlap Matrix #3005

@qstaelens

Description

@qstaelens

I'm encountering issues with linear dependencies in the basis set, leading to the following warning during the SCF procedure:

WARN: Singularity detected in overlap matrix (condition number = 2.15e+08).
SCF may be inaccurate and hard to converge.

def eig(h, s, cutoff=1e-7):
d, t = np.linalg.eigh(s)
mask = d > cutoff
x = t[:, mask] / np.sqrt(d[mask])
xhx = x.T @ h @ x
e, c = np.linalg.eigh(xhx)
c = x @ c
return e, c

mol = gto.Mole()
mol.atom = atom_block
mol.basis = '6-31++g**'
mol.spin = 0
mol.charge = 0
mol.build(verbose=0)

mf = scf.RHF(mol)
mf.verbose = 3
mf.max_cycle = 1000
mf.eig = eig
mf = addons.remove_linear_dep_(mf)
mf.scf()

Despite using addons.remove_linear_dep_, I still get the singular overlap matrix warning and unstable SCF behavior. Even after attempting to remove the smallest eigenvalues from the overlap matrix I get the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions