Skip to content

gomesgroup/autodE

 
 

Repository files navigation

Build Status codecov Code style: black GitHub CodeQL Conda Recipe Conda Downloads

alt text


Introduction

autodE is a Python module initially designed for the automated calculation of reaction profiles from SMILES strings of reactant(s) and product(s). Current features include: transition state location, conformer searching, atom mapping, Python wrappers for a range of electronic structure theory codes, SMILES parsing, association complex generation, and reaction profile generation.

Why ORCA 6.x is the Recommended Backend

Starting with autodE v1.4.5 (gomesgroup fork), ORCA 6.x is the recommended high-level QM backend for automated reaction discovery. Here's why:

Feature Benefit for autodE Alternative
GOAT (Global Optimizer with Adaptive Thermostat) Automated conformer search with metadynamics - finds global minima without manual intervention CREST (requires separate setup)
SOLVATOR Automatic explicit solvation shell generation - critical for accurate solution-phase barriers Manual placement
DOCKER Built-in molecular docking for bimolecular reactions - automatic association complex generation External docking tools
NEB-TS Improved nudged elastic band for complex reaction paths Standard NEB
IRC Enhanced intrinsic reaction coordinate with bidirectional tracing Manual IRC setup
ExtOpt External optimizer interface - enables MLIP-accelerated geometry optimization Pure DFT (slower)
Free & Open No license fees, unlimited parallel jobs Commercial alternatives

ORCA 6.x Feature Highlights

GOAT (Metadynamics-Based Conformer Search)

import autode as ade
from autode.wrappers.keywords import GOATKeywords

# Automatic global minimum search
mol = ade.Molecule(smiles='CC(C)CC(C)C')  # 2,4-dimethylpentane
mol.optimise(method=ade.methods.ORCA(), keywords=GOATKeywords())
# GOAT automatically explores conformational space

SOLVATOR (Explicit Solvation)

from autode.wrappers.keywords import SolvatorKeywords

# Add explicit water molecules around solute
keywords = SolvatorKeywords(solvent='water', n_solvent=50, shell_radius=5.0)
solvated_mol = mol.optimise(method=ade.methods.ORCA(), keywords=keywords)

MLIP-Accelerated Optimization

from autode.wrappers import MLIPConfig

# Use machine learning potentials for fast pre-optimization
config = MLIPConfig(model='aimnet2', server_url='http://localhost:5003')
mol.optimise(method=ade.methods.ORCA(), mlip_config=config)
# 10-100x faster initial optimization before DFT refinement

DOCKER (Bimolecular Complex Generation)

from autode.wrappers import dock_molecules

# Automatic docking for reaction complex setup
reactant1 = ade.Molecule(smiles='CCBr')
reactant2 = ade.Molecule(smiles='[OH-]')
complex = dock_molecules(reactant1, reactant2, method=ade.methods.ORCA())
# Finds optimal pre-reactive geometry for SN2 reaction

Version Detection Fix

This fork fixes a critical bug where ORCA 6.x was incorrectly detected as ORCA 4.x:

# Before (broken): version[0] == "5" returns False for "6.1.1"
# After (fixed): int(version.split('.')[0]) >= 5 returns True

# New version properties available:
orca = ade.methods.ORCA()
print(orca.is_v6)           # True for ORCA 6.x
print(orca.is_v5_or_later)  # True for ORCA 5.x and 6.x
print(orca.major_version)   # 6

Dependencies

  • Python >= 3.9
  • Recommended High-Level Method:
    • ORCA >= 6.0 (Recommended - free, full feature support)
  • Alternative High-Level Methods:
  • Recommended Low-Level Method:
    • XTB >= 6.5 (Recommended)
  • Alternative Low-Level Methods:

Optional Dependencies:

Installation

To install autodE with conda:

conda install autode -c conda-forge

To install the gomesgroup fork with ORCA 6.x features:

pip install git+https://github.com/gomesgroup/autode.git

See the installation guide for installing from source.

Usage

Reaction profiles in autodE are generated by initialising Reactant and Product objects, generating a Reaction from those and invoking calculate_reaction_profile(). For example, to calculate the profile for a 1,2 hydrogen shift in a propyl radical:

import autode as ade

ade.Config.n_cores = 8
ade.Config.hcode = "orca"  # Recommended: ORCA 6.x
ade.Config.lcode = "xtb"

r = ade.Reactant(name='reactant', smiles='CC[C]([H])[H]')
p = ade.Product(name='product', smiles='C[C]([H])C')

reaction = ade.Reaction(r, p, name='1-2_shift')
reaction.calculate_reaction_profile()  # creates 1-2_shift/ and saves profile

Using ORCA 6.x Features

Modern DFT with D4 Dispersion:

import autode as ade
from autode.wrappers.keywords.orca6 import orca6_keywords, r2scan3c_keywords

ade.Config.hcode = "orca"

# Use r2SCAN-3c (fast, accurate composite method)
mol = ade.Molecule(smiles='c1ccccc1')
mol.optimise(method=ade.methods.ORCA(), keywords=r2scan3c_keywords)

IRC Validation of Transition States:

from autode.wrappers import run_irc, validate_ts_with_irc

# Find TS
ts = reaction.find_ts()

# Validate with IRC (traces path both directions)
irc_result = validate_ts_with_irc(ts, method=ade.methods.ORCA())
if irc_result.connects_to_reactants and irc_result.connects_to_products:
    print("TS validated!")

Hybrid MLIP-DFT NEB:

from autode.wrappers.neb import NEBMLIPHybrid

# Fast NEB with MLIP, refined with DFT at key points
neb = NEBMLIPHybrid(
    reactant=r, product=p,
    mlip_model='aimnet2',
    dft_method=ade.methods.ORCA()
)
ts_guess = neb.get_ts_guess()

See examples/ for more examples and duartegroup.github.io/autodE/ for additional documentation.

ORCA 6.x Feature Reference

Feature Module Description
GOAT autode.wrappers.keywords.goat Metadynamics conformer search
SOLVATOR autode.wrappers.keywords.solvator Explicit solvation shell generation
DOCKER autode.wrappers.docker Molecular docking for complexes
IRC autode.wrappers.irc Intrinsic reaction coordinate
NEB-TS autode.wrappers.keywords.neb Enhanced nudged elastic band
MLIP autode.wrappers.mlip_external Machine learning potential integration
OPI autode.wrappers.opi_wrapper ORCA Python Interface
D4 autode.wrappers.keywords.dispersion D4 dispersion correction
r2SCAN-3c autode.wrappers.keywords.orca6 Composite DFT method
Relativistic autode.wrappers.keywords.relativistic ZORA, X2C, DKH2

For detailed documentation on ORCA 6.x features, see docs/orca6_features.md.

Multi-Architecture Support

The gomesgroup fork supports multiple architectures for MLIP integration:

Architecture Platform MLIP Server
x86_64 Linux (Intel/AMD) localhost:5003
aarch64 Linux (ARM64/Grace Hopper) localhost:5003
arm64 + Darwin macOS (Apple Silicon) localhost:5003

Development

There is a slack workspace for development and discussion - please email to be added. Pull requests are very welcome but must pass all the unit tests prior to being merged. Please write code and tests! See the todo list for features on the horizon. Bugs and feature requests should be raised on the issue page.

NOTE: We'd love more contributors to this project!

Running Tests

# Run all tests
pytest tests/

# Run ORCA 6.x specific tests
pytest tests/test_orca_v6*.py -v

# Run with coverage
pytest tests/ --cov=autode --cov-report=html

Citation

If autodE is used in a publication please consider citing the paper:

@article{autodE,
  doi = {10.1002/anie.202011941},
  url = {https://doi.org/10.1002/anie.202011941},
  year = {2021},
  publisher = {Wiley},
  volume = {60},
  number = {8},
  pages = {4266--4274},
  author = {Tom A. Young and Joseph J. Silcock and Alistair J. Sterling and Fernanda Duarte},
  title = {{autodE}: Automated Calculation of Reaction Energy Profiles -- Application to Organic and Organometallic Reactions},
  journal = {Angewandte Chemie International Edition}
}

Contributors

About

automated reaction profile generation

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.9%
  • C++ 2.6%
  • Other 1.5%