# Results.get\_atoms

**URL:** <https://openmc.discourse.group/t/results-get-atoms/1322>\
**Category:** User Support\
**Created:** [July 23, 2021, 9:24am UTC](https://openmc.discourse.group/t/results-get-atoms/1322 "2021-07-23T09:24:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaoPF](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@HaoPF](https://openmc.discourse.group/u/HaoPF)\
**Post date:** [July 23, 2021, 9:24am UTC](https://openmc.discourse.group/t/results-get-atoms/1322/1 "2021-07-23T09:24:50Z")

</div>

Hi all,  
I used OpenMC to do the deplete calculation.I ran into a problem when I tried to get the number of U235 atoms.Here are some screenshots of the problem.I’m sorry if my problems are stupid.  
thanks in advance,  
HaoPF  
 ![2021-07-23 17-08-54 的屏幕截图](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/5/5c6db14b1843be4286673f8ff6c51a20fa2cc229.png)

 ![2021-07-23 17-08-07 的屏幕截图](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/a/aeb368b9246e054d4f3da412557bb5941dc142b1.png)  
 ![2021-07-23 17-09-23 的屏幕截图](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/6/6526ff350d09d2c62620962ba045ac32537df537.png)

---

<div class="post-metadata">

**Author:** ![bentridisalah](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/bentridisalah/32/1421_2.png) [@bentridisalah](https://openmc.discourse.group/u/bentridisalah)\
**Post date:** [July 30, 2021, 6:01pm UTC](https://openmc.discourse.group/t/results-get-atoms/1322/3 "2021-07-30T18:01:35Z")

</div>

@HaoPF, Hi

I encountered the same problem few days ago when i was testing the depletion calculation, but in my case the error was in the misidentification of the right id when i was calling the depletion results (i naively used the same id as in the openmc example, i.e ‘1’), and once i checked it in Materials.xml file, my depleteable material was set to be with id=‘4’ and once changed everything went well. Here in your case, i see that, despite you are using the right id of your depletable material, you got an error about the id material (KeyError : ‘1’) and i compared both materials.xml files (yours and mine) and the only difference is the density definition, where you are using weight density (wo) when i’m using atomic one (ao) in my file. I’m not sure that could be the source of the problem, but the report in error message is pointing to some concentration calculation in the corresponding module !!

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [August 11, 2021, 12:08pm UTC](https://openmc.discourse.group/t/results-get-atoms/1322/4 "2021-08-11T12:08:44Z")

</div>

@HaoPF That does look strange. Do you have a model and/or depletion results file that you’re able to share so that I can try to look into it further?

---

<div class="post-metadata">

**Author:** ![HaoPF](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@HaoPF](https://openmc.discourse.group/u/HaoPF)\
**Post date:** [September 8, 2021, 3:13am UTC](https://openmc.discourse.group/t/results-get-atoms/1322/5 "2021-09-08T03:13:01Z")

</div>

@bentridisalah Sorry for the late reply.As you said, I used the correct material ID but still got the error.I’ll try using ‘ao’ to define density.Thank you very much for your reply.

---

<div class="post-metadata">

**Author:** ![HaoPF](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@HaoPF](https://openmc.discourse.group/u/HaoPF)\
**Post date:** [September 8, 2021, 1:26pm UTC](https://openmc.discourse.group/t/results-get-atoms/1322/6 "2021-09-08T13:26:18Z")

</div>

@bentridisalah I used ‘ao’ to define the density and was able to get the number of U235.Thank you very much for your advice.

---

<div class="post-metadata">

**Author:** ![bentridisalah](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/bentridisalah/32/1421_2.png) [@bentridisalah](https://openmc.discourse.group/u/bentridisalah)\
**Post date:** [September 8, 2021, 7:03pm UTC](https://openmc.discourse.group/t/results-get-atoms/1322/7 "2021-09-08T19:03:33Z")

</div>

@HaoPF  
You are very welcome. I’m pleased that you could fix the problem.
