bug in restart2data

Hi guys,

I found some bugs in the recently distributed restart2data file under the tool directory:

  1. in restart2data, PI is defined as a macro of 4.0*atan(1.), there is no problem when PI
    is used in multiplications, but when used as divisor, at lease on my machines, it will
    give wrong results; as a result, the angles in angle coefficients are wrong.
    The easiest solution might be to define
    #define PI (4.*atan(1.))

  2. some pair styles like “eam/alloy” are missing.

Thanks.

Lingti

Comments below.

Steve

2011/6/21 L.T. Kong <[email protected]...>:

Hi guys,

I found some bugs in the recently distributed restart2data file under the
tool directory:
1) in restart2data, PI is defined as a macro of 4.0*atan(1.), there is no
problem when PI
is used in multiplications, but when used as divisor, at lease on my
machines, it will
give wrong results; as a result, the angles in angle coefficients are
wrong.
The easiest solution might be to define
#define PI (4.*atan(1.))

yes - just fixed it - thanks

2) some pair styles like "eam/alloy" are missing.

The current restart2data has eam/alloy in it in
a couple places - just search for it.

Comments below.

Steve

2011/6/21 L.T. Kong <[email protected]...>:

Hi guys,

I found some bugs in the recently distributed restart2data file under the
tool directory:
1) in restart2data, PI is defined as a macro of 4.0*atan(1.), there is no
problem when PI
is used in multiplications, but when used as divisor, at lease on my
machines, it will
give wrong results; as a result, the angles in angle coefficients are
wrong.
The easiest solution might be to define
#define PI (4.*atan(1.))

isn't this a relic from fortran programming days?

the math.h header (or <cmath> in modern c++)
should define an M_PI constant with machine precision.

axel.