Mopac

From lamm-mit/scienceclaw · View interactive version

Mopac is an AI agent skill from the GitHub repository lamm-mit/scienceclaw. Semi-empirical quantum chemistry with MOPAC. Fast QM calculations for geometry optimization, properties, activation barriers, reaction pathways. Methods PM6, PM7, PM6-D3H4X for 1000x faster than DFT. For full DFT accuracy, use ase. For classical MD, use openmm.

How to use this skill

Skill file

MOPAC Semi-Empirical Quantum Chemistry

Overview

MOPAC provides semi-empirical quantum chemistry calculations that are ~1000x faster than DFT while maintaining reasonable accuracy for many applications. This skill enables rapid computational investigation of reaction mechanisms, transition states, activation barriers, and molecular properties. MOPAC is ideal for high-throughput screening and rapid hypothesis testing in drug discovery and materials chemistry.

Core Capabilities

1. Geometry Optimization

Molecular Structures:

Optimize small molecules and drug-like compounds:

# PM6 method (balanced speed/accuracy)
# PM7 method (improved accuracy, slightly slower)
# PM6-D3H4X (includes dispersion corrections for D3 interactions)

mopac_optimized = optimize_structure(
    smiles="CCO",
    method="PM6",
    convergence="tight"
)

# Get optimized geometry and energy
energy = mopac_optimized.get_energy()
structure = mopac_optimized.get_structure()

Key Features:

2. Transition State Finding

Activation Barriers:

Locate and characterize transition states:

# Min-TS-Min pathway
# 1. Optimize reactant
# 2. Find transition state (TS keyword in MOPAC)
# 3. Optimize product

ts_structure = find_transition_state(
    reactant="reactant.smi",
    product="product.smi",
    method="PM6"
)

activation_barrier = ts_structure.get_energy() - reactant.get_energy()

Applications:

3. Molecular Properties

Calculate from Quantum Wavefunction:

- Dipole moment
- Polarizability
- Electronegativity
- Electrostatic potential (ESP)
- Partial charges (Mulliken, Löwdin)
- Orbital energies (HOMO, LUMO, gap)
- Hardness, softness (chemical potential)
- Reactivity indices (Fukui functions)

For Drug Design:

4. Solvation Effects

COSMO Implicit Solvent Model:

Calculate properties in aqueous/organic media:

# COSMO (Conductor-like Screening Model)
# Implicit solvent descriptions for:
# - Water
# - DMSO, DMF
# - Chloroform, dichloromethane
# - Alcohols

aqueous_energy = calculate_solvation(
    structure="molecule.xyz",
    solvent="water",
    method="PM6"
)

# pKa prediction from desolvation energy

5. Vibrational Analysis

Frequencies and Thermochemistry:

Compute IR-active vibrational modes:

- Vibrational frequencies
- Infrared intensities
- Raman scattering
- Zero-point energy (ZPE)
- Enthalpy corrections
- Entropy corrections
- Gibbs free energy at any temperature

MOPAC Methods

PM6 (Parametrized Model 6)

PM7

PM6-D3H4X

Use Cases

Drug Discovery:

Reaction Mechanism:

Materials Chemistry:

Chemical Stability:

Integration with Other Skills

Input:

Output:

Accuracy vs. DFT

| Property | MOPAC (PM6) | DFT | Error | Time (MOPAC) | Time (DFT) |

|----------|-----------|-----|-------|-------------|----------|

| Geometry | 0.02 Å | 0.01 Å | ±0.01 Å | 5 sec | 5 min |

| Energy | ±1-2 eV | ±0.1 eV | ±1 eV | 5 sec | 5 min |

| Barriers | ±2-4 kcal | ±0.5 kcal | ±2 kcal | 30 sec | 2-4 hrs |

| pKa | ±0.5 units | ±0.3 units | ±0.5 | 20 sec | 30 min |

When to use MOPAC:

When to use DFT:

Limitations

Example Workflow

# 1. Optimize structure
python mopac_optimize.py --smiles "CC(C)CC(N)C(=O)O" --method PM6

# 2. Calculate properties
python mopac_properties.py --structure optimized.xyz --include-frequencies

# 3. Find transition state
python mopac_transition_state.py --reactant reactant.xyz --product product.xyz

# 4. Predict pKa
python mopac_pka.py --structure molecule.xyz --solvent water

# 5. Analyze reactivity
python mopac_reactivity.py --structure molecule.xyz --method PM6-D3H4X

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.