fix bug with coefficient parsing for sdk angles

This commit is contained in:
Axel Kohlmeyer
2011-11-07 20:53:37 -05:00
parent 0316e0bf9c
commit ef385531fe

View File

@ -244,7 +244,7 @@ void AngleSDK::coeff(int narg, char **arg)
double k_one = force->numeric(arg[1]);
double theta0_one = force->numeric(arg[2]);
double repscale_one = 1.0;
double repscale_one;
// backward compatibility with old cg/cmm style input:
// this had <lj_type> <epsilon> <sigma>
@ -254,7 +254,8 @@ void AngleSDK::coeff(int narg, char **arg)
if (narg == 6) {
repscale_one = force->numeric(arg[4]);
if (repscale_one > 0.0) repscale_one = 1.0;
} else if (narg == 3) repscale_one = force->numeric(arg[3]);
} else if (narg == 4) repscale_one = force->numeric(arg[3]);
else if (narg == 3) repscale_one = 1.0;
else error->all(FLERR,"Incorrect args for angle coefficients");
// convert theta0 from degrees to radians and store coefficients