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

__init__

Set stopping criteria for initial subspace optimization.

add_child

Construct child object self.`attr_name` of type cls.

add_child_one_of

Invoke add_child on one of several child options in args.

compute

Update energy and/or gradients in state.

constrain

Override to impose any constraints, restricting to allowed subspace.

finite_difference_test

Check gradient implementation by taking steps along direction.

minimize

Minimize, and return optimized energy of system

report

Override to perform optional reporting / processing every few steps.

safe_step_size

Override to return maximum safe step size along direction, if any.

save_checkpoint

Save self and all children in hierarchy to cp_path.

step

Move the state along direction by amount step_size

tau_tf

Thomas-Fermi kinetic energy density

update

Set wavefunctions to optimum subspace of atomic orbitals.

Attributes

system

comm

Communicator over which algorithm operates in unison

name

Name of algorithm instance used in reporting eg.

i_iter_start

Starting iteration number (eg.

n_iterations

Maximum number of iterations

energy_threshold

Convergence threshold on energy change

n_consecutive

Number of consecutive iterations threshold must be satisfied

method

CG, L-BFGS or Gradient (i.e steepest descent)

cg_type

Polak-Ribiere, Fletcher-Reeves or Hestenes-Stiefel

line_minimize

Auto, Constant, Quadratic, Wolfe

step_size

Step size options

n_history

Maximum history size (only used for L-BFGS)

wolfe

Wolfe line minimize stopping conditions

converge_on

Converge on 'any', 'all' or a number of thresholds

n_converge

Number of thresholds that converge_on corresponds to

extra_thresholds

Names and thresholds for any additional convergence quantities.

child_names

Names of attributes with child objects.

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:
Return type:

None

step(direction, step_size)

Move the state along direction by amount step_size

Parameters:
Return type:

None

tau_tf(n_tilde, grid)

Thomas-Fermi kinetic energy density

Parameters:
Return type:

FieldH

update(system)

Set wavefunctions to optimum subspace of atomic orbitals.

Parameters:

system (System) –

Return type:

None