add_param_to_list (bond, &b);
nbond[i]++;
nbond[j]++;
- if (debug)
- {
- fprintf(debug, "Bonding atoms %s-%d and %s-%d\n",
- *atoms->atomname[i], i+1, *atoms->atomname[j], j+1);
- }
}
}
}
{
set_pbc(&pbc, epbcXYZ, box);
}
- if (debug)
- {
- pr_rvecs(debug, 0, "X2TOP", box, DIM);
- }
for (i = 0; (i < ang->nr); i++)
{
ai = ang->param[i].ai();
ak = ang->param[i].ak();
th = RAD2DEG*bond_angle(x[ai], x[aj], x[ak], bPBC ? &pbc : nullptr,
r_ij, r_kj, &costh, &t1, &t2);
- if (debug)
- {
- fprintf(debug, "X2TOP: ai=%3d aj=%3d ak=%3d r_ij=%8.3f r_kj=%8.3f th=%8.3f\n",
- ai, aj, ak, norm(r_ij), norm(r_kj), th);
- }
ang->param[i].c0() = th;
}
for (i = 0; (i < dih->nr); i++)
al = dih->param[i].al();
ph = RAD2DEG*dih_angle(x[ai], x[aj], x[ak], x[al], bPBC ? &pbc : nullptr,
r_ij, r_kj, r_kl, m, n, &t1, &t2, &t3);
- if (debug)
- {
- fprintf(debug, "X2TOP: ai=%3d aj=%3d ak=%3d al=%3d r_ij=%8.3f r_kj=%8.3f r_kl=%8.3f ph=%8.3f\n",
- ai, aj, ak, al, norm(r_ij), norm(r_kj), norm(r_kl), ph);
- }
dih->param[i].c0() = ph;
}
}