Interfaces#

The following documentation covers the classes and functions that might be be useful for running optimizations directly through optkings python API and functions that would be helpful for driver level operations (creating a molecular system, creating a set of internal coordinates, etc…).

optking.opt_helper Module#

Helpers to provide high-level interfaces for OptKing. The Helpers allow individual steps to be taken easily from a variety of sources. EngineHelper runs calculations through QCEngine. Optimizations can also be run through the QCEngine procedure for OptKing example. CustomHelper adds the abilility to directly input energies, gradients, hessians, etc…

Functions#

from_dict(input_obj[, type, dtype])

Attempt to create a dictionary with required elements of an OptimizationInput from user input.

from_psi4(mol_src[, dtype])

Construct an OptKing molecule and a QCSchema OptimizationInput dict of schema_version dtype from a Psi4-like molecule.

from_schema(input_obj)

Initialize opt_helper's molecule from QCSchema Input

Classes#

CustomHelper(mol_src[, params])

Class allows for easy setup of OptKing.

EngineHelper(optimization_input, **kwargs)

Perform an optimization using qcengine to compute properties.

Helper([params])

Base class for CustomHelper (accepts user provided gradients) and EngineHelper (uses MolSSI's QCEngine for gradients)

Class Inheritance Diagram#

Inheritance diagram of optking.opt_helper.CustomHelper, optking.opt_helper.EngineHelper, optking.opt_helper.Helper

optking.optwrapper Module#

Functions#

initialize_from_psi4(calc_name, program, ...)

Gathers information from an active psi4 instance.

initialize_options(opt_keys[, silent])

make_computer(opt_input, computer_type)

optimize_psi4(calc_name[, program, dertype])

Wrapper for optimize.optimize() Looks for an active psi4 molecule and optimizes.

optimize_qcengine(opt_input[, computer_type])

Try to optimize, find TS, or find IRC of the system as specifed by a QCSchema OptimizationInput.

optking.optimize Module#

Provides some of the high level functions and classes to run optimizations. This is a good starting place for anyone looking to add features to the code to familarize themselves with the overall workings of OptKing. Functions may be useful to users seeking greater control over the inner workings of OptKing than provided by the OptHelpers. For instance, if manually creating a molecular system or manually controlling / switching algorithms on the fly.

See also

stepalgorithms.OptimizationAlgorithm, stepalgorithms.OptimizationInterface

Functions#

get_hess_grad(computer, o_molsys)

Compute hessian and fetch gradient from output if possible.

get_pes_info(H, computer, o_molsys, ...[, ...])

Calculate, update, or guess hessian as appropriate.

make_internal_coords(o_molsys, params)

Add optimization coordinates to molecule system.

optimization_factory(method, molsys, ...[, ...])

create optimization algorithms. method may be redundant however params is allowed

optimize(o_molsys, computer)

Driver for OptKing's optimization procedure.

prepare_opt_output(o_molsys, computer[, ...])

Classes#

OptimizationManager(molsys, history_object, ...)

Recommended use of Optking's Optimization Algorithms is to create this class and then loop over take_step.

Class Inheritance Diagram#

Inheritance diagram of optking.optimize.OptimizationManager