# Custom S Alpha Beta Libraries

**URL:** <https://openmc.discourse.group/t/custom-s-alpha-beta-libraries/1622>\
**Category:** User Support\
**Created:** [January 4, 2022, 5:59pm UTC](https://openmc.discourse.group/t/custom-s-alpha-beta-libraries/1622 "2022-01-04T17:59:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayjosh](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@mayjosh](https://openmc.discourse.group/u/mayjosh)\
**Post date:** [January 4, 2022, 5:59pm UTC](https://openmc.discourse.group/t/custom-s-alpha-beta-libraries/1622/1 "2022-01-04T17:59:50Z")

</div>

Hi all. I’m trying use an Sab set I have for 20% porous graphite. It was originally ace formatted, but I made some tweaks to this conversion script ( [data/convert\_lib80x.py at bcc99743f5c0efa0d7f3821201e04a31f8fd1d0d · openmc-dev/data · GitHub](https://github.com/openmc-dev/data/blob/bcc99743f5c0efa0d7f3821201e04a31f8fd1d0d/convert_lib80x.py) ) to convert it to the proper format and add it to my cross\_sections.xml file. When I try to add the data to a material using the call material\_name.add\_s\_alpha\_beta(“c\_graphite\_20p”), OpenMC doesn’t recognize the name of this dataset and instead assigns the c\_Graphite\_30p data. Is there a way to force OpenMC to add my Sab library without manually adding the new Sab library into the \_THERMAL\_NAMES dictionary within the openmc/data/thermal.py file? Thanks!  
-Josh

---

<div class="post-metadata">

**Author:** ![April](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@April](https://openmc.discourse.group/u/April)\
**Post date:** [January 5, 2022, 9:52pm UTC](https://openmc.discourse.group/t/custom-s-alpha-beta-libraries/1622/2 "2022-01-05T21:52:23Z")

</div>

Hi Josh - thanks for sending your cross\_sections.xml file separately. From that file, it looks like you’ve named the S(a,b) data set as “c\_Graphite\_20p”, but are using “c\_graphite\_20p” in your script? Here’s what I see in your `cross_sections.xml`:

```auto
 <library materials="c_Graphite_20p" path="home/josh/openmc_cross_sections/c_Graphite_20p.h5" type="thermal" />

```

Would you please try using the case-sensitive file name?

---

<div class="post-metadata">

**Author:** ![mayjosh](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@mayjosh](https://openmc.discourse.group/u/mayjosh)\
**Post date:** [January 5, 2022, 10:23pm UTC](https://openmc.discourse.group/t/custom-s-alpha-beta-libraries/1622/3 "2022-01-05T22:23:46Z")

</div>

April, I checked the cases across my files and they seem to be consistent across the files. I’m realizing now that I mistyped in the forum post above. In my materials files I am actually using the call material\_name.add\_s\_alpha\_beta(“c\_Graphite\_20p”). Sorry for the confusion!

---

<div class="post-metadata">

**Author:** ![mayjosh](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@mayjosh](https://openmc.discourse.group/u/mayjosh)\
**Post date:** [January 5, 2022, 11:53pm UTC](https://openmc.discourse.group/t/custom-s-alpha-beta-libraries/1622/4 "2022-01-05T23:53:41Z")

</div>

As suggested by April offline, in the same file as the material definition with the custom Sab library, adding the following code will prevent renaming the associated library:

```auto
import openmc.data.thermal as d
d._THERMAL_NAMES["c_Graphite_20p"] = "c_Graphite_20p"

```

Thanks April!
