Helper
- class optking.opt_helper.Helper(params={}, **kwargs)[source]
Bases:
ABC
Base class for CustomHelper (accepts user provided gradients) and EngineHelper (uses MolSSI’s QCEngine for gradients)
A step may be taken by setting the class attributes gX and E, then calling the compute() and take_step() methods. The class attribute HX may also be set at any time as desired, if this is not set then optking will perform its normal update/guess procedure.
If full_hess_every has been set, the optimizer will require that hessians be provided every n steps. The properties required by the optimizer can be queried by calling get_requirements() test_convergence may be used to determine compliance with optking’s convergence criteria
Optking will create a OptimizationResult as output in this process. This will be written upon calling close()
Attributes Summary
Methods Summary
attempt_fromiter
(array)Create coordinates for optimization.
close
()compute
()Get the energy, gradient, and hessian.
from_dict
(d)Construct as far as possible the helper.
Returns a formatted string to summarize the step taken after calling take_step()
Returns a formatted string to summarize molecular system before taking a step or calling compute
show
()status
([str_mode])get string message describing state of optimizer
Return final energy and geometry
Must call compute before calling this method.
test_convergence
([str_mode])Check the final two steps for convergence.
to_dict
()Attributes Documentation
- geom
Methods Documentation
- compute()[source]
Get the energy, gradient, and hessian. Project redundancies and apply constraints / forces
- classmethod from_dict(d)[source]
Construct as far as possible the helper. Child class will need to update computer
- post_step_str()[source]
Returns a formatted string to summarize the step taken after calling take_step()
- pre_step_str()[source]
Returns a formatted string to summarize molecular system before taking a step or calling compute
- status(str_mode=None)[source]
get string message describing state of optimizer
- Returns
‘FAILED’ if unrecoverable ‘UNFINISHED-FAILED’ if recoverable error ‘UNFINISHED’ optimization has not converged ‘FINISHED’ optimization converged
- Return type