the magnetic moment

Bader charge density analysis

Moderator: moderators

Post Reply
Fadwa
Posts: 5
Joined: Tue Apr 22, 2014 3:20 pm

the magnetic moment

Post by Fadwa »

Dear Bader admin and users,
Runing Bader with "charge.cube", I can get the charge on each atom from ACF.dat. what about the magnetic moment (spin_up - spin_down) of the atom? What shall I do?

Any suggestion will be appreciated.

Best Wishes,

Fadwa
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: the magnetic moment

Post by graeme »

If you have a spin density file, spin.cube , you can find the spin on each atom using:

bader spin.cube -ref charge.cube
Fadwa
Posts: 5
Joined: Tue Apr 22, 2014 3:20 pm

Re: the magnetic moment

Post by Fadwa »

Dear Prof Graeme,

Thank you for your quick reply.

First, I should do file "charge.cube" than I make file " spin.cube" after that I'll run bader with this order " bader spin.cube -ref charge .cube" , right or not ?

So which file can I get magnetic moment? in ACF.dat ?

Best wishes
halil54
Posts: 5
Joined: Tue Dec 16, 2014 1:05 pm

Re: the magnetic moment

Post by halil54 »

Hi all,

Sorry for trivial questions but I am quite newby and a bit confused. I am also trying to calculate the magnetic moments from CHGCAR file. Regarding that I am running my calculations with LAECHG=.TRUE. tag. I will have CHGCAR_sum file at the end.

- Prof. Henkelman suggest to run "bader CHGCAR_spin -ref CHGCAR_sum". I guess to have CHGCAR_spin file I should first use the chgsplit.pl on CHGCAR_sum script then the file will come, right ?
- Nevertheless, when I convert my CHGCAR file to CHGCAR.cube and split the error message comes as :

Points in total charge density: 1.53235161082913e-15
Points in magnetization density: 3.99350522014799e-15
Number of points not same in two parts! at ./chgsplit.pl line 67, <IN1> line 99372.

- And when I use the CHGCAR file without converting to cube format code is not working...

Can anybody tell me what is the missing and I can not get the CHGCAR_spin ?

Regards
Halil
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: the magnetic moment

Post by graeme »

It looks like the files are not being parsed correctly. Check for obvious problems with the header (e.g. end line characters) and then we'll take a look if you post the files.
halil54
Posts: 5
Joined: Tue Dec 16, 2014 1:05 pm

Re: the magnetic moment

Post by halil54 »

I have attached the CHGCAR_sum file, where I get by using " chgsum.pl AECCAR0 AECCAR2 ". With this I can run " bader CHGCAR -ref CHGCAR_sum " or I can convert both CHGCAR and CHGCAR_sum files to cube format and run the bader, to get the charges on ions. The first question which one will be the correct ?

The second question is about the magnetic moments. To get the magnetic moments on each ions, I need to do "bader spin.cube -ref charge.cube", how can I get the spin.cube ? In case that this file will come after running chgsplit.pl, I can not run the script. Error:
> ./chgsplit.pl CHGCAR_sum
Atoms in file: 68
Points in total charge density: 1179648

and nothing comes out.

I run my calculations with Nd,Fe and B, GGA+U and Non-collinear. Can it be the reason ?
Attachments
CHGCAR_sum.txt
(21.38 MiB) Downloaded 920 times
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: the magnetic moment

Post by graeme »

Please attach the original CHGCAR, AECCAR0, and AECCAR2 so I can reproduce the error.

In regards to your question, you can do the analysis using CHGCAR; there is no reason to convert the files to the cube format.
halil54
Posts: 5
Joined: Tue Dec 16, 2014 1:05 pm

Re: the magnetic moment

Post by halil54 »

Dear Prof. Graeme, thanks in advance. I have just attached the files, looking forward to reply.
Attachments
CHGCAR.txt
(83.2 MiB) Downloaded 1230 times
AECCAR2.txt
(20.48 MiB) Downloaded 912 times
AECCAR0.txt
(20.48 MiB) Downloaded 915 times
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: the magnetic moment

Post by graeme »

Our chgsplit.pl script was not working with the vasp5 CHGCAR format. It is now, so you can download it again, or change the 10th line to:
for ($i=0; $i<6; $i++) {
halil54
Posts: 5
Joined: Tue Dec 16, 2014 1:05 pm

Re: the magnetic moment

Post by halil54 »

Dear Prof. Graeme,

Sorry for very late return, due to the accident I had, I could not able to write.

I have changed the line 10 as you write and also tried with downloading new version but I still got the same error. When I type ./chgsplit.pl CHGCAR_sum
>Atoms in file: 68
>Points in total charge density: 1179648

is shown but nothing comes more. The file CHGCAR_mag is empty. Did I missed anything ?

thanks in advance
Post Reply