Auto3D.ASE.geometry.opt_geometry

Auto3D.ASE.geometry.opt_geometry(path: str, model_name: str, gpu_idx: int = 0, opt_tol: float = 0.01, opt_steps: int = 2000, patience: int | None = None, batchsize_atoms: int = 1024) str

Geometry optimization interface with FIRE optimizer.

Optimizes molecular geometries from an SDF file using neural network potentials (ANI2x, ANI2xt, AIMNET, or custom models).

Parameters:
  • path – Input SDF file path.

  • model_name – Model for optimization. Options: - ‘ANI2x’: ANI2x neural network potential - ‘ANI2xt’: ANI2xt neural network potential - ‘AIMNET’: AIMNet2 model (default in Auto3D) - Path to custom NNP model file (.pt)

  • gpu_idx – CUDA device index. Defaults to 0.

  • opt_tol – Convergence threshold for max force (eV/Å). Defaults to 0.01.

  • opt_steps – Maximum optimization steps per structure. Defaults to 2000.

  • patience – Drop conformer if force doesn’t decrease for this many consecutive steps. Defaults to None (uses opt_steps value).

  • batchsize_atoms – Number of atoms per optimization batch. Larger values use more GPU memory but may be faster. Defaults to 1024. Recommendation: ~1024 per GB of GPU memory.

Returns:

Path to output SDF file with optimized geometries.

Example

>>> from Auto3D.ASE.geometry import opt_geometry
>>> output = opt_geometry(
...     "molecules.sdf",
...     "AIMNET",
...     gpu_idx=0,
...     patience=250,
...     batchsize_atoms=2048,
... )