From e47c992c41049fec8b9b3f1d70df38457fc17519 Mon Sep 17 00:00:00 2001 From: Joe Jordan Date: Thu, 19 Jul 2018 13:53:22 +0200 Subject: [PATCH] remove most debug flags from gmxpreprocess To make pdb2gmx more readable as part of #2566 I removed the debug info. I went ahead and removed most debug info from other gmxpreprocess tools as well. Change-Id: I88919d1f166d7f44508b4fcfae156ffa051b4d70 --- src/gromacs/gmxpreprocess/convparm.cpp | 16 --- src/gromacs/gmxpreprocess/gen_ad.cpp | 11 -- src/gromacs/gmxpreprocess/genhydro.cpp | 96 --------------- src/gromacs/gmxpreprocess/gmxcpp.cpp | 49 +------- src/gromacs/gmxpreprocess/gpp_atomtype.cpp | 14 --- src/gromacs/gmxpreprocess/gpp_nextnb.cpp | 8 -- src/gromacs/gmxpreprocess/h_db.cpp | 18 --- src/gromacs/gmxpreprocess/hizzie.cpp | 35 ------ src/gromacs/gmxpreprocess/pdb2gmx.cpp | 48 +------- src/gromacs/gmxpreprocess/pdb2top.cpp | 40 +------ src/gromacs/gmxpreprocess/readir.cpp | 20 +--- src/gromacs/gmxpreprocess/resall.cpp | 19 --- src/gromacs/gmxpreprocess/specbond.cpp | 19 --- src/gromacs/gmxpreprocess/ter_db.cpp | 4 - src/gromacs/gmxpreprocess/tomorse.cpp | 15 +-- src/gromacs/gmxpreprocess/topdirs.cpp | 12 -- src/gromacs/gmxpreprocess/topio.cpp | 9 -- src/gromacs/gmxpreprocess/toppush.cpp | 21 ---- src/gromacs/gmxpreprocess/toputil.cpp | 6 - src/gromacs/gmxpreprocess/vsite_parm.cpp | 129 +-------------------- src/gromacs/gmxpreprocess/x2top.cpp | 19 --- 21 files changed, 9 insertions(+), 599 deletions(-) diff --git a/src/gromacs/gmxpreprocess/convparm.cpp b/src/gromacs/gmxpreprocess/convparm.cpp index 0d5e0b042a..c6e2f3ccbc 100644 --- a/src/gromacs/gmxpreprocess/convparm.cpp +++ b/src/gromacs/gmxpreprocess/convparm.cpp @@ -484,11 +484,6 @@ static int enter_params(gmx_ffparams_t *ffparams, t_functype ftype, { type = ffparams->ntypes; } - if (debug) - { - fprintf(debug, "copying newparam to ffparams->iparams[%d] (ntypes=%d)\n", - type, ffparams->ntypes); - } memcpy(&ffparams->iparams[type], &newparam, (size_t)sizeof(newparam)); ffparams->ntypes++; @@ -529,11 +524,6 @@ static void enter_function(t_params *p, t_functype ftype, int comb, real reppow, *maxtypes += 1000; srenew(ffparams->functype, *maxtypes); srenew(ffparams->iparams, *maxtypes); - if (debug) - { - fprintf(debug, "%s, line %d: srenewed idef->functype and idef->iparams to %d\n", - __FILE__, __LINE__, *maxtypes); - } } type = enter_params(ffparams, ftype, p->param[k].c, comb, reppow, start, bAppend); /* Type==-1 is used as a signal that this interaction is all-zero and should not be added. */ @@ -645,11 +635,5 @@ void convert_params(int atnr, t_params nbtypes[], } } - if (debug) - { - fprintf(debug, "%s, line %d: There are %d functypes in idef\n", - __FILE__, __LINE__, ffp->ntypes); - } - ffp->fudgeQQ = fudgeQQ; } diff --git a/src/gromacs/gmxpreprocess/gen_ad.cpp b/src/gromacs/gmxpreprocess/gen_ad.cpp index 04319508b3..8f79cde0a1 100644 --- a/src/gromacs/gmxpreprocess/gen_ad.cpp +++ b/src/gromacs/gmxpreprocess/gen_ad.cpp @@ -212,13 +212,6 @@ static void rm2par(t_param p[], int *np, peq eq) } if (p[index[i]].a[0] == p[index[i]].a[1]) { - if (debug) - { - fprintf(debug, - "Something VERY strange is going on in rm2par (gen_ad.c)\n" - "a[0] %d a[1] %d a[2] %d a[3] %d\n", - p[i].a[0], p[i].a[1], p[i].a[2], p[i].a[3]); - } strcpy(p[i].s, ""); } else if (index[i] > i) @@ -977,10 +970,6 @@ void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[], } nbd = nb_dist(nnb, i, l1); - if (debug) - { - fprintf(debug, "Distance (%d-%d) = %d\n", i+1, l1+1, nbd); - } if (nbd == 3) { i1 = std::min(i, l1); diff --git a/src/gromacs/gmxpreprocess/genhydro.cpp b/src/gromacs/gmxpreprocess/genhydro.cpp index 3dabd9d36c..e9a41c1600 100644 --- a/src/gromacs/gmxpreprocess/genhydro.cpp +++ b/src/gromacs/gmxpreprocess/genhydro.cpp @@ -107,34 +107,6 @@ static void hacksearch_atom(int *ii, int *jj, char *name, } -static void dump_ab(FILE *out, int natom, const int nab[], t_hack *ab[], bool bHeader) -{ - int i, j; - -#define SS(s) (s) ? (s) : "-" - /* dump ab */ - if (bHeader) - { - fprintf(out, "ADDBLOCK (t_hack) natom=%d\n" - "%4s %2s %-4s %-4s %2s %-4s %-4s %-4s %-4s %1s %s\n", - natom, "atom", "nr", "old", "new", "tp", "ai", "aj", "ak", "al", "a", "x"); - } - for (i = 0; i < natom; i++) - { - for (j = 0; j < nab[i]; j++) - { - fprintf(out, "%4d %2d %-4s %-4s %2d %-4s %-4s %-4s %-4s %s %g %g %g\n", - i+1, ab[i][j].nr, SS(ab[i][j].oname), SS(ab[i][j].nname), - ab[i][j].tp, - SS(ab[i][j].ai()), SS(ab[i][j].aj()), - SS(ab[i][j].ak()), SS(ab[i][j].al()), - ab[i][j].atom ? "+" : "", - ab[i][j].newx[XX], ab[i][j].newx[YY], ab[i][j].newx[ZZ]); - } - } -#undef SS -} - static t_hackblock *get_hackblocks(t_atoms *pdba, int nah, t_hackblock ah[], int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, @@ -203,10 +175,6 @@ static void expand_hackblocks_one(t_hackblock *hbr, char *atomname, /* must be either hdb entry (tp>0) or add from tdb (oname==NULL) and first control aton (AI) matches this atom or delete/replace from tdb (oname!=NULL) and oname matches this atom */ - if (debug) - { - fprintf(debug, " %s", hbr->hack[j].oname ? hbr->hack[j].oname : hbr->hack[j].ai()); - } if (!bIgnore && ( ( ( hbr->hack[j].tp > 0 || hbr->hack[j].oname == nullptr ) && @@ -215,10 +183,6 @@ static void expand_hackblocks_one(t_hackblock *hbr, char *atomname, strcmp(atomname, hbr->hack[j].oname) == 0) ) ) { /* now expand all hacks for this atom */ - if (debug) - { - fprintf(debug, " +%dh", hbr->hack[j].nr); - } srenew(*abi, *nabi + hbr->hack[j].nr); for (k = 0; k < hbr->hack[j].nr; k++) { @@ -311,10 +275,6 @@ static void expand_hackblocks(t_atoms *pdba, t_hackblock hb[], expand_hackblocks_one(&hb[pdba->atom[i].resind], *pdba->atomname[i], &nab[i], &ab[i], bN, bC); } - if (debug) - { - fprintf(debug, "\n"); - } } static int check_atoms_present(t_atoms *pdba, const int nab[], t_hack *ab[]) @@ -340,12 +300,6 @@ static int check_atoms_present(t_atoms *pdba, const int nab[], t_hack *ab[]) { /* We found the added atom. */ ab[i][j].bAlreadyPresent = TRUE; - if (debug) - { - fprintf(debug, "Atom '%s' in residue '%s' %d is already present\n", - ab[i][j].nname, - *pdba->resinfo[rnr].name, pdba->resinfo[rnr].nr); - } } else { @@ -486,10 +440,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], nab = *nabptr; ab = *abptr; bKeep_ab = TRUE; - if (debug) - { - fprintf(debug, "pointer to ab found\n"); - } } else { @@ -500,10 +450,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], { /* WOW, everything was already figured out */ bUpdate_pdba = FALSE; - if (debug) - { - fprintf(debug, "pointer to non-null ab found\n"); - } } else { @@ -511,10 +457,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], bUpdate_pdba = TRUE; /* first get all the hackblocks for each residue: */ hb = get_hackblocks(pdba, nah, ah, nterpairs, ntdb, ctdb, rN, rC); - if (debug) - { - dump_hb(debug, pdba->nres, hb); - } /* expand the hackblocks to atom level */ snew(nab, natoms); @@ -523,32 +465,14 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], free_t_hackblock(pdba->nres, &hb); } - if (debug) - { - fprintf(debug, "before calc_all_pos\n"); - dump_ab(debug, natoms, nab, ab, TRUE); - } - /* Now calc the positions */ calc_all_pos(pdba, *xptr, nab, ab, bCheckMissing); - if (debug) - { - fprintf(debug, "after calc_all_pos\n"); - dump_ab(debug, natoms, nab, ab, TRUE); - } - if (bUpdate_pdba) { /* we don't have to add atoms that are already present in pdba, so we will remove them from the ab (t_hack) */ nadd = check_atoms_present(pdba, nab, ab); - if (debug) - { - fprintf(debug, "removed add hacks that were already in pdba:\n"); - dump_ab(debug, natoms, nab, ab, TRUE); - fprintf(debug, "will be adding %d atoms\n", nadd); - } /* Copy old atoms, making space for new ones */ snew(newpdba, 1); @@ -561,11 +485,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], { nadd = 0; } - if (debug) - { - fprintf(debug, "snew xn for %d old + %d new atoms %d total)\n", - natoms, nadd, natoms+nadd); - } if (nadd == 0) { @@ -596,13 +515,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], srenew(newpdba->atomname, natoms+nadd); } } - if (debug) - { - fprintf(debug, "(%3d) %3d %4s %4s%3d %3d", - i+1, newi+1, *pdba->atomname[i], - *pdba->resinfo[pdba->atom[i].resind].name, - pdba->resinfo[pdba->atom[i].resind].nr, nab[i]); - } if (bUpdate_pdba) { copy_atom(pdba, i, newpdba, newi); @@ -630,10 +542,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], { newpdba->atom[newi].resind = pdba->atom[i].resind; } - if (debug) - { - fprintf(debug, " + %d", newi+1); - } } if (ab[i][j].nname != nullptr && (ab[i][j].oname == nullptr || @@ -684,10 +592,6 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], } newi++; i += nalreadypresent; - if (debug) - { - fprintf(debug, "\n"); - } } } if (bUpdate_pdba) diff --git a/src/gromacs/gmxpreprocess/gmxcpp.cpp b/src/gromacs/gmxpreprocess/gmxcpp.cpp index 4bac41ea0b..15eb3b997d 100644 --- a/src/gromacs/gmxpreprocess/gmxcpp.cpp +++ b/src/gromacs/gmxpreprocess/gmxcpp.cpp @@ -212,10 +212,6 @@ static void add_define(const char *name, const char *value) } else if (defs[i].def) { - if (debug) - { - fprintf(debug, "Overriding define %s\n", name); - } sfree(defs[i].def); } if (value && strlen(value) > 0) @@ -279,10 +275,6 @@ int cpp_open_file(const char *filenm, gmx_cpp_t *handle, char **cppopts) i++; } } - if (debug) - { - fprintf(debug, "GMXCPP: added %d command line arguments\n", i); - } snew(cpp, 1); *handle = cpp; @@ -316,10 +308,6 @@ int cpp_open_file(const char *filenm, gmx_cpp_t *handle, char **cppopts) { gmx_fatal(FARGS, "Topology include file \"%s\" not found", filenm); } - if (nullptr != debug) - { - fprintf(debug, "GMXCPP: cpp file open %s\n", cpp->fn); - } /* If the file name has a path component, we need to change to that * directory. Note that we - just as C - always use UNIX path separators * internally in include file names. @@ -344,16 +332,7 @@ int cpp_open_file(const char *filenm, gmx_cpp_t *handle, char **cppopts) snew(cpp->cwd, STRLEN); gmx_getcwd(cpp->cwd, STRLEN); - if (nullptr != debug) - { - fprintf(debug, "GMXCPP: cwd %s\n", cpp->cwd); - } gmx_chdir(cpp->path); - - if (nullptr != debug) - { - fprintf(debug, "GMXCPP: chdir to %s\n", cpp->path); - } } cpp->line_len = 0; cpp->line = nullptr; @@ -364,10 +343,6 @@ int cpp_open_file(const char *filenm, gmx_cpp_t *handle, char **cppopts) cpp->parent = nullptr; if (cpp->fp == nullptr) { - if (nullptr != debug) - { - fprintf(debug, "GMXCPP: opening file %s\n", cpp->fn); - } cpp->fp = fopen(cpp->fn, "r"); } if (cpp->fp == nullptr) @@ -511,11 +486,6 @@ process_directive(gmx_cpp_t *handlep, const char *dname, const char *dval) strncpy(inc_fn, dval+i0, len); inc_fn[len] = '\0'; - if (debug) - { - fprintf(debug, "Going to open include file '%s' i0 = %d, strlen = %d\n", - inc_fn, i0, len); - } /* Open include file and store it as a child in the handle structure */ status = cpp_open_file(inc_fn, &(handle->child), nullptr); sfree(inc_fn); @@ -653,12 +623,7 @@ int cpp_read_line(gmx_cpp_t *handlep, int n, char buf[]) } strcpy(handle->line, buf); handle->line_nr++; - } - /* Now we've read a line! */ - if (debug) - { - fprintf(debug, "%s : %4d : %s\n", handle->fn, handle->line_nr, buf); - } + } /* Now we've read a line! */ /* Process directives if this line contains one */ if (find_directive(buf, &dname, &dval)) @@ -741,17 +706,9 @@ int cpp_close_file(gmx_cpp_t *handlep) { return eCPP_FILE_NOT_OPEN; } - if (debug) - { - fprintf(debug, "GMXCPP: closing file %s\n", handle->fn); - } fclose(handle->fp); if (nullptr != handle->cwd) { - if (nullptr != debug) - { - fprintf(debug, "GMXCPP: chdir to %s\n", handle->cwd); - } gmx_chdir(handle->cwd); } @@ -768,10 +725,6 @@ int cpp_close_file(gmx_cpp_t *handlep) case EINTR: return eCPP_INTERRUPT; default: - if (debug) - { - fprintf(debug, "Strange stuff closing file, errno = %d", errno); - } return eCPP_UNKNOWN; } } diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.cpp b/src/gromacs/gmxpreprocess/gpp_atomtype.cpp index aae9956793..033fb2015c 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.cpp +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.cpp @@ -220,10 +220,6 @@ int add_atomtype(gpp_atomtype_t ga, t_symtab *tab, { if (strcmp(*ga->atomname[i], name) == 0) { - if (nullptr != debug) - { - fprintf(debug, "Trying to add atomtype %s again. Skipping it.\n", name); - } break; } } @@ -317,10 +313,6 @@ static int search_atomtypes(gpp_atomtype_t ga, int *n, int typelist[], if (i == nn) { - if (debug) - { - fprintf(debug, "Renumbering atomtype %d to %d\n", thistype, nn); - } if (nn == ntype) { gmx_fatal(FARGS, "Atomtype horror n = %d, %s, %d", nn, __FILE__, __LINE__); @@ -400,14 +392,8 @@ void renum_atype(t_params plist[], gmx_mtop_t *mtop, snew(new_atomnumber, nat); snew(new_atomname, nat); - /* We now have a list of unique atomtypes in typelist */ - if (debug) - { - pr_ivec(debug, 0, "typelist", typelist, nat, TRUE); - } - /* Renumber nlist */ nbsnew = nullptr; snew(nbsnew, plist[ftype].nr); diff --git a/src/gromacs/gmxpreprocess/gpp_nextnb.cpp b/src/gromacs/gmxpreprocess/gpp_nextnb.cpp index 71db4920a2..d567cdea34 100644 --- a/src/gromacs/gmxpreprocess/gpp_nextnb.cpp +++ b/src/gromacs/gmxpreprocess/gpp_nextnb.cpp @@ -189,10 +189,6 @@ static void nnb2excl(t_nextnb *nnb, t_blocka *excl) nr_of_sortables += nnb->nrexcl[i][nre]; } - if (debug) - { - fprintf(debug, "nr_of_sortables: %d\n", nr_of_sortables); - } /* make space for sortable array */ snew(s, nr_of_sortables); @@ -248,10 +244,6 @@ static void nnb2excl(t_nextnb *nnb, t_blocka *excl) /* cleanup temporary space */ sfree (s); } - if (debug) - { - print_blocka(debug, "Exclusions", "Atom", "Excluded", excl); - } } /*! \brief Return true of neighbor is already present in some exclusion level diff --git a/src/gromacs/gmxpreprocess/h_db.cpp b/src/gromacs/gmxpreprocess/h_db.cpp index 6e1a81f32c..52c634696d 100644 --- a/src/gromacs/gmxpreprocess/h_db.cpp +++ b/src/gromacs/gmxpreprocess/h_db.cpp @@ -134,11 +134,6 @@ static void read_h_db_file(const char *hfn, int *nahptr, t_hackblock **ah) int i, n, nab, nah; t_hackblock *aah; - if (debug) - { - fprintf(debug, "Hydrogen Database (%s):\n", hfn); - } - fflib_filename_base(hfn, filebase, STRLEN); /* Currently filebase is read and set, but not used. * hdb entries from any hdb file and be applied to rtp entries @@ -162,10 +157,6 @@ static void read_h_db_file(const char *hfn, int *nahptr, t_hackblock **ah) nah, line); break; } - if (debug) - { - fprintf(debug, "%s", buf); - } srenew(aah, nah+1); clear_t_hackblock(&aah[nah]); aah[nah].name = gmx_strdup(buf); @@ -173,10 +164,6 @@ static void read_h_db_file(const char *hfn, int *nahptr, t_hackblock **ah) if (sscanf(line+n, "%d", &nab) == 1) { - if (debug) - { - fprintf(debug, " %d\n", nab); - } snew(aah[nah].hack, nab); aah[nah].nhack = nab; for (i = 0; (i < nab); i++) @@ -204,11 +191,6 @@ static void read_h_db_file(const char *hfn, int *nahptr, t_hackblock **ah) qsort(aah, nah, (size_t)sizeof(**ah), compaddh); } - /* - if (debug) - dump_h_db(hfn,nah,aah); - */ - *nahptr = nah; *ah = aah; } diff --git a/src/gromacs/gmxpreprocess/hizzie.cpp b/src/gromacs/gmxpreprocess/hizzie.cpp index 023b6062a8..c81add20c3 100644 --- a/src/gromacs/gmxpreprocess/hizzie.cpp +++ b/src/gromacs/gmxpreprocess/hizzie.cpp @@ -121,27 +121,6 @@ static void chk_allhb(t_atoms *pdba, rvec x[], t_blocka *hb, hb->nra = k; } -static void pr_hbonds(FILE *fp, t_blocka *hb, t_atoms *pdba) -{ - int i, j, k, j0, j1; - - fprintf(fp, "Dumping all hydrogen bonds!\n"); - for (i = 0; (i < hb->nr); i++) - { - j0 = hb->index[i]; - j1 = hb->index[i+1]; - for (j = j0; (j < j1); j++) - { - k = hb->a[j]; - fprintf(fp, "%5s%4d%5s - %5s%4d%5s\n", - *pdba->resinfo[pdba->atom[i].resind].name, - pdba->resinfo[pdba->atom[i].resind].nr, *pdba->atomname[i], - *pdba->resinfo[pdba->atom[k].resind].name, - pdba->resinfo[pdba->atom[k].resind].nr, *pdba->atomname[k]); - } - } -} - static bool chk_hbonds(int i, t_atoms *pdba, rvec x[], const bool ad[], bool hbond[], rvec xh, real angle, real dist) @@ -172,16 +151,6 @@ static bool chk_hbonds(int i, t_atoms *pdba, rvec x[], a = RAD2DEG * acos(cos_angle(nh, oh)); if ((d2 < dist2) && (a > angle)) { - if (debug) - { - fprintf(debug, - "HBOND between %s%d-%s and %s%d-%s is %g nm, %g deg\n", - *pdba->resinfo[pdba->atom[i].resind].name, - pdba->resinfo[pdba->atom[i].resind].nr, *pdba->atomname[i], - *pdba->resinfo[pdba->atom[aj].resind].name, - pdba->resinfo[pdba->atom[aj].resind].nr, *pdba->atomname[aj], - std::sqrt(d2), a); - } hbond[i] = TRUE; bHB = TRUE; } @@ -266,10 +235,6 @@ void set_histp(t_atoms *pdba, rvec *x, real angle, real dist) } fprintf(stderr, " %d donors and %d acceptors were found.\n", nd, na); chk_allhb(pdba, x, hb, donor, acceptor, dist); - if (debug) - { - pr_hbonds(debug, hb, pdba); - } fprintf(stderr, "There are %d hydrogen bonds\n", hb->nra); /* Now do the HIS stuff */ diff --git a/src/gromacs/gmxpreprocess/pdb2gmx.cpp b/src/gromacs/gmxpreprocess/pdb2gmx.cpp index 12f2fab670..f2d8cb564c 100644 --- a/src/gromacs/gmxpreprocess/pdb2gmx.cpp +++ b/src/gromacs/gmxpreprocess/pdb2gmx.cpp @@ -1392,7 +1392,7 @@ int gmx_pdb2gmx(int argc, char *argv[]) gpp_atomtype_t atype; gmx_residuetype_t*rt; const char *top_fn; - char fn[256], itp_fn[STRLEN], posre_fn[STRLEN], buf_fn[STRLEN]; + char itp_fn[STRLEN], posre_fn[STRLEN], buf_fn[STRLEN]; char molname[STRLEN], title[STRLEN]; char *c, forcefield[STRLEN], ffdir[STRLEN]; char ffname[STRLEN], suffix[STRLEN], buf[STRLEN]; @@ -1980,20 +1980,6 @@ int gmx_pdb2gmx(int argc, char *argv[]) &symtab, bVerbose); } - if (debug) - { - if (nch == 1) - { - sprintf(fn, "chain.pdb"); - } - else - { - sprintf(fn, "chain_%c%d.pdb", cc->chainid, cc->chainnum); - } - write_sto_conf(fn, title, pdba, x, nullptr, ePBC, box); - } - - for (i = 0; i < cc->nterpairs; i++) { @@ -2124,25 +2110,11 @@ int gmx_pdb2gmx(int argc, char *argv[]) /* Generate Hydrogen atoms (and termini) in the sequence */ printf("Generating any missing hydrogen atoms and/or adding termini.\n"); - natom = add_h(&pdba, &x, nah, ah, - cc->nterpairs, cc->ntdb, cc->ctdb, cc->r_start, cc->r_end, bAllowMissing, - nullptr, nullptr, TRUE, FALSE); + add_h(&pdba, &x, nah, ah, + cc->nterpairs, cc->ntdb, cc->ctdb, cc->r_start, cc->r_end, bAllowMissing, + nullptr, nullptr, TRUE, FALSE); printf("Now there are %d residues with %d atoms\n", pdba->nres, pdba->nr); - if (debug) - { - write_pdbfile(debug, title, pdba, x, ePBC, box, ' ', 0, nullptr, TRUE); - } - - if (debug) - { - for (i = 0; (i < natom); i++) - { - fprintf(debug, "Res %s%d atom %d %s\n", - *(pdba->resinfo[pdba->atom[i].resind].name), - pdba->resinfo[pdba->atom[i].resind].nr, i+1, *pdba->atomname[i]); - } - } strcpy(posre_fn, ftp2fn(efITP, NFILE, fnm)); @@ -2277,18 +2249,6 @@ int gmx_pdb2gmx(int argc, char *argv[]) cc->pdba = pdba; cc->x = x; - if (debug) - { - if (cc->chainid == ' ') - { - sprintf(fn, "chain.pdb"); - } - else - { - sprintf(fn, "chain_%c.pdb", cc->chainid); - } - write_sto_conf(fn, "", pdba, x, nullptr, ePBC, box); - } } if (watermodel == nullptr) diff --git a/src/gromacs/gmxpreprocess/pdb2top.cpp b/src/gromacs/gmxpreprocess/pdb2top.cpp index 689e5afbc4..793eb0c666 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@ -457,10 +457,8 @@ static int name2type(t_atoms *at, int **cgnr, i0 = 0; snew(*cgnr, at->nr); qt = 0; - prevcg = NOTSET; curcg = 0; cg = -1; - j = NOTSET; for (i = 0; (i < at->nr); i++) { @@ -479,12 +477,6 @@ static int name2type(t_atoms *at, int **cgnr, } 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]); @@ -503,11 +495,6 @@ static int name2type(t_atoms *at, int **cgnr, } 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)) { @@ -968,12 +955,6 @@ static void add_atom_to_restp(t_restp *restp, int at_start, const t_hack *hack) 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) @@ -1165,14 +1146,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, { /* 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++) @@ -1188,12 +1162,6 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, } 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); @@ -1577,12 +1545,6 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname, 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, diff --git a/src/gromacs/gmxpreprocess/readir.cpp b/src/gromacs/gmxpreprocess/readir.cpp index 60dba852f4..5e39a38bef 100644 --- a/src/gromacs/gmxpreprocess/readir.cpp +++ b/src/gromacs/gmxpreprocess/readir.cpp @@ -2608,11 +2608,6 @@ static bool do_numbering(int natoms, gmx_groups_t *groups, int ng, char *ptrs[], bool bRest; char warn_buf[STRLEN]; - if (debug) - { - fprintf(debug, "Starting numbering %d groups of type %d\n", ng, gtype); - } - title = gtypes[gtype]; snew(cbuf, natoms); @@ -2631,10 +2626,6 @@ static bool do_numbering(int natoms, gmx_groups_t *groups, int ng, char *ptrs[], { grps->nm_ind[grps->nr++] = gid; } - if (debug) - { - fprintf(debug, "Found gid %d for group %s\n", gid, ptrs[i]); - } /* Now go over the atoms in the group */ for (j = block->index[gid]; (j < block->index[gid+1]); j++) @@ -2981,11 +2972,7 @@ static void calc_nrdf(const gmx_mtop_t *mtop, t_inputrec *ir, char **gnames) /* Correct for VCM removal according to the fraction of each VCM * group present in this TC group. */ - nrdf_uc = nrdf_tc[i]; - if (debug) - { - fprintf(debug, "T-group[%d] nrdf_uc = %g\n", i, nrdf_uc); - } + nrdf_uc = nrdf_tc[i]; nrdf_tc[i] = 0; for (j = 0; j < groups->grps[egcVCM].nr+1; j++) { @@ -2994,11 +2981,6 @@ static void calc_nrdf(const gmx_mtop_t *mtop, t_inputrec *ir, char **gnames) nrdf_tc[i] += nrdf_uc*((double)na_vcm[j]/(double)na_tot)* (nrdf_vcm[j] - nrdf_vcm_sub[j])/nrdf_vcm[j]; } - if (debug) - { - fprintf(debug, " nrdf_vcm[%d] = %g, nrdf = %g\n", - j, nrdf_vcm[j], nrdf_tc[i]); - } } } } diff --git a/src/gromacs/gmxpreprocess/resall.cpp b/src/gromacs/gmxpreprocess/resall.cpp index fbd90b88c0..c87b8edba6 100644 --- a/src/gromacs/gmxpreprocess/resall.cpp +++ b/src/gromacs/gmxpreprocess/resall.cpp @@ -336,15 +336,6 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp, in = fflib_open(rrdb); - if (debug) - { - fprintf(debug, "%9s %5s", "Residue", "atoms"); - for (i = 0; i < ebtsNR; i++) - { - fprintf(debug, " %10s", btsNames[i]); - } - fprintf(debug, "\n"); - } snew(header_settings, 1); /* these bonded parameters will overwritten be when * @@ -487,16 +478,6 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp, gmx_fatal(FARGS, "No atoms found in .rtp file in residue %s\n", rrtp[nrtp].resname); } - if (debug) - { - fprintf(debug, "%3d %5s %5d", - nrtp+1, rrtp[nrtp].resname, rrtp[nrtp].natom); - for (i = 0; i < ebtsNR; i++) - { - fprintf(debug, " %10d", rrtp[nrtp].rb[i].nb); - } - fprintf(debug, "\n"); - } firstrtp = -1; for (i = 0; i < nrtp; i++) diff --git a/src/gromacs/gmxpreprocess/specbond.cpp b/src/gromacs/gmxpreprocess/specbond.cpp index f055022032..6edf217836 100644 --- a/src/gromacs/gmxpreprocess/specbond.cpp +++ b/src/gromacs/gmxpreprocess/specbond.cpp @@ -161,13 +161,6 @@ static bool is_bond(int nsb, t_specbond sb[], t_atoms *pdba, int a1, int a2, res1 = *pdba->resinfo[pdba->atom[a1].resind].name; res2 = *pdba->resinfo[pdba->atom[a2].resind].name; - if (debug) - { - fprintf(stderr, "Checking %s-%d %s-%d and %s-%d %s-%d: %g ", - res1, pdba->resinfo[pdba->atom[a1].resind].nr, at1, a1+1, - res2, pdba->resinfo[pdba->atom[a2].resind].nr, at2, a2+1, d); - } - for (i = 0; (i < nsb); i++) { *index_sb = i; @@ -179,10 +172,6 @@ static bool is_bond(int nsb, t_specbond sb[], t_atoms *pdba, int a1, int a2, *bSwap = FALSE; if ((0.9*sb[i].length < d) && (1.1*sb[i].length > d)) { - if (debug) - { - fprintf(stderr, "%g\n", sb[i].length); - } return TRUE; } } @@ -194,18 +183,10 @@ static bool is_bond(int nsb, t_specbond sb[], t_atoms *pdba, int a1, int a2, *bSwap = TRUE; if ((0.9*sb[i].length < d) && (1.1*sb[i].length > d)) { - if (debug) - { - fprintf(stderr, "%g\n", sb[i].length); - } return TRUE; } } } - if (debug) - { - fprintf(stderr, "\n"); - } return FALSE; } diff --git a/src/gromacs/gmxpreprocess/ter_db.cpp b/src/gromacs/gmxpreprocess/ter_db.cpp index 33518f48a2..f7ebbd5708 100644 --- a/src/gromacs/gmxpreprocess/ter_db.cpp +++ b/src/gromacs/gmxpreprocess/ter_db.cpp @@ -261,10 +261,6 @@ static void read_ter_db_file(char *fn, } in = fflib_open(fn); - if (debug) - { - fprintf(debug, "Opened %s\n", fn); - } tb = *tbptr; nb = *ntbptr - 1; diff --git a/src/gromacs/gmxpreprocess/tomorse.cpp b/src/gromacs/gmxpreprocess/tomorse.cpp index 4abdd4ed23..be2b42284b 100644 --- a/src/gromacs/gmxpreprocess/tomorse.cpp +++ b/src/gromacs/gmxpreprocess/tomorse.cpp @@ -178,23 +178,14 @@ static real search_e_diss(int n2m, t_2morse t2m[], char *ai, char *aj) } } /* Return the dissocation energy corresponding to the best match, if we have - * found one. Do some debug output anyway. + * found one. */ if (ibest == -1) { - if (debug) - { - fprintf(debug, "MORSE: Couldn't find E_diss for bond %s - %s, using default %g\n", ai, aj, ediss); - } return ediss; } else { - if (debug) - { - fprintf(debug, "MORSE: Dissoc. E (%10.3f) for bond %4s-%4s taken from bond %4s-%4s\n", - t2m[ibest].e_diss, ai, aj, t2m[ibest].ai, t2m[ibest].aj); - } return t2m[ibest].e_diss; } } @@ -211,10 +202,6 @@ void convert_harmonics(int nrmols, t_molinfo mols[], gpp_atomtype_t atype) /* First get the data */ t2m = read_dissociation_energies(&n2m); - if (debug) - { - fprintf(debug, "MORSE: read %d dissoc energies\n", n2m); - } if (n2m <= 0) { fprintf(stderr, "No dissocation energies read\n"); diff --git a/src/gromacs/gmxpreprocess/topdirs.cpp b/src/gromacs/gmxpreprocess/topdirs.cpp index 91e57fa837..bd8bb4d093 100644 --- a/src/gromacs/gmxpreprocess/topdirs.cpp +++ b/src/gromacs/gmxpreprocess/topdirs.cpp @@ -394,10 +394,6 @@ void DS_Init(DirStack **DS) for (i = 0; (i < d_maxdir); i++) { - if (debug) - { - fprintf(debug, "%20s: ", dir2str((directive)i)); - } if (necessary[i]) { directive d; @@ -405,17 +401,9 @@ void DS_Init(DirStack **DS) do { d = necessary[i][j++]; - if (debug) - { - fprintf(debug, "%20s ", dir2str(d)); - } } while (d != d_none); } - if (debug) - { - fprintf(debug, "\n"); - } } } *DS = nullptr; diff --git a/src/gromacs/gmxpreprocess/topio.cpp b/src/gromacs/gmxpreprocess/topio.cpp index 118a1f9763..1ff2a1ac5c 100644 --- a/src/gromacs/gmxpreprocess/topio.cpp +++ b/src/gromacs/gmxpreprocess/topio.cpp @@ -141,11 +141,6 @@ static void gen_pairs(t_params *nbs, t_params *pairs, real fudge, int comb) } fprintf(stderr, "Generating 1-4 interactions: fudge = %g\n", fudge); - if (debug) - { - fprintf(debug, "Fudge factor for 1-4 interactions: %g\n", fudge); - fprintf(debug, "Holy Cow! there are %d types\n", ntp); - } snew(pairs->param, pairs->nr); for (i = 0; (i < ntp); i++) { @@ -597,10 +592,6 @@ static char **read_topol(const char *infile, const char *outfile, else { /* Directive found */ - if (debug) - { - fprintf(debug, "found directive '%s'\n", dir2str(newd)); - } if (DS_Check_Order (DS, newd)) { DS_Push (&DS, newd); diff --git a/src/gromacs/gmxpreprocess/toppush.cpp b/src/gromacs/gmxpreprocess/toppush.cpp index b0b23bcffa..0826822335 100644 --- a/src/gromacs/gmxpreprocess/toppush.cpp +++ b/src/gromacs/gmxpreprocess/toppush.cpp @@ -479,10 +479,6 @@ void push_at (t_symtab *symtab, gpp_atomtype_t at, t_bond_atomtype bat, warning_error_and_exit(wi, errbuf, FARGS); } pt = xl[j].ptype; - if (debug) - { - fprintf(debug, "ptype: %s\n", ptype_str[pt]); - } atom->q = q; atom->m = m; @@ -1298,11 +1294,6 @@ static void push_atom_now(t_symtab *symtab, t_atoms *at, int atomnr, static void push_cg(t_block *block, int *lastindex, int index, int a) { - if (debug) - { - fprintf (debug, "Index %d, Atom %d\n", index, a); - } - if (((block->nr) && (*lastindex != index)) || (!block->nr)) { /* add a new block */ @@ -1385,10 +1376,6 @@ void push_atom(t_symtab *symtab, t_block *cgs, } } } - if (debug) - { - fprintf(debug, "mB=%g, qB=%g, typeB=%d\n", mB, qB, typeB); - } push_cg(cgs, lastcg, cgnumber, nr); @@ -2440,10 +2427,6 @@ void push_excl(char *line, t_block2 *b2, warninp_t wi) } else { - if (debug) - { - fprintf(debug, "Unbound atom %d\n", i-1); - } return; } strcpy(base, "%*d"); @@ -2531,10 +2514,6 @@ void merge_excl(t_blocka *excl, t_block2 *b2, warninp_t wi) b2->nr, excl->nr); warning_error_and_exit(wi, errbuf, FARGS); } - else if (debug) - { - fprintf(debug, "Entering merge_excl\n"); - } /* First copy all entries from excl to b2 */ b_to_b2(excl, b2); diff --git a/src/gromacs/gmxpreprocess/toputil.cpp b/src/gromacs/gmxpreprocess/toputil.cpp index 7689c5afd1..0b92f80ecd 100644 --- a/src/gromacs/gmxpreprocess/toputil.cpp +++ b/src/gromacs/gmxpreprocess/toputil.cpp @@ -447,12 +447,6 @@ void print_atoms(FILE *out, gpp_atomtype_t atype, t_atoms *at, int *cgnr, qtot = 0; - if (debug) - { - fprintf(debug, "This molecule has %d atoms and %d residues\n", - at->nr, at->nres); - } - if (at->nres) { /* if the information is present... */ diff --git a/src/gromacs/gmxpreprocess/vsite_parm.cpp b/src/gromacs/gmxpreprocess/vsite_parm.cpp index cede9478b6..ef8c8a1408 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.cpp +++ b/src/gromacs/gmxpreprocess/vsite_parm.cpp @@ -428,17 +428,6 @@ static bool calc_vsite3_param(gpp_atomtype_t atype, real bjk, bjl, a = -1, b = -1; /* check if this is part of a NH3 , NH2-umbrella or CH3 group, * i.e. if atom k and l are dummy masses (MNH* or MCH3*) */ - if (debug) - { - int i; - for (i = 0; i < 4; i++) - { - fprintf(debug, "atom %d type %s ", - param->a[i]+1, - get_atomtype_name_AB(&at->atom[param->a[i]], atype)); - } - fprintf(debug, "\n"); - } bXH3 = ( (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->ak()], atype), "MNH", 3) == 0) && (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->al()], atype), "MNH", 3) == 0) ) || @@ -502,12 +491,6 @@ static bool calc_vsite3_param(gpp_atomtype_t atype, param->c0() = a; param->c1() = b; - if (debug) - { - fprintf(debug, "params for vsite3 %d: %g %g\n", - param->ai()+1, param->c0(), param->c1()); - } - return bError; } @@ -536,11 +519,6 @@ static bool calc_vsite3fd_param(t_param *param, param->c0() = rk / (rk + rl); param->c1() = -bij; /* 'bond'-length for fixed distance vsite */ - if (debug) - { - fprintf(debug, "params for vsite3fd %d: %g %g\n", - param->ai()+1, param->c0(), param->c1()); - } return bError; } @@ -571,11 +549,6 @@ static bool calc_vsite3fad_param(t_param *param, param->c0() = 360 - param->c0(); } - if (debug) - { - fprintf(debug, "params for vsite3fad %d: %g %g\n", - param->ai()+1, param->c0(), param->c1()); - } return bError; } @@ -595,16 +568,6 @@ static bool calc_vsite3out_param(gpp_atomtype_t atype, /* check if this is part of a NH2-umbrella, NH3 or CH3 group, * i.e. if atom k and l are dummy masses (MNH* or MCH3*) */ - if (debug) - { - int i; - for (i = 0; i < 4; i++) - { - fprintf(debug, "atom %d type %s ", - param->a[i]+1, get_atomtype_name_AB(&at->atom[param->a[i]], atype)); - } - fprintf(debug, "\n"); - } bXH3 = ( (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->ak()], atype), "MNH", 3) == 0) && (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->al()], atype), "MNH", 3) == 0) ) || @@ -683,11 +646,6 @@ static bool calc_vsite3out_param(gpp_atomtype_t atype, { param->c2() = c; } - if (debug) - { - fprintf(debug, "params for vsite3out %d: %g %g %g\n", - param->ai()+1, param->c0(), param->c1(), param->c2()); - } return bError; } @@ -741,11 +699,6 @@ static bool calc_vsite4fd_param(t_param *param, param->c0() = cl; param->c1() = cm; param->c2() = -bij; - if (debug) - { - fprintf(debug, "params for vsite4fd %d: %g %g %g\n", - param->ai()+1, param->c0(), param->c1(), param->c2()); - } } return bError; @@ -804,11 +757,6 @@ calc_vsite4fdn_param(t_param *param, param->c1() = b; param->c2() = bij; - if (debug) - { - fprintf(debug, "params for vsite4fdn %d: %g %g %g\n", - param->ai()+1, param->c0(), param->c1(), param->c2()); - } } return bError; @@ -829,10 +777,6 @@ int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, bFirst = TRUE; nvsite = 0; - if (debug) - { - fprintf(debug, "\nCalculating parameters for virtual sites\n"); - } /* Make a reverse list to avoid ninteractions^2 operations */ at2vb = make_at2vsitebond(atoms->nr, plist); @@ -939,12 +883,7 @@ int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, sfree(idihs); } /* if bSet */ } /* for i */ - if (debug && plist[ftype].nr) - { - fprintf(stderr, "Calculated parameters for %d out of %d %s atoms\n", - nrset, plist[ftype].nr, interaction_function[ftype].longname); - } - } /* if IF_VSITE */ + } /* if IF_VSITE */ } done_at2vsitebond(atoms->nr, at2vb); @@ -963,10 +902,6 @@ void set_vsites_ptype(bool bVerbose, gmx_moltype_t *molt) { fprintf(stderr, "Setting particle type to V for virtual sites\n"); } - if (debug) - { - fprintf(stderr, "checking %d functypes\n", F_NRE); - } for (ftype = 0; ftype < F_NRE; ftype++) { il = &molt->ilist[ftype]; @@ -1057,10 +992,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], bAllFD = TRUE; /* check if all virtual sites are constructed from the same atoms */ nvsite = 0; - if (debug) - { - fprintf(debug, "constr %d %d:", ps->param[i].ai()+1, ps->param[i].aj()+1); - } for (k = 0; (k < 2) && !bKeep && !bRemove; k++) { /* for all atoms in the bond */ @@ -1077,10 +1008,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], bAllFD = bAllFD && bThisFD; if (bThisFD || bThisOUT) { - if (debug) - { - fprintf(debug, " %s", bThisOUT ? "out" : "fd"); - } oatom = ps->param[i].a[1-k]; /* the other atom */ if (vsite_type[oatom] == NOTSET && oatom == plist[pindex[atom].ftype].param[pindex[atom].parnr].aj()) @@ -1091,10 +1018,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], { nOut++; } - if (debug) - { - fprintf(debug, " D-AI"); - } } } if (!bRemove) @@ -1136,20 +1059,12 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], if (!bPresent) { bKeep = TRUE; - if (debug) - { - fprintf(debug, " !present"); - } } } } else { bKeep = TRUE; - if (debug) - { - fprintf(debug, " !same#at"); - } } } } @@ -1165,10 +1080,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], /* if we have no virtual sites in this bond, keep it */ if (nvsite == 0) { - if (debug) - { - fprintf(debug, " no vsite"); - } bKeep = TRUE; } @@ -1196,10 +1107,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], if (!bUsed) { bKeep = TRUE; - if (debug) - { - fprintf(debug, " !used"); - } } } } @@ -1233,10 +1140,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], if (!bPresent) { bKeep = TRUE; - if (debug) - { - fprintf(debug, " !bonded"); - } } } } @@ -1244,10 +1147,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], if (bKeep) { - if (debug) - { - fprintf(debug, " keeping"); - } /* now copy the bond to the new array */ ps->param[kept_i] = ps->param[i]; kept_i++; @@ -1263,10 +1162,6 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], { nremoved++; } - if (debug) - { - fprintf(debug, "\n"); - } } if (nremoved) @@ -1460,14 +1355,6 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[], /* store construction atoms of first vsite */ vsnral = NRAL(pindex[atom].ftype) - 1; first_atoms = plist[pindex[atom].ftype].param[pindex[atom].parnr].a + 1; - if (debug) - { - fprintf(debug, "dih w. vsite: %d %d %d %d\n", - ps->param[i].ai()+1, ps->param[i].aj()+1, - ps->param[i].ak()+1, ps->param[i].al()+1); - fprintf(debug, "vsite %d from: %d %d %d\n", - atom+1, first_atoms[0]+1, first_atoms[1]+1, first_atoms[2]+1); - } } else { @@ -1530,10 +1417,6 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[], if (!bUsed) { bKeep = TRUE; - if (debug) - { - fprintf(debug, "unused atom in dih: %d\n", atom+1); - } } } } @@ -1635,16 +1518,6 @@ void clean_vsite_bondeds(t_params *plist, int natoms, bool bRmVSiteBds) } } - if (debug) - { - for (i = 0; i < natoms; i++) - { - fprintf(debug, "atom %d vsite_type %s\n", i, - vsite_type[i] == NOTSET ? "NOTSET" : - interaction_function[vsite_type[i]].name); - } - } - /* remove interactions that include virtual sites */ for (ftype = 0; ftype < F_NRE; ftype++) { diff --git a/src/gromacs/gmxpreprocess/x2top.cpp b/src/gromacs/gmxpreprocess/x2top.cpp index 4cb770a14b..a92f0a9546 100644 --- a/src/gromacs/gmxpreprocess/x2top.cpp +++ b/src/gromacs/gmxpreprocess/x2top.cpp @@ -140,11 +140,6 @@ static void mk_bonds(int nnm, t_nm2type nmt[], 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); - } } } } @@ -277,10 +272,6 @@ static void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], bool { 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(); @@ -288,11 +279,6 @@ static void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], bool 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++) @@ -303,11 +289,6 @@ static void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], bool 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; } } -- 2.22.0