Page 1 of 1

the magnetic moment

Posted: Wed Nov 05, 2014 3:15 pm
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

Re: the magnetic moment

Posted: Wed Nov 05, 2014 6:25 pm
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

Re: the magnetic moment

Posted: Wed Nov 05, 2014 10:46 pm
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

Re: the magnetic moment

Posted: Tue Dec 16, 2014 3:03 pm
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

Re: the magnetic moment

Posted: Tue Dec 16, 2014 6:34 pm
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.

Re: the magnetic moment

Posted: Thu Dec 18, 2014 1:06 pm
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 ?

Re: the magnetic moment

Posted: Thu Dec 18, 2014 2:52 pm
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.

Re: the magnetic moment

Posted: Fri Dec 19, 2014 1:23 pm
by halil54
Dear Prof. Graeme, thanks in advance. I have just attached the files, looking forward to reply.

Re: the magnetic moment

Posted: Sat Dec 20, 2014 4:12 pm
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++) {

Re: the magnetic moment

Posted: Tue Jan 13, 2015 9:52 am
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