Geometry optimization

Auto3D is mainly designed for generating low-energy 3D structures from the SMILES. It aslo provides a wrapper function opt_geometry to do geometry optimization for existing 3D structures, using ANI2x, AIMNET or ANI2xt as the optimizing engine.

You can use it to opimize 3D structures from other sources, or try tight optimization convergence threshold from the output of Auto3D.

The source jupyter notebook can be downloaded here

[ ]:
import os, sys
root = os.path.dirname(os.path.dirname(os.path.abspath("__file__")))
sys.path.append(root)

import Auto3D
from Auto3D import Auto3DOptions, main, opt_geometry
[2]:
#Always ensure that you have the latest version
print(Auto3D.__version__)
2.2.10
[4]:
path = os.path.join(root, "example/files/RDKIT_AIMNET_smiles/smiles_out.sdf")
optimized = opt_geometry(path, model_name="AIMNET", opt_tol=0.002)
print(optimized)
Preparing for parallel optimizing... (Max optimization steps: 5000)
Total 3D conformers: 4
  9%|▊         | 432/5000 [00:23<04:08, 18.38it/s]
Optimization finished at step 433:   Total 3D structures: 4  Converged: 4   Dropped(Oscillating): 0    Active: 0
/home/jack/Auto3D_pkg/example/files/RDKIT_AIMNET_smiles/smiles_out_AIMNET_opt.sdf

[5]:
help(opt_geometry)  #please note that model_name can be "ANI2x", "ANI2xt" and "AIMNET".
Help on function opt_geometry in module Auto3D.ASE.geometry:

opt_geometry(path: str, model_name: str, gpu_idx=0, opt_tol=0.003, opt_steps=5000)
    Geometry optimization interface with FIRE optimizer.

    :param path: Input sdf file
    :type path: str
    :param model_name: ANI2x, ANI2xt or AIMNET
    :type model_name: str
    :param gpu_idx: GPU cuda index, defaults to 0
    :type gpu_idx: int, optional
    :param opt_tol: Convergence_threshold for geometry optimization (eV/A), defaults to 0.003
    :type opt_tol: float, optional
    :param opt_steps: Maximum geometry optimization steps, defaults to 5000
    :type opt_steps: int, optional

[ ]: