xcart error, can't read floating point variable from string

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

Moderator: bguster

Locked
stella
Posts: 4
Joined: Wed Dec 20, 2017 4:01 am

xcart error, can't read floating point variable from string

Post by stella » Tue Jan 16, 2018 1:49 am

Program doesn't seem to be reading coordinate inputs correctly.

I get the error:
Attempted to read ndig=14 floating point digits,
from string(1:ndig) 0.52083000+E00, to initialize a floating variable.

inarray :
An error occurred reading data for keyword " XCART",
looking for 108 array elements


Here's the code:
natom 36 ntypat 3 typat 19*1 12*2 6*3 znucl 9.0 3.0 4.0
nband 80
xcart
0.52083000+E00 6.34067000+E00 7.93547000+E00
0.49915000+E00 0.68722000+E00 2.69284000+E00
5.40419000+E00 6.05658000+E00 8.10849000+E00
3.63760000+E00 0.91518000+E00 1.62362000+E00
8.03029000+E00 3.44032000+E00 3.48519000+E00
2.80320000+E00 5.54940000+E00 1.01246500+E01
0.00000000+E00 3.16611000+E00 7.18011000+E00
5.33018000+E00 2.91341000+E00 7.35572000+E00
1.37231000+E00 3.65292000+E00 1.34398000+E00
5.38038000+E00 3.55009000+E00 1.05235900+E01
7.32802000+E00 4.76621000+E00 0.65308000+E00
2.56847000+E00 2.34420000+E00 9.04026000+E00
3.53357000+E00 7.61987000+E00 3.56259000+E00
4.20671000+E00 4.78776000+E00 4.95830000+E00
5.37863000+E00 1.65757000+E00 4.39961000+E00
3.72459000+E00 0.00000000+E00 6.87860000+E00
4.35849000+E00 3.65090000+E00 0.00000000+E00
4.84196000+E00 6.91973000+E00 0.62202000+E00
1.69367000+E00 5.45630000+E00 3.51013000+E00
3.08226000+E00 2.93483000+E00 3.38216000+E00
7.70136000+E00 2.43022000+E00 6.04167000+E00
5.37951000+E00 3.71265000+E00 2.62145000+E00
5.00795000+E00 0.91562000+E00 9.31854000+E00
3.04099000+E00 4.62651000+E00 7.52709000+E00
2.03071000+E00 6.50605000+E00 1.30792000+E00
3.62945000+E00 5.09563000+E00 2.28580000+E00
0.79299000+E00 0.93452000+E00 5.59746000+E00
5.56089000+E00 7.15346000+E00 5.49698000+E00
2.76408000+E00 0.71908000+E00 4.29453000+E00
1.57755000+E00 5.00501000+E00 5.77378000+E00
2.68246000+E00 2.59737000+E00 5.99473000+E00
0.72795000+E00 3.19081000+E00 4.25151000+E00
6.48812000+E00 1.86515000+E00 1.40361000+E00
6.21622000+E00 6.00626000+E00 3.22467000+E00
3.07072000+E00 7.00778000+E00 6.50413000+E00
6.98681000+E00 4.97283000+E00 5.77503000+E00


As you can see, there's definitely 108 coordinates provided in the array.

gfcjyb
Posts: 3
Joined: Sat Mar 17, 2018 2:02 am

Re: xcart error, can't read floating point variable from str

Post by gfcjyb » Mon Mar 19, 2018 10:56 pm

It should be E+00 instead of +E00.

Hola
Posts: 9
Joined: Thu Mar 29, 2018 10:51 am

Re: xcart error, can't read floating point variable from str

Post by Hola » Thu Mar 29, 2018 11:07 am

Hello everyone,

I have the same problem with RPRIM. I get this error message :

" inread : ERROR -
Attempted to read ndig=9 floating point digits,
from string(1:ndig) SQRT(3)/2, to initialize a floating variable.

inarray :
An error occurred reading data for keyword " RPRIM",
looking for 9 array elements. "

In my input file I define RPRIM like this:
rprim
1.0 0.0 0.0
-0.5 sqrt(3)/2 0.0
0.0 0.0 1.0

I suppose that it comes from sqrt(3)/2. However I don't want to use a decimal approximate value.

Should anyone help me ??

Yours sincerely

NPike
Posts: 34
Joined: Fri Mar 18, 2016 1:15 pm

Re: xcart error, can't read floating point variable from str

Post by NPike » Fri Apr 06, 2018 4:30 pm

Hello Hola!

You are correct that it is the sqrt(3)/2 that leads to the Abinit error message. As it states in the tutorials, the input reader of Abinit can read some fractions (1/2, 1/3, etc) but cannot read in anything more complex such as the sqrt(). I suggest replacing sqrt(3)/2 by 0.86602540378 (which has the required number of digits (10 in this case due to tolsym).

Cheers!
Nicholas A. Pike
Research Scientist

Locked