Find a Reaction Path and Transition State with AFIR and MACE¶
1. Introduction¶
Find a reaction path and its transition state with the Atomic Simulation Environment (ASE): an artificial force (artificial force induced reaction, AFIR) pulls two atoms together, and a MACE machine-learned force field (MLFF) foundation model supplies the energies and forces. The search runs in the notebook itself, submits no job and needs no login. The default molecule is allyl vinyl ether, whose Claisen rearrangement gives 4-pentenal.
2. Open the notebook¶
In JupyterLite, the notebook is made/workflows/local/reaction_path_afir_mace.ipynb, entry 7.4.1 "AFIR reaction path discovery (MACE)" of made/workflows/Introduction.ipynb.
3. Set the parameters¶
Cell 1.2 holds the molecule, the atom pairs, the force ramp and the model:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
MOLECULE_NAME is read from a file of that name in FOLDER, ../../uploads, otherwise fetched from PubChem. BOND_FORMING_PAIR holds the indices of the two atoms AFIR pulls together, which selects the reaction; BOND_BREAKING_PAIR is the pair expected to come apart, which also directs the saddle point search, and REPORTED_PAIRS are further distances to follow. AFIR_FORCE_RAMP lists the artificial forces, in eV/Å, applied stage by stage until the molecule reacts. PRODUCT_NAME labels the results and is not checked against them, and EXPERIMENTAL_ACTIVATION_ENERGY is drawn on the energy diagram.
MACE_MODEL_FAMILY is "MACE-OFF23", trained on organic molecules, or "MACE-MP-0", trained on crystals; MACE-OFF23 is distributed under the Academic Software License, which does not permit commercial use. The other model parameters are those of Relax structure with MLFF (MACE).
Cell 1.3 holds the convergence thresholds and the output paths:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
These parameters set the precision and the run time, not the reaction found. Each search writes to its own folder, RESULTS_FOLDER, named after the molecule and the pair pulled together.
4. Run and read the result¶
Run the notebook up to cell 2.1, which lists the atoms with their neighbors and the selected pairs, set the pairs in cell 1.2 from that listing, and run all cells with Run > Run All.
Sections 3 to 9 relax the reactant, ramp the force, remove the bias to get the physical energy profile, relax the product, refine the transition state with the dimer method, check that it has one imaginary frequency, and follow that mode to the two minima it connects. Section 10 plots the energy diagram and shows the reactant, the transition state and the product. Section 11 passes the three structures on with set_materials, which writes them to FOLDER, and writes the energy profile and the plots to RESULTS_FOLDER.
5. Interactive JupyterLite notebook¶
The interactive JupyterLite notebook for discovering a reaction path with AFIR and MACE can be accessed below.
6. Related¶
Reaction Energy Profile with NEB (Quantum ESPRESSO) calculates a reaction energy profile with Density Functional Theory from the web interface.