8000 Provide initial guess for SCF step · Issue #8 · ajz34/dh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Provide initial guess for SCF step #8
Open
@jeanwsr

Description

@jeanwsr

dh/pyscf/dh/rdfdh.py

Lines 50 to 56 in 2ac67ac

def energy_elec_nc(mf: RDFDH, mo_coeff=None, h1e=None, vhf=None, **_):
if mo_coeff is None:
if mf.mf_s.e_tot == 0:
mf.run_scf()
if mf.xc_n is None: # if bDH-like functional, just return 572A SCF energy
return mf.mf_s.e_tot - mf.mf_s.energy_nuc(), None
mo_coeff = mf.mf_s.mo_coeff

Since kwargs are not passed to run_scf, so currently it's not possible to pass initial guess, is it?

So I'm wondering which solution is preferred: allow users passing dm0 in as kwargs, or encourage users running mf.mf_s manually after DH initialized?

An even more flexible implementation could be allow initializing upon mf_or_mol, like

https://github.com/pyscf/pyscf/blob/0785373fb5f11105bc41743565cf4b7e13464c92/pyscf/mcscf/casci.py#L779

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0