# Plotting partial DOS with AbiPy

**URL:** <https://discourse.abinit.org/t/plotting-partial-dos-with-abipy/3033>\
**Category:** Python interfacing : Abipy ecosystem\
**Created:** [November 19, 2021, 9:29am UTC](https://discourse.abinit.org/t/plotting-partial-dos-with-abipy/3033 "2021-11-19T09:29:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastianecheverrir](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/s/f0a364/32.png) [@sebastianecheverrir](https://discourse.abinit.org/u/sebastianecheverrir)\
**Post date:** [November 19, 2021, 9:29am UTC](https://discourse.abinit.org/t/plotting-partial-dos-with-abipy/3033/1 "2021-11-19T09:29:10Z")

</div>

Hi

I am using AbiPy to plot the DOS of a cementite (Fe3C) supercell using this example as a reference ([https://abinit.github.io/abipy/gallery/plot\_edos.html](https://abinit.github.io/abipy/gallery/plot_edos.html)). AbiPy works great and the results agree with what is reported in the literature.  
 ![DOS](https://discourse.abinit.org/uploads/default/original/1X/1b126ca6a5e2bc0750d6f2ad41b544661f8e8f91.png)

Currently, I am trying to plot the contribution of each element to the DOS (partial DOS’s, see e.g. figure 3 in [Redirecting](https://doi.org/10.1016/j.jmmm.2010.11.067)) but I have not found any information about how to do it.

Is that feature implemented in AbiPy?

Thanks!  
Sebastián

---

<div class="post-metadata">

**Author:** ![MMNSchmitt](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@MMNSchmitt](https://discourse.abinit.org/u/MMNSchmitt)\
**Post date:** [November 22, 2021, 12:55pm UTC](https://discourse.abinit.org/t/plotting-partial-dos-with-abipy/3033/2 "2021-11-22T12:55:55Z")

</div>

Dear Sebastian,

There is a dedicated section of the forum for the AbiPy ecosystem. So I moved your question there.

Best,  
Marcus

---

<div class="post-metadata">

**Author:** ![gmatteo](https://discourse.abinit.org/user_avatar/discourse.abinit.org/gmatteo/32/6_2.png) [@gmatteo](https://discourse.abinit.org/u/gmatteo)\
**Post date:** [November 23, 2021, 12:58am UTC](https://discourse.abinit.org/t/plotting-partial-dos-with-abipy/3033/3 "2021-11-23T00:58:08Z")

</div>

> Currently, I am trying to plot the contribution of each element to the DOS (partial DOS’s, see e.g. figure 3 in [Redirecting](https://doi.org/10.1016/j.jmmm.2010.11.067)) but I have not found any information about how to do it.
> 
> Is that feature implemented in AbiPy?

Yes, electronic fatbands and projected-DOS are supported by Abipy.

First of all, one has to perform a NSCF calculations in Abinit with [prtdos](https://docs.abinit.org/variables/files/#prtdos) 3 to produce a FATBANDS.nc file that  
can be post-processed with AbiPy.  
In Fig 3, they are computing the type-projected DOS so the NSCF calculations should be done on a k-mesh then one can call `ncfile.plot_pjdos_typeview()` to plot the type-projected DOS.

See [this notebook](https://nbviewer.org/github/abinit/abitutorials/blob/master/abitutorials/efatbands.ipynb) for further info.
