pyscf icon indicating copy to clipboard operation
pyscf copied to clipboard

spherical averaged dft

Open binghuang2018 opened this issue 4 years ago • 3 comments

Is it possible to run spherically-averaged DFT, much the same as for spherically-averaged HF using the current implementation of PySCF? Or I have to modify the relevant code for HF to suit my purpose?

binghuang2018 avatar Jul 31 '21 09:07 binghuang2018

[from Qiming Sun's reply by email]

Is it an atomic calculation? pyscf/scf/atom_hf.py can handle spherically averaged HF calculations. It does not support DFT. Extending this module is not difficult. You would like pseudo code as below

class SphericalDFT(rks.RKS, atom_hf.AtomSphericAverageRHF):
    def __init__(self, mol, *args, **kwargs):
        atom_hf.AtomSphericAverageRHF.__init__(self, mol)
        rks.RKS.__init__(self, mol, *args, **kwargs)

    eig = atom_hf.AtomSphericAverageRHF.eig

    get_occ = atom_hf.AtomSphericAverageRHF.get_occ

    get_grad = atom_hf.AtomSphericAverageRHF.get_grad

For molecules, there are some functions to manipulate the occupancy for SCF in pyscf/scf/addons.py e.g. frac_occ_ allows to assign fractional occupancies for degenerated orbitals. Some helper functions have examples in examples/scf.

binghuang2018 avatar Jul 31 '21 09:07 binghuang2018

Bing: can you put this on pyscf/pyscf? I'd like to open assign this as feature request.

gkc1000 avatar Aug 02 '21 03:08 gkc1000

Sure thing!

On Mon, 2 Aug 2021 at 05:09, gkc1000 @.***> wrote:

Bing: can you put this on pyscf/pyscf? I'd like to open assign this as feature request.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/sunqm/pyscf/issues/17#issuecomment-890677795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKUND5WROVSCUNSPKUY3D3LT2YEALANCNFSM5BJ2STPQ .

binghuang2018 avatar Aug 02 '21 08:08 binghuang2018