5.3.1. band_minimizer.auto¶
- eminus.band_minimizer.auto(scf, W, Nit, cost=scf_step_occ, grad=get_grad_occ, condition=check_convergence, betat=3e-5, cgform=1)[source]¶
Automatic precond. conjugate-gradient minimization algorithm for a fixed Hamiltonian.
This function chooses an sd step over the pccg step if the energy goes up.
- Parameters:
scf – SCF object.
W – Expansion coefficients of unconstrained wave functions in reciprocal space.
Nit – Maximum number of SCF steps.
- Keyword Arguments:
cost – Function that will run every SCF step.
grad – Function that calculates the respective gradient.
condition – Function to check and log the convergence condition.
betat – Step size.
cgform – Conjugate gradient form.
- Returns:
Band energies per SCF cycle and optimized expansion coefficients.