| Property | Value |
|---|---|
| Difficulty | Advanced |
| Time | 30-45 minutes |
| Prerequisites | Understanding of NEB, ASE, catalysis |
| Goal | Find transition states using CatTsunami tools |
FAIR chemistry models can be used to enumerate and study reaction pathways via transition state search tools built into ASE or in packages like Sella via the ASE interface.
Since the NEB calculations here can be a bit time consuming, we’ll use a small number of steps during the documentation testing, and otherwise use a reasonable guess.
import os
# Use a small number of steps here to keep the docs fast during CI, but otherwise do quite reasonable settings.
fast_docs = os.environ.get("FAST_DOCS", "false").lower() == "true"
if fast_docs:
optimization_steps = 20
else:
optimization_steps = 300Need to install fairchem-core or get UMA access or getting permissions/401 errors?
Install the necessary packages using pip, uv etc
! pip install fairchem-core fairchem-data-oc fairchem-applications-cattsunamiGet access to any necessary huggingface gated models
Get and login to your Huggingface account
Request access to https://
huggingface .co /facebook /UMA Create a Huggingface token at https://
huggingface .co /settings /tokens/ with the permission “Permissions: Read access to contents of all public gated repos you can access” Add the token as an environment variable using
huggingface-cli loginor by setting the HF_TOKEN environment variable.
# Login using the huggingface-cli utility
! huggingface-cli login
# alternatively,
import os
os.environ['HF_TOKEN'] = 'MY_TOKEN'Do enumerations in an AdsorbML style¶
from __future__ import annotations
import matplotlib.pyplot as plt
from ase.io import read
from ase.mep import DyNEB
from ase.optimize import BFGS
from fairchem.applications.cattsunami.core import Reaction
from fairchem.applications.cattsunami.core.autoframe import AutoFrameDissociation
from fairchem.applications.cattsunami.databases import DISSOCIATION_REACTION_DB_PATH
from fairchem.core import FAIRChemCalculator, pretrained_mlip
from fairchem.data.oc.core import Adsorbate, AdsorbateSlabConfig, Bulk, Slab
from fairchem.data.oc.databases.pkls import ADSORBATE_PKL_PATH, BULK_PKL_PATH
from x3dase.x3d import X3D
# Instantiate the reaction class for the reaction of interest
reaction = Reaction(
reaction_str_from_db="*CH -> *C + *H",
reaction_db_path=DISSOCIATION_REACTION_DB_PATH,
adsorbate_db_path=ADSORBATE_PKL_PATH,
)/home/runner/work/_tool/Python/3.12.13/x64/lib/python3.12/site-packages/fairchem/applications/cattsunami/core/reaction.py:29: UserWarning: Loading data from a pickle file. Pickle files can execute arbitrary code and should only be loaded from trusted sources. Consider migrating to a safer format such as Parquet, CSV, or JSON.
reaction_db = safe_pickle_load(reaction_db_path)
/home/runner/work/_tool/Python/3.12.13/x64/lib/python3.12/site-packages/fairchem/applications/cattsunami/core/reaction.py:30: UserWarning: Loading data from a pickle file. Pickle files can execute arbitrary code and should only be loaded from trusted sources. Consider migrating to a safer format such as Parquet, CSV, or JSON.
adsorbate_db = safe_pickle_load(adsorbate_db_path)
# Instantiate our adsorbate class for the reactant and product
reactant = Adsorbate(
adsorbate_id_from_db=reaction.reactant1_idx, adsorbate_db_path=ADSORBATE_PKL_PATH
)
product1 = Adsorbate(
adsorbate_id_from_db=reaction.product1_idx, adsorbate_db_path=ADSORBATE_PKL_PATH
)
product2 = Adsorbate(
adsorbate_id_from_db=reaction.product2_idx, adsorbate_db_path=ADSORBATE_PKL_PATH
)/home/runner/work/_tool/Python/3.12.13/x64/lib/python3.12/site-packages/fairchem/data/oc/core/adsorbate.py:79: UserWarning: Loading data from a pickle file. Pickle files can execute arbitrary code and should only be loaded from trusted sources. Consider migrating to a safer format such as Parquet, CSV, or JSON.
adsorbate_db = safe_pickle_load(fp)
# Grab the bulk and cut the slab we are interested in
bulk = Bulk(bulk_src_id_from_db="mp-33", bulk_db_path=BULK_PKL_PATH)
slab = Slab.from_bulk_get_specific_millers(bulk=bulk, specific_millers=(0, 0, 1))/home/runner/work/_tool/Python/3.12.13/x64/lib/python3.12/site-packages/fairchem/data/oc/core/bulk.py:66: UserWarning: Loading data from a pickle file. Pickle files can execute arbitrary code and should only be loaded from trusted sources. Consider migrating to a safer format such as Parquet, CSV, or JSON.
bulk_db = safe_pickle_load(fp)
# Perform site enumeration
# For AdsorbML num_sites = 100, but we use 5 here for brevity. This should be increased for practical use.
reactant_configs = AdsorbateSlabConfig(
slab=slab[0],
adsorbate=reactant,
mode="random_site_heuristic_placement",
num_sites=10,
).atoms_list
product1_configs = AdsorbateSlabConfig(
slab=slab[0],
adsorbate=product1,
mode="random_site_heuristic_placement",
num_sites=10,
).atoms_list
product2_configs = AdsorbateSlabConfig(
slab=slab[0],
adsorbate=product2,
mode="random_site_heuristic_placement",
num_sites=10,
).atoms_list# Instantiate the calculator
predictor = pretrained_mlip.get_predict_unit("uma-s-1p2")
calc = FAIRChemCalculator(predictor, task_name="oc20")WARNING:root:device was not explicitly set, using device='cuda'.
# Relax the reactant systems
reactant_energies = []
for config in reactant_configs:
config.calc = calc
config.pbc = True
opt = BFGS(config)
opt.run(fmax=0.05, steps=optimization_steps)
reactant_energies.append(config.get_potential_energy()) Step Time Energy fmax
BFGS: 0 22:04:44 -302.182123 3.951200
BFGS: 1 22:04:44 -302.550916 3.070993
BFGS: 2 22:04:45 -303.489488 3.180399
BFGS: 3 22:04:45 -303.676685 2.948564
BFGS: 4 22:04:46 -303.922250 1.671678
BFGS: 5 22:04:46 -304.050540 1.817757
BFGS: 6 22:04:46 -304.102161 1.226749
BFGS: 7 22:04:47 -304.230989 0.772960
BFGS: 8 22:04:47 -304.256728 0.758920
BFGS: 9 22:04:47 -304.299361 0.523954
BFGS: 10 22:04:48 -304.317465 0.346186
BFGS: 11 22:04:48 -304.328628 0.225458
BFGS: 12 22:04:49 -304.332692 0.235399
BFGS: 13 22:04:49 -304.337372 0.194303
BFGS: 14 22:04:49 -304.340623 0.162572
BFGS: 15 22:04:50 -304.342393 0.130076
BFGS: 16 22:04:50 -304.343312 0.118082
BFGS: 17 22:04:51 -304.344326 0.128528
BFGS: 18 22:04:51 -304.345951 0.150008
BFGS: 19 22:04:52 -304.347870 0.139220
BFGS: 20 22:04:52 -304.349310 0.090474
Step Time Energy fmax
BFGS: 0 22:04:53 -301.196469 4.158237
BFGS: 1 22:04:53 -301.589630 3.478541
BFGS: 2 22:04:54 -302.608591 3.246684
BFGS: 3 22:04:54 -302.677382 4.099408
BFGS: 4 22:04:55 -302.925616 2.377601
BFGS: 5 22:04:55 -303.077220 1.758904
BFGS: 6 22:04:55 -303.118827 1.252174
BFGS: 7 22:04:56 -303.270874 1.725407
BFGS: 8 22:04:56 -303.352170 1.529085
BFGS: 9 22:04:57 -303.478941 1.496114
BFGS: 10 22:04:57 -303.578437 1.561614
BFGS: 11 22:04:57 -303.850896 2.291701
BFGS: 12 22:04:58 -303.921038 1.696044
BFGS: 13 22:04:58 -303.978788 0.888312
BFGS: 14 22:04:59 -304.046962 0.877124
BFGS: 15 22:04:59 -304.071321 0.824517
BFGS: 16 22:05:00 -304.131899 0.463965
BFGS: 17 22:05:00 -304.143366 0.294907
BFGS: 18 22:05:01 -304.156962 0.349023
BFGS: 19 22:05:01 -304.166249 0.450978
BFGS: 20 22:05:02 -304.181422 0.432740
Step Time Energy fmax
BFGS: 0 22:05:02 -301.829290 4.239682
BFGS: 1 22:05:02 -302.237853 3.564268
BFGS: 2 22:05:03 -303.246257 3.033882
BFGS: 3 22:05:03 -303.411589 3.879442
BFGS: 4 22:05:04 -303.670208 2.143794
BFGS: 5 22:05:04 -303.883037 1.941473
BFGS: 6 22:05:04 -303.935335 1.095430
BFGS: 7 22:05:05 -304.020437 0.977983
BFGS: 8 22:05:05 -304.055023 0.822400
BFGS: 9 22:05:06 -304.112609 0.782732
BFGS: 10 22:05:06 -304.142186 0.601819
BFGS: 11 22:05:07 -304.171092 0.358764
BFGS: 12 22:05:07 -304.178872 0.191915
BFGS: 13 22:05:08 -304.182801 0.224043
BFGS: 14 22:05:08 -304.187128 0.239019
BFGS: 15 22:05:09 -304.191228 0.253949
BFGS: 16 22:05:09 -304.193646 0.184428
BFGS: 17 22:05:10 -304.195746 0.148517
BFGS: 18 22:05:10 -304.199494 0.283660
BFGS: 19 22:05:11 -304.208276 0.518165
BFGS: 20 22:05:11 -304.215655 0.746799
Step Time Energy fmax
BFGS: 0 22:05:11 -301.427201 4.164698
BFGS: 1 22:05:12 -301.807352 3.374596
BFGS: 2 22:05:12 -302.745548 3.246082
BFGS: 3 22:05:12 -302.866998 3.104721
BFGS: 4 22:05:13 -303.104441 2.017326
BFGS: 5 22:05:13 -303.228602 3.095577
BFGS: 6 22:05:14 -303.316841 1.548745
BFGS: 7 22:05:14 -303.456819 0.974323
BFGS: 8 22:05:15 -303.778898 2.085014
BFGS: 9 22:05:15 -303.861000 2.515118
BFGS: 10 22:05:16 -303.991158 1.816479
BFGS: 11 22:05:16 -304.137921 1.099743
BFGS: 12 22:05:16 -304.223788 1.364431
BFGS: 13 22:05:17 -304.286386 1.148846
BFGS: 14 22:05:17 -304.386164 1.187968
BFGS: 15 22:05:18 -304.447770 1.001883
BFGS: 16 22:05:18 -304.499101 0.759565
BFGS: 17 22:05:19 -304.572487 0.538013
BFGS: 18 22:05:19 -304.586249 0.438292
BFGS: 19 22:05:20 -304.603759 0.301932
BFGS: 20 22:05:20 -304.614898 0.396103
Step Time Energy fmax
BFGS: 0 22:05:20 -302.052381 4.095423
BFGS: 1 22:05:21 -302.441961 3.223257
BFGS: 2 22:05:21 -303.398188 3.159112
BFGS: 3 22:05:21 -303.570691 2.921476
BFGS: 4 22:05:22 -303.797308 1.715170
BFGS: 5 22:05:22 -303.906548 1.742403
BFGS: 6 22:05:23 -303.948066 1.039264
BFGS: 7 22:05:23 -304.043066 0.782803
BFGS: 8 22:05:24 -304.080588 0.924824
BFGS: 9 22:05:24 -304.113102 0.744008
BFGS: 10 22:05:24 -304.149596 0.426364
BFGS: 11 22:05:25 -304.171410 0.397284
BFGS: 12 22:05:25 -304.184537 0.327931
BFGS: 13 22:05:26 -304.195183 0.307337
BFGS: 14 22:05:26 -304.201913 0.289389
BFGS: 15 22:05:26 -304.210497 0.347943
BFGS: 16 22:05:27 -304.223463 0.457947
BFGS: 17 22:05:27 -304.245979 0.781777
BFGS: 18 22:05:28 -304.257286 1.747714
BFGS: 19 22:05:28 -304.301217 0.929039
BFGS: 20 22:05:29 -304.345880 0.817471
Step Time Energy fmax
BFGS: 0 22:05:29 -301.592734 4.146710
BFGS: 1 22:05:29 -301.981423 3.042418
BFGS: 2 22:05:30 -302.938026 3.460598
BFGS: 3 22:05:31 -303.103180 3.237995
BFGS: 4 22:05:31 -303.452240 2.041092
BFGS: 5 22:05:31 -303.576978 3.054463
BFGS: 6 22:05:32 -303.691832 2.301496
BFGS: 7 22:05:32 -303.956811 1.276097
BFGS: 8 22:05:33 -303.995292 0.625712
BFGS: 9 22:05:33 -304.046447 0.702369
BFGS: 10 22:05:34 -304.147744 0.764393
BFGS: 11 22:05:34 -304.208982 0.684329
BFGS: 12 22:05:35 -304.259316 0.687089
BFGS: 13 22:05:35 -304.290290 0.815184
BFGS: 14 22:05:36 -304.364128 1.264795
BFGS: 15 22:05:36 -304.397505 1.290476
BFGS: 16 22:05:37 -304.449943 1.054364
BFGS: 17 22:05:37 -304.491838 0.743238
BFGS: 18 22:05:38 -304.537322 0.534620
BFGS: 19 22:05:38 -304.556032 0.530230
BFGS: 20 22:05:39 -304.577855 0.351013
Step Time Energy fmax
BFGS: 0 22:05:39 -302.212310 4.101396
BFGS: 1 22:05:39 -302.600812 3.168386
BFGS: 2 22:05:40 -303.506360 3.106888
BFGS: 3 22:05:40 -303.666522 2.742903
BFGS: 4 22:05:41 -303.902366 1.297109
BFGS: 5 22:05:41 -303.951933 1.224691
BFGS: 6 22:05:42 -304.014034 1.487519
BFGS: 7 22:05:42 -304.124540 0.879585
BFGS: 8 22:05:43 -304.160509 0.666497
BFGS: 9 22:05:43 -304.221453 0.773205
BFGS: 10 22:05:44 -304.302576 1.310468
BFGS: 11 22:05:44 -304.365872 1.525791
BFGS: 12 22:05:45 -304.415635 1.154575
BFGS: 13 22:05:45 -304.455651 0.909612
BFGS: 14 22:05:46 -304.503517 1.006202
BFGS: 15 22:05:46 -304.536612 0.511419
BFGS: 16 22:05:47 -304.544522 0.552287
BFGS: 17 22:05:47 -304.559586 0.383213
BFGS: 18 22:05:48 -304.570129 0.420537
BFGS: 19 22:05:48 -304.587464 0.447229
BFGS: 20 22:05:48 -304.610880 0.510064
Step Time Energy fmax
BFGS: 0 22:05:49 -301.361442 4.126246
BFGS: 1 22:05:49 -301.746779 3.115346
BFGS: 2 22:05:49 -302.739302 3.480702
BFGS: 3 22:05:50 -302.873579 3.463034
BFGS: 4 22:05:50 -303.159078 2.009418
BFGS: 5 22:05:51 -303.251170 2.926268
BFGS: 6 22:05:51 -303.327671 1.284480
BFGS: 7 22:05:52 -303.406409 1.023445
BFGS: 8 22:05:52 -303.722971 1.846857
BFGS: 9 22:05:53 -303.806777 2.546587
BFGS: 10 22:05:53 -303.898104 1.858555
BFGS: 11 22:05:54 -303.992350 0.809350
BFGS: 12 22:05:54 -304.066262 0.911000
BFGS: 13 22:05:54 -304.088261 0.526673
BFGS: 14 22:05:55 -304.116199 0.551447
BFGS: 15 22:05:55 -304.128490 0.371974
BFGS: 16 22:05:56 -304.135475 0.235058
BFGS: 17 22:05:56 -304.144149 0.253255
BFGS: 18 22:05:56 -304.153071 0.260569
BFGS: 19 22:05:57 -304.159756 0.236081
BFGS: 20 22:05:57 -304.164191 0.210792
Step Time Energy fmax
BFGS: 0 22:05:58 -302.328425 4.088926
BFGS: 1 22:05:58 -302.714243 3.033494
BFGS: 2 22:05:59 -303.559774 3.111772
BFGS: 3 22:05:59 -303.710675 2.625439
BFGS: 4 22:06:00 -303.854822 3.977710
BFGS: 5 22:06:00 -303.975609 0.946243
BFGS: 6 22:06:01 -304.010289 0.776272
BFGS: 7 22:06:01 -304.162010 0.791750
BFGS: 8 22:06:02 -304.214224 0.736428
BFGS: 9 22:06:02 -304.280052 0.977492
BFGS: 10 22:06:03 -304.356336 1.011699
BFGS: 11 22:06:03 -304.436730 1.173814
BFGS: 12 22:06:04 -304.488940 0.898506
BFGS: 13 22:06:04 -304.507828 0.681583
BFGS: 14 22:06:04 -304.535707 0.543123
BFGS: 15 22:06:05 -304.567433 0.327862
BFGS: 16 22:06:05 -304.578306 0.337866
BFGS: 17 22:06:05 -304.588573 0.413143
BFGS: 18 22:06:06 -304.602786 0.448081
BFGS: 19 22:06:06 -304.618714 0.423585
BFGS: 20 22:06:07 -304.633986 0.309568
Step Time Energy fmax
BFGS: 0 22:06:07 -301.962707 4.125292
BFGS: 1 22:06:07 -302.350725 3.132106
BFGS: 2 22:06:08 -303.267167 3.267631
BFGS: 3 22:06:08 -303.427340 2.983484
BFGS: 4 22:06:09 -303.745728 1.894676
BFGS: 5 22:06:09 -303.821516 1.703735
BFGS: 6 22:06:10 -303.909678 1.595334
BFGS: 7 22:06:10 -303.993222 0.849082
BFGS: 8 22:06:11 -304.016972 0.721829
BFGS: 9 22:06:11 -304.100967 0.863138
BFGS: 10 22:06:11 -304.131082 0.597564
BFGS: 11 22:06:12 -304.145467 0.326088
BFGS: 12 22:06:12 -304.152078 0.292697
BFGS: 13 22:06:12 -304.161113 0.461653
BFGS: 14 22:06:13 -304.170750 0.385342
BFGS: 15 22:06:13 -304.175167 0.183370
BFGS: 16 22:06:14 -304.178072 0.185226
BFGS: 17 22:06:14 -304.182867 0.335092
BFGS: 18 22:06:14 -304.189826 0.510224
BFGS: 19 22:06:15 -304.199511 0.589141
BFGS: 20 22:06:15 -304.210530 0.492921
# Relax the product systems
product1_energies = []
for config in product1_configs:
config.calc = calc
config.pbc = True
opt = BFGS(config)
opt.run(fmax=0.05, steps=optimization_steps)
product1_energies.append(config.get_potential_energy()) Step Time Energy fmax
BFGS: 0 22:06:16 -296.193959 4.395644
BFGS: 1 22:06:16 -296.704805 4.670111
BFGS: 2 22:06:16 -298.249012 2.995520
BFGS: 3 22:06:17 -297.167285 14.385906
BFGS: 4 22:06:17 -298.432858 1.810175
BFGS: 5 22:06:18 -298.494845 1.034029
BFGS: 6 22:06:18 -298.535254 0.811730
BFGS: 7 22:06:19 -298.543928 0.612564
BFGS: 8 22:06:19 -298.571226 0.511507
BFGS: 9 22:06:20 -298.577005 0.563665
BFGS: 10 22:06:20 -298.615849 0.958819
BFGS: 11 22:06:20 -298.687057 1.756858
BFGS: 12 22:06:21 -298.744248 2.566862
BFGS: 13 22:06:21 -298.773725 2.975739
BFGS: 14 22:06:21 -298.834555 2.979905
BFGS: 15 22:06:21 -299.335209 3.016037
BFGS: 16 22:06:22 -299.568697 2.175694
BFGS: 17 22:06:22 -299.675807 2.026693
BFGS: 18 22:06:22 -299.805555 1.301822
BFGS: 19 22:06:22 -299.941546 0.812584
BFGS: 20 22:06:23 -299.984303 0.951098
Step Time Energy fmax
BFGS: 0 22:06:23 -296.410412 4.350846
BFGS: 1 22:06:23 -296.879022 4.588064
BFGS: 2 22:06:23 -298.299653 3.233489
BFGS: 3 22:06:24 -297.768822 10.602427
BFGS: 4 22:06:24 -298.541540 1.888344
BFGS: 5 22:06:24 -298.613430 1.194988
BFGS: 6 22:06:24 -298.688387 1.511981
BFGS: 7 22:06:25 -298.735072 1.614201
BFGS: 8 22:06:25 -298.960537 1.624056
BFGS: 9 22:06:25 -299.112295 2.122302
BFGS: 10 22:06:25 -299.249421 2.456835
BFGS: 11 22:06:26 -299.475710 2.784452
BFGS: 12 22:06:26 -299.874081 2.782352
BFGS: 13 22:06:26 -300.455328 1.104584
BFGS: 14 22:06:26 -300.510669 0.468562
BFGS: 15 22:06:27 -300.525198 0.366276
BFGS: 16 22:06:27 -300.542861 0.320946
BFGS: 17 22:06:27 -300.554363 0.311503
BFGS: 18 22:06:27 -300.561879 0.235912
BFGS: 19 22:06:28 -300.565813 0.195348
BFGS: 20 22:06:28 -300.568819 0.167228
Step Time Energy fmax
BFGS: 0 22:06:28 -297.049516 4.529462
BFGS: 1 22:06:28 -297.505517 4.685110
BFGS: 2 22:06:29 -298.760089 3.853232
BFGS: 3 22:06:29 -299.183447 3.967176
BFGS: 4 22:06:29 -299.358092 1.839008
BFGS: 5 22:06:30 -299.594154 1.881319
BFGS: 6 22:06:30 -299.886904 1.020435
BFGS: 7 22:06:30 -299.924429 1.025748
BFGS: 8 22:06:30 -300.186679 1.178984
BFGS: 9 22:06:31 -300.301392 1.201892
BFGS: 10 22:06:31 -300.357492 1.152191
BFGS: 11 22:06:31 -300.471224 1.045303
BFGS: 12 22:06:32 -300.493329 0.848673
BFGS: 13 22:06:32 -300.522446 0.444844
BFGS: 14 22:06:32 -300.538123 0.318501
BFGS: 15 22:06:32 -300.545950 0.364877
BFGS: 16 22:06:33 -300.557338 0.381572
BFGS: 17 22:06:33 -300.566316 0.276825
BFGS: 18 22:06:33 -300.571675 0.125846
BFGS: 19 22:06:34 -300.573274 0.101019
BFGS: 20 22:06:34 -300.574133 0.104714
Step Time Energy fmax
BFGS: 0 22:06:34 -297.525147 4.446262
BFGS: 1 22:06:34 -297.991943 4.501924
BFGS: 2 22:06:34 -299.185101 2.971647
BFGS: 3 22:06:35 -299.220334 4.269752
BFGS: 4 22:06:35 -299.498291 1.090109
BFGS: 5 22:06:35 -299.566841 0.969236
BFGS: 6 22:06:35 -299.766046 0.691420
BFGS: 7 22:06:36 -299.794386 0.545835
BFGS: 8 22:06:36 -299.828908 0.538166
BFGS: 9 22:06:36 -299.868889 0.521127
BFGS: 10 22:06:37 -299.900523 0.475811
BFGS: 11 22:06:37 -299.913421 0.399640
BFGS: 12 22:06:37 -299.919505 0.390579
BFGS: 13 22:06:38 -299.928144 0.424714
BFGS: 14 22:06:38 -299.939398 0.518381
BFGS: 15 22:06:38 -299.955656 0.569592
BFGS: 16 22:06:38 -299.970818 0.468159
BFGS: 17 22:06:38 -299.986974 0.403783
BFGS: 18 22:06:39 -300.007031 0.295942
BFGS: 19 22:06:39 -300.017882 0.385281
BFGS: 20 22:06:39 -300.025620 0.343194
Step Time Energy fmax
BFGS: 0 22:06:39 -296.327770 4.375683
BFGS: 1 22:06:39 -296.814305 4.621173
BFGS: 2 22:06:40 -298.280365 3.124213
BFGS: 3 22:06:40 -297.525965 12.094531
BFGS: 4 22:06:40 -298.492050 1.853305
BFGS: 5 22:06:40 -298.558347 1.108696
BFGS: 6 22:06:41 -298.610616 1.096269
BFGS: 7 22:06:41 -298.630335 0.998532
BFGS: 8 22:06:41 -298.724675 1.252477
BFGS: 9 22:06:41 -298.762352 1.189067
BFGS: 10 22:06:42 -299.133490 1.622450
BFGS: 11 22:06:42 -299.414784 2.605648
BFGS: 12 22:06:42 -299.740643 0.814584
BFGS: 13 22:06:42 -299.776654 1.004778
BFGS: 14 22:06:43 -299.806654 0.662082
BFGS: 15 22:06:43 -299.858936 0.436938
BFGS: 16 22:06:43 -299.904319 0.379743
BFGS: 17 22:06:43 -299.911122 0.402782
BFGS: 18 22:06:44 -299.922083 0.466203
BFGS: 19 22:06:44 -299.940794 0.495082
BFGS: 20 22:06:44 -299.954784 0.386916
Step Time Energy fmax
BFGS: 0 22:06:44 -297.245928 4.353559
BFGS: 1 22:06:44 -297.687563 4.476822
BFGS: 2 22:06:44 -298.920149 3.377255
BFGS: 3 22:06:44 -299.056686 5.374192
BFGS: 4 22:06:45 -299.324420 1.773168
BFGS: 5 22:06:45 -299.436098 1.654357
BFGS: 6 22:06:45 -299.784500 0.858743
BFGS: 7 22:06:45 -299.841235 1.554809
BFGS: 8 22:06:46 -299.891021 0.933088
BFGS: 9 22:06:46 -299.959404 0.864633
BFGS: 10 22:06:46 -299.996232 0.780191
BFGS: 11 22:06:46 -300.020093 0.469303
BFGS: 12 22:06:46 -300.031348 0.283389
BFGS: 13 22:06:47 -300.035866 0.307480
BFGS: 14 22:06:47 -300.038795 0.241853
BFGS: 15 22:06:47 -300.040951 0.121573
BFGS: 16 22:06:47 -300.041803 0.088946
BFGS: 17 22:06:47 -300.042138 0.070973
BFGS: 18 22:06:48 -300.042470 0.074182
BFGS: 19 22:06:48 -300.042940 0.069252
BFGS: 20 22:06:48 -300.043307 0.069280
Step Time Energy fmax
BFGS: 0 22:06:48 -296.586378 4.350543
BFGS: 1 22:06:49 -297.044588 4.558040
BFGS: 2 22:06:49 -298.405212 3.309255
BFGS: 3 22:06:49 -298.083875 9.112134
BFGS: 4 22:06:49 -298.680195 1.913984
BFGS: 5 22:06:49 -298.758623 1.366129
BFGS: 6 22:06:49 -298.886849 1.919750
BFGS: 7 22:06:49 -299.010668 2.226084
BFGS: 8 22:06:50 -299.263210 2.240922
BFGS: 9 22:06:50 -299.438510 1.520718
BFGS: 10 22:06:50 -299.508999 1.276535
BFGS: 11 22:06:50 -299.668547 1.000224
BFGS: 12 22:06:51 -299.866452 1.166281
BFGS: 13 22:06:51 -299.906843 1.052009
BFGS: 14 22:06:51 -299.948564 0.503373
BFGS: 15 22:06:51 -299.965756 0.413276
BFGS: 16 22:06:52 -299.979226 0.496207
BFGS: 17 22:06:52 -299.990849 0.516532
BFGS: 18 22:06:52 -300.005509 0.396552
BFGS: 19 22:06:52 -300.013895 0.231584
BFGS: 20 22:06:52 -300.020289 0.335446
Step Time Energy fmax
BFGS: 0 22:06:52 -297.274769 4.408290
BFGS: 1 22:06:53 -297.728932 4.524951
BFGS: 2 22:06:53 -298.974209 3.375627
BFGS: 3 22:06:53 -299.134544 4.980351
BFGS: 4 22:06:53 -299.381150 1.541472
BFGS: 5 22:06:54 -299.476375 1.330932
BFGS: 6 22:06:54 -299.691558 1.713909
BFGS: 7 22:06:54 -299.733993 0.844228
BFGS: 8 22:06:54 -299.775904 0.891981
BFGS: 9 22:06:55 -299.851625 1.129873
BFGS: 10 22:06:55 -299.891416 0.916966
BFGS: 11 22:06:55 -299.929548 0.587015
BFGS: 12 22:06:55 -299.941800 0.424098
BFGS: 13 22:06:56 -299.949548 0.483423
BFGS: 14 22:06:56 -299.961183 0.562620
BFGS: 15 22:06:56 -299.977412 0.528221
BFGS: 16 22:06:56 -299.991168 0.370229
BFGS: 17 22:06:56 -300.003008 0.379668
BFGS: 18 22:06:57 -300.016965 0.361986
BFGS: 19 22:06:57 -300.029373 0.265420
BFGS: 20 22:06:57 -300.035328 0.233715
Step Time Energy fmax
BFGS: 0 22:06:57 -296.213122 4.396762
BFGS: 1 22:06:57 -296.720731 4.667923
BFGS: 2 22:06:57 -298.251807 3.015737
BFGS: 3 22:06:57 -297.220963 13.999430
BFGS: 4 22:06:58 -298.438664 1.816925
BFGS: 5 22:06:58 -298.500906 1.038973
BFGS: 6 22:06:58 -298.541560 0.819470
BFGS: 7 22:06:58 -298.550651 0.623626
BFGS: 8 22:06:58 -298.579425 0.513583
BFGS: 9 22:06:58 -298.585180 0.553716
BFGS: 10 22:06:59 -298.638528 1.055068
BFGS: 11 22:06:59 -298.709035 1.719602
BFGS: 12 22:06:59 -298.782577 2.372834
BFGS: 13 22:06:59 -298.854548 2.723328
BFGS: 14 22:07:00 -298.917847 3.051505
BFGS: 15 22:07:00 -299.087665 2.986859
BFGS: 16 22:07:00 -299.732036 2.121173
BFGS: 17 22:07:00 -299.793318 1.381208
BFGS: 18 22:07:01 -299.889990 0.917406
BFGS: 19 22:07:01 -299.956812 0.655943
BFGS: 20 22:07:01 -300.008860 0.332787
Step Time Energy fmax
BFGS: 0 22:07:01 -296.254266 4.369749
BFGS: 1 22:07:01 -296.749402 4.633548
BFGS: 2 22:07:02 -298.254079 3.055930
BFGS: 3 22:07:02 -297.339658 13.201382
BFGS: 4 22:07:02 -298.451108 1.829474
BFGS: 5 22:07:02 -298.515175 1.058403
BFGS: 6 22:07:02 -298.560055 0.960335
BFGS: 7 22:07:03 -298.572695 0.803930
BFGS: 8 22:07:03 -298.626068 0.812803
BFGS: 9 22:07:03 -298.640722 0.892571
BFGS: 10 22:07:03 -298.909389 1.493263
BFGS: 11 22:07:04 -299.204431 2.385604
BFGS: 12 22:07:04 -299.473367 3.499699
BFGS: 13 22:07:04 -299.416496 3.937192
BFGS: 14 22:07:04 -299.617628 3.413902
BFGS: 15 22:07:04 -299.714127 3.075043
BFGS: 16 22:07:05 -300.054270 1.837062
BFGS: 17 22:07:05 -300.113757 1.710753
BFGS: 18 22:07:05 -300.355502 1.111875
BFGS: 19 22:07:05 -300.451233 0.946405
BFGS: 20 22:07:05 -300.518323 0.758300
product2_energies = []
for config in product2_configs:
config.calc = calc
config.pbc = True
opt = BFGS(config)
opt.run(fmax=0.05, steps=optimization_steps)
product2_energies.append(config.get_potential_energy()) Step Time Energy fmax
BFGS: 0 22:07:05 -295.129511 1.625983
BFGS: 1 22:07:06 -295.234061 1.469685
BFGS: 2 22:07:06 -295.424063 2.285075
BFGS: 3 22:07:06 -295.502646 0.482264
BFGS: 4 22:07:06 -295.517512 0.602092
BFGS: 5 22:07:06 -295.542682 0.601050
BFGS: 6 22:07:06 -295.553943 0.354015
BFGS: 7 22:07:06 -295.560156 0.257279
BFGS: 8 22:07:06 -295.564434 0.299101
BFGS: 9 22:07:07 -295.569740 0.270496
BFGS: 10 22:07:07 -295.573190 0.175190
BFGS: 11 22:07:07 -295.574433 0.088718
BFGS: 12 22:07:07 -295.574728 0.094895
BFGS: 13 22:07:07 -295.575073 0.110619
BFGS: 14 22:07:07 -295.575875 0.140945
BFGS: 15 22:07:07 -295.577755 0.187463
BFGS: 16 22:07:07 -295.582426 0.241654
BFGS: 17 22:07:08 -295.593394 0.373073
BFGS: 18 22:07:08 -295.606301 0.626378
BFGS: 19 22:07:08 -295.608201 0.956808
BFGS: 20 22:07:08 -295.617665 0.768336
Step Time Energy fmax
BFGS: 0 22:07:08 -295.153399 1.568786
BFGS: 1 22:07:09 -295.252977 1.419887
BFGS: 2 22:07:09 -295.447146 2.152578
BFGS: 3 22:07:09 -295.518282 0.498051
BFGS: 4 22:07:09 -295.532129 0.591673
BFGS: 5 22:07:10 -295.557460 0.541339
BFGS: 6 22:07:10 -295.567066 0.291925
BFGS: 7 22:07:10 -295.572697 0.272144
BFGS: 8 22:07:11 -295.577274 0.304827
BFGS: 9 22:07:11 -295.582703 0.266652
BFGS: 10 22:07:11 -295.586397 0.187221
BFGS: 11 22:07:11 -295.587921 0.147383
BFGS: 12 22:07:11 -295.588618 0.171989
BFGS: 13 22:07:12 -295.590178 0.231109
BFGS: 14 22:07:12 -295.594422 0.354660
BFGS: 15 22:07:12 -295.620873 0.677485
BFGS: 16 22:07:12 -295.694669 0.725313
BFGS: 17 22:07:12 -295.791870 0.576918
BFGS: 18 22:07:12 -295.847963 0.554045
BFGS: 19 22:07:12 -295.863752 0.495483
BFGS: 20 22:07:12 -295.915431 0.273266
Step Time Energy fmax
BFGS: 0 22:07:12 -295.146038 1.585628
BFGS: 1 22:07:13 -295.247110 1.434633
BFGS: 2 22:07:13 -295.439679 2.192843
BFGS: 3 22:07:13 -295.513179 0.491520
BFGS: 4 22:07:13 -295.527307 0.593895
BFGS: 5 22:07:13 -295.552451 0.560946
BFGS: 6 22:07:13 -295.562561 0.312146
BFGS: 7 22:07:14 -295.568324 0.265958
BFGS: 8 22:07:14 -295.572745 0.301480
BFGS: 9 22:07:14 -295.578070 0.266289
BFGS: 10 22:07:14 -295.581629 0.181436
BFGS: 11 22:07:14 -295.583023 0.125741
BFGS: 12 22:07:14 -295.583542 0.143557
BFGS: 13 22:07:15 -295.584529 0.183904
BFGS: 14 22:07:15 -295.587018 0.264440
BFGS: 15 22:07:15 -295.596458 0.444462
BFGS: 16 22:07:15 -295.621746 0.606143
BFGS: 17 22:07:15 -295.677348 0.732379
BFGS: 18 22:07:15 -295.732442 0.669742
BFGS: 19 22:07:15 -295.740872 0.792575
BFGS: 20 22:07:16 -295.770449 0.722451
Step Time Energy fmax
BFGS: 0 22:07:16 -295.584780 0.737781
BFGS: 1 22:07:16 -295.637548 0.692715
BFGS: 2 22:07:16 -295.827538 0.395752
BFGS: 3 22:07:16 -295.839028 0.357162
BFGS: 4 22:07:17 -295.843313 0.354302
BFGS: 5 22:07:17 -295.865551 0.267455
BFGS: 6 22:07:17 -295.868133 0.232831
BFGS: 7 22:07:17 -295.873883 0.185662
BFGS: 8 22:07:18 -295.876914 0.223974
BFGS: 9 22:07:18 -295.879682 0.265175
BFGS: 10 22:07:18 -295.882427 0.286261
BFGS: 11 22:07:19 -295.888559 0.315452
BFGS: 12 22:07:19 -295.900488 0.428121
BFGS: 13 22:07:19 -295.910493 0.561902
BFGS: 14 22:07:19 -295.925155 0.417131
BFGS: 15 22:07:20 -295.941574 0.425322
BFGS: 16 22:07:20 -295.947738 0.354027
BFGS: 17 22:07:20 -295.960862 0.143138
BFGS: 18 22:07:20 -295.963717 0.096062
BFGS: 19 22:07:21 -295.964511 0.088851
BFGS: 20 22:07:21 -295.965051 0.081901
Step Time Energy fmax
BFGS: 0 22:07:21 -295.273327 1.342793
BFGS: 1 22:07:22 -295.354301 1.221476
BFGS: 2 22:07:22 -295.566505 1.496161
BFGS: 3 22:07:23 -295.603586 0.587610
BFGS: 4 22:07:23 -295.614790 0.522850
BFGS: 5 22:07:23 -295.649849 0.440460
BFGS: 6 22:07:23 -295.654930 0.438547
BFGS: 7 22:07:24 -295.702594 0.685523
BFGS: 8 22:07:24 -295.716774 0.551981
BFGS: 9 22:07:24 -295.742711 0.803573
BFGS: 10 22:07:24 -295.767996 0.853733
BFGS: 11 22:07:25 -295.798615 0.633841
BFGS: 12 22:07:25 -295.822330 0.324033
BFGS: 13 22:07:25 -295.830605 0.215168
BFGS: 14 22:07:25 -295.832797 0.250102
BFGS: 15 22:07:25 -295.835087 0.293675
BFGS: 16 22:07:26 -295.837675 0.244206
BFGS: 17 22:07:26 -295.840884 0.090109
BFGS: 18 22:07:26 -295.841426 0.048018
Step Time Energy fmax
BFGS: 0 22:07:26 -295.586953 0.748807
BFGS: 1 22:07:26 -295.638784 0.663982
BFGS: 2 22:07:27 -295.821328 0.400649
BFGS: 3 22:07:27 -295.832358 0.345752
BFGS: 4 22:07:27 -295.836750 0.345781
BFGS: 5 22:07:27 -295.857647 0.283747
BFGS: 6 22:07:27 -295.860371 0.245873
BFGS: 7 22:07:27 -295.867656 0.175629
BFGS: 8 22:07:27 -295.870753 0.192982
BFGS: 9 22:07:27 -295.873292 0.230675
BFGS: 10 22:07:28 -295.875396 0.244648
BFGS: 11 22:07:28 -295.879845 0.257853
BFGS: 12 22:07:28 -295.886269 0.259512
BFGS: 13 22:07:28 -295.892661 0.269804
BFGS: 14 22:07:28 -295.899352 0.343094
BFGS: 15 22:07:28 -295.905887 0.336160
BFGS: 16 22:07:29 -295.912454 0.297634
BFGS: 17 22:07:29 -295.922041 0.192575
BFGS: 18 22:07:29 -295.927168 0.127966
BFGS: 19 22:07:29 -295.929139 0.089565
BFGS: 20 22:07:30 -295.929854 0.096264
Step Time Energy fmax
BFGS: 0 22:07:30 -295.130171 1.626546
BFGS: 1 22:07:30 -295.234484 1.469895
BFGS: 2 22:07:30 -295.423739 2.273462
BFGS: 3 22:07:30 -295.501825 0.478383
BFGS: 4 22:07:31 -295.516551 0.598723
BFGS: 5 22:07:31 -295.541494 0.599541
BFGS: 6 22:07:31 -295.552699 0.355263
BFGS: 7 22:07:31 -295.558901 0.255270
BFGS: 8 22:07:32 -295.563098 0.296739
BFGS: 9 22:07:32 -295.568375 0.268141
BFGS: 10 22:07:32 -295.571764 0.171783
BFGS: 11 22:07:32 -295.572961 0.081097
BFGS: 12 22:07:32 -295.573232 0.085773
BFGS: 13 22:07:32 -295.573527 0.099480
BFGS: 14 22:07:32 -295.574199 0.125064
BFGS: 15 22:07:33 -295.575670 0.160226
BFGS: 16 22:07:33 -295.578826 0.192968
BFGS: 17 22:07:33 -295.585608 0.295085
BFGS: 18 22:07:33 -295.596770 0.571008
BFGS: 19 22:07:33 -295.597487 0.888284
BFGS: 20 22:07:34 -295.608746 0.730354
Step Time Energy fmax
BFGS: 0 22:07:34 -295.133140 1.617791
BFGS: 1 22:07:34 -295.236818 1.462381
BFGS: 2 22:07:34 -295.426644 2.257605
BFGS: 3 22:07:34 -295.503829 0.480008
BFGS: 4 22:07:35 -295.518431 0.597303
BFGS: 5 22:07:35 -295.543367 0.593023
BFGS: 6 22:07:35 -295.554384 0.348002
BFGS: 7 22:07:35 -295.560505 0.256953
BFGS: 8 22:07:36 -295.564728 0.297285
BFGS: 9 22:07:36 -295.570006 0.267336
BFGS: 10 22:07:36 -295.573410 0.172905
BFGS: 11 22:07:36 -295.574630 0.088514
BFGS: 12 22:07:36 -295.574932 0.095512
BFGS: 13 22:07:37 -295.575308 0.112693
BFGS: 14 22:07:37 -295.576173 0.145004
BFGS: 15 22:07:37 -295.578215 0.193744
BFGS: 16 22:07:37 -295.583587 0.251182
BFGS: 17 22:07:37 -295.596342 0.430641
BFGS: 18 22:07:38 -295.603238 0.753229
BFGS: 19 22:07:38 -295.605377 0.627734
BFGS: 20 22:07:38 -295.607701 0.631691
Step Time Energy fmax
BFGS: 0 22:07:38 -295.129655 1.627166
BFGS: 1 22:07:38 -295.234080 1.470413
BFGS: 2 22:07:38 -295.423323 2.276092
BFGS: 3 22:07:38 -295.501535 0.478002
BFGS: 4 22:07:38 -295.516285 0.598902
BFGS: 5 22:07:39 -295.541234 0.600751
BFGS: 6 22:07:39 -295.552488 0.356619
BFGS: 7 22:07:39 -295.558716 0.255225
BFGS: 8 22:07:39 -295.562918 0.296914
BFGS: 9 22:07:39 -295.568204 0.268498
BFGS: 10 22:07:39 -295.571600 0.171862
BFGS: 11 22:07:40 -295.572795 0.080540
BFGS: 12 22:07:40 -295.573064 0.085015
BFGS: 13 22:07:40 -295.573353 0.098375
BFGS: 14 22:07:40 -295.574007 0.123406
BFGS: 15 22:07:40 -295.575427 0.157446
BFGS: 16 22:07:41 -295.578435 0.188555
BFGS: 17 22:07:41 -295.584653 0.278506
BFGS: 18 22:07:41 -295.596186 0.554961
BFGS: 19 22:07:41 -295.596076 0.872502
BFGS: 20 22:07:42 -295.603466 0.682158
Step Time Energy fmax
BFGS: 0 22:07:42 -295.170545 1.532652
BFGS: 1 22:07:42 -295.266958 1.387541
BFGS: 2 22:07:43 -295.465061 2.034439
BFGS: 3 22:07:43 -295.529266 0.514345
BFGS: 4 22:07:43 -295.542348 0.583603
BFGS: 5 22:07:43 -295.568892 0.477925
BFGS: 6 22:07:43 -295.577099 0.233336
BFGS: 7 22:07:43 -295.582620 0.295911
BFGS: 8 22:07:44 -295.587865 0.317917
BFGS: 9 22:07:44 -295.593929 0.274891
BFGS: 10 22:07:44 -295.598145 0.202463
BFGS: 11 22:07:44 -295.600135 0.209784
BFGS: 12 22:07:44 -295.601634 0.259826
BFGS: 13 22:07:44 -295.606370 0.401463
BFGS: 14 22:07:45 -295.628332 0.785045
BFGS: 15 22:07:45 -295.713243 0.529749
BFGS: 16 22:07:45 -295.771739 0.860686
BFGS: 17 22:07:45 -295.800463 0.687420
BFGS: 18 22:07:46 -295.811700 0.413180
BFGS: 19 22:07:46 -295.821956 0.398921
BFGS: 20 22:07:46 -295.832058 0.286278
Enumerate NEBs¶

af = AutoFrameDissociation(
reaction=reaction,
reactant_system=reactant_configs[reactant_energies.index(min(reactant_energies))],
product1_systems=product1_configs,
product1_energies=product1_energies,
product2_systems=product2_configs,
product2_energies=product2_energies,
r_product1_max=2, # r1 in the above fig
r_product2_max=3, # r3 in the above fig
r_product2_min=1, # r2 in the above fig
)import random
nframes = 10
random.seed(
42
) # set the seed to make the random generation deterministic for the tutorial!
frame_sets, mapping_idxs = af.get_neb_frames(
calc,
n_frames=nframes,
n_pdt1_sites=4, # = 5 in the above fig (step 1)
n_pdt2_sites=4, # = 5 in the above fig (step 2)
) Step Time Energy fmax
BFGS: 0 22:07:46 -303.893851 0.532647
BFGS: 1 22:07:46 -303.901217 0.402872
BFGS: 2 22:07:47 -303.916538 0.192653
BFGS: 3 22:07:47 -303.919885 0.203654
BFGS: 4 22:07:47 -303.923262 0.166644
BFGS: 5 22:07:47 -303.925090 0.119984
BFGS: 6 22:07:48 -303.926480 0.100834
BFGS: 7 22:07:48 -303.927351 0.082986
BFGS: 8 22:07:48 -303.927770 0.061450
BFGS: 9 22:07:48 -303.928021 0.048652
Step Time Energy fmax
BFGS: 0 22:07:48 -303.874032 0.383013
BFGS: 1 22:07:48 -303.881582 0.298423
BFGS: 2 22:07:49 -303.900233 0.242316
BFGS: 3 22:07:49 -303.903534 0.245696
BFGS: 4 22:07:49 -303.911904 0.191448
BFGS: 5 22:07:49 -303.915076 0.208331
BFGS: 6 22:07:50 -303.919531 0.194360
BFGS: 7 22:07:50 -303.922926 0.160868
BFGS: 8 22:07:50 -303.924886 0.126317
BFGS: 9 22:07:50 -303.926338 0.113817
BFGS: 10 22:07:51 -303.928037 0.131311
BFGS: 11 22:07:51 -303.929354 0.101034
BFGS: 12 22:07:51 -303.930003 0.052871
BFGS: 13 22:07:52 -303.930211 0.031171
Step Time Energy fmax
BFGS: 0 22:07:52 -303.787419 0.982876
BFGS: 1 22:07:52 -303.812806 0.716708
BFGS: 2 22:07:53 -303.840296 0.282892
BFGS: 3 22:07:53 -303.845640 0.224512
BFGS: 4 22:07:53 -303.850559 0.280630
BFGS: 5 22:07:53 -303.854329 0.268779
BFGS: 6 22:07:54 -303.857574 0.210717
BFGS: 7 22:07:54 -303.859707 0.137774
BFGS: 8 22:07:54 -303.860949 0.117711
BFGS: 9 22:07:54 -303.861658 0.103651
BFGS: 10 22:07:55 -303.862209 0.067168
BFGS: 11 22:07:55 -303.862611 0.063771
BFGS: 12 22:07:55 -303.862828 0.064102
BFGS: 13 22:07:55 -303.862941 0.045960
Step Time Energy fmax
BFGS: 0 22:07:56 -303.665922 2.088395
BFGS: 1 22:07:56 -303.753665 1.392871
BFGS: 2 22:07:56 -303.822273 0.619140
BFGS: 3 22:07:57 -303.838028 0.397523
BFGS: 4 22:07:57 -303.850591 0.505360
BFGS: 5 22:07:57 -303.861285 0.478885
BFGS: 6 22:07:57 -303.869572 0.359850
BFGS: 7 22:07:57 -303.874843 0.224651
BFGS: 8 22:07:57 -303.878756 0.187401
BFGS: 9 22:07:57 -303.881021 0.179994
BFGS: 10 22:07:57 -303.882759 0.142059
BFGS: 11 22:07:57 -303.884611 0.131592
BFGS: 12 22:07:57 -303.885812 0.130933
BFGS: 13 22:07:58 -303.886796 0.125024
BFGS: 14 22:07:58 -303.888180 0.151977
BFGS: 15 22:07:58 -303.890344 0.179919
BFGS: 16 22:07:58 -303.893235 0.189463
BFGS: 17 22:07:58 -303.896366 0.236626
BFGS: 18 22:07:58 -303.899388 0.249484
BFGS: 19 22:07:58 -303.902627 0.217580
BFGS: 20 22:07:58 -303.907025 0.215632
BFGS: 21 22:07:59 -303.912026 0.281144
BFGS: 22 22:07:59 -303.916891 0.246662
BFGS: 23 22:07:59 -303.920272 0.174398
BFGS: 24 22:07:59 -303.922496 0.161527
BFGS: 25 22:07:59 -303.924593 0.146609
BFGS: 26 22:07:59 -303.926300 0.087270
BFGS: 27 22:08:00 -303.927077 0.063568
BFGS: 28 22:08:00 -303.927408 0.042998
Step Time Energy fmax
BFGS: 0 22:08:00 -303.795057 0.547320
BFGS: 1 22:08:00 -303.807936 0.532004
BFGS: 2 22:08:00 -303.849268 0.449799
BFGS: 3 22:08:01 -303.860465 0.421948
BFGS: 4 22:08:01 -303.879953 0.353360
BFGS: 5 22:08:01 -303.889470 0.305276
BFGS: 6 22:08:02 -303.904567 0.328738
BFGS: 7 22:08:02 -303.914287 0.269986
BFGS: 8 22:08:02 -303.919667 0.163592
BFGS: 9 22:08:02 -303.922109 0.206099
BFGS: 10 22:08:03 -303.924035 0.204640
BFGS: 11 22:08:03 -303.925517 0.145016
BFGS: 12 22:08:03 -303.926636 0.093123
BFGS: 13 22:08:03 -303.927122 0.058064
BFGS: 14 22:08:04 -303.927380 0.067279
BFGS: 15 22:08:04 -303.927720 0.074813
BFGS: 16 22:08:04 -303.928105 0.064592
BFGS: 17 22:08:05 -303.928361 0.037207
Step Time Energy fmax
BFGS: 0 22:08:05 -303.424182 0.756019
BFGS: 1 22:08:05 -303.450829 0.692678
BFGS: 2 22:08:06 -303.522446 0.665072
BFGS: 3 22:08:06 -303.536123 0.522856
BFGS: 4 22:08:06 -303.575687 0.462844
BFGS: 5 22:08:06 -303.589267 0.459962
BFGS: 6 22:08:06 -303.626676 0.605733
BFGS: 7 22:08:07 -303.647657 0.513762
BFGS: 8 22:08:07 -303.680105 0.588383
BFGS: 9 22:08:07 -303.717179 0.792327
BFGS: 10 22:08:08 -303.758122 0.735712
BFGS: 11 22:08:08 -303.796890 0.608909
BFGS: 12 22:08:08 -303.831351 0.508165
BFGS: 13 22:08:09 -303.863348 0.576126
BFGS: 14 22:08:09 -303.895049 0.500170
BFGS: 15 22:08:09 -303.910681 0.287026
BFGS: 16 22:08:10 -303.916076 0.193375
BFGS: 17 22:08:10 -303.920182 0.236638
BFGS: 18 22:08:10 -303.923112 0.160245
BFGS: 19 22:08:11 -303.926290 0.112570
BFGS: 20 22:08:11 -303.927720 0.083858
BFGS: 21 22:08:11 -303.928721 0.093991
BFGS: 22 22:08:12 -303.929388 0.076695
BFGS: 23 22:08:12 -303.929949 0.067906
BFGS: 24 22:08:12 -303.930248 0.049347
Step Time Energy fmax
BFGS: 0 22:08:13 -303.821938 0.376614
BFGS: 1 22:08:13 -303.829227 0.272067
BFGS: 2 22:08:13 -303.844343 0.258346
BFGS: 3 22:08:14 -303.848886 0.270862
BFGS: 4 22:08:14 -303.854502 0.209730
BFGS: 5 22:08:14 -303.857048 0.157801
BFGS: 6 22:08:15 -303.859399 0.147706
BFGS: 7 22:08:15 -303.861985 0.163442
BFGS: 8 22:08:15 -303.864185 0.156284
BFGS: 9 22:08:16 -303.865446 0.100184
BFGS: 10 22:08:16 -303.866079 0.068160
BFGS: 11 22:08:16 -303.866449 0.076774
BFGS: 12 22:08:16 -303.866757 0.063830
BFGS: 13 22:08:17 -303.866969 0.043260
Step Time Energy fmax
BFGS: 0 22:08:17 -303.555695 0.810927
BFGS: 1 22:08:17 -303.585119 0.704982
BFGS: 2 22:08:17 -303.662098 0.706586
BFGS: 3 22:08:18 -303.683869 0.743880
BFGS: 4 22:08:18 -303.767029 0.957224
BFGS: 5 22:08:18 -303.796298 0.661789
BFGS: 6 22:08:19 -303.847401 0.452584
BFGS: 7 22:08:19 -303.863636 0.468904
BFGS: 8 22:08:19 -303.883510 0.559369
BFGS: 9 22:08:20 -303.899519 0.439211
BFGS: 10 22:08:20 -303.913394 0.290616
BFGS: 11 22:08:20 -303.919690 0.188251
BFGS: 12 22:08:20 -303.922585 0.126685
BFGS: 13 22:08:21 -303.924585 0.117460
BFGS: 14 22:08:21 -303.927001 0.113306
BFGS: 15 22:08:21 -303.928538 0.094482
BFGS: 16 22:08:22 -303.929270 0.069109
BFGS: 17 22:08:22 -303.929689 0.063114
BFGS: 18 22:08:22 -303.930078 0.061973
BFGS: 19 22:08:23 -303.930386 0.056156
BFGS: 20 22:08:23 -303.930575 0.036638
Step Time Energy fmax
BFGS: 0 22:08:23 -303.356362 1.002291
BFGS: 1 22:08:23 -303.398154 0.719967
BFGS: 2 22:08:24 -303.459316 0.583086
BFGS: 3 22:08:24 -303.487103 0.677873
BFGS: 4 22:08:24 -303.519023 0.767869
BFGS: 5 22:08:24 -303.551210 0.814798
BFGS: 6 22:08:25 -303.609715 0.996061
BFGS: 7 22:08:25 -303.664402 1.172830
BFGS: 8 22:08:25 -303.714088 1.187427
BFGS: 9 22:08:26 -303.780450 0.723968
BFGS: 10 22:08:26 -303.809392 0.700001
BFGS: 11 22:08:26 -303.834191 0.430364
BFGS: 12 22:08:26 -303.849984 0.477375
BFGS: 13 22:08:26 -303.863249 0.409928
BFGS: 14 22:08:27 -303.882286 0.318546
BFGS: 15 22:08:27 -303.893295 0.310412
BFGS: 16 22:08:27 -303.906960 0.326563
BFGS: 17 22:08:27 -303.918787 0.340569
BFGS: 18 22:08:28 -303.930403 0.352549
BFGS: 19 22:08:28 -303.942132 0.395262
BFGS: 20 22:08:28 -303.960245 0.487311
BFGS: 21 22:08:29 -303.985231 0.535155
BFGS: 22 22:08:29 -304.016113 0.806862
BFGS: 23 22:08:29 -304.062126 1.069297
BFGS: 24 22:08:30 -304.128487 0.989568
BFGS: 25 22:08:30 -304.184795 0.720742
BFGS: 26 22:08:30 -304.230035 0.717991
BFGS: 27 22:08:31 -304.288632 0.573395
BFGS: 28 22:08:31 -304.321940 0.714703
BFGS: 29 22:08:31 -304.352281 0.662010
BFGS: 30 22:08:31 -304.381338 0.438664
BFGS: 31 22:08:32 -304.396100 0.230526
BFGS: 32 22:08:32 -304.400301 0.250846
BFGS: 33 22:08:32 -304.405632 0.214200
BFGS: 34 22:08:33 -304.409652 0.147750
BFGS: 35 22:08:33 -304.412131 0.074659
BFGS: 36 22:08:33 -304.413237 0.051681
BFGS: 37 22:08:34 -304.413664 0.046720
Step Time Energy fmax
BFGS: 0 22:08:34 -303.516199 2.391694
BFGS: 1 22:08:34 -303.643903 1.541548
BFGS: 2 22:08:34 -303.778020 1.154220
BFGS: 3 22:08:35 -303.864252 1.297580
BFGS: 4 22:08:35 -304.035871 1.535601
BFGS: 5 22:08:35 -304.150661 1.341468
BFGS: 6 22:08:35 -304.209507 1.126254
BFGS: 7 22:08:35 -304.354424 0.689038
BFGS: 8 22:08:36 -304.374657 0.482235
BFGS: 9 22:08:36 -304.399733 0.403965
BFGS: 10 22:08:36 -304.417646 0.444907
BFGS: 11 22:08:36 -304.434195 0.386275
BFGS: 12 22:08:36 -304.445499 0.375320
BFGS: 13 22:08:37 -304.455861 0.340236
BFGS: 14 22:08:37 -304.465752 0.373225
BFGS: 15 22:08:37 -304.473768 0.305795
BFGS: 16 22:08:37 -304.480463 0.262633
BFGS: 17 22:08:37 -304.486744 0.227261
BFGS: 18 22:08:37 -304.490603 0.176697
BFGS: 19 22:08:38 -304.493484 0.190541
BFGS: 20 22:08:38 -304.496585 0.137773
BFGS: 21 22:08:38 -304.498911 0.136971
BFGS: 22 22:08:39 -304.500452 0.134117
BFGS: 23 22:08:39 -304.501916 0.147694
BFGS: 24 22:08:39 -304.503359 0.152788
BFGS: 25 22:08:40 -304.504458 0.104216
BFGS: 26 22:08:40 -304.505150 0.070537
BFGS: 27 22:08:40 -304.505428 0.050380
BFGS: 28 22:08:40 -304.505571 0.051586
BFGS: 29 22:08:41 -304.505750 0.049271
Step Time Energy fmax
BFGS: 0 22:08:41 -303.006443 1.305634
BFGS: 1 22:08:41 -303.052216 0.782056
BFGS: 2 22:08:42 -303.087812 0.746559
BFGS: 3 22:08:42 -303.114527 0.965587
BFGS: 4 22:08:42 -303.187691 1.551002
BFGS: 5 22:08:43 -303.254118 1.733636
BFGS: 6 22:08:43 -303.333163 1.452052
BFGS: 7 22:08:43 -303.479773 0.920228
BFGS: 8 22:08:43 -303.497556 1.260563
BFGS: 9 22:08:43 -303.530562 0.563397
BFGS: 10 22:08:43 -303.570795 0.486194
BFGS: 11 22:08:44 -303.630228 0.448972
BFGS: 12 22:08:44 -303.643197 0.453759
BFGS: 13 22:08:44 -303.693676 0.576179
BFGS: 14 22:08:44 -303.712658 0.611167
BFGS: 15 22:08:44 -303.739630 0.652538
BFGS: 16 22:08:45 -303.777786 0.751958
BFGS: 17 22:08:45 -303.846545 0.979675
BFGS: 18 22:08:45 -303.932979 0.887505
BFGS: 19 22:08:45 -303.995563 1.200845
BFGS: 20 22:08:46 -304.104248 1.041527
BFGS: 21 22:08:46 -304.224909 1.142418
BFGS: 22 22:08:46 -304.300303 0.948588
BFGS: 23 22:08:46 -304.364602 1.140029
BFGS: 24 22:08:47 -304.472081 0.599353
BFGS: 25 22:08:47 -304.519998 0.473349
BFGS: 26 22:08:47 -304.550952 0.652676
BFGS: 27 22:08:47 -304.577841 0.600667
BFGS: 28 22:08:48 -304.605860 0.370892
BFGS: 29 22:08:48 -304.621509 0.267596
BFGS: 30 22:08:48 -304.631602 0.311056
BFGS: 31 22:08:49 -304.638005 0.345321
BFGS: 32 22:08:49 -304.645648 0.302290
BFGS: 33 22:08:49 -304.655499 0.245169
BFGS: 34 22:08:49 -304.662444 0.285472
BFGS: 35 22:08:50 -304.665902 0.172357
BFGS: 36 22:08:50 -304.668490 0.179642
BFGS: 37 22:08:50 -304.672266 0.152295
BFGS: 38 22:08:50 -304.676290 0.132614
BFGS: 39 22:08:51 -304.679211 0.082201
BFGS: 40 22:08:51 -304.680369 0.046785
/home/runner/work/_tool/Python/3.12.13/x64/lib/python3.12/site-packages/fairchem/applications/cattsunami/core/autoframe.py:1551: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end).
alpha = torch.range(0, num_frames - 1, device=device) / (num_frames - 1)
Run NEBs¶
## This will run all NEBs enumerated - to just run one, run the code cell below.
# On GPU, each NEB takes an average of ~1 minute so this could take around a half hour on GPU
# But much longer on CPU
# Remember that not all NEBs will converge -- the k, nframes would be adjusted to achieve convergence
fmax = 0.05 # [eV / ang**2]
delta_fmax_climb = 0.4
converged_idxs = []
for idx, frame_set in enumerate(frame_sets):
neb = DyNEB(frame_set, k=1)
for image in frame_set:
image.calc = FAIRChemCalculator(predictor, task_name="oc20")
optimizer = BFGS(
neb,
trajectory=f"ch_dissoc_on_Ru_{idx}.traj",
)
conv = optimizer.run(fmax=fmax + delta_fmax_climb, steps=optimization_steps)
if conv:
neb.climb = True
conv = optimizer.run(fmax=fmax, steps=optimization_steps)
if conv:
converged_idxs.append(idx)
print(converged_idxs)This cell will run a shorter calculations for just a single one of the enumerated transition state pathways. You can adapt this code to run transition state searches via nudged elastic band (NEB) calculations for any reaction.
# If you run the above cell -- dont run this one
fmax = 0.05 # [eV / ang**2]
delta_fmax_climb = 0.4
images = frame_sets[0]
neb = DyNEB(images, k=1)
for image in images:
image.calc = FAIRChemCalculator(predictor, task_name="oc20")
optimizer = BFGS(
neb,
trajectory="ch_dissoc_on_Ru_0.traj",
)
conv = optimizer.run(fmax=fmax + delta_fmax_climb, steps=optimization_steps)
if conv:
neb.climb = True
conv = optimizer.run(fmax=fmax, steps=optimization_steps)/home/runner/work/_tool/Python/3.12.13/x64/lib/python3.12/site-packages/ase/mep/neb.py:329: UserWarning: The default method has changed from 'aseneb' to 'improvedtangent'. The 'aseneb' method is an unpublished, custom implementation that is not recommended as it frequently results in very poor bands. Please explicitly set method='improvedtangent' to silence this warning, or set method='aseneb' if you strictly require the old behavior (results may vary). See: https://gitlab.com/ase/ase/-/merge_requests/3952
warnings.warn(
Step Time Energy fmax
BFGS: 0 22:09:32 -302.005925 3.599968
BFGS: 1 22:09:33 -302.177785 3.346508
BFGS: 2 22:09:33 -302.482021 5.397150
BFGS: 3 22:09:34 -302.567829 1.958688
BFGS: 4 22:09:35 -302.689341 1.578218
BFGS: 5 22:09:36 -302.830552 1.846235
BFGS: 6 22:09:36 -302.858578 1.476285
BFGS: 7 22:09:37 -302.912736 1.491631
BFGS: 8 22:09:38 -302.924854 0.850690
BFGS: 9 22:09:39 -302.970452 0.655527
BFGS: 10 22:09:40 -302.980495 0.681118
BFGS: 11 22:09:40 -302.996967 0.545364
BFGS: 12 22:09:41 -303.003528 0.398086
BFGS: 13 22:09:42 -303.017259 0.501602
BFGS: 14 22:09:43 -303.038469 0.640469
BFGS: 15 22:09:43 -303.080648 0.827055
BFGS: 16 22:09:44 -303.127996 0.687532
BFGS: 17 22:09:45 -303.193340 0.679738
BFGS: 18 22:09:46 -303.274706 1.067019
BFGS: 19 22:09:46 -303.340862 1.094699
BFGS: 20 22:09:47 -303.371550 1.030889
BFGS: 21 22:09:48 -303.403827 0.760912
BFGS: 22 22:09:49 -303.441734 1.108232
BFGS: 23 22:09:49 -303.465383 0.909192
BFGS: 24 22:09:50 -303.518232 0.890567
BFGS: 25 22:09:51 -303.549481 0.868830
BFGS: 26 22:09:52 -303.601608 0.890405
BFGS: 27 22:09:52 -303.649377 0.988747
BFGS: 28 22:09:53 -303.690606 1.265197
BFGS: 29 22:09:54 -303.723633 0.902722
BFGS: 30 22:09:55 -303.742264 0.973171
BFGS: 31 22:09:56 -303.754847 0.583742
BFGS: 32 22:09:56 -303.758944 0.575000
Visualize the results¶
Finally, let’s visualize the results!
optimized_neb = read("ch_dissoc_on_Ru_0.traj", ":")[-1 * nframes :]es = []
for frame in optimized_neb:
frame.set_calculator(calc)
es.append(frame.get_potential_energy())/tmp/ipykernel_8852/3247994494.py:3: FutureWarning: Please use atoms.calc = calc
frame.set_calculator(calc)
# Plot the reaction coordinate
es = [e - es[0] for e in es]
plt.plot(es)
plt.xlabel("frame number")
plt.ylabel("relative energy [eV]")
plt.title(f"CH dissociation on Ru(0001), Ea = {max(es):1.2f} eV")
plt.savefig("CH_dissoc_on_Ru_0001.png")
To generalize an interactive visualization, use ase gui from the command line or the X3D package
# Make an interative html file of the optimized neb trajectory
x3d = X3D(optimized_neb)
x3d.write("optimized_neb_ch_disoc_on_Ru0001.html")