ConjugateGradient#

class optking.stepAlgorithms.ConjugateGradient(molsys, history, params)[source]#

Bases: OptimizationAlgorithm

Implements the conjugate gradient algorithm.

Notes

The following varieties are implemented.

  1. Fletcher (from Fletcher’s “Pratical Methods of Optimization, Vol. 1”, Ch. 4, Pg. 63, Eqn. 4.1.4)

  2. descent (from Fletcher, Ch. 4, Pg. 66, Eqn. 4.1.11)

  3. Polak (from Fletcher, Ch. 4, Pg. 66, Eqn. 4.1.12)

Methods Summary

expected_energy(dq, fq, H)

Quadratic energy model

requires(**kwargs)

Returns tuple with strings ('energy', 'gradient', 'hessian') for what the algorithm needs to compute a new point

step(fq, *args, **kwargs)

Basic form of the algorithm

supports_trust_region()

Returns boolean for whether a trust region should be used with this method

Methods Documentation

expected_energy(dq, fq, H)[source]#

Quadratic energy model

requires(**kwargs)[source]#

Returns tuple with strings (‘energy’, ‘gradient’, ‘hessian’) for what the algorithm needs to compute a new point

step(fq, *args, **kwargs)[source]#

Basic form of the algorithm

supports_trust_region()[source]#

Returns boolean for whether a trust region should be used with this method