Page 1 of 1

error when using gz2.py

Posted: Wed Jun 09, 2010 3:28 am
by casjxm
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!

Re: error when using gz2.py

Posted: Tue Feb 21, 2012 5:05 am
by lamsalc
There is no any word "Calculated" in cut3d file. So gz2.py can't find it.

Re: error when using gz2.py

Posted: Wed Feb 29, 2012 12:34 am
by lamsalc
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!