fix up more cases where floating point numbers were used as boolean

This commit is contained in:
Axel Kohlmeyer
2025-06-26 00:59:02 -04:00
parent 5ad24fc733
commit ed279cb9f9
3 changed files with 10 additions and 10 deletions

View File

@ -364,7 +364,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
delf[2] += delr_st[2] * finc;
// theta5 force
if (theta5 && theta5p) {
if ((theta5 != 0.0) && (theta5p != 0.0)) {
finc = -f2 * f4t1 * f4t4 * df4t5 * f4t6 * f5c3 * f5c3 * rinv_st * factor_lj;
@ -375,7 +375,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
}
// theta6 force
if (theta6 && theta6p) {
if ((theta6 != 0.0) && (theta6p != 0.0)) {
finc = -f2 * f4t1* f4t4 * f4t5 * df4t6 * f5c3 * f5c3 * rinv_st * factor_lj;
@ -387,7 +387,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
// cosphi3 and cosphi4 (=cosphi3) force and virial
if (cosphi3) {
if (cosphi3 != 0.0) {
ay[0] = ny_xtrct[a][0];
ay[1] = ny_xtrct[a][1];
@ -476,7 +476,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
deltb[2] = 0.0;
// theta1 torque
if (theta1 && theta1p) {
if ((theta1 != 0.0) && (theta1p != 0.0)) {
tpair = -f2 * df4t1 * f4t4 * f4t5 * f4t6 * f5c3 * f5c3 * factor_lj;
MathExtra::cross3(ax,bx,t1dir);
@ -492,7 +492,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
}
// theta4 torque
if (theta4) {
if (theta4 != 0.0) {
tpair = -f2 * f4t1 * df4t4 * f4t5 * f4t6 * f5c3 * f5c3 * factor_lj;
MathExtra::cross3(bz,az,t4dir);
@ -508,7 +508,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
}
// theta5 torque
if (theta5 && theta5p) {
if ((theta5 != 0.0) && (theta5p != 0.0)) {
tpair = -f2 * f4t1 * f4t4 * df4t5 * f4t6 * f5c3 * f5c3 * factor_lj;
MathExtra::cross3(delr_st_norm,az,t5dir);
@ -520,7 +520,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
}
// theta6 torque
if (theta6 && theta6p) {
if ((theta6 != 0.0) && (theta6p != 0.0)) {
tpair = -f2 * f4t1 * f4t4 * f4t5 * df4t6 * f5c3 * f5c3 * factor_lj;
MathExtra::cross3(delr_st_norm,bz,t6dir);
@ -532,7 +532,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
}
// Full cosphi3 and cosphi4 (=cosphi3) contribution to the torque
if (cosphi3) {
if (cosphi3 != 0.0) {
gamma = d_cs - d_cst;
gammacub = gamma * gamma * gamma;

View File

@ -483,7 +483,7 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
}
// theta4 torque
if (theta4) {
if (theta4 != 0.0) {
tpair = -f1 * f4t1 * f4t2 * f4t3 * df4t4 * f4t7 * f4t8 * factor_lj;
MathExtra::cross3(bz,az,t4dir);

View File

@ -598,7 +598,7 @@ void PairOxdnaStk::compute(int eflag, int vflag)
deltb[2] = 0.0;
// theta4 torque
if (theta4) {
if (theta4 != 0.0) {
tpair = -f1 * df4t4 * f4t5 * f4t6 * f5c1 * f5c2;
MathExtra::cross3(az,bz,t4dir);