forte2.optimize.geometry_optimizer#

Module Contents#

class forte2.optimize.geometry_optimizer.GeometryOptimizer#

Cartesian geometry optimizer using L-BFGS and method analytic gradients.

Parameters:
method_factoryCallable, optional

Callable taking a System and returning a method object that provides run(), E, and gradient(). This is retained as a valid alternative. The preferred API call is GeometryOptimizer(...)(method).run().

maxiterint, optional, default=50

Maximum L-BFGS iterations.

g_tolfloat, optional, default=1.0e-4

L-BFGS gradient convergence threshold.

max_stepfloat, optional, default=1.0

Maximum line-search step length.

project_orbitalsbool, optional, default=True

If True, project the occupied orbitals from the previous evaluated geometry into the AO basis of the next geometry and use them as the SCF initial guess.

lbfgs_kwargsdict, optional

Additional keyword arguments forwarded to LBFGS.

method_factory: Callable | None = None#
maxiter: int = 50#
g_tol: float = 0.0001#
max_step: float = 1.0#
project_orbitals: bool = True#
lbfgs_kwargs: dict#
executed: bool = False#
converged: bool = False#
iter: int = 0#
E: float | None = None#
gradient: numpy.ndarray | None = None#
history: list[tuple] = []#
coordinates: numpy.ndarray | None = None#
system: forte2.system.System | None = None#
method: object | None = None#
parent_method: object | None = None#
run(system=None)#

Optimize a molecular geometry.

Parameters:
systemSystem, optional

Initial molecular system. Required only when method_factory is used directly instead of the upstream-method API.

Returns:
GeometryOptimizer

The executed optimizer object.