Auto3D.config.OptimizationConfig

class Auto3D.config.OptimizationConfig(opt_steps: int = 2000, convergence_threshold: float = 0.01, patience: int = 250, batchsize_atoms: int = 1024, energy_tol: float = 0.001, energy_patience: int = 3)

Bases: object

Configuration for geometry optimization.

This dataclass encapsulates all parameters related to the FIRE optimizer and convergence criteria, replacing the previous untyped dict approach.

Example

>>> config = OptimizationConfig(opt_steps=1000, convergence_threshold=0.005)
>>> optimizer = optimizing(in_f, out_f, model, device, config)
__init__(opt_steps: int = 2000, convergence_threshold: float = 0.01, patience: int = 250, batchsize_atoms: int = 1024, energy_tol: float = 0.001, energy_patience: int = 3) None

Methods

__init__([opt_steps, convergence_threshold, ...])

to_dict()

Convert to dict for backward compatibility with existing code.

Attributes

batchsize_atoms

Number of atoms per optimization batch.

convergence_threshold

Force convergence threshold in eV/Angstrom.

energy_patience

Number of steps energy must be stable before considering converged.

energy_tol

Energy convergence threshold in eV.

opt_steps

Maximum number of optimization steps per structure.

patience

Number of steps without force decrease before dropping a conformer as oscillating.

opt_steps: int = 2000

Maximum number of optimization steps per structure.

convergence_threshold: float = 0.01

Force convergence threshold in eV/Angstrom. Structure converges when maximum force falls below this value.

patience: int = 250

Number of steps without force decrease before dropping a conformer as oscillating.

batchsize_atoms: int = 1024

Number of atoms per optimization batch. Larger values use more GPU memory but may be faster.

energy_tol: float = 0.001

Energy convergence threshold in eV. Used for early termination when energy stabilizes.

energy_patience: int = 3

Number of steps energy must be stable before considering converged.

to_dict() dict

Convert to dict for backward compatibility with existing code.

Returns:

Dictionary with optimization parameters using legacy key names.