Adsorption Energies#

Pre-trained ODAC models are versatile across various MOF-related tasks. To begin, we’ll start with a fundamental application: calculating the adsorption energy for a single CO2 molecule. This serves as an excellent and simple demonstration of what you can achieve with these datasets and models.

For predicting the adsorption energy of a single CO2 molecule within a MOF structure, the adsorption energy (\(E_{\mathrm{ads}}\)) is defined as:

\[ E_{\mathrm{ads}} = E_{\mathrm{MOF+CO2}} - E_{\mathrm{MOF}} - E_{\mathrm{CO2}} \tag{1}\]

Each term on the right-hand side represents the energy of the relaxed state of the indicated chemical system. For a comprehensive understanding of our methodology for computing these adsorption energies, please refer to our paper.

Loading Pre-trained Models#

A pre-trained model can be loaded using FAIRChemCalculator. In this example, we’ll employ UMA to determine the CO2 adsorption energies.

from fairchem.core import FAIRChemCalculator, pretrained_mlip

predictor = pretrained_mlip.get_predict_unit("uma-s-1p1")
calc = FAIRChemCalculator(predictor, task_name="odac")
WARNING:root:device was not explicitly set, using device='cuda'.

Adsorption in rigid MOFs: CO2 Adsorption Energy in Mg-MOF-74#

Let’s apply our knowledge to Mg-MOF-74, a widely studied MOF known for its excellent CO2 adsorption properties. Its structure comprises magnesium atomic complexes connected by a carboxylated and oxidized benzene ring, serving as an organic linker. Previous studies consistently report the CO2 adsorption energy for Mg-MOF-74 to be around -0.40 eV [1] [2] [3].

Our goal is to verify if we can achieve a similar value by performing a simple single-point calculation using UMA. In the ODAC23 dataset, all MOF structures are identified by their CSD (Cambridge Structural Database) code. For Mg-MOF-74, this code is OPAGIX. We’ve extracted a specific OPAGIX+CO2 configuration from the dataset, which exhibits the lowest adsorption energy among its counterparts.

import matplotlib.pyplot as plt
from ase.io import read
from ase.visualize.plot import plot_atoms

mof_co2 = read("structures/OPAGIX_w_CO2.cif")
mof = read("structures/OPAGIX.cif")
co2 = read("structures/co2.xyz")

fig, ax = plt.subplots(figsize=(5, 4.5), dpi=250)
plot_atoms(mof_co2, ax)
ax.set_axis_off()
../../_images/5d0d87751a2c838512e931cd479c6f60fcca902f43fa061961a3f469282cb6c0.png

The final step in calculating the adsorption energy involves connecting the FAIRChemCalculator to each relaxed structure: OPAGIX+CO2, OPAGIX, and CO2. The structures used here are already relaxed from ODAC23. For simplicity, we assume here that further relaxations can be neglected. We will show how to go beyond this assumption in the next section.

mof_co2.calc = calc
mof.calc = calc
co2.calc = calc

E_ads = (
    mof_co2.get_potential_energy()
    - mof.get_potential_energy()
    - co2.get_potential_energy()
)

print(f"Adsorption energy of CO2 in Mg-MOF-74: {E_ads:.3f} eV")
Adsorption energy of CO2 in Mg-MOF-74: -0.459 eV

Adsorption in flexible MOFs#

The adsorption energy calculation method outlined above is typically performed with rigid MOFs for simplicity. Both experimental and modeling literature have shown, however, that MOF flexibility can be important in accurately capturing the underlying chemistry of adsorption [1] [2] [3]. In particular, uptake can be improved by treating MOFs as flexible. Two types of MOF flexibility can be considered: intrinsic flexibility and deformation induced by guest molecules. In the Open DAC Project, we consider the latter MOF deformation by allowing the atomic positions of the MOF to relax during geometry optimization [4]. The addition of additional degrees of freedoms can complicate the computation of the adsorption energy and necessitates an extra step in the calculation procedure.

The figure below shows water adsorption in the MOF with CSD code WOBHEB with added defects (WOBHEB_0.11_0) from a DFT simulation. A typical adsorption energy calculation would only seek to capture the effects shaded in purple, which include both chemisorption and non-bonded interactions between the host and guest molecule. When allowing the MOF to relax, however, the adsorption energy also includes the energetic effect of the MOF deformation highlighted in green.

To account for this deformation, it is vital to use the most energetically favorable MOF geometry for the empty MOF term in Eqn. 1. Including MOF atomic coordinates as degrees of freedom can result in three possible outcomes:

  1. The MOF does not deform, so the energies of the relaxed empty MOF and the MOF in the adsorbed state are the same

  2. The MOF deforms to a less energetically favorable geometry than its ground state

  3. The MOF locates a new energetically favorable geoemtry relative to the empty MOF relaxation

The first outcome requires no additional computation because the MOF rigidity assumption is valid. The second outcome represents physical and reversible deformation where the MOF returns to its empty ground state upon removal of the guest molecule. The third outcome is often the result of the guest molecule breaking local symmetry. We also found cases in ODAC in which both outcomes 2 and 3 occur within the same MOF.

To ensure the most energetically favorable empty MOF geometry is found, an addition empty MOF relaxation should be performed after MOF + adsorbate relaxation. The guest molecule should be removed, and the MOF should be relaxed starting from its geometry in the adsorbed state. If all deformation is reversible, the MOF will return to its original empty geometry. Otherwise, the lowest energy (most favorable) MOF geometry should be taken as the reference energy, \(E_{\mathrm{MOF}}\), in Eqn. 1.

H2O Adsorption Energy in Flexible WOBHEB with UMA#

The first part of this tutorial demonstrates how to perform a single point adsorption energy calculation using UMA. To treat MOFs as flexible, we perform all calculations on geometries determined by geometry optimization. The following example corresponds to the figure shown above (H2O adsorption in WOBHEB_0.11_0).

In this tutorial, \(E_{x}(r_{y})\) corresponds to the energy of \(x\) determined from geometry optimization of \(y\).

First, we obtain the energy of the empty MOF from relaxation of only the MOF: \(E_{\mathrm{MOF}}(r_{\mathrm{MOF}})\)

import ase.io
from ase.optimize import BFGS

mof = ase.io.read("structures/WOBHEB_0.11.cif")
mof.calc = calc
relax = BFGS(mof)
relax.run(fmax=0.05)
E_mof_empty = mof.get_potential_energy()
print(f"Energy of empty MOF: {E_mof_empty:.3f} eV")
      Step     Time          Energy          fmax
BFGS:    0 05:30:11    -1077.274062        0.206406
BFGS:    1 05:30:11    -1077.276780        0.152729
BFGS:    2 05:30:11    -1077.281941        0.169930
BFGS:    3 05:30:12    -1077.284774        0.155757
BFGS:    4 05:30:12    -1077.288836        0.108762
BFGS:    5 05:30:12    -1077.291025        0.086450
BFGS:    6 05:30:12    -1077.293360        0.093429
BFGS:    7 05:30:12    -1077.295412        0.100097
BFGS:    8 05:30:13    -1077.297829        0.102519
BFGS:    9 05:30:13    -1077.300012        0.091595
BFGS:   10 05:30:13    -1077.302009        0.078979
BFGS:   11 05:30:13    -1077.304136        0.105559
BFGS:   12 05:30:14    -1077.306720        0.087955
BFGS:   13 05:30:14    -1077.309517        0.086338
BFGS:   14 05:30:14    -1077.312265        0.086858
BFGS:   15 05:30:14    -1077.314703        0.106275
BFGS:   16 05:30:14    -1077.316986        0.106203
BFGS:   17 05:30:15    -1077.319484        0.085517
BFGS:   18 05:30:15    -1077.322258        0.109633
BFGS:   19 05:30:15    -1077.325134        0.148681
BFGS:   20 05:30:15    -1077.327763        0.125952
BFGS:   21 05:30:16    -1077.329922        0.069106
BFGS:   22 05:30:16    -1077.331953        0.087263
BFGS:   23 05:30:16    -1077.334272        0.125256
BFGS:   24 05:30:16    -1077.336835        0.166683
BFGS:   25 05:30:16    -1077.339543        0.145556
BFGS:   26 05:30:17    -1077.342148        0.087677
BFGS:   27 05:30:17    -1077.344541        0.076150
BFGS:   28 05:30:17    -1077.346892        0.148956
BFGS:   29 05:30:17    -1077.349783        0.170197
BFGS:   30 05:30:18    -1077.352530        0.109257
BFGS:   31 05:30:18    -1077.354746        0.070318
BFGS:   32 05:30:18    -1077.356775        0.089691
BFGS:   33 05:30:18    -1077.358659        0.124293
BFGS:   34 05:30:18    -1077.360604        0.108019
BFGS:   35 05:30:19    -1077.362473        0.068640
BFGS:   36 05:30:19    -1077.364167        0.070219
BFGS:   37 05:30:19    -1077.365711        0.105415
BFGS:   38 05:30:19    -1077.367259        0.104295
BFGS:   39 05:30:20    -1077.368764        0.062694
BFGS:   40 05:30:20    -1077.370134        0.057438
BFGS:   41 05:30:20    -1077.371356        0.062747
BFGS:   42 05:30:20    -1077.372407        0.065825
BFGS:   43 05:30:20    -1077.373380        0.058384
BFGS:   44 05:30:21    -1077.374362        0.042869
Energy of empty MOF: -1077.374 eV

Next, we add the H2O guest molecule and relax the MOF + adsorbate to obtain \(E_{\mathrm{MOF+H2O}}(r_{\mathrm{MOF+H2O}})\).

mof_h2o = ase.io.read("structures/WOBHEB_H2O.cif")
mof_h2o.calc = calc
relax = BFGS(mof_h2o)
relax.run(fmax=0.05)
E_combo = mof_h2o.get_potential_energy()
print(f"Energy of MOF + H2O: {E_combo:.3f} eV")
      Step     Time          Energy          fmax
BFGS:    0 05:30:21    -1091.565588        1.145035
BFGS:    1 05:30:21    -1091.585063        0.314149
BFGS:    2 05:30:22    -1091.590211        0.243429
BFGS:    3 05:30:22    -1091.608167        0.237238
BFGS:    4 05:30:22    -1091.614633        0.227946
BFGS:    5 05:30:22    -1091.625217        0.186770
BFGS:    6 05:30:22    -1091.632355        0.178894
BFGS:    7 05:30:23    -1091.640631        0.175068
BFGS:    8 05:30:23    -1091.648042        0.184456
BFGS:    9 05:30:23    -1091.656148        0.160904
BFGS:   10 05:30:23    -1091.663842        0.178439
BFGS:   11 05:30:24    -1091.672296        0.188663
BFGS:   12 05:30:24    -1091.682089        0.157423
BFGS:   13 05:30:24    -1091.692982        0.177263
BFGS:   14 05:30:24    -1091.704431        0.158170
BFGS:   15 05:30:25    -1091.715512        0.191629
BFGS:   16 05:30:25    -1091.725710        0.197832
BFGS:   17 05:30:25    -1091.735329        0.163753
BFGS:   18 05:30:25    -1091.745541        0.151529
BFGS:   19 05:30:25    -1091.754022        0.170852
BFGS:   20 05:30:26    -1091.761497        0.153587
BFGS:   21 05:30:26    -1091.767895        0.152673
BFGS:   22 05:30:26    -1091.774205        0.166008
BFGS:   23 05:30:26    -1091.780886        0.135383
BFGS:   24 05:30:27    -1091.788357        0.181012
BFGS:   25 05:30:27    -1091.794279        0.204515
BFGS:   26 05:30:27    -1091.800633        0.131419
BFGS:   27 05:30:27    -1091.806516        0.190031
BFGS:   28 05:30:28    -1091.812301        0.199190
BFGS:   29 05:30:28    -1091.817178        0.151646
BFGS:   30 05:30:28    -1091.822218        0.100129
BFGS:   31 05:30:28    -1091.826302        0.125634
BFGS:   32 05:30:28    -1091.832527        0.177376
BFGS:   33 05:30:29    -1091.837117        0.246838
BFGS:   34 05:30:29    -1091.842041        0.112743
BFGS:   35 05:30:29    -1091.845774        0.329233
BFGS:   36 05:30:29    -1091.850868        0.174676
BFGS:   37 05:30:30    -1091.858479        0.159674
BFGS:   38 05:30:30    -1091.865280        0.141351
BFGS:   39 05:30:30    -1091.872011        0.141415
BFGS:   40 05:30:30    -1091.878314        0.250969
BFGS:   41 05:30:31    -1091.880675        0.558379
BFGS:   42 05:30:31    -1091.886135        0.642685
BFGS:   43 05:30:31    -1091.893805        0.224307
BFGS:   44 05:30:31    -1091.899393        0.160979
BFGS:   45 05:30:31    -1091.916844        0.250991
BFGS:   46 05:30:32    -1091.924777        0.379647
BFGS:   47 05:30:32    -1091.939840        0.278122
BFGS:   48 05:30:32    -1091.955576        0.389290
BFGS:   49 05:30:32    -1091.976369        0.629274
BFGS:   50 05:30:33    -1091.969078        1.432857
BFGS:   51 05:30:33    -1092.006183        0.312937
BFGS:   52 05:30:33    -1092.022278        0.283276
BFGS:   53 05:30:33    -1092.071270        0.323334
BFGS:   54 05:30:34    -1092.087518        0.282852
BFGS:   55 05:30:34    -1092.120326        0.385647
BFGS:   56 05:30:34    -1092.127821        0.548098
BFGS:   57 05:30:34    -1092.142371        0.263540
BFGS:   58 05:30:34    -1092.157406        0.263605
BFGS:   59 05:30:35    -1092.170757        0.281025
BFGS:   60 05:30:35    -1092.181235        0.282599
BFGS:   61 05:30:35    -1092.192711        0.368930
BFGS:   62 05:30:35    -1092.203904        0.411732
BFGS:   63 05:30:36    -1092.215174        0.351375
BFGS:   64 05:30:36    -1092.224976        0.236593
BFGS:   65 05:30:36    -1092.232424        0.117195
BFGS:   66 05:30:36    -1092.238478        0.110235
BFGS:   67 05:30:37    -1092.243960        0.129565
BFGS:   68 05:30:37    -1092.249730        0.140869
BFGS:   69 05:30:37    -1092.254691        0.123975
BFGS:   70 05:30:37    -1092.259929        0.090250
BFGS:   71 05:30:37    -1092.264493        0.089426
BFGS:   72 05:30:38    -1092.268480        0.115142
BFGS:   73 05:30:38    -1092.272152        0.140609
BFGS:   74 05:30:38    -1092.275632        0.178467
BFGS:   75 05:30:38    -1092.278869        0.182508
BFGS:   76 05:30:39    -1092.282420        0.135669
BFGS:   77 05:30:39    -1092.285190        0.098786
BFGS:   78 05:30:39    -1092.287684        0.094928
BFGS:   79 05:30:39    -1092.290122        0.096927
BFGS:   80 05:30:40    -1092.292041        0.106282
BFGS:   81 05:30:40    -1092.293822        0.072174
BFGS:   82 05:30:40    -1092.295197        0.083740
BFGS:   83 05:30:40    -1092.296585        0.072721
BFGS:   84 05:30:41    -1092.297997        0.077375
BFGS:   85 05:30:41    -1092.299618        0.071146
BFGS:   86 05:30:41    -1092.301326        0.087822
BFGS:   87 05:30:41    -1092.302999        0.098169
BFGS:   88 05:30:41    -1092.304805        0.082611
BFGS:   89 05:30:42    -1092.306292        0.062241
BFGS:   90 05:30:42    -1092.307700        0.047373
Energy of MOF + H2O: -1092.308 eV

We can now isolate the MOF atoms from the relaxed MOF + H2O geometry and see that the MOF has adopted a geometry that is less energetically favorable than the empty MOF by ~0.2 eV. The energy of the MOF in the adsorbed state corresponds to \(E_{\mathrm{MOF}}(r_{\mathrm{MOF+H2O}})\).

mof_adsorbed_state = mof_h2o[:-3]
mof_adsorbed_state.calc = calc
E_mof_adsorbed_state = mof_adsorbed_state.get_potential_energy()
print(f"Energy of MOF in the adsorbed state: {E_mof_adsorbed_state:.3f} eV")
Energy of MOF in the adsorbed state: -1077.090 eV

H2O adsorption in this MOF appears to correspond to Case #2 as outlined above. We can now perform re-relaxation of the empty MOF starting from the \(r_{\mathrm{MOF+H2O}}\) geometry.

relax = BFGS(mof_adsorbed_state)
relax.run(fmax=0.05)
E_mof_rerelax = mof_adsorbed_state.get_potential_energy()
print(f"Energy of re-relaxed empty MOF: {E_mof_rerelax:.3f} eV")
      Step     Time          Energy          fmax
BFGS:    0 05:30:42    -1077.090379        0.983683
BFGS:    1 05:30:42    -1077.122747        0.872057
BFGS:    2 05:30:43    -1077.172500        0.801716
BFGS:    3 05:30:43    -1077.212256        0.502565
BFGS:    4 05:30:43    -1077.232006        0.438778
BFGS:    5 05:30:43    -1077.250016        0.282617
BFGS:    6 05:30:43    -1077.260778        0.260615
BFGS:    7 05:30:44    -1077.270252        0.246811
BFGS:    8 05:30:44    -1077.279537        0.211466
BFGS:    9 05:30:44    -1077.286618        0.184635
BFGS:   10 05:30:44    -1077.291787        0.150621
BFGS:   11 05:30:45    -1077.295874        0.140548
BFGS:   12 05:30:45    -1077.299513        0.145925
BFGS:   13 05:30:45    -1077.304187        0.185932
BFGS:   14 05:30:45    -1077.308949        0.174054
BFGS:   15 05:30:46    -1077.313544        0.135798
BFGS:   16 05:30:46    -1077.317665        0.164901
BFGS:   17 05:30:46    -1077.321871        0.151415
BFGS:   18 05:30:46    -1077.326240        0.144718
BFGS:   19 05:30:47    -1077.329796        0.113662
BFGS:   20 05:30:47    -1077.332429        0.109195
BFGS:   21 05:30:47    -1077.334667        0.099860
BFGS:   22 05:30:47    -1077.336954        0.122027
BFGS:   23 05:30:48    -1077.339655        0.117977
BFGS:   24 05:30:48    -1077.342278        0.089853
BFGS:   25 05:30:48    -1077.344599        0.091038
BFGS:   26 05:30:48    -1077.346515        0.068103
BFGS:   27 05:30:48    -1077.348058        0.068266
BFGS:   28 05:30:49    -1077.349762        0.090829
BFGS:   29 05:30:49    -1077.351319        0.095438
BFGS:   30 05:30:49    -1077.352923        0.064476
BFGS:   31 05:30:49    -1077.354107        0.050820
BFGS:   32 05:30:50    -1077.355410        0.054591
BFGS:   33 05:30:50    -1077.356784        0.084050
BFGS:   34 05:30:50    -1077.358170        0.078935
BFGS:   35 05:30:50    -1077.359697        0.068700
BFGS:   36 05:30:50    -1077.361104        0.070686
BFGS:   37 05:30:51    -1077.362383        0.073841
BFGS:   38 05:30:51    -1077.363552        0.084890
BFGS:   39 05:30:51    -1077.364875        0.081208
BFGS:   40 05:30:51    -1077.365857        0.067486
BFGS:   41 05:30:52    -1077.366877        0.058424
BFGS:   42 05:30:52    -1077.367964        0.059606
BFGS:   43 05:30:52    -1077.368995        0.070513
BFGS:   44 05:30:52    -1077.370251        0.076406
BFGS:   45 05:30:53    -1077.371404        0.048500
Energy of re-relaxed empty MOF: -1077.371 eV

The MOF returns to its original empty reference energy upon re-relaxation, confirming that this deformation is physically relevant and is induced by the adsorbate molecule. In Case #3, this re-relaxed energy will be more negative (more favorable) than the original empty MOF relaxation. Thus, we take the reference empty MOF energy (\(E_{\mathrm{MOF}}\) in Eqn. 1) to be the minimum of the original empty MOF energy and the re-relaxed MOf energy:

E_mof = min(E_mof_empty, E_mof_rerelax)

# get adsorbate reference energy
h2o = mof_h2o[-3:]
h2o.calc = calc
E_h2o = h2o.get_potential_energy()

# compute adsorption energy
E_ads = E_combo - E_mof - E_h2o
print(f"Adsorption energy of H2O in WOBHEB_0.11_0: {E_ads:.3f} eV")
Adsorption energy of H2O in WOBHEB_0.11_0: -0.685 eV

This adsorption energy closely matches that from DFT (–0.699 eV) [1]. The strong adsorption energy is a consequence of both H2O chemisorption and MOF deformation. We can decompose the adsorption energy into contributions from these two factors. Assuming rigid H2O molecules, we define \(E_{\mathrm{int}}\) and \(E_{\mathrm{MOF,deform}}\), respectively, as

\[ E_{\mathrm{int}} = E_{\mathrm{MOF+H2O}}(r_{\mathrm{MOF+H2O}}) - E_{\mathrm{MOF}}(r_{\mathrm{MOF+H2O}}) - E_{\mathrm{H2O}}(r_{\mathrm{MOF+H2O}}) \tag{2}\]
\[ E_{\mathrm{MOF,deform}} = E_{\mathrm{MOF}}(r_{\mathrm{MOF+H2O}}) - E_{\mathrm{MOF}}(r_{\mathrm{MOF}}) \tag{3}\]

\(E_{\mathrm{int}}\) describes host host–guest interactions for the MOF in the adsorbed state only. \(E_{\mathrm{MOF,deform}}\) quantifies the magnitude of deformation between the MOF in the adsorbed state and the most energetically favorable empty MOF geometry determined from the workflow presented here. It can be shown that

\[ E_{\mathrm{ads}} = E_{\mathrm{int}} + E_{\mathrm{MOF,deform}} \tag{4}\]

For H2O adsorption in WOBHEB_0.11, we have

E_int = E_combo - E_mof_adsorbed_state - E_h2o
print(f"E_int: {E_int}")
E_int: -0.9693084359167141
E_mof_deform = E_mof_adsorbed_state - E_mof_empty
print(f"E_mof_deform: {E_mof_deform}")
E_mof_deform: 0.2839837074279785
E_ads = E_int + E_mof_deform
print(f"E_ads: {E_ads}")
E_ads: -0.6853247284887356

\(E_{\mathrm{int}}\) is equivalent to \(E_{\mathrm{ads}}\) when the MOF is assumed to be rigid. In this case, failure to consider adsorbate-induced deformation would result in an overestimation of the adsorption energy magnitude.

Acknowledgements & Authors#

Logan Brabson and Sihoon Choi (Georgia Tech) and the OpenDAC project.