qimpy.dft.electrons.LCAO

class LCAO(*, comm, checkpoint_in=CheckpointPath(checkpoint=None, path=''), 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=CheckpointPath(checkpoint=None, path=''), 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

update

Set wavefunctions to optimum subspace of atomic orbitals.

Attributes

system

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

update(system)

Set wavefunctions to optimum subspace of atomic orbitals.

Parameters

system (System) –

Return type

None