Intermolecular Interaction Energy
Compute the interaction energy between two molecular fragments using the counterpoise-uncorrected formula:
The job takes a single atoms geometry containing both fragments. It automatically detects connected components via bond guessing, separates them into two fragments, and runs three single-point energy calculations. The result is the interaction energy together with each term in the equation.
Negative interaction energies indicate attractive interactions (e.g. hydrogen bonds, dispersion); positive values indicate repulsion.
from atomiverse import Atoms, IntermolecularInteractionEnergy
from atomiverse.levels import GFN2_XTB
# Two water molecules in a single geometry
dimer = Atoms(
numbers=[8, 1, 1, 8, 1, 1],
positions=[
[0.0, 0.0, 0.0],
[0.0, 0.757, 0.587],
[0.0, -0.757, 0.587],
[2.9, 0.0, 0.0],
[2.9, 0.757, 0.587],
[2.9, -0.757, 0.587],
],
)
job = IntermolecularInteractionEnergy(
atoms=dimer,
charge=0,
multiplicity=1,
level_of_theory=GFN2_XTB,
)
job.submit()
result = job.require_result()
print(f"Interaction energy: {result.interaction_energy:.6f} Hartree")
print(f" Complex: {result.complex_energy:.6f} Hartree")
print(f" Fragment A: {result.fragment_a_energy:.6f} Hartree")
print(f" Fragment B: {result.fragment_b_energy:.6f} Hartree")
Inputs
| Field | Type | Default | Description |
|---|---|---|---|
atoms | Atoms | required | Geometry containing both fragments together |
charge | int | 0 | Total charge of the complex |
multiplicity | int | 1 | Spin multiplicity (2S + 1); must be ≥ 1 |
level_of_theory | LevelOfTheory | required | Computational method for all three energy evaluations |
Results
job.require_result() returns an IntermolecularInteractionEnergyResult:
| Field | Type | Units | Description |
|---|---|---|---|
interaction_energy | float | Hartree | E(AB) − E(A) − E(B) |
complex_energy | float | Hartree | Total energy of the full complex |
fragment_a_energy | float | Hartree | Energy of the first fragment |
fragment_b_energy | float | Hartree | Energy of the second fragment |
How It Works
- Bond guessing — The job uses a cheminformatics-based bond guesser to detect covalent connectivity in the complex.
- Fragment separation — Connected components in the bond graph are identified. The largest two components become fragment A and fragment B.
- Energy evaluation — Single-point energies are computed for the complex and each fragment at the specified level of theory.
- Interaction energy — The difference yields the counterpoise-uncorrected interaction energy.
The total charge and multiplicity are assigned to fragment A. Fragment B defaults to neutral singlet. This is a reasonable default for neutral dimers and ion–molecule complexes where one partner is neutral.
Fragment Detection
The job expects exactly two connected components. If the bond guesser finds only one component (all atoms covalently bonded), the job raises an error. If it finds three or more, the job also raises an error — submit such systems pairwise.
The detection algorithm sorts fragments by atom count so that fragment A is always the larger (or equally sized) component, making results deterministic for a given geometry.
Limitations
- No counterpoise correction — The interaction energy is not basis set superposition error (BSSE) corrected. For methods and basis sets where BSSE is significant, use the individual fragment energies with your own counterpoise workflow.
- Two fragments only — Systems with three or more separate molecules must be split into pairwise calculations.
- Charge partitioning — The total charge is assigned entirely to fragment A. Complexes with distributed charge require manual SPE jobs for correct fragment charge states.
Compute Resources
The walltime multiplier is 3.0× the base single-point energy estimate because three evaluations (complex, fragment A, fragment B) run sequentially. CPU cores and memory follow the same automatic tiering as regular single-point energy jobs, based on the largest molecule in the calculation.