Nucleophilicity & Electrophilicity
Identify electrophilic and nucleophilic sites in a molecule and compute methyl anion affinities (MAA) and methyl cation affinities (MCA) using the ESNUEL methodology (Jensen group).
from atomiverse import Atoms, NucleophilicityElectrophilicity
from atomiverse.levels import GFN2_XTB
water = Atoms.from_smiles("O")
job = NucleophilicityElectrophilicity(
atoms=water,
charge=0,
multiplicity=1,
level_of_theory=GFN2_XTB,
)
job.submit()
result = job.require_result()
for site in result.electrophilic:
print(f"Electrophilic site {site.site_index} ({site.site_name}): "
f"MAA = {site.affinity_kjmol:.2f} kJ/mol")
for site in result.nucleophilic:
print(f"Nucleophilic site {site.site_index} ({site.site_name}): "
f"MCA = {site.affinity_kjmol:.2f} kJ/mol")
Inputs
atoms is the starting molecular geometry (3D coordinates).
charge (default 0) and multiplicity (default 1) describe the electronic state.
level_of_theory selects the computational method used for both geometry
optimisation and single-point energy evaluation.
smiles (optional) provides a SMILES string for more robust site identification.
When omitted, bonds are perceived from the 3D structure.
Results
result.electrophilic lists all identified electrophilic sites with:
site_index: Atom index in the input moleculesite_name: Functional-group labelproduct_smiles: SMILES of the methylated productaffinity_kjmol: Methyl anion affinity (MAA) in kJ/mol
result.nucleophilic lists all identified nucleophilic sites with:
site_index: Atom index in the input moleculesite_name: Functional-group labelproduct_smiles: SMILES of the methylated productaffinity_kjmol: Methyl cation affinity (MCA) in kJ/mol
result.methyl_anion_ref_kjmol is the reference energy of CH3- in kJ/mol.
result.methyl_cation_ref_kjmol is the reference energy of CH3+ in kJ/mol.
result.reactant_energy_kjmol is the energy of the reactant in kJ/mol.
Thresholds
When interpreting MAA and MCA values, the following qualitative thresholds can be used as a guide:
| Affinity (kJ/mol) | Classification |
|---|---|
| < 0 | Unfavourable |
| 0 – 50 | Weak |
| 50 – 100 | Moderate |
| 100 – 200 | Strong |
| > 200 | Very strong |
These thresholds are general guidelines; absolute values depend on the level of theory chosen.
Important Notes
- The workflow site identification uses a set of SMIRKS reaction patterns ported from the upstream ESNUEL project (MIT licensed).
- Each methylated product is geometry-optimised and evaluated with a single-point calculation at the chosen level of theory.
- More negative affinities indicate stronger reactivity (MAA for electrophilic attack, MCA for nucleophilic attack).
- The reactant geometry is also optimised before energy evaluation.
Compute Resources
CPU cores and memory are determined automatically based on the molecule size. The walltime estimate accounts for one optimisation + SPE for the reactant plus additional calculations for each identified reactive site.