Skip to content

Commit

Permalink
Merge branch 'main' into fm-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
mshuaibii authored Jul 19, 2024
2 parents 4880d0c + 33ebf3d commit 692147d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_dispatch:
pull_request_review:
types: [submitted, edited]
merge_group:

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches: [main]
push:
merge_group:

jobs:
lint:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches: [main]
push:
branches: [main]
merge_group:

jobs:
test:
Expand Down
3 changes: 2 additions & 1 deletion docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ parts:
- file: tutorials/intro
- file: tutorials/OCP-introduction
- file: tutorials/adsorbml_walkthrough
- file: tutorials/cattsunami_walkthrough
- file: tutorials/cattsunami_tutorial
- file: tutorials/fairchem_models_for_nebs
- file: tutorials/NRR/NRR_toc
sections:
- file: tutorials/NRR/NRR_example
Expand Down
5 changes: 5 additions & 0 deletions docs/tutorials/NRR/NRR_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ import os
from glob import glob
import pandas as pd
from fairchem.data.oc.utils import DetectTrajAnomaly
# Set random seed to ensure adsorbate enumeration yields a valid candidate
# If using a larger number of random samples this wouldn't be necessary
import numpy as np
np.random.seed(22)
```

```{code-cell} ipython3
Expand Down
18 changes: 15 additions & 3 deletions docs/tutorials/fairchem_models_for_nebs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ kernelspec:
# Tutorial for using Fair Chemistry models to relax NEBs

```{code-cell} ipython3
---
tags: ["skip-execution"]
---
from ase.optimize import BFGS
from ase.io import read
Expand All @@ -24,7 +27,6 @@ from fairchem.core.models.model_registry import model_name_to_local_file
#Optional
from x3dase.x3d import X3D
import matplotlib.pyplot as plt
from pathlib import Path
import os
```

Expand All @@ -33,6 +35,9 @@ import os
Shown here are the values used consistently throughout the paper.

```{code-cell} ipython3
---
tags: ["skip-execution"]
---
fmax = 0.05 # [eV / ang]
delta_fmax_climb = 0.4 # this means that when the fmax is below 0.45 eV/Ang climbing image will be turned on
k = 1 # you may adjust this value as you see fit
Expand All @@ -46,17 +51,24 @@ checkpoint_path = model_name_to_local_file('EquiformerV2-31M-S2EF-OC20-All+MD',
## If you have your own set of NEB frames

```{code-cell} ipython3
---
tags: ["skip-execution"]
---
"""
Load your frames (change to the appropriate loading method)
The approach uses ase, so you must provide a list of ase.Atoms objects
with the appropriate constraints.
"""
path_ = Path(__file__).parents[2]
cwd = os.getcwd()
path_ = os.path.abspath(os.path.join(cwd, os.pardir, os.pardir))
path_ = os.path.join(path_, "src", "fairchem", "applications", "cattsunami", "tutorial", "sample_traj.traj")
frame_set = read(path_, ":")[0:10] # Change to the path to your atoms of the frame set
```

```{code-cell} ipython3
---
tags: ["skip-execution"]
---
neb = OCPNEB(
frame_set,
checkpoint_path=checkpoint_path,
Expand All @@ -78,7 +90,7 @@ if conv:

You may use the `interpolate` function we implemented which is very similar to idpp but not sensative to periodic boundary crossings. Alternatively you can adopt whatever interpolation scheme you prefer. The `interpolate` function lacks some of the extra protections implemented in the `interpolate_and_correct_frames` which is used in the CatTSunami enumeration workflow. Care should be taken to ensure the results are reasonable.

IMPORTANT NOTES:
IMPORTANT NOTES:
1. Make sure the indices in the initial and final frame map to the same atoms
2. Ensure you have the proper constraints on subsurface atoms

Expand Down
Binary file not shown.

0 comments on commit 692147d

Please sign in to comment.