# Re: [Pw_forum] Magnetization Density Calculation

```Hello Paolo,

```
I specify nbnd in the scf calculation and after convergence it shows the (large and nonzero) moments on each atom on the cell. The moments are oriented as I would expect.

```
```
Is it the case that it relies on the plotting mesh specified in the &PLOT section? I may not have done this correctly.
```
```
So, I should stick with plotnum=13, specify the direction as stated, and then configure &PLOT to give me the values on the desired grid in the unit cell?
```
Thanks,

*Steve Novakov*
BASc Engineering Physics
Candidate - PhD Physics
Ferroelectronics Laboratory <http://www.ferroelectronicslab.com>
University of Michigan - Ann Arbor
On 2/2/2018 8:24 AM, Paolo Giannozzi wrote:
```
plot_num=13 is what you need. Are you sure you have a nonzero magnetization?
```
Paolo

```
On Thu, Feb 1, 2018 at 5:06 PM, Steve Novakov <steve...@umich.edu <mailto:steve...@umich.edu>> wrote:
```
Hello,

I have replicated some band structure (and other) calculations for
a noncollinear antiferromagnet that I previously completed with
VASP. I am interested in figuring out how to plot the
magnetization density in the unit cell using QE. With VASP, the
CHGCAR file contains data in the format

...

rho+ rho- mx my mz

...

so it is fairly simple to do. However, I am unable to reproduce
this in QE. From my reading of the pp.x inputs page, I see that
there is, for the "plot_num"
variable, two seemingly relevant options:

plot_num=7 : where I then have to specify the spin_component for
charge, mx, my, mz. I am unsure what to pass here for "kpoint(i)"
and "kband(i)". I just want the total magnetization density in the
unit cell, so presumably this is the sum of the band magnetization

plot_num=13: when I pass spin_component=1 (or 2, or 3) I get a
large text file full of zeroes.

I notice in the output directory, there are three files called
"magnetization.x.dat" (and y, and z). Does this already contain
the relevant info? What are these files? They seem to be in binary
and I have tried importing them using various encodings but it is
all gibberish thus far.

I would greatly appreciate any guidance in this matter. Thank you.

```
-- *Steve Novakov*
```    BASc Engineering Physics
Candidate - PhD Physics
Ferroelectronics Laboratory <http://www.ferroelectronicslab.com>
University of Michigan - Ann Arbor

_______________________________________________
Pw_forum mailing list
Pw_forum@pwscf.org <mailto:Pw_forum@pwscf.org>
http://pwscf.org/mailman/listinfo/pw_forum
<http://pwscf.org/mailman/listinfo/pw_forum>

--
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222

_______________________________________________
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum
```
```
```
```_______________________________________________
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum```