LineSearch

class optking.linesearch.LineSearch(molsys, history, params)[source]

Bases: OptimizationInterface

Basic framework for performing Linesearches. Child classes must implement a fit method that determines the step_size from the previous point in the linesearch to either the new point in the linesearch or to the predicted minimum of the linesearch.

Methods Summary

compute_distance()

expected_energy(**kwargs)

Linesearch Algorithms should be able to compute the expected energy based only on the Points.

fit()

Determines where the next step should head.

from_dict(d, molsys, history, params)

reset()

start(dq)

step([fq, energy])

Either take a step with the size dictated by the fit method.

take_step([fq, H, energy, return_str])

Method skeleton (for example see OptimizationAlgorithm) 1.

to_dict()

Methods Documentation

compute_distance()[source]
abstract expected_energy(**kwargs)[source]

Linesearch Algorithms should be able to compute the expected energy based only on the Points.

fit()[source]

Determines where the next step should head. Remove points from self.points as needed Add the new points. Must set self.final_point if the linesearch has finished.

Returns

  • step_size (float) – length of step (could be negative) along dq to the next point from the last point

  • converged (bool) – has fit found a minimum.

classmethod from_dict(d, molsys, history, params)[source]
reset()[source]
start(dq)[source]
abstract step(fq=None, energy=None, **kwargs)[source]

Either take a step with the size dictated by the fit method. or take another step of the default size

take_step(fq=None, H=None, energy=None, return_str=False, **kwargs)[source]

Method skeleton (for example see OptimizationAlgorithm) 1. Choose what kind of step should take place next 2. take step 3. displace molsys 4. update history (trim history as applicable) 5. return step taken

to_dict()[source]