Skip to content

Interaction Energy

The InteractionEnergyInput can be used to calculate the interaction energy between two molecules or molecular fragments. This is internally done by performing an energy calculation on the complex or supermolecule as well as on the separate molecules or molecular fragments.

The usage is similar to EnergyInput, but in addition, fragments need to be specified.

Examples

An interaction energy calculation in conjunction with the DFTMethod by default uses the counterpoise correction to correct for the basis set superposition error.

import sierra
from sierra.inputs import *

water_dimer = Molecule(
    data="""
  O     0.090292566619   0.010267287967   0.161419915047
  H     1.038941035484   0.187584401348   0.138499031891
  H    -0.177084237519  -0.101993299023  -0.751576021727
  O     2.986260668496   0.447983365826  -0.124161876074
  H     3.497973949378   0.355136722277   0.680290535463
  H     3.601730017649   0.601021521584  -0.841689584630
"""
)
method = DFTMethod(xc="B97-3c")
input = InteractionEnergyInput(
    molecule=water_dimer, method=method, fragments=[[0, 1, 2]]
)
result = sierra.run(input)

print(f"Interaction energy: {result.interaction_energy:.4f} Hartree")
#> Interaction energy: -0.0056 Hartree
print(f"BSSE (included above): {result.counterpoise_correction:.4f} Hartree")
#> BSSE (included above): -0.0012 Hartree

Methods like OrbNetMethod and XTBMethod are intrinsically basis-set corrected, so that there is no need for using the counterpoise correction.

import sierra
from sierra.inputs import *

water_dimer = Molecule(
    data="""
  O     0.090292566619   0.010267287967   0.161419915047
  H     1.038941035484   0.187584401348   0.138499031891
  H    -0.177084237519  -0.101993299023  -0.751576021727
  O     2.986260668496   0.447983365826  -0.124161876074
  H     3.497973949378   0.355136722277   0.680290535463
  H     3.601730017649   0.601021521584  -0.841689584630
"""
)
method = XTBMethod(model="gfn1")
input = InteractionEnergyInput(
    molecule=water_dimer,
    method=method,
    fragments=[[0, 1, 2]],
    counterpoise=False,
)
result = sierra.run(input)

print(f"Interaction energy: {result.interaction_energy:.4f} Hartree")
#> Interaction energy: -0.0068 Hartree

InteractionEnergyInput

Fields

counterpoise

If true, calculations with ghost atoms will be performed in order to correct the interaction energy for the basis set superposition error.

  • Type: bool
  • Default: True
fragment_charges

The fragments are assumed to be neutral, unless charges are explicitly specified for the fragments. If the 'molecule' is charged, fragment charges must be specified.

  • Type: Tuple[int, int]
  • Default: (0, 0)
fragment_multiplicities

The multiplicity of each fragment. A value of None refers to the lowest multiplicity given the electron number parity.

  • Type: Tuple[int, int]
  • Default: (None, None)
fragments

For both fragments, a list of atom indices (0-based indexing). If only the atoms for a single fragment are specified, the remaining atoms are assigned to the second fragment.

  • Type: Tuple[Array, Array]
method

The computational method for this call

molecule

The molecule the result is computed with

workflow
  • Type: WorkflowIdentifier
  • Default: WorkflowIdentifier(name='interaction_energy', image=None)
details

Additional detail parameters to supply to the computation

Detail Fields

energy_threshold

threshold for energy convergence

  • Type: Optional[float]
result_contract
store_extras

This field determines the amount of output that is kept in the 'extras' field in addition to the requirements of the contract. 'True' will lead to storing all available information and 'False' will lead to storing no information beyond the requirements of the contract. Alternatively, a list of field names can be provided that shall be stored.

  • Type: One of: [bool, List[str]]
  • Default: False

InteractionEnergyResult

Fields

All the fields in InteractionEnergyInput and the following:

counterpoise_correction

The counterpoise correction to the energy if counterpoise; otherwise None.

fragment_energies

The energy of both fragments, calculated in isolation. If counterpoise, a supermolecular basis has been used.

supermolecular_energy

The supermolecular total energy, inclucing the counterpoise_correction if counterpoise.

interaction_energy

The interaction energy between the fragments, inclucing the counterpoise_correction if counterpoise.

  • Type: EnergyQuantity