pyscf.pbc.grad package#
Submodules#
pyscf.pbc.grad.krhf module#
Non-relativistic analytical nuclear gradients for restricted Hartree Fock with kpoints sampling
- class pyscf.pbc.grad.krhf.Gradients(method)[source]#
Bases:
GradientsBase
Non-relativistic restricted Hartree-Fock gradients
- as_scanner()#
Generating a nuclear gradients scanner/solver (for geometry optimizer).
The returned solver is a function. This function requires one argument “cell” as input and returns energy and first order nuclear derivatives.
The solver will automatically use the results of last calculation as the initial guess of the new calculation. All parameters assigned in the nuc-grad object and SCF object (DIIS, conv_tol, max_memory etc) are automatically applied in the solver.
Note scanner has side effects. It may change many underlying objects (_scf, with_df, with_x2c, …) during calculation.
- extra_force(atom_id, envs)[source]#
Hook for extra contributions in analytical gradients.
Contributions like the response of auxiliary basis in density fitting method, the grid response in DFT numerical integration can be put in this function.
- grad_elec(mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None)#
Electronic part of KRHF/KRKS gradients Args:
mf_grad : pbc.grad.krhf.Gradients or pbc.grad.krks.Gradients object
- kernel(mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None)[source]#
Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).
- class pyscf.pbc.grad.krhf.GradientsBase(method)[source]#
Bases:
GradientsBase
Basic nuclear gradient functions for non-relativistic methods
- hcore_generator(cell=None, kpts=None)#
- class pyscf.pbc.grad.krhf.SCF_GradScanner(g)[source]#
Bases:
GradScanner
- pyscf.pbc.grad.krhf.as_scanner(mf_grad)[source]#
Generating a nuclear gradients scanner/solver (for geometry optimizer).
The returned solver is a function. This function requires one argument “cell” as input and returns energy and first order nuclear derivatives.
The solver will automatically use the results of last calculation as the initial guess of the new calculation. All parameters assigned in the nuc-grad object and SCF object (DIIS, conv_tol, max_memory etc) are automatically applied in the solver.
Note scanner has side effects. It may change many underlying objects (_scf, with_df, with_x2c, …) during calculation.
- pyscf.pbc.grad.krhf.get_hcore(cell, kpts)[source]#
Part of the nuclear gradients of core Hamiltonian
- pyscf.pbc.grad.krhf.get_jk(mf_grad, dm, kpts)[source]#
J = ((-nabla i) j| kl) D_lk K = ((-nabla i) j| kl) D_jk
- pyscf.pbc.grad.krhf.grad_elec(mf_grad, mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None)[source]#
Electronic part of KRHF/KRKS gradients Args:
mf_grad : pbc.grad.krhf.Gradients or pbc.grad.krks.Gradients object
pyscf.pbc.grad.krks module#
Non-relativistic analytical nuclear gradients for restricted Kohn Sham with kpoints sampling
pyscf.pbc.grad.kuhf module#
Non-relativistic analytical nuclear gradients for unrestricted Hartree Fock with kpoints sampling
- class pyscf.pbc.grad.kuhf.Gradients(method)[source]#
Bases:
Gradients
Non-relativistic restricted Hartree-Fock gradients
- grad_elec(mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None)#
Electronic part of KRHF/KRKS gradients Args:
mf_grad : pbc.grad.krhf.Gradients or pbc.grad.krks.Gradients object
pyscf.pbc.grad.kuks module#
Non-relativistic analytical nuclear gradients for unrestricted Kohn Sham with kpoints sampling
pyscf.pbc.grad.rhf module#
- class pyscf.pbc.grad.rhf.Gradients(method)[source]#
Bases:
GradientsBase
Non-relativistic Gamma-point restricted Hartree-Fock gradients
- grad_elec(mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None, kpt=array([0., 0., 0.]))#
- class pyscf.pbc.grad.rhf.GradientsBase(method)[source]#
Bases:
GradientsBase
Base class for Gamma-point nuclear gradient
pyscf.pbc.grad.rks module#
pyscf.pbc.grad.uhf module#
- class pyscf.pbc.grad.uhf.Gradients(method)[source]#
Bases:
GradientsBase
Non-relativistic Gamma-point restricted Hartree-Fock gradients
- grad_elec(mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None, kpt=array([0., 0., 0.]))#
pyscf.pbc.grad.uks module#
Module contents#
Analytical nuclear gradients for PBC