error when using gz2.py

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
casjxm
Posts: 2
Joined: Wed Jun 09, 2010 2:11 am

error when using gz2.py

Post by casjxm » Wed Jun 09, 2010 3:28 am

Hello everyone,
I'm trying the spin tutorial about fcc Fe (antiferromagnetic)
I use gz2.py to calculate the magnetic moment of Fe atoms in the file tspin_2o_DEN,
but it gives the error information like this:

Number of atoms = 2
Atomic coordinates
[['0.000000E+00', '0.000000E+00', '0.000000E+00'], ['1.650000E+00', '-1.650000E+00', '3.300000E+00']]
number of integration points: 32
Treating atom # 0
Treating atom # 1
0 0
Traceback (most recent call last):
File "gz2.py", line 58, in ?
integral.append(sum/npts_integral)
ZeroDivisionError: integer division or modulo by zero

It may because the code “if(string.find(line,"Calculated")>0)” in gz2.py doesn't work,
but I don’t know how to solve it, any reply will be appreciated!

lamsalc
Posts: 15
Joined: Thu Aug 18, 2011 10:08 pm

Re: error when using gz2.py

Post by lamsalc » Tue Feb 21, 2012 5:05 am

There is no any word "Calculated" in cut3d file. So gz2.py can't find it.

lamsalc
Posts: 15
Joined: Thu Aug 18, 2011 10:08 pm

Re: error when using gz2.py

Post by lamsalc » Wed Feb 29, 2012 12:34 am

Dear casjxm and everyone
I am also having the same problem. I didn't find the word "Calculated" in cut3d as required by gz2.py.
I will be grateful if anyone gives me the answer on how to calculate "magnetic moment" in abinit?
Thank you in advance!

Locked