i0 = 0;
snew(*cgnr, at->nr);
qt = 0;
- prevcg = NOTSET;
curcg = 0;
cg = -1;
- j = NOTSET;
for (i = 0; (i < at->nr); i++)
{
}
if (at->atom[i].m == 0)
{
- if (debug)
- {
- fprintf(debug, "atom %d%s: curcg=%d, prevcg=%d, cg=%d\n",
- i+1, *(at->atomname[i]), curcg, prevcg,
- j == NOTSET ? NOTSET : restp[resind].cgnr[j]);
- }
qt = 0;
prevcg = cg;
name = *(at->atomname[i]);
}
else
{
- if (debug)
- {
- fprintf(debug, "atom %d%s: curcg=%d, qt=%g, is_int=%s\n",
- i+1, *(at->atomname[i]), curcg, qt, gmx::boolToString(is_int(qt)));
- }
cg = -1;
if (is_int(qt))
{
int k;
const char *Hnum = "123456";
- /*if (debug)
- {
- fprintf(debug,"adding atom(s) %s to atom %s in res %d%s in rtp\n",
- hack->nname,
- * restp->atomname[at_start], resnr, restp->resname);
- }*/
strcpy(buf, hack->nname);
buf[strlen(buf)+1] = '\0';
if (hack->nr > 1)
{
/* oname != NULL */
if ( (*hb)[i].hack[j].nname == nullptr)
- {
- /* we're deleting */
- if (debug)
- {
- fprintf(debug, "deleting atom %s from res %d%s in rtp\n",
- *(*restp)[i].atomname[l],
- i+1, (*restp)[i].resname);
- }
+ { /* we're deleting */
/* shift the rest */
(*restp)[i].natom--;
for (k = l; k < (*restp)[i].natom; k++)
}
else /* nname != NULL */
{ /* we're replacing */
- if (debug)
- {
- fprintf(debug, "replacing atom %s by %s in res %d%s in rtp\n",
- *(*restp)[i].atomname[l], (*hb)[i].hack[j].nname,
- i+1, (*restp)[i].resname);
- }
snew( (*restp)[i].atomname[l], 1);
(*restp)[i].atom[l] = *(*hb)[i].hack[j].atom;
*(*restp)[i].atomname[l] = gmx_strdup((*hb)[i].hack[j].nname);
init_plist(plist);
gmx_residuetype_init(&rt);
- if (debug)
- {
- print_resall(debug, atoms->nres, restp, atype);
- dump_hb(debug, atoms->nres, hb);
- }
-
/* Make bonds */
at2bonds(&(plist[F_BONDS]), hb,
atoms, *x,