qimpy.dft.electrons.LCAO
- class LCAO(*, comm, checkpoint_in=(None, ''), n_iterations=30, energy_threshold=1e-06, gradient_threshold=1e-08)
Bases:
Minimize[MatrixArray]Optimize electronic state in atomic-orbital subspace.
- Parameters:
comm (MPI.Comm)
checkpoint_in (CheckpointPath)
n_iterations (int)
energy_threshold (float)
gradient_threshold (float)
- __init__(*, comm, checkpoint_in=(None, ''), n_iterations=30, energy_threshold=1e-06, gradient_threshold=1e-08)
Set stopping criteria for initial subspace optimization.
- Parameters:
energy_threshold (float) – [Input file] Energy convergence threshold in Hartrees. Stop when energy difference between consecutive LCAO iterations falls below this threshold.
gradient_threshold (float) – [Input file] Subspace-gradient convergence threshold (dimensionless). Stop when gradient of energy with respect to subspace Hamiltonian falls below this threshold.
comm (Comm)
checkpoint_in (CheckpointPath)
n_iterations (int)
- Return type:
None
Methods
Set stopping criteria for initial subspace optimization.
add_childConstruct child object self.`attr_name` of type cls.
add_child_one_ofInvoke add_child on one of several child options in args.
Update energy and/or gradients in state.
constrainOverride to impose any constraints, restricting to allowed subspace.
finite_difference_testCheck gradient implementation by taking steps along direction.
minimizeMinimize, and return optimized energy of system
reportOverride to perform optional reporting / processing every few steps.
safe_step_sizeOverride to return maximum safe step size along direction, if any.
save_checkpointSave self and all children in hierarchy to cp_path.
Move the state along direction by amount step_size
Thomas-Fermi kinetic energy density
Set wavefunctions to optimum subspace of atomic orbitals.
Attributes
systemcommCommunicator over which algorithm operates in unison
nameName of algorithm instance used in reporting eg.
i_iter_startStarting iteration number (eg.
n_iterationsMaximum number of iterations
energy_thresholdConvergence threshold on energy change
n_consecutiveNumber of consecutive iterations threshold must be satisfied
methodCG, L-BFGS or Gradient (i.e steepest descent)
cg_typePolak-Ribiere, Fletcher-Reeves or Hestenes-Stiefel
line_minimizeAuto, Constant, Quadratic, Wolfe
step_sizeStep size options
n_historyMaximum history size (only used for L-BFGS)
wolfeWolfe line minimize stopping conditions
converge_onConverge on 'any', 'all' or a number of thresholds
n_convergeNumber of thresholds that converge_on corresponds to
extra_thresholdsNames and thresholds for any additional convergence quantities.
child_namesNames of attributes with child objects.
variant_nameVersion of children having variants (if any)
- compute(state, energy_only)
Update energy and/or gradients in state. If energy_only is True, only update the energy, else update all entries including extra convergence checks, gradients and preconditioned gradient.
- Parameters:
state (MinimizeState[MatrixArray])
energy_only (bool)
- Return type:
None
- step(direction, step_size)
Move the state along direction by amount step_size
- Parameters:
direction (MatrixArray)
step_size (float)
- Return type:
None
- tau_tf(n_tilde, grid)
Thomas-Fermi kinetic energy density