From a483ace17d15128f35bc3aac125fa3441f0c1e74 Mon Sep 17 00:00:00 2001 From: Joe Jordan Date: Thu, 12 Jul 2018 15:46:07 +0200 Subject: [PATCH] change gmx_bool to bool in gmxpreprocess This change only replaces gmx_bool with bool in files the gmxpreprocess dir. This is only refactoring. Change-Id: If98d69cb11f7560e036b8bb52d1d069dac624bb0 --- src/gromacs/gmxpreprocess/add_par.cpp | 4 +- src/gromacs/gmxpreprocess/add_par.h | 4 +- src/gromacs/gmxpreprocess/convparm.cpp | 6 +- src/gromacs/gmxpreprocess/fflibutil.cpp | 4 +- src/gromacs/gmxpreprocess/fflibutil.h | 6 +- src/gromacs/gmxpreprocess/gen_ad.cpp | 28 ++--- src/gromacs/gmxpreprocess/gen_ad.h | 4 +- src/gromacs/gmxpreprocess/gen_vsite.cpp | 30 ++--- src/gromacs/gmxpreprocess/gen_vsite.h | 6 +- src/gromacs/gmxpreprocess/genconf.cpp | 2 +- src/gromacs/gmxpreprocess/genhydro.cpp | 24 ++-- src/gromacs/gmxpreprocess/genhydro.h | 6 +- src/gromacs/gmxpreprocess/gmxcpp.cpp | 8 +- src/gromacs/gmxpreprocess/gpp_atomtype.cpp | 4 +- src/gromacs/gmxpreprocess/gpp_atomtype.h | 2 +- src/gromacs/gmxpreprocess/grompp-impl.h | 10 +- src/gromacs/gmxpreprocess/grompp.cpp | 136 ++++++++++----------- src/gromacs/gmxpreprocess/hackblock.cpp | 10 +- src/gromacs/gmxpreprocess/hackblock.h | 18 +-- src/gromacs/gmxpreprocess/hizzie.cpp | 18 +-- src/gromacs/gmxpreprocess/nm2type.cpp | 2 +- src/gromacs/gmxpreprocess/pdb2gmx.cpp | 46 +++---- src/gromacs/gmxpreprocess/pdb2top.cpp | 46 +++---- src/gromacs/gmxpreprocess/pdb2top.h | 20 +-- src/gromacs/gmxpreprocess/pgutil.cpp | 8 +- src/gromacs/gmxpreprocess/pgutil.h | 6 +- src/gromacs/gmxpreprocess/readir.cpp | 56 ++++----- src/gromacs/gmxpreprocess/readir.h | 18 +-- src/gromacs/gmxpreprocess/readrot.cpp | 4 +- src/gromacs/gmxpreprocess/resall.cpp | 12 +- src/gromacs/gmxpreprocess/resall.h | 4 +- src/gromacs/gmxpreprocess/solvate.cpp | 10 +- src/gromacs/gmxpreprocess/specbond.cpp | 18 +-- src/gromacs/gmxpreprocess/specbond.h | 8 +- src/gromacs/gmxpreprocess/ter_db.cpp | 4 +- src/gromacs/gmxpreprocess/tomorse.cpp | 4 +- src/gromacs/gmxpreprocess/topio.cpp | 18 +-- src/gromacs/gmxpreprocess/topio.h | 4 +- src/gromacs/gmxpreprocess/toppush.cpp | 52 ++++---- src/gromacs/gmxpreprocess/toppush.h | 6 +- src/gromacs/gmxpreprocess/topshake.cpp | 2 +- src/gromacs/gmxpreprocess/toputil.cpp | 8 +- src/gromacs/gmxpreprocess/toputil.h | 2 +- src/gromacs/gmxpreprocess/vsite_parm.cpp | 66 +++++----- src/gromacs/gmxpreprocess/vsite_parm.h | 8 +- src/gromacs/gmxpreprocess/x2top.cpp | 30 ++--- src/gromacs/gmxpreprocess/xlate.cpp | 10 +- src/gromacs/gmxpreprocess/xlate.h | 6 +- 48 files changed, 404 insertions(+), 404 deletions(-) diff --git a/src/gromacs/gmxpreprocess/add_par.cpp b/src/gromacs/gmxpreprocess/add_par.cpp index e5a884ed1a..4a07968e4e 100644 --- a/src/gromacs/gmxpreprocess/add_par.cpp +++ b/src/gromacs/gmxpreprocess/add_par.cpp @@ -186,7 +186,7 @@ void add_vsite3_param(t_params *ps, int ai, int aj, int ak, int al, ps->nr++; } -void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al, gmx_bool bSwapParity) +void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al, bool bSwapParity) { pr_alloc(1, ps); ps->param[ps->nr].ai() = ai; @@ -217,7 +217,7 @@ void add_vsite4_atoms(t_params *ps, int ai, int aj, int ak, int al, int am) ps->nr++; } -int search_jtype(t_restp *rtp, char *name, gmx_bool bNterm) +int search_jtype(t_restp *rtp, char *name, bool bNterm) { int niter, iter, j, jmax; size_t k, kmax, minstrlen; diff --git a/src/gromacs/gmxpreprocess/add_par.h b/src/gromacs/gmxpreprocess/add_par.h index dbdd58cac4..f96cf02a1f 100644 --- a/src/gromacs/gmxpreprocess/add_par.h +++ b/src/gromacs/gmxpreprocess/add_par.h @@ -56,7 +56,7 @@ void add_cmap_param(t_params *ps, int ai, int aj, int ak, int al, int am, void add_vsite2_atoms(t_params *ps, int ai, int aj, int ak); void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al, - gmx_bool bSwapParity); + bool bSwapParity); void add_vsite2_param(t_params *ps, int ai, int aj, int ak, real c0); @@ -66,6 +66,6 @@ void add_vsite3_param(t_params *ps, int ai, int aj, int ak, int al, void add_vsite4_atoms(t_params *ps, int ai, int aj, int ak, int al, int am); -int search_jtype(t_restp *rp, char *name, gmx_bool bFirstRes); +int search_jtype(t_restp *rp, char *name, bool bFirstRes); #endif diff --git a/src/gromacs/gmxpreprocess/convparm.cpp b/src/gromacs/gmxpreprocess/convparm.cpp index a092887605..0d5e0b042a 100644 --- a/src/gromacs/gmxpreprocess/convparm.cpp +++ b/src/gromacs/gmxpreprocess/convparm.cpp @@ -117,7 +117,7 @@ assign_param(t_functype ftype, t_iparams *newparam, real old[MAXFORCEPARAM], int comb, double reppow) { int i, j; - gmx_bool all_param_zero = TRUE; + bool all_param_zero = TRUE; /* Set to zero */ for (j = 0; (j < MAXFORCEPARAM); j++) @@ -455,7 +455,7 @@ assign_param(t_functype ftype, t_iparams *newparam, static int enter_params(gmx_ffparams_t *ffparams, t_functype ftype, real forceparams[MAXFORCEPARAM], int comb, real reppow, - int start, gmx_bool bAppend) + int start, bool bAppend) { t_iparams newparam; int type; @@ -515,7 +515,7 @@ static void append_interaction(t_ilist *ilist, static void enter_function(t_params *p, t_functype ftype, int comb, real reppow, gmx_ffparams_t *ffparams, t_ilist *il, int *maxtypes, - gmx_bool bNB, gmx_bool bAppend) + bool bNB, bool bAppend) { int k, type, nr, nral, delta, start; diff --git a/src/gromacs/gmxpreprocess/fflibutil.cpp b/src/gromacs/gmxpreprocess/fflibutil.cpp index 812a229856..555bf9b09a 100644 --- a/src/gromacs/gmxpreprocess/fflibutil.cpp +++ b/src/gromacs/gmxpreprocess/fflibutil.cpp @@ -98,7 +98,7 @@ void fflib_filename_base(const char *filename, char *filebase, int maxlen) int fflib_search_file_end(const char *ffdir, const char *file_end, - gmx_bool bFatalError, + bool bFatalError, char ***filenames) { try @@ -167,7 +167,7 @@ std::vector fflib_enumerate_forcefields() return result; } -gmx_bool fflib_fexist(const char *file) +bool fflib_fexist(const char *file) { char *file_fullpath; diff --git a/src/gromacs/gmxpreprocess/fflibutil.h b/src/gromacs/gmxpreprocess/fflibutil.h index 1c0d6597c0..413a898b6d 100644 --- a/src/gromacs/gmxpreprocess/fflibutil.h +++ b/src/gromacs/gmxpreprocess/fflibutil.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -65,14 +65,14 @@ void fflib_filename_base(const char *filename, char *filebase, int maxlen); int fflib_search_file_end(const char *ffdir, const char *file_end, - gmx_bool bFatalError, + bool bFatalError, char ***filenames); /* Search for files ending on file_end in the force field directory fflib. * fflib should be in the GROMACS lib.path. * Return the number of files and the file names in filenames. */ -gmx_bool fflib_fexist(const char *file); +bool fflib_fexist(const char *file); /* Check if a file exists in the force field library */ FILE *fflib_open(const char *file); diff --git a/src/gromacs/gmxpreprocess/gen_ad.cpp b/src/gromacs/gmxpreprocess/gen_ad.cpp index c4a1940411..04319508b3 100644 --- a/src/gromacs/gmxpreprocess/gen_ad.cpp +++ b/src/gromacs/gmxpreprocess/gen_ad.cpp @@ -61,12 +61,12 @@ #include "gromacs/utility/smalloc.h" #define DIHEDRAL_WAS_SET_IN_RTP 0 -static gmx_bool was_dihedral_set_in_rtp(const t_param *dih) +static bool was_dihedral_set_in_rtp(const t_param *dih) { return dih->c[MAXFORCEPARAM-1] == DIHEDRAL_WAS_SET_IN_RTP; } -typedef gmx_bool (*peq)(t_param *p1, t_param *p2); +typedef bool (*peq)(t_param *p1, t_param *p2); static int acomp(const void *a1, const void *a2) { @@ -151,7 +151,7 @@ static int dcomp(const void *d1, const void *d2) } -static gmx_bool is_dihedral_on_same_bond(t_param *p1, t_param *p2) +static bool is_dihedral_on_same_bond(t_param *p1, t_param *p2) { if (((p1->aj() == p2->aj()) && (p1->ak() == p2->ak())) || ((p1->aj() == p2->ak()) && (p1->ak() == p2->aj()))) @@ -165,7 +165,7 @@ static gmx_bool is_dihedral_on_same_bond(t_param *p1, t_param *p2) } -static gmx_bool preq(t_param *p1, t_param *p2) +static bool preq(t_param *p1, t_param *p2) { if ((p1->ai() == p2->ai()) && (p1->aj() == p2->aj())) { @@ -383,8 +383,8 @@ static int n_hydro(const int a[], char ***atomname) /* Clean up the dihedrals (both generated and read from the .rtp * file). */ static void clean_dih(t_param *dih, int *ndih, t_param improper[], int nimproper, - t_atoms *atoms, gmx_bool bKeepAllGeneratedDihedrals, - gmx_bool bRemoveDihedralIfWithImproper) + t_atoms *atoms, bool bKeepAllGeneratedDihedrals, + bool bRemoveDihedralIfWithImproper) { int i, j, k, l; int *index, nind; @@ -428,8 +428,8 @@ static void clean_dih(t_param *dih, int *ndih, t_param improper[], int nimproper k = 0; for (i = 0; i < nind; i++) { - gmx_bool bWasSetInRTP = was_dihedral_set_in_rtp(&dih[index[i]]); - gmx_bool bKeep = TRUE; + bool bWasSetInRTP = was_dihedral_set_in_rtp(&dih[index[i]]); + bool bKeep = TRUE; if (!bWasSetInRTP && bRemoveDihedralIfWithImproper) { /* Remove the dihedral if there is an improper on the same @@ -489,12 +489,12 @@ static void clean_dih(t_param *dih, int *ndih, t_param improper[], int nimproper } static int get_impropers(t_atoms *atoms, t_hackblock hb[], t_param **improper, - gmx_bool bAllowMissing) + bool bAllowMissing) { t_rbondeds *impropers; int nimproper, i, j, k, start, ninc, nalloc; int ai[MAXATOMLIST]; - gmx_bool bStop; + bool bStop; ninc = 500; nalloc = ninc; @@ -570,7 +570,7 @@ static int nb_dist(t_nextnb *nnb, int ai, int aj) return NRE; } -static gmx_bool is_hydro(t_atoms *atoms, int ai) +static bool is_hydro(t_atoms *atoms, int ai) { return ((*(atoms->atomname[ai]))[0] == 'H'); } @@ -600,7 +600,7 @@ static void get_atomnames_min(int n, char **anm, } static void gen_excls(t_atoms *atoms, t_excls *excls, t_hackblock hb[], - gmx_bool bAllowMissing) + bool bAllowMissing) { int r; int a, astart, i1, i2, itmp; @@ -757,7 +757,7 @@ void generate_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]) /* Generate pairs, angles and dihedrals from .rtp settings */ void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[], t_params plist[], t_excls excls[], t_hackblock hb[], - gmx_bool bAllowMissing) + bool bAllowMissing) { t_param *ang, *dih, *pai, *improper; t_rbondeds *hbang, *hbdih; @@ -768,7 +768,7 @@ void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[], int ninc, maxang, maxdih, maxpai; int nang, ndih, npai, nimproper, nbd; int nFound; - gmx_bool bFound, bExcl; + bool bFound, bExcl; /* These are the angles, dihedrals and pairs that we generate * from the bonds. The ones that are already there from the rtp file diff --git a/src/gromacs/gmxpreprocess/gen_ad.h b/src/gromacs/gmxpreprocess/gen_ad.h index de9cad98bf..15d6e17dae 100644 --- a/src/gromacs/gmxpreprocess/gen_ad.h +++ b/src/gromacs/gmxpreprocess/gen_ad.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -47,6 +47,6 @@ void clean_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]); void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[], t_params plist[], t_excls excls[], t_hackblock hb[], - gmx_bool bAllowMissing); + bool bAllowMissing); #endif diff --git a/src/gromacs/gmxpreprocess/gen_vsite.cpp b/src/gromacs/gmxpreprocess/gen_vsite.cpp index fed37dbde9..3135ab3b20 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.cpp +++ b/src/gromacs/gmxpreprocess/gen_vsite.cpp @@ -71,7 +71,7 @@ typedef struct { char atomtype[MAXNAME]; /* Type for the XH3/XH2 atom */ - gmx_bool isplanar; /* If true, the atomtype above and the three connected + bool isplanar; /* If true, the atomtype above and the three connected * ones are in a planar geometry. The two next entries * are undefined in that case */ @@ -329,7 +329,7 @@ static int nitrogen_is_planar(t_vsiteconf vsiteconflist[], int nvsiteconf, char * and -1 if not found. */ int i, res; - gmx_bool found = FALSE; + bool found = FALSE; for (i = 0; i < nvsiteconf && !found; i++) { found = (!gmx_strcasecmp(vsiteconflist[i].atomtype, atomtype) && (vsiteconflist[i].nhydrogens == 2)); @@ -350,7 +350,7 @@ static char *get_dummymass_name(t_vsiteconf vsiteconflist[], int nvsiteconf, cha { /* Return the dummy mass name if found, or NULL if not set in ddb database */ int i; - gmx_bool found = FALSE; + bool found = FALSE; for (i = 0; i < nvsiteconf && !found; i++) { found = (!gmx_strcasecmp(vsiteconflist[i].atomtype, atom) && @@ -517,7 +517,7 @@ static int get_atype(int atom, t_atoms *at, int nrtp, t_restp rtp[], gmx_residuetype_t *rt) { int type; - gmx_bool bNterm; + bool bNterm; int j; t_restp *rtpp; @@ -555,7 +555,7 @@ static real get_amass(int atom, t_atoms *at, int nrtp, t_restp rtp[], gmx_residuetype_t *rt) { real mass; - gmx_bool bNterm; + bool bNterm; int j; t_restp *rtpp; @@ -589,7 +589,7 @@ static void add_vsites(t_params plist[], int vsite_type[], int nrheavies, int heavies[]) { int i, j, ftype, other, moreheavy; - gmx_bool bSwapParity; + bool bSwapParity; for (i = 0; i < nrHatoms; i++) { @@ -693,7 +693,7 @@ static void add_vsites(t_params plist[], int vsite_type[], static int gen_vsites_6ring(t_atoms *at, int *vsite_type[], t_params plist[], int nrfound, int *ats, real bond_cc, real bond_ch, - real xcom, gmx_bool bDoZ) + real xcom, bool bDoZ) { /* these MUST correspond to the atnms array in do_vsite_aromatics! */ enum { @@ -1491,7 +1491,7 @@ static int gen_vsites_his(t_atoms *at, int *vsite_type[], t_params plist[], return nvsite; } -static gmx_bool is_vsite(int vsite_type) +static bool is_vsite(int vsite_type) { if (vsite_type == NOTSET) { @@ -1516,7 +1516,7 @@ static char atomnamesuffix[] = "1234"; void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, t_atoms *at, t_symtab *symtab, rvec *x[], t_params plist[], int *vsite_type[], int *cgnr[], - real mHmult, gmx_bool bVsiteAromatics, + real mHmult, bool bVsiteAromatics, const char *ffdir) { #define MAXATOMSPERRESIDUE 16 @@ -1524,9 +1524,9 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, int ai, aj, ak, al; int nrfound = 0, needed, nrbonds, nrHatoms, Heavy, nrheavies, tpM, tpHeavy; int Hatoms[4], heavies[4]; - gmx_bool bWARNING, bAddVsiteParam, bFirstWater; + bool bWARNING, bAddVsiteParam, bFirstWater; matrix tmpmat; - gmx_bool *bResProcessed; + bool *bResProcessed; real mHtot, mtot, fact, fact2; rvec rpar, rperp, temp; char name[10], tpname[32], nexttpname[32], *ch; @@ -1539,7 +1539,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, int ndb, f; char **db; int nvsiteconf, nvsitetop, cmplength; - gmx_bool isN, planarN, bFound; + bool isN, planarN, bFound; gmx_residuetype_t*rt; t_vsiteconf *vsiteconflist; @@ -1567,7 +1567,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, const char *resnmsN[resNR] = { "NPHE", "NTRP", "NTYR", "NHIS" }; const char *resnmsC[resNR] = { "CPHE", "CTRP", "CTYR", "CHIS" }; /* HIS can be known as HISH, HIS1, HISA, HID, HIE, HIP, etc. too */ - gmx_bool bPartial[resNR] = { FALSE, FALSE, FALSE, TRUE }; + bool bPartial[resNR] = { FALSE, FALSE, FALSE, TRUE }; /* the atnms for every residue MUST correspond to the enums in the gen_vsites_* (one for each residue) routines! */ /* also the atom names in atnms MUST be in the same order as in the .rtp! */ @@ -1853,7 +1853,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, { /* CH3, NH3 or non-planar NH2 group */ int Hat_vsite_type[3] = { F_VSITE3, F_VSITE3OUT, F_VSITE3OUT }; - gmx_bool Hat_SwapParity[3] = { FALSE, TRUE, FALSE }; + bool Hat_SwapParity[3] = { FALSE, TRUE, FALSE }; if (debug) { @@ -2166,7 +2166,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, } void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult, - gmx_bool bDeuterate) + bool bDeuterate) { int i, j, a; diff --git a/src/gromacs/gmxpreprocess/gen_vsite.h b/src/gromacs/gmxpreprocess/gen_vsite.h index ad90107ccf..efa351924a 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.h +++ b/src/gromacs/gmxpreprocess/gen_vsite.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -48,10 +48,10 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, t_atoms *at, struct t_symtab *symtab, rvec *x[], t_params plist[], int *dummy_type[], int *cgnr[], - real mHmult, gmx_bool bVSiteAromatics, + real mHmult, bool bVSiteAromatics, const char *ffdir); void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult, - gmx_bool bDeuterate); + bool bDeuterate); #endif diff --git a/src/gromacs/gmxpreprocess/genconf.cpp b/src/gromacs/gmxpreprocess/genconf.cpp index 4e67d0ea89..c38392663a 100644 --- a/src/gromacs/gmxpreprocess/genconf.cpp +++ b/src/gromacs/gmxpreprocess/genconf.cpp @@ -131,7 +131,7 @@ int gmx_genconf(int argc, char *argv[]) int nres; /* number of molecules? */ int i, j, k, l, m, ndx, nrdx, nx, ny, nz; t_trxstatus *status; - gmx_bool bTRX; + bool bTRX; gmx_output_env_t *oenv; t_filenm fnm[] = { diff --git a/src/gromacs/gmxpreprocess/genhydro.cpp b/src/gromacs/gmxpreprocess/genhydro.cpp index 5fca3ba6b4..3dabd9d36c 100644 --- a/src/gromacs/gmxpreprocess/genhydro.cpp +++ b/src/gromacs/gmxpreprocess/genhydro.cpp @@ -64,7 +64,7 @@ static void copy_atom(t_atoms *atoms1, int a1, t_atoms *atoms2, int a2) } static int pdbasearch_atom(const char *name, int resind, t_atoms *pdba, - const char *searchtype, gmx_bool bAllowMissing) + const char *searchtype, bool bAllowMissing) { int i; @@ -107,7 +107,7 @@ static void hacksearch_atom(int *ii, int *jj, char *name, } -static void dump_ab(FILE *out, int natom, const int nab[], t_hack *ab[], gmx_bool bHeader) +static void dump_ab(FILE *out, int natom, const int nab[], t_hack *ab[], bool bHeader) { int i, j; @@ -174,10 +174,10 @@ static t_hackblock *get_hackblocks(t_atoms *pdba, int nah, t_hackblock ah[], } static void expand_hackblocks_one(t_hackblock *hbr, char *atomname, - int *nabi, t_hack **abi, gmx_bool bN, gmx_bool bC) + int *nabi, t_hack **abi, bool bN, bool bC) { int j, k, l; - gmx_bool bIgnore; + bool bIgnore; /* we'll recursively add atoms to atoms */ for (j = 0; j < hbr->nhack; j++) @@ -292,7 +292,7 @@ static void expand_hackblocks(t_atoms *pdba, t_hackblock hb[], int nterpairs, const int *rN, const int *rC) { int i, j; - gmx_bool bN, bC; + bool bN, bC; for (i = 0; i < pdba->nr; i++) { @@ -366,13 +366,13 @@ static int check_atoms_present(t_atoms *pdba, const int nab[], t_hack *ab[]) } static void calc_all_pos(t_atoms *pdba, rvec x[], int nab[], t_hack *ab[], - gmx_bool bCheckMissing) + bool bCheckMissing) { int i, j, ii, jj, m, ia, d, rnr, l = 0; #define MAXH 4 rvec xa[4]; /* control atoms for calc_h_pos */ rvec xh[MAXH]; /* hydrogen positions from calc_h_pos */ - gmx_bool bFoundAll; + bool bFoundAll; jj = 0; @@ -461,9 +461,9 @@ static void free_ab(int natoms, int *nab, t_hack **ab) static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], int nah, t_hackblock ah[], int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, - int *rN, int *rC, gmx_bool bCheckMissing, + int *rN, int *rC, bool bCheckMissing, int **nabptr, t_hack ***abptr, - gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba) + bool bUpdate_pdba, bool bKeep_old_pdba) { t_atoms *newpdba = nullptr, *pdba = nullptr; int nadd; @@ -472,7 +472,7 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], t_hack **ab = nullptr; t_hackblock *hb; rvec *xn; - gmx_bool bKeep_ab; + bool bKeep_ab; /* set flags for adding hydrogens (according to hdb) */ pdba = *pdbaptr; @@ -733,9 +733,9 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], int add_h(t_atoms **pdbaptr, rvec *xptr[], int nah, t_hackblock ah[], int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, - int *rN, int *rC, gmx_bool bAllowMissing, + int *rN, int *rC, bool bAllowMissing, int **nabptr, t_hack ***abptr, - gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba) + bool bUpdate_pdba, bool bKeep_old_pdba) { int nold, nnew, niter; diff --git a/src/gromacs/gmxpreprocess/genhydro.h b/src/gromacs/gmxpreprocess/genhydro.h index 21d3558e41..79d0fd826d 100644 --- a/src/gromacs/gmxpreprocess/genhydro.h +++ b/src/gromacs/gmxpreprocess/genhydro.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -45,9 +45,9 @@ int add_h(t_atoms **pdbaptr, rvec *xptr[], int nah, t_hackblock ah[], int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, - int *rN, int *rC, gmx_bool bMissing, + int *rN, int *rC, bool bMissing, int **nabptr, t_hack ***abptr, - gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba); + bool bUpdate_pdba, bool bKeep_old_pdba); /* Generate hydrogen atoms and N and C terminal patches. * int nterpairs is the number of termini pairs in the molecule * ntdb[i] and ctdb[i] may be NULL, no replacement will be done then. diff --git a/src/gromacs/gmxpreprocess/gmxcpp.cpp b/src/gromacs/gmxpreprocess/gmxcpp.cpp index 67a0043f18..782b1290e1 100644 --- a/src/gromacs/gmxpreprocess/gmxcpp.cpp +++ b/src/gromacs/gmxpreprocess/gmxcpp.cpp @@ -85,7 +85,7 @@ typedef struct gmx_cpp { struct gmx_cpp *child, *parent; } gmx_cpp; -static gmx_bool is_word_end(char c) +static bool is_word_end(char c) { return !(isalnum(c) || c == '_'); } @@ -109,7 +109,7 @@ static const char *strstrw(const char *buf, const char *word) return nullptr; } -static gmx_bool find_directive(char *buf, char **name, char **val) +static bool find_directive(char *buf, char **name, char **val) { /* Skip initial whitespace */ while (isspace(*buf)) @@ -148,7 +148,7 @@ static gmx_bool find_directive(char *buf, char **name, char **val) return TRUE; } -static gmx_bool is_ifdeffed_out(gmx_cpp_t handle) +static bool is_ifdeffed_out(gmx_cpp_t handle) { return ((handle->nifdef > 0) && (handle->ifdefs[handle->nifdef-1] != eifTRUE)); } @@ -580,7 +580,7 @@ int cpp_read_line(gmx_cpp_t *handlep, int n, char buf[]) const char *ptr, *ptr2; char *name; char *dname, *dval; - gmx_bool bEOF; + bool bEOF; if (!handle) { diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.cpp b/src/gromacs/gmxpreprocess/gpp_atomtype.cpp index 39ad33601c..aae9956793 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.cpp +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.cpp @@ -279,7 +279,7 @@ static int search_atomtypes(gpp_atomtype_t ga, int *n, int typelist[], t_param param[], int ftype) { int i, nn, nrfp, j, k, ntype, tli; - gmx_bool bFound = FALSE; + bool bFound = FALSE; nn = *n; nrfp = NRFP(ftype); @@ -335,7 +335,7 @@ static int search_atomtypes(gpp_atomtype_t ga, int *n, int typelist[], void renum_atype(t_params plist[], gmx_mtop_t *mtop, int *wall_atomtype, - gpp_atomtype_t ga, gmx_bool bVerbose) + gpp_atomtype_t ga, bool bVerbose) { int i, j, k, l, mi, mj, nat, nrfp, ftype, ntype; t_atoms *atoms; diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.h b/src/gromacs/gmxpreprocess/gpp_atomtype.h index 3578004cc0..66d5285b0d 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.h +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.h @@ -92,7 +92,7 @@ void print_at (FILE * out, gpp_atomtype_t at); void renum_atype(t_params plist[], gmx_mtop_t *mtop, int *wall_atomtype, - gpp_atomtype_t at, gmx_bool bVerbose); + gpp_atomtype_t at, bool bVerbose); void copy_atomtype_atomtypes(gpp_atomtype_t atype, t_atomtypes *atypes); /* Copy from one structure to another */ diff --git a/src/gromacs/gmxpreprocess/grompp-impl.h b/src/gromacs/gmxpreprocess/grompp-impl.h index 23cc5144c5..e8484de27b 100644 --- a/src/gromacs/gmxpreprocess/grompp-impl.h +++ b/src/gromacs/gmxpreprocess/grompp-impl.h @@ -50,8 +50,8 @@ struct t_blocka; #define MAXSLEN 32 typedef struct { - gmx_bool bSet; /* Has this combination been set */ - real c[4]; /* The non-bonded parameters */ + bool bSet; /* Has this combination been set */ + real c[4]; /* The non-bonded parameters */ } t_nbparam; /* The t_nbparam struct is used to temporary store the explicit * non-bonded parameter combinations, which will be copied to t_params. @@ -104,8 +104,8 @@ typedef struct { typedef struct { char **name; int nrexcl; /* Number of exclusions per atom */ - gmx_bool excl_set; /* Have exclusions been generated? */ - gmx_bool bProcessed; /* Has the mol been processed */ + bool excl_set; /* Have exclusions been generated? */ + bool bProcessed; /* Has the mol been processed */ t_atoms atoms; /* Atoms */ t_block cgs; /* Charge groups */ t_block mols; /* Molecules */ @@ -118,7 +118,7 @@ typedef struct { int nr; } t_mols; -gmx_bool is_int(double x); +bool is_int(double x); /* Returns TRUE when x is integer */ /* Must correspond to strings in topdirs.c */ diff --git a/src/gromacs/gmxpreprocess/grompp.cpp b/src/gromacs/gmxpreprocess/grompp.cpp index d8dc2bda92..d2ae7729d6 100644 --- a/src/gromacs/gmxpreprocess/grompp.cpp +++ b/src/gromacs/gmxpreprocess/grompp.cpp @@ -250,7 +250,7 @@ static void check_bonds_timestep(const gmx_mtop_t *mtop, double dt, warninp_t wi int ftype; int i, a1, a2, w_a1, w_a2, j; real twopi2, limit2, fc, re, m1, m2, period2, w_period2; - gmx_bool bFound, bWater, bWarn; + bool bFound, bWater, bWarn; char warn_buf[STRLEN]; ip = mtop->ffparams.iparams; @@ -305,13 +305,13 @@ static void check_bonds_timestep(const gmx_mtop_t *mtop, double dt, warninp_t wi } if (period2 < limit2) { - bFound = FALSE; + bFound = false; for (j = 0; j < ilc->nr; j += 3) { if ((ilc->iatoms[j+1] == a1 && ilc->iatoms[j+2] == a2) || (ilc->iatoms[j+1] == a2 && ilc->iatoms[j+2] == a1)) { - bFound = TRUE; + bFound = true; } } for (j = 0; j < ils->nr; j += 4) @@ -319,7 +319,7 @@ static void check_bonds_timestep(const gmx_mtop_t *mtop, double dt, warninp_t wi if ((a1 == ils->iatoms[j+1] || a1 == ils->iatoms[j+2] || a1 == ils->iatoms[j+3]) && (a2 == ils->iatoms[j+1] || a2 == ils->iatoms[j+2] || a2 == ils->iatoms[j+3])) { - bFound = TRUE; + bFound = true; } } if (!bFound && @@ -410,7 +410,7 @@ static void check_shells_inputrec(gmx_mtop_t *mtop, /* TODO Decide whether this function can be consolidated with * gmx_mtop_ftype_count */ -static gmx_bool nint_ftype(gmx_mtop_t *mtop, t_molinfo *mi, int ftype) +static int nint_ftype(gmx_mtop_t *mtop, t_molinfo *mi, int ftype) { int nint = 0; for (const gmx_molblock_t &molb : mtop->molblock) @@ -498,7 +498,7 @@ static void molinfo2mtop(int nmi, t_molinfo *mi, gmx_mtop_t *mtop) static void new_status(const char *topfile, const char *topppfile, const char *confin, t_gromppopts *opts, t_inputrec *ir, gmx_bool bZero, - gmx_bool bGenVel, gmx_bool bVerbose, t_state *state, + bool bGenVel, bool bVerbose, t_state *state, gpp_atomtype_t atype, gmx_mtop_t *sys, int *nmi, t_molinfo **mi, t_molinfo **intermolecular_interactions, t_params plist[], @@ -688,7 +688,7 @@ new_status(const char *topfile, const char *topppfile, const char *confin, } static void copy_state(const char *slog, t_trxframe *fr, - gmx_bool bReadVel, t_state *state, + bool bReadVel, t_state *state, double *use_time) { int i; @@ -727,13 +727,13 @@ static void copy_state(const char *slog, t_trxframe *fr, } static void cont_status(const char *slog, const char *ener, - gmx_bool bNeedVel, gmx_bool bGenVel, real fr_time, + bool bNeedVel, bool bGenVel, real fr_time, t_inputrec *ir, t_state *state, gmx_mtop_t *sys, const gmx_output_env_t *oenv) /* If fr_time == -1 read the last frame available which is complete */ { - gmx_bool bReadVel; + bool bReadVel; t_trxframe fr; t_trxstatus *fp; int i; @@ -777,7 +777,7 @@ static void cont_status(const char *slog, const char *ener, } close_trx(fp); /* Search for a frame without velocities */ - bReadVel = FALSE; + bReadVel = false; read_first_frame(oenv, &fp, slog, &fr, TRX_NEED_X); } } @@ -822,17 +822,17 @@ static void read_posres(gmx_mtop_t *mtop, t_molinfo *molinfo, gmx_bool bTopB, rvec com, warninp_t wi) { - gmx_bool *hadAtom; - rvec *x, *v; - dvec sum; - double totmass; - t_topology *top; - matrix box, invbox; - int natoms, npbcdim = 0; - char warn_buf[STRLEN]; - int a, i, ai, j, k, nat_molb; - t_params *pr, *prfb; - t_atom *atom; + gmx_bool *hadAtom; + rvec *x, *v; + dvec sum; + double totmass; + t_topology *top; + matrix box, invbox; + int natoms, npbcdim = 0; + char warn_buf[STRLEN]; + int a, i, ai, j, k, nat_molb; + t_params *pr, *prfb; + t_atom *atom; snew(top, 1); read_tps_conf(fn, top, nullptr, &x, &v, box, FALSE); @@ -1266,17 +1266,17 @@ static real calc_temp(const gmx_mtop_t *mtop, static real get_max_reference_temp(const t_inputrec *ir, warninp_t wi) { - real ref_t; - int i; - gmx_bool bNoCoupl; + real ref_t; + int i; + bool bNoCoupl; ref_t = 0; - bNoCoupl = FALSE; + bNoCoupl = false; for (i = 0; i < ir->opts.ngtc; i++) { if (ir->opts.tau_t[i] < 0) { - bNoCoupl = TRUE; + bNoCoupl = true; } else { @@ -1299,9 +1299,9 @@ static real get_max_reference_temp(const t_inputrec *ir, /* Checks if there are unbound atoms in moleculetype molt. * Prints a note for each unbound atoms and a warning if any is present. */ -static void checkForUnboundAtoms(const gmx_moltype_t *molt, - gmx_bool bVerbose, - warninp_t wi) +static void checkForUnboundAtoms(const gmx_moltype_t *molt, + gmx_bool bVerbose, + warninp_t wi) { const t_atoms *atoms = &molt->atoms; @@ -1357,9 +1357,9 @@ static void checkForUnboundAtoms(const gmx_moltype_t *molt, } /* Checks all moleculetypes for unbound atoms */ -static void checkForUnboundAtoms(const gmx_mtop_t *mtop, - gmx_bool bVerbose, - warninp_t wi) +static void checkForUnboundAtoms(const gmx_mtop_t *mtop, + gmx_bool bVerbose, + warninp_t wi) { for (const gmx_moltype_t &molt : mtop->moltype) { @@ -1422,11 +1422,11 @@ static bool haveDecoupledModeInMol(const gmx_moltype_t *molt, atomToConstraints.index[a2 + 1] - atomToConstraints.index[a2] == 1 && atomToConstraints.index[a1 + 1] - atomToConstraints.index[a1] >= 3) { - int constraint0 = atomToConstraints.a[atomToConstraints.index[a0]]; - int constraint2 = atomToConstraints.a[atomToConstraints.index[a2]]; + int constraint0 = atomToConstraints.a[atomToConstraints.index[a0]]; + int constraint2 = atomToConstraints.a[atomToConstraints.index[a2]]; - bool foundAtom0 = false; - bool foundAtom2 = false; + bool foundAtom0 = false; + bool foundAtom2 = false; for (int conIndex = atomToConstraints.index[a1]; conIndex < atomToConstraints.index[a1 + 1]; conIndex++) { if (atomToConstraints.a[conIndex] == constraint0) @@ -1484,14 +1484,14 @@ static void checkDecoupledModeAccuracy(const gmx_mtop_t *mtop, * energy/time, respectively, so they will "only" work correctly * for atomistic force fields using MD units. */ - const real massFactorThreshold = 13.0; - const real bufferToleranceThreshold = 1e-4; - const int lincsIterationThreshold = 2; - const int lincsOrderThreshold = 4; - const real shakeToleranceThreshold = 0.005*ir->delta_t; - - bool lincsWithSufficientTolerance = (ir->eConstrAlg == econtLINCS && ir->nLincsIter >= lincsIterationThreshold && ir->nProjOrder >= lincsOrderThreshold); - bool shakeWithSufficientTolerance = (ir->eConstrAlg == econtSHAKE && ir->shake_tol <= 1.1*shakeToleranceThreshold); + const real massFactorThreshold = 13.0; + const real bufferToleranceThreshold = 1e-4; + const int lincsIterationThreshold = 2; + const int lincsOrderThreshold = 4; + const real shakeToleranceThreshold = 0.005*ir->delta_t; + + bool lincsWithSufficientTolerance = (ir->eConstrAlg == econtLINCS && ir->nLincsIter >= lincsIterationThreshold && ir->nProjOrder >= lincsOrderThreshold); + bool shakeWithSufficientTolerance = (ir->eConstrAlg == econtSHAKE && ir->shake_tol <= 1.1*shakeToleranceThreshold); if (ir->cutoff_scheme == ecutsVERLET && ir->verletbuf_tol <= 1.1*bufferToleranceThreshold && (lincsWithSufficientTolerance || shakeWithSufficientTolerance)) @@ -1584,7 +1584,7 @@ static void set_verlet_buffer(const gmx_mtop_t *mtop, int gmx_grompp(int argc, char *argv[]) { - const char *desc[] = { + const char *desc[] = { "[THISMODULE] (the gromacs preprocessor)", "reads a molecular topology file, checks the validity of the", "file, expands the topology from a molecular description to an atomic", @@ -1682,24 +1682,24 @@ int gmx_grompp(int argc, char *argv[]) "interpret the output messages before attempting to bypass them with", "this option." }; - t_gromppopts *opts; - int nmi; - t_molinfo *mi, *intermolecular_interactions; - gpp_atomtype_t atype; - int nvsite, comb; - t_params *plist; - real fudgeQQ; - double reppow; - const char *mdparin; - int ntype; - gmx_bool bNeedVel, bGenVel; - gmx_bool have_atomnumber; - gmx_output_env_t *oenv; - gmx_bool bVerbose = FALSE; - warninp_t wi; - char warn_buf[STRLEN]; - - t_filenm fnm[] = { + t_gromppopts *opts; + int nmi; + t_molinfo *mi, *intermolecular_interactions; + gpp_atomtype_t atype; + int nvsite, comb; + t_params *plist; + real fudgeQQ; + double reppow; + const char *mdparin; + int ntype; + bool bNeedVel, bGenVel; + gmx_bool have_atomnumber; + gmx_output_env_t *oenv; + gmx_bool bVerbose = FALSE; + warninp_t wi; + char warn_buf[STRLEN]; + + t_filenm fnm[] = { { efMDP, nullptr, nullptr, ffREAD }, { efMDP, "-po", "mdout", ffWRITE }, { efSTX, "-c", nullptr, ffREAD }, @@ -1718,11 +1718,11 @@ int gmx_grompp(int argc, char *argv[]) #define NFILE asize(fnm) /* Command line options */ - gmx_bool bRenum = TRUE; - gmx_bool bRmVSBds = TRUE, bZero = FALSE; - int i, maxwarn = 0; - real fr_time = -1; - t_pargs pa[] = { + gmx_bool bRenum = TRUE; + gmx_bool bRmVSBds = TRUE, bZero = FALSE; + int i, maxwarn = 0; + real fr_time = -1; + t_pargs pa[] = { { "-v", FALSE, etBOOL, {&bVerbose}, "Be loud and noisy" }, { "-time", FALSE, etREAL, {&fr_time}, diff --git a/src/gromacs/gmxpreprocess/hackblock.cpp b/src/gromacs/gmxpreprocess/hackblock.cpp index 606a02a303..ad2a5fd736 100644 --- a/src/gromacs/gmxpreprocess/hackblock.cpp +++ b/src/gromacs/gmxpreprocess/hackblock.cpp @@ -183,10 +183,10 @@ static void copy_t_rbonded(t_rbonded *s, t_rbonded *d) d->match = s->match; } -static gmx_bool contains_char(t_rbonded *s, char c) +static bool contains_char(t_rbonded *s, char c) { int i; - gmx_bool bRet; + bool bRet; bRet = FALSE; for (i = 0; i < MAXATOMLIST; i++) @@ -205,7 +205,7 @@ rbonded_find_atoms_in_list(t_rbonded *b, t_rbonded blist[], int nlist, int natom { int i, k; int foundPos = -1; - gmx_bool atomsMatch; + bool atomsMatch; for (i = 0; i < nlist && foundPos < 0; i++) { @@ -241,10 +241,10 @@ rbonded_find_atoms_in_list(t_rbonded *b, t_rbonded blist[], int nlist, int natom return foundPos; } -gmx_bool merge_t_bondeds(t_rbondeds s[], t_rbondeds d[], gmx_bool bMin, gmx_bool bPlus) +bool merge_t_bondeds(t_rbondeds s[], t_rbondeds d[], bool bMin, bool bPlus) { int i, j; - gmx_bool bBondsRemoved; + bool bBondsRemoved; int nbHackblockStart; int index; diff --git a/src/gromacs/gmxpreprocess/hackblock.h b/src/gromacs/gmxpreprocess/hackblock.h index e4577fcee2..c8553b6bcc 100644 --- a/src/gromacs/gmxpreprocess/hackblock.h +++ b/src/gromacs/gmxpreprocess/hackblock.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -60,7 +60,7 @@ typedef struct { char *s; /* optional define string which gets copied from .rtp/.tdb to .top and will be parsed by cpp during grompp */ - gmx_bool match; /* boolean to mark that the entry has been found */ + bool match; /* boolean to mark that the entry has been found */ char* &ai() { return a[0]; } char* &aj() { return a[1]; } char* &ak() { return a[2]; } @@ -85,10 +85,10 @@ typedef struct { char ***atomname; int *cgnr; /* Bonded interaction setup */ - gmx_bool bKeepAllGeneratedDihedrals; + bool bKeepAllGeneratedDihedrals; int nrexcl; - gmx_bool bGenerateHH14Interactions; - gmx_bool bRemoveDihedralIfWithImproper; + bool bGenerateHH14Interactions; + bool bRemoveDihedralIfWithImproper; /* list of bonded interactions to add */ t_rbondeds rb[ebtsNR]; } t_restp; @@ -108,8 +108,8 @@ typedef struct { int tp; /* Type of attachment (1..11) */ int nctl; /* How many control atoms there are */ char *a[4]; /* Control atoms i,j,k,l */ - gmx_bool bAlreadyPresent; - gmx_bool bXSet; + bool bAlreadyPresent; + bool bXSet; rvec newx; /* calculated new position */ int newi; /* new atom index number (after additions) */ char* &ai() { return a[0]; } @@ -148,8 +148,8 @@ void clear_t_hackblock(t_hackblock *hb); void clear_t_hack(t_hack *hack); /* reset struct */ -gmx_bool merge_t_bondeds(t_rbondeds s[], t_rbondeds d[], - gmx_bool bMin, gmx_bool bPlus); +bool merge_t_bondeds(t_rbondeds s[], t_rbondeds d[], + bool bMin, bool bPlus); /* add s[].b[] to d[].b[] * If bMin==TRUE, don't copy bondeds with atoms starting with '-' * If bPlus==TRUE, don't copy bondeds with atoms starting with '+' diff --git a/src/gromacs/gmxpreprocess/hizzie.cpp b/src/gromacs/gmxpreprocess/hizzie.cpp index 7a6e9282f6..023b6062a8 100644 --- a/src/gromacs/gmxpreprocess/hizzie.cpp +++ b/src/gromacs/gmxpreprocess/hizzie.cpp @@ -71,7 +71,7 @@ static int in_strings(char *key, int nstr, const char **str) return -1; } -static gmx_bool hbond(rvec x[], int i, int j, real distance) +static bool hbond(rvec x[], int i, int j, real distance) { real tol = distance*distance; rvec tmp; @@ -82,7 +82,7 @@ static gmx_bool hbond(rvec x[], int i, int j, real distance) } static void chk_allhb(t_atoms *pdba, rvec x[], t_blocka *hb, - const gmx_bool donor[], const gmx_bool accept[], real dist) + const bool donor[], const bool accept[], real dist) { int i, j, k, ii, natom; @@ -142,11 +142,11 @@ static void pr_hbonds(FILE *fp, t_blocka *hb, t_atoms *pdba) } } -static gmx_bool chk_hbonds(int i, t_atoms *pdba, rvec x[], - const gmx_bool ad[], gmx_bool hbond[], rvec xh, - real angle, real dist) +static bool chk_hbonds(int i, t_atoms *pdba, rvec x[], + const bool ad[], bool hbond[], rvec xh, + real angle, real dist) { - gmx_bool bHB; + bool bHB; int j, aj, ri, natom; real d2, dist2, a; rvec nh, oh; @@ -216,9 +216,9 @@ void set_histp(t_atoms *pdba, rvec *x, real angle, real dist) }; #define NPD asize(prot_don) - gmx_bool *donor, *acceptor; - gmx_bool *hbond; - gmx_bool bHDd, bHEd; + bool *donor, *acceptor; + bool *hbond; + bool bHDd, bHEd; rvec xh1, xh2; int natom; int i, j, nd, na, hisind, type = -1; diff --git a/src/gromacs/gmxpreprocess/nm2type.cpp b/src/gromacs/gmxpreprocess/nm2type.cpp index 3b7d145a8c..a469435ced 100644 --- a/src/gromacs/gmxpreprocess/nm2type.cpp +++ b/src/gromacs/gmxpreprocess/nm2type.cpp @@ -61,7 +61,7 @@ static void rd_nm2type_file(const char *fn, int *nnm, t_nm2type **nmp) { FILE *fp; - gmx_bool bCont; + bool bCont; char libfilename[128]; char format[128], f1[128]; char buf[1024], elem[16], type[16], nbbuf[16], **newbuf; diff --git a/src/gromacs/gmxpreprocess/pdb2gmx.cpp b/src/gromacs/gmxpreprocess/pdb2gmx.cpp index bf63bfbb60..12f2fab670 100644 --- a/src/gromacs/gmxpreprocess/pdb2gmx.cpp +++ b/src/gromacs/gmxpreprocess/pdb2gmx.cpp @@ -271,8 +271,8 @@ static void read_rtprename(const char *fname, FILE *fp, static char *search_resrename(int nrr, rtprename_t *rr, const char *name, - gmx_bool bStart, gmx_bool bEnd, - gmx_bool bCompareFFRTPname) + bool bStart, bool bEnd, + bool bCompareFFRTPname) { char *nn; int i; @@ -323,16 +323,16 @@ static void rename_resrtp(t_atoms *pdba, int nterpairs, const int *r_start, cons gmx_bool bVerbose) { int r, j; - gmx_bool bStart, bEnd; + bool bStart, bEnd; char *nn; - gmx_bool bFFRTPTERRNM; + bool bFFRTPTERRNM; bFFRTPTERRNM = (getenv("GMX_NO_FFRTP_TER_RENAME") == nullptr); for (r = 0; r < pdba->nres; r++) { - bStart = FALSE; - bEnd = FALSE; + bStart = false; + bEnd = false; for (j = 0; j < nterpairs; j++) { if (r == r_start[j]) @@ -344,7 +344,7 @@ static void rename_resrtp(t_atoms *pdba, int nterpairs, const int *r_start, cons { if (r == r_end[j]) { - bEnd = TRUE; + bEnd = true; } } @@ -387,7 +387,7 @@ static void pdbres_to_gmxrtp(t_atoms *pdba) } static void rename_pdbres(t_atoms *pdba, const char *oldnm, const char *newnm, - gmx_bool bFullCompare, t_symtab *symtab) + bool bFullCompare, t_symtab *symtab) { char *resnm; int i; @@ -405,7 +405,7 @@ static void rename_pdbres(t_atoms *pdba, const char *oldnm, const char *newnm, } static void rename_bb(t_atoms *pdba, const char *oldnm, const char *newnm, - gmx_bool bFullCompare, t_symtab *symtab) + bool bFullCompare, t_symtab *symtab) { char *bbnm; int i; @@ -425,7 +425,7 @@ static void rename_bb(t_atoms *pdba, const char *oldnm, const char *newnm, static void rename_bbint(t_atoms *pdba, const char *oldnm, const char *gettp(int, int, const rtprename_t *), - gmx_bool bFullCompare, + bool bFullCompare, t_symtab *symtab, int nrr, const rtprename_t *rr) { @@ -1230,19 +1230,19 @@ modify_chain_numbers(t_atoms * pdba, typedef struct { - char chainid; - char chainnum; - int start; - int natom; - gmx_bool bAllWat; - int nterpairs; - int *chainstart; + char chainid; + char chainnum; + int start; + int natom; + bool bAllWat; + int nterpairs; + int *chainstart; } t_pdbchain; typedef struct { char chainid; int chainnum; - gmx_bool bAllWat; + bool bAllWat; int nterpairs; int *chainstart; t_hackblock **ntdb; @@ -1409,7 +1409,7 @@ int gmx_pdb2gmx(int argc, char *argv[]) int nssbonds; t_ssbond *ssbonds; rvec *pdbx, *x; - gmx_bool bVsites = FALSE, bWat, bPrevWat = FALSE, bITP, bVsiteAromatics = FALSE; + bool bVsites = FALSE, bWat, bPrevWat = FALSE, bITP, bVsiteAromatics = FALSE; real mHmult = 0; t_hackblock *hb_chain; t_restp *restp_chain; @@ -1431,7 +1431,7 @@ int gmx_pdb2gmx(int argc, char *argv[]) int nid_used; int this_chainstart; int prev_chainstart; - gmx_bool bMerged; + bool bMerged; int nchainmerges; gmx_atomprop_t aps; @@ -1685,7 +1685,7 @@ int gmx_pdb2gmx(int argc, char *argv[]) maxch = 16; snew(pdb_ch, maxch); - bMerged = FALSE; + bMerged = false; for (i = 0; (i < natom); i++) { ri = &pdba_all.resinfo[pdba_all.atom[i].resind]; @@ -1715,7 +1715,7 @@ int gmx_pdb2gmx(int argc, char *argv[]) if ((i == 0) || (this_chainnumber != prev_chainnumber) || (bWat != bPrevWat)) { this_chainstart = pdba_all.atom[i].resind; - bMerged = FALSE; + bMerged = false; if (i > 0 && !bWat) { if (!strncmp(merge[0], "int", 3)) @@ -1733,7 +1733,7 @@ int gmx_pdb2gmx(int argc, char *argv[]) } else if (!strncmp(merge[0], "all", 3)) { - bMerged = TRUE; + bMerged = true; } } diff --git a/src/gromacs/gmxpreprocess/pdb2top.cpp b/src/gromacs/gmxpreprocess/pdb2top.cpp index d9c0c80f19..8fbfc3e672 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@ -86,7 +86,7 @@ static int missing_atoms(t_restp *rp, int resind, t_atoms *at, int i0, int i) { int j, k, nmiss; char *name; - gmx_bool bFound; + bool bFound; nmiss = 0; for (j = 0; j < rp->natom; j++) @@ -116,7 +116,7 @@ static int missing_atoms(t_restp *rp, int resind, t_atoms *at, int i0, int i) return nmiss; } -gmx_bool is_int(double x) +bool is_int(double x) { const double tol = 1e-4; int ix; @@ -445,7 +445,7 @@ static int name2type(t_atoms *at, int **cgnr, { int i, j, prevresind, resind, i0, prevcg, cg, curcg; char *name; - gmx_bool bNterm; + bool bNterm; double qt; int nmissat; @@ -466,7 +466,7 @@ static int name2type(t_atoms *at, int **cgnr, prevresind = resind; if (at->atom[i].resind != resind) { - gmx_bool bProt; + bool bProt; resind = at->atom[i].resind; bProt = gmx_residuetype_is_protein(rt, *(at->resinfo[resind].name)); bNterm = bProt && (resind == 0); @@ -545,7 +545,7 @@ static void print_top_heavy_H(FILE *out, real mHmult) void print_top_comment(FILE *out, const char *filename, const char *ffdir, - gmx_bool bITP) + bool bITP) { char ffdir_parent[STRLEN]; char *p; @@ -593,7 +593,7 @@ void print_top_comment(FILE *out, } void print_top_header(FILE *out, const char *filename, - gmx_bool bITP, const char *ffdir, real mHmult) + bool bITP, const char *ffdir, real mHmult) { const char *p; @@ -698,7 +698,7 @@ void print_top_mols(FILE *out, } void write_top(FILE *out, char *pr, const char *molname, - t_atoms *at, gmx_bool bRTPresname, + t_atoms *at, bool bRTPresname, int bts[], t_params plist[], t_excls excls[], gpp_atomtype_t atype, int *cgnr, int nrexcl) /* NOTE: nrexcl is not the size of *excl! */ @@ -739,7 +739,7 @@ void write_top(FILE *out, char *pr, const char *molname, static void do_ssbonds(t_params *ps, t_atoms *atoms, - int nssbonds, t_ssbond *ssbonds, gmx_bool bAllowMissing) + int nssbonds, t_ssbond *ssbonds, bool bAllowMissing) { int i, ri, rj; int ai, aj; @@ -911,7 +911,7 @@ static void clean_bonds(t_params *ps) } } -void print_sums(t_atoms *atoms, gmx_bool bSystem) +void print_sums(t_atoms *atoms, bool bSystem) { double m, qtot; int i; @@ -1022,13 +1022,13 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, const int *rn, const int *rc, - gmx_bool bAllowMissing) + bool bAllowMissing) { int i, j, k, l; char *key; t_restp *res; int tern, terc; - gmx_bool bRM; + bool bRM; snew(*hb, nres); snew(*restp, nres); @@ -1208,7 +1208,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, } } -static gmx_bool atomname_cmp_nr(const char *anm, t_hack *hack, int *nr) +static bool atomname_cmp_nr(const char *anm, t_hack *hack, int *nr) { if (hack->nr == 1) @@ -1239,9 +1239,9 @@ static gmx_bool atomname_cmp_nr(const char *anm, t_hack *hack, int *nr) } } -static gmx_bool match_atomnames_with_rtp_atom(t_atoms *pdba, rvec *x, int atind, - t_restp *rptr, t_hackblock *hbr, - gmx_bool bVerbose) +static bool match_atomnames_with_rtp_atom(t_atoms *pdba, rvec *x, int atind, + t_restp *rptr, t_hackblock *hbr, + bool bVerbose) { int resnr; int j, k; @@ -1249,8 +1249,8 @@ static gmx_bool match_atomnames_with_rtp_atom(t_atoms *pdba, rvec *x, int atind, int anmnr; char *start_at, buf[STRLEN]; int start_nr; - gmx_bool bReplaceReplace, bFoundInAdd; - gmx_bool bDeleted; + bool bReplaceReplace, bFoundInAdd; + bool bDeleted; oldnm = *pdba->atomname[atind]; resnr = pdba->resinfo[pdba->atom[atind].resind].nr; @@ -1398,7 +1398,7 @@ static gmx_bool match_atomnames_with_rtp_atom(t_atoms *pdba, rvec *x, int atind, void match_atomnames_with_rtp(t_restp restp[], t_hackblock hb[], t_atoms *pdba, rvec *x, - gmx_bool bVerbose) + bool bVerbose) { int i, j; char *oldnm; @@ -1437,7 +1437,7 @@ static void gen_cmap(t_params *psb, t_restp *restp, t_atoms *atoms) const char *pname; t_resinfo *resinfo = atoms->resinfo; int nres = atoms->nres; - gmx_bool bAddCMAP; + bool bAddCMAP; int cmap_atomid[NUM_CMAP_ATOMS]; int cmap_chainnum = -1, this_residue_index; @@ -1551,14 +1551,14 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname, t_atoms *atoms, rvec **x, gpp_atomtype_t atype, t_symtab *tab, int nrtp, t_restp rtp[], t_restp *restp, t_hackblock *hb, - gmx_bool bAllowMissing, - gmx_bool bVsites, gmx_bool bVsiteAromatics, + bool bAllowMissing, + bool bVsites, bool bVsiteAromatics, const char *ffdir, real mHmult, int nssbonds, t_ssbond *ssbonds, real long_bond_dist, real short_bond_dist, - gmx_bool bDeuterate, gmx_bool bChargeGroups, gmx_bool bCmap, - gmx_bool bRenumRes, gmx_bool bRTPresname) + bool bDeuterate, bool bChargeGroups, bool bCmap, + bool bRenumRes, bool bRTPresname) { /* t_hackblock *hb; diff --git a/src/gromacs/gmxpreprocess/pdb2top.h b/src/gromacs/gmxpreprocess/pdb2top.h index 782b1e9388..796547d6ba 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.h +++ b/src/gromacs/gmxpreprocess/pdb2top.h @@ -75,22 +75,22 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, const int *rn, const int *rc, - gmx_bool bAllowMissing); + bool bAllowMissing); /* Get the database entries for the nres residues in resinfo * and store them in restp and hb. */ void match_atomnames_with_rtp(t_restp restp[], t_hackblock hb[], t_atoms *pdba, rvec *x, - gmx_bool bVerbose); + bool bVerbose); /* Check if atom in pdba need to be deleted of renamed due to tdb or hdb. * If renaming involves atoms added wrt to the rtp database, * add these atoms to restp. */ -void print_top_comment(FILE *out, const char *filename, const char *ffdir, gmx_bool bITP); +void print_top_comment(FILE *out, const char *filename, const char *ffdir, bool bITP); -void print_top_header(FILE *out, const char *filename, gmx_bool bITP, +void print_top_header(FILE *out, const char *filename, bool bITP, const char *ffdir, real mHmult); void print_top_mols(FILE *out, @@ -99,7 +99,7 @@ void print_top_mols(FILE *out, int nmol, t_mols *mols); void write_top(FILE *out, char *pr, const char *molname, - t_atoms *at, gmx_bool bRTPresname, + t_atoms *at, bool bRTPresname, int bts[], t_params plist[], t_excls excls[], gpp_atomtype_t atype, int *cgnr, int nrexcl); /* NOTE: nrexcl is not the size of *excl! */ @@ -110,16 +110,16 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname, gpp_atomtype_t atype, struct t_symtab *tab, int nrtp, t_restp rtp[], t_restp *restp, t_hackblock *hb, - gmx_bool bAllowMissing, - gmx_bool bVsites, gmx_bool bVsiteAromatics, + bool bAllowMissing, + bool bVsites, bool bVsiteAromatics, const char *ffdir, real mHmult, int nssbonds, t_ssbond ssbonds[], real long_bond_dist, real short_bond_dist, - gmx_bool bDeuterate, gmx_bool bChargeGroups, gmx_bool bCmap, - gmx_bool bRenumRes, gmx_bool bRTPresname); + bool bDeuterate, bool bChargeGroups, bool bCmap, + bool bRenumRes, bool bRTPresname); /* Create a topology ! */ -void print_sums(t_atoms *atoms, gmx_bool bSystem); +void print_sums(t_atoms *atoms, bool bSystem); #endif diff --git a/src/gromacs/gmxpreprocess/pgutil.cpp b/src/gromacs/gmxpreprocess/pgutil.cpp index a86ad7a35a..89ca70ff6c 100644 --- a/src/gromacs/gmxpreprocess/pgutil.cpp +++ b/src/gromacs/gmxpreprocess/pgutil.cpp @@ -51,7 +51,7 @@ static void atom_not_found(int fatal_errno, const char *file, int line, const char *atomname, int resind, const char *resname, - const char *bondtype, gmx_bool bAllowMissing) + const char *bondtype, bool bAllowMissing) { char message_buffer[BUFSIZE]; if (strcmp(bondtype, "check") != 0) @@ -88,10 +88,10 @@ static void atom_not_found(int fatal_errno, const char *file, int line, int search_atom(const char *type, int start, t_atoms *atoms, - const char *bondtype, gmx_bool bAllowMissing) + const char *bondtype, bool bAllowMissing) { int i, resind = -1; - gmx_bool bPrevious, bNext; + bool bPrevious, bNext; int natoms = atoms->nr; t_atom *at = atoms->atom; char ** const * anm = atoms->atomname; @@ -154,7 +154,7 @@ int search_atom(const char *type, int start, int search_res_atom(const char *type, int resind, t_atoms *atoms, - const char *bondtype, gmx_bool bAllowMissing) + const char *bondtype, bool bAllowMissing) { int i; diff --git a/src/gromacs/gmxpreprocess/pgutil.h b/src/gromacs/gmxpreprocess/pgutil.h index 5ad893a285..2baf3a473d 100644 --- a/src/gromacs/gmxpreprocess/pgutil.h +++ b/src/gromacs/gmxpreprocess/pgutil.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -52,7 +52,7 @@ struct t_atoms; */ int search_atom(const char *type, int start, t_atoms *atoms, - const char *bondtype, gmx_bool bAllowMissing); + const char *bondtype, bool bAllowMissing); /* Similar to search_atom, but this routine searches for the specified * atom in residue resind. @@ -60,7 +60,7 @@ int search_atom(const char *type, int start, int search_res_atom(const char *type, int resind, t_atoms *atoms, - const char *bondtype, gmx_bool bAllowMissing); + const char *bondtype, bool bAllowMissing); void set_at(t_atom *at, real m, real q, int type, int resind); diff --git a/src/gromacs/gmxpreprocess/readir.cpp b/src/gromacs/gmxpreprocess/readir.cpp index 1e49192d1d..60dba852f4 100644 --- a/src/gromacs/gmxpreprocess/readir.cpp +++ b/src/gromacs/gmxpreprocess/readir.cpp @@ -182,7 +182,7 @@ static void GetSimTemps(int ntemps, t_simtemp *simtemp, double *temperature_lamb -static void _low_check(gmx_bool b, const char *s, warninp_t wi) +static void _low_check(bool b, const char *s, warninp_t wi) { if (b) { @@ -206,7 +206,7 @@ static void check_nst(const char *desc_nst, int nst, } } -static gmx_bool ir_NVE(const t_inputrec *ir) +static bool ir_NVE(const t_inputrec *ir) { return (EI_MD(ir->eI) && ir->etc == etcNO); } @@ -584,7 +584,7 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts, if (ir->bSimTemp) { - gmx_bool bAllTempZero = TRUE; + bool bAllTempZero = TRUE; for (i = 0; i < fep->n_lambda; i++) { sprintf(err_buf, "Entry %d for %s must be between 0 and 1, instead is %g", i, efpt_names[efptTEMPERATURE], fep->all_lambda[efptTEMPERATURE][i]); @@ -1423,7 +1423,7 @@ static void do_fep_params(t_inputrec *ir, char fep_lambda[][STRLEN], char weight t_lambda *fep = ir->fepvals; t_expanded *expand = ir->expandedvals; real **count_fep_lambdas; - gmx_bool bOneLambda = TRUE; + bool bOneLambda = TRUE; snew(count_fep_lambdas, efptNR); @@ -1697,7 +1697,7 @@ static void read_expandedparams(std::vector *inp, * \param[in] couple_lambda_value Enumeration ecouplam value describing the end state * \return Whether VDW is on (i.e. the user chose vdw or vdw-q in the .mdp file) */ -static gmx_bool couple_lambda_has_vdw_on(int couple_lambda_value) +static bool couple_lambda_has_vdw_on(int couple_lambda_value) { return (couple_lambda_value == ecouplamVDW || couple_lambda_value == ecouplamVDWQ); @@ -2595,17 +2595,17 @@ int search_string(const char *s, int ng, char *gn[]) s); } -static gmx_bool do_numbering(int natoms, gmx_groups_t *groups, int ng, char *ptrs[], - t_blocka *block, char *gnames[], - int gtype, int restnm, - int grptp, gmx_bool bVerbose, - warninp_t wi) +static bool do_numbering(int natoms, gmx_groups_t *groups, int ng, char *ptrs[], + t_blocka *block, char *gnames[], + int gtype, int restnm, + int grptp, bool bVerbose, + warninp_t wi) { unsigned short *cbuf; t_grps *grps = &(groups->grps[gtype]); int i, j, gid, aj, ognr, ntot = 0; const char *title; - gmx_bool bRest; + bool bRest; char warn_buf[STRLEN]; if (debug) @@ -3022,8 +3022,8 @@ static void calc_nrdf(const gmx_mtop_t *mtop, t_inputrec *ir, char **gnames) sfree(nrdf_vcm_sub); } -static gmx_bool do_egp_flag(t_inputrec *ir, gmx_groups_t *groups, - const char *option, const char *val, int flag) +static bool do_egp_flag(t_inputrec *ir, gmx_groups_t *groups, + const char *option, const char *val, int flag) { /* The maximum number of energy group pairs would be MAXPTR*(MAXPTR+1)/2. * But since this is much larger than STRLEN, such a line can not be parsed. @@ -3033,7 +3033,7 @@ static gmx_bool do_egp_flag(t_inputrec *ir, gmx_groups_t *groups, int nelem, i, j, k, nr; char *names[EGP_MAX]; char ***gnames; - gmx_bool bSet; + bool bSet; gnames = groups->grpname; @@ -3144,7 +3144,7 @@ static void make_IMD_group(t_IMD *IMDgroup, char *IMDgname, t_blocka *grps, char void do_index(const char* mdparin, const char *ndx, gmx_mtop_t *mtop, - gmx_bool bVerbose, + bool bVerbose, t_inputrec *ir, warninp_t wi) { @@ -3160,7 +3160,7 @@ void do_index(const char* mdparin, const char *ndx, int nacg, nfreeze, nfrdim, nenergy, nvcm, nuser; char *ptr1[MAXPTR], *ptr2[MAXPTR], *ptr3[MAXPTR]; int i, j, k, restnm; - gmx_bool bExcl, bTable, bAnneal, bRest; + bool bExcl, bTable, bAnneal, bRest; int nQMmethod, nQMbasis, nQMg; char warn_buf[STRLEN]; char* endptr; @@ -3780,9 +3780,9 @@ static void check_disre(gmx_mtop_t *mtop) } } -static gmx_bool absolute_reference(t_inputrec *ir, gmx_mtop_t *sys, - gmx_bool posres_only, - ivec AbsRef) +static bool absolute_reference(t_inputrec *ir, gmx_mtop_t *sys, + bool posres_only, + ivec AbsRef) { int d, g, i; gmx_mtop_ilistloop_t iloop; @@ -3873,9 +3873,9 @@ static gmx_bool absolute_reference(t_inputrec *ir, gmx_mtop_t *sys, static void check_combination_rule_differences(const gmx_mtop_t *mtop, int state, - gmx_bool *bC6ParametersWorkWithGeometricRules, - gmx_bool *bC6ParametersWorkWithLBRules, - gmx_bool *bLBRulesPossible) + bool *bC6ParametersWorkWithGeometricRules, + bool *bC6ParametersWorkWithLBRules, + bool *bLBRulesPossible) { int ntypes, tpi, tpj; int *typecount; @@ -3883,7 +3883,7 @@ check_combination_rule_differences(const gmx_mtop_t *mtop, int state, double c6i, c6j, c12i, c12j; double c6, c6_geometric, c6_LB; double sigmai, sigmaj, epsi, epsj; - gmx_bool bCanDoLBRules, bCanDoGeometricRules; + bool bCanDoLBRules, bCanDoGeometricRules; const char *ptr; /* A tolerance of 1e-5 seems reasonable for (possibly hand-typed) @@ -3958,7 +3958,7 @@ static void check_combination_rules(const t_inputrec *ir, const gmx_mtop_t *mtop, warninp_t wi) { - gmx_bool bLBRulesPossible, bC6ParametersWorkWithGeometricRules, bC6ParametersWorkWithLBRules; + bool bLBRulesPossible, bC6ParametersWorkWithGeometricRules, bC6ParametersWorkWithLBRules; check_combination_rule_differences(mtop, 0, &bC6ParametersWorkWithGeometricRules, @@ -4004,7 +4004,7 @@ void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys, { char err_buf[STRLEN]; int i, m, c, nmol; - gmx_bool bCharge, bAcc; + bool bCharge, bAcc; real *mgrp, mt; rvec acc; gmx_mtop_atomloop_block_t aloopb; @@ -4220,7 +4220,7 @@ void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys, if (ir->bPull) { - gmx_bool bWarned; + bool bWarned; bWarned = FALSE; for (i = 0; i < ir->pull->ncoord && !bWarned; i++) @@ -4265,8 +4265,8 @@ void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys, } void double_check(t_inputrec *ir, matrix box, - gmx_bool bHasNormalConstraints, - gmx_bool bHasAnyConstraints, + bool bHasNormalConstraints, + bool bHasAnyConstraints, warninp_t wi) { real min_size; diff --git a/src/gromacs/gmxpreprocess/readir.h b/src/gromacs/gmxpreprocess/readir.h index 73bd5db542..827ea72950 100644 --- a/src/gromacs/gmxpreprocess/readir.h +++ b/src/gromacs/gmxpreprocess/readir.h @@ -72,17 +72,17 @@ struct t_gromppopts int nshake; char *include; char *define; - gmx_bool bGenVel; - gmx_bool bGenPairs; + bool bGenVel; + bool bGenPairs; real tempi; int seed; - gmx_bool bOrire; - gmx_bool bMorse; + bool bOrire; + bool bMorse; char *wall_atomtype[2]; char *couple_moltype; int couple_lam0; int couple_lam1; - gmx_bool bCoupleIntra; + bool bCoupleIntra; }; /*! \brief Initialise object to hold strings parsed from an .mdp file */ @@ -100,8 +100,8 @@ int search_string(const char *s, int ng, char *gn[]); /* Returns the index of string s in the index groups */ void double_check(t_inputrec *ir, matrix box, - gmx_bool bHasNormalConstraints, - gmx_bool bHasAnyConstraints, + bool bHasNormalConstraints, + bool bHasAnyConstraints, warninp_t wi); /* Do more checks */ @@ -125,7 +125,7 @@ void get_ir(const char *mdparin, const char *mdparout, void do_index(const char* mdparin, const char *ndx, gmx_mtop_t *mtop, - gmx_bool bVerbose, + bool bVerbose, t_inputrec *ir, warninp_t wi); /* Read the index file and assign grp numbers to atoms. @@ -165,6 +165,6 @@ void make_rotation_groups(t_rot *rot, char **rotgnames, /* Process the rotation parameters after reading the index groups */ void set_reference_positions(t_rot *rot, rvec *x, matrix box, - const char *fn, gmx_bool bSet, warninp_t wi); + const char *fn, bool bSet, warninp_t wi); #endif diff --git a/src/gromacs/gmxpreprocess/readrot.cpp b/src/gromacs/gmxpreprocess/readrot.cpp index 70cfc5e4c9..5bfabd157f 100644 --- a/src/gromacs/gmxpreprocess/readrot.cpp +++ b/src/gromacs/gmxpreprocess/readrot.cpp @@ -205,7 +205,7 @@ extern char **read_rotparams(std::vector *inp, t_rot *rot, static void check_box_unchanged(matrix f_box, matrix box, char fn[], warninp_t wi) { int i, ii; - gmx_bool bSame = TRUE; + bool bSame = TRUE; char warn_buf[STRLEN]; @@ -233,7 +233,7 @@ static void check_box_unchanged(matrix f_box, matrix box, char fn[], warninp_t w /* Extract the reference positions for the rotation group(s) */ extern void set_reference_positions( t_rot *rot, rvec *x, matrix box, - const char *fn, gmx_bool bSet, warninp_t wi) + const char *fn, bool bSet, warninp_t wi) { int g, i, ii; t_rotgrp *rotg; diff --git a/src/gromacs/gmxpreprocess/resall.cpp b/src/gromacs/gmxpreprocess/resall.cpp index 4304dbda00..53a4e99ab2 100644 --- a/src/gromacs/gmxpreprocess/resall.cpp +++ b/src/gromacs/gmxpreprocess/resall.cpp @@ -131,8 +131,8 @@ static void print_resatoms(FILE *out, gpp_atomtype_t atype, t_restp *rtp) } } -static gmx_bool read_atoms(FILE *in, char *line, - t_restp *r0, t_symtab *tab, gpp_atomtype_t atype) +static bool read_atoms(FILE *in, char *line, + t_restp *r0, t_symtab *tab, gpp_atomtype_t atype) { int i, j, cg, maxentries; char buf[256], buf1[256]; @@ -178,7 +178,7 @@ static gmx_bool read_atoms(FILE *in, char *line, return TRUE; } -static gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp) +static bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp) { char str[STRLEN]; int j, n, ni, maxrb; @@ -322,14 +322,14 @@ void print_resall(FILE *out, int nrtp, t_restp rtp[], void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp, gpp_atomtype_t atype, t_symtab *tab, - gmx_bool bAllowOverrideRTP) + bool bAllowOverrideRTP) { FILE *in; char filebase[STRLEN], line[STRLEN], header[STRLEN]; int i, nrtp, maxrtp, bt, nparam; int dum1, dum2, dum3; t_restp *rrtp, *header_settings; - gmx_bool bNextResidue, bError; + bool bNextResidue, bError; int firstrtp; fflib_filename_base(rrdb, filebase, STRLEN); @@ -554,7 +554,7 @@ void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp, * SEARCH ROUTINES * ***********************************************************/ -static gmx_bool is_sign(char c) +static bool is_sign(char c) { return (c == '+' || c == '-'); } diff --git a/src/gromacs/gmxpreprocess/resall.h b/src/gromacs/gmxpreprocess/resall.h index 669ef7c9a8..b72e630698 100644 --- a/src/gromacs/gmxpreprocess/resall.h +++ b/src/gromacs/gmxpreprocess/resall.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -58,7 +58,7 @@ gpp_atomtype_t read_atype(const char *ffdir, struct t_symtab *tab); void read_resall(char *resdb, int *nrtp, t_restp **rtp, gpp_atomtype_t atype, struct t_symtab *tab, - gmx_bool bAllowOverrideRTP); + bool bAllowOverrideRTP); /* read rtp database, append to the existing database */ void print_resall(FILE *out, int nrtp, t_restp rtp[], diff --git a/src/gromacs/gmxpreprocess/solvate.cpp b/src/gromacs/gmxpreprocess/solvate.cpp index b3c8b3ea69..e28bd4c9fb 100644 --- a/src/gromacs/gmxpreprocess/solvate.cpp +++ b/src/gromacs/gmxpreprocess/solvate.cpp @@ -736,7 +736,7 @@ static void update_top(t_atoms *atoms, matrix box, int NFILE, t_filenm fnm[], char buf[STRLEN], buf2[STRLEN], *temp; const char *topinout; int line; - gmx_bool bSystem, bMolecules, bSkip; + bool bSystem, bMolecules, bSkip; int i, nsol = 0; double mtot; real vol, mm; @@ -778,10 +778,10 @@ static void update_top(t_atoms *atoms, matrix box, int NFILE, t_filenm fnm[], fpin = gmx_ffopen(topinout, "r"); fpout = gmx_fopen_temporary(temporary_filename); line = 0; - bSystem = bMolecules = FALSE; + bSystem = bMolecules = false; while (fgets(buf, STRLEN, fpin)) { - bSkip = FALSE; + bSkip = false; line++; strcpy(buf2, buf); if ((temp = strchr(buf2, '\n')) != nullptr) @@ -813,7 +813,7 @@ static void update_top(t_atoms *atoms, matrix box, int NFILE, t_filenm fnm[], if (buf2[0] && (!strstr(buf2, " water")) ) { sprintf(buf, "%s in water\n", buf2); - bSystem = FALSE; + bSystem = false; } } else if (bMolecules) @@ -826,7 +826,7 @@ static void update_top(t_atoms *atoms, matrix box, int NFILE, t_filenm fnm[], nsol -= i; if (nsol < 0) { - bSkip = TRUE; + bSkip = true; nsol += i; } } diff --git a/src/gromacs/gmxpreprocess/specbond.cpp b/src/gromacs/gmxpreprocess/specbond.cpp index 912c9e38be..f055022032 100644 --- a/src/gromacs/gmxpreprocess/specbond.cpp +++ b/src/gromacs/gmxpreprocess/specbond.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -53,7 +53,7 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/utility/strdb.h" -gmx_bool yesno(void) +bool yesno(void) { char c; @@ -133,7 +133,7 @@ void done_specbonds(int nsb, t_specbond sb[]) } } -static gmx_bool is_special(int nsb, t_specbond sb[], char *res, char *atom) +static bool is_special(int nsb, t_specbond sb[], char *res, char *atom) { int i; @@ -150,8 +150,8 @@ static gmx_bool is_special(int nsb, t_specbond sb[], char *res, char *atom) return FALSE; } -static gmx_bool is_bond(int nsb, t_specbond sb[], t_atoms *pdba, int a1, int a2, - real d, int *index_sb, gmx_bool *bSwap) +static bool is_bond(int nsb, t_specbond sb[], t_atoms *pdba, int a1, int a2, + real d, int *index_sb, bool *bSwap) { int i; char *at1, *at2, *res1, *res2; @@ -209,7 +209,7 @@ static gmx_bool is_bond(int nsb, t_specbond sb[], t_atoms *pdba, int a1, int a2, return FALSE; } -static void rename_1res(t_atoms *pdba, int resind, char *newres, gmx_bool bVerbose) +static void rename_1res(t_atoms *pdba, int resind, char *newres, bool bVerbose) { if (bVerbose) { @@ -223,15 +223,15 @@ static void rename_1res(t_atoms *pdba, int resind, char *newres, gmx_bool bVerbo *pdba->resinfo[resind].rtp = gmx_strdup(newres); } -int mk_specbonds(t_atoms *pdba, rvec x[], gmx_bool bInteractive, - t_ssbond **specbonds, gmx_bool bVerbose) +int mk_specbonds(t_atoms *pdba, rvec x[], bool bInteractive, + t_ssbond **specbonds, bool bVerbose) { t_specbond *sb = nullptr; t_ssbond *bonds = nullptr; int nsb; int nspec, nbonds; int *specp, *sgp; - gmx_bool bDoit, bSwap; + bool bDoit, bSwap; int i, j, b, e, e2; int ai, aj, index_sb; real **d; diff --git a/src/gromacs/gmxpreprocess/specbond.h b/src/gromacs/gmxpreprocess/specbond.h index bcdd7bd9aa..645c82bf0d 100644 --- a/src/gromacs/gmxpreprocess/specbond.h +++ b/src/gromacs/gmxpreprocess/specbond.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -40,9 +40,9 @@ #include "gromacs/gmxpreprocess/pdb2top.h" -int mk_specbonds(t_atoms *pdba, rvec x[], gmx_bool bInteractive, - t_ssbond **specbonds, gmx_bool bVerbose); +int mk_specbonds(t_atoms *pdba, rvec x[], bool bInteractive, + t_ssbond **specbonds, bool bVerbose); -gmx_bool yesno(void); +bool yesno(void); #endif diff --git a/src/gromacs/gmxpreprocess/ter_db.cpp b/src/gromacs/gmxpreprocess/ter_db.cpp index 551029be8a..33518f48a2 100644 --- a/src/gromacs/gmxpreprocess/ter_db.cpp +++ b/src/gromacs/gmxpreprocess/ter_db.cpp @@ -86,7 +86,7 @@ static int find_kw(char *keyw) #define FATAL() gmx_fatal(FARGS, "Reading Termini Database: not enough items on line\n%s", line) -static void read_atom(char *line, gmx_bool bAdd, +static void read_atom(char *line, bool bAdd, char **nname, t_atom *a, gpp_atomtype_t atype, int *cgnr) { int nr, i; @@ -461,7 +461,7 @@ t_hackblock **filter_ter(int nb, t_hackblock tb[], */ int i, j, n, none_idx; - gmx_bool found; + bool found; char *s; t_hackblock **list; diff --git a/src/gromacs/gmxpreprocess/tomorse.cpp b/src/gromacs/gmxpreprocess/tomorse.cpp index 97523622ec..4abdd4ed23 100644 --- a/src/gromacs/gmxpreprocess/tomorse.cpp +++ b/src/gromacs/gmxpreprocess/tomorse.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -207,7 +207,7 @@ void convert_harmonics(int nrmols, t_molinfo mols[], gpp_atomtype_t atype) int i, j, k, last, ni, nj; int nrharm, nrmorse, bb; real edis, kb, b0, beta; - gmx_bool *bRemoveHarm; + bool *bRemoveHarm; /* First get the data */ t2m = read_dissociation_energies(&n2m); diff --git a/src/gromacs/gmxpreprocess/topio.cpp b/src/gromacs/gmxpreprocess/topio.cpp index ecfc20ecf4..118a1f9763 100644 --- a/src/gromacs/gmxpreprocess/topio.cpp +++ b/src/gromacs/gmxpreprocess/topio.cpp @@ -430,9 +430,9 @@ static char **read_topol(const char *infile, const char *outfile, t_gromppopts *opts, real *fudgeQQ, std::vector *molblock, - gmx_bool bFEP, - gmx_bool bZero, - gmx_bool usingFullRangeElectrostatics, + bool bFEP, + bool bZero, + bool usingFullRangeElectrostatics, warninp_t wi) { FILE *out; @@ -449,7 +449,7 @@ static char **read_topol(const char *infile, const char *outfile, t_nbparam **nbparam, **pair; t_block2 *block2; real fudgeLJ = -1; /* Multiplication factor to generate 1-4 from LJ */ - gmx_bool bReadDefaults, bReadMolType, bGenPairs, bWarn_copy_A_B; + bool bReadDefaults, bReadMolType, bGenPairs, bWarn_copy_A_B; double qt = 0, qBt = 0; /* total charge */ t_bond_atomtype batype; int lastcg = -1; @@ -846,7 +846,7 @@ static char **read_topol(const char *infile, const char *outfile, case d_molecules: { int whichmol; - gmx_bool bCouple; + bool bCouple; push_mol(nmol, *molinfo, pline, &whichmol, &nrcopies, wi); mi0 = &((*molinfo)[whichmol]); @@ -973,11 +973,11 @@ static char **read_topol(const char *infile, const char *outfile, return title; } -char **do_top(gmx_bool bVerbose, +char **do_top(bool bVerbose, const char *topfile, const char *topppfile, t_gromppopts *opts, - gmx_bool bZero, + bool bZero, t_symtab *symtab, t_params plist[], int *combination_rule, @@ -1039,7 +1039,7 @@ static void generate_qmexcl_moltype(gmx_moltype_t *molt, const unsigned char *gr */ int qm_max = 0, qm_nr = 0, link_nr = 0, link_max = 0; int *qm_arr = nullptr, *link_arr = nullptr; - gmx_bool *bQMMM, *blink; + bool *bQMMM, *blink; /* First we search and select the QM atoms in an qm_arr array that * we use to create the exclusions. @@ -1320,7 +1320,7 @@ void generate_qmexcl(gmx_mtop_t *sys, t_inputrec *ir, warninp_t wi) unsigned char *grpnr; int mol, nat_mol, nr_mol_with_qm_atoms = 0; gmx_molblock_t *molb; - gmx_bool bQMMM; + bool bQMMM; grpnr = sys->groups.grpnr[egcQMMM]; diff --git a/src/gromacs/gmxpreprocess/topio.h b/src/gromacs/gmxpreprocess/topio.h index 3d1fac960a..2e99405b6f 100644 --- a/src/gromacs/gmxpreprocess/topio.h +++ b/src/gromacs/gmxpreprocess/topio.h @@ -53,11 +53,11 @@ typedef warninp *warninp_t; double check_mol(const gmx_mtop_t *mtop, warninp_t wi); /* Check mass and charge */ -char **do_top(gmx_bool bVerbose, +char **do_top(bool bVerbose, const char *topfile, const char *topppfile, t_gromppopts *opts, - gmx_bool bZero, + bool bZero, struct t_symtab *symtab, t_params plist[], int *combination_rule, diff --git a/src/gromacs/gmxpreprocess/toppush.cpp b/src/gromacs/gmxpreprocess/toppush.cpp index 4635e25c13..b0b23bcffa 100644 --- a/src/gromacs/gmxpreprocess/toppush.cpp +++ b/src/gromacs/gmxpreprocess/toppush.cpp @@ -243,8 +243,8 @@ void push_at (t_symtab *symtab, gpp_atomtype_t at, t_bond_atomtype bat, t_atom *atom; t_param *param; int atomnr; - gmx_bool have_atomic_number; - gmx_bool have_bonded_type; + bool have_atomic_number; + bool have_bonded_type; snew(atom, 1); snew(param, 1); @@ -536,7 +536,7 @@ static void push_bondtype(t_params * bt, const t_param * b, int nral, int ftype, - gmx_bool bAllowRepeat, + bool bAllowRepeat, const char * line, warninp_t wi) { @@ -805,7 +805,7 @@ void push_dihedraltype(directive d, t_params bt[], char alc[MAXATOMLIST+1][20]; double c[MAXFORCEPARAM]; t_param p; - gmx_bool bAllowRepeat; + bool bAllowRepeat; char errbuf[STRLEN]; /* This routine accepts dihedraltypes defined from either 2 or 4 atoms. @@ -948,7 +948,7 @@ void push_nbt(directive d, t_nbparam **nbt, gpp_atomtype_t atype, real cr[4]; int ai, aj; t_nbparam *nbp; - gmx_bool bId; + bool bId; char errbuf[STRLEN]; if (sscanf (pline, "%s%s%d", a0, a1, &f) != 3) @@ -1434,11 +1434,11 @@ void push_molt(t_symtab *symtab, int *nmol, t_molinfo **mol, char *line, newmol->excl_set = FALSE; } -static gmx_bool default_nb_params(int ftype, t_params bt[], t_atoms *at, - t_param *p, int c_start, gmx_bool bB, gmx_bool bGenPairs) +static bool default_nb_params(int ftype, t_params bt[], t_atoms *at, + t_param *p, int c_start, bool bB, bool bGenPairs) { int i, j, ti, tj, ntype; - gmx_bool bFound; + bool bFound; t_param *pi = nullptr; int nr = bt[ftype].nr; int nral = NRAL(ftype); @@ -1529,15 +1529,15 @@ static gmx_bool default_nb_params(int ftype, t_params bt[], t_atoms *at, return bFound; } -static gmx_bool default_cmap_params(t_params bondtype[], - t_atoms *at, gpp_atomtype_t atype, - t_param *p, gmx_bool bB, - int *cmap_type, int *nparam_def, - warninp_t wi) +static bool default_cmap_params(t_params bondtype[], + t_atoms *at, gpp_atomtype_t atype, + t_param *p, bool bB, + int *cmap_type, int *nparam_def, + warninp_t wi) { int i, nparam_found; int ct; - gmx_bool bFound = FALSE; + bool bFound = FALSE; char errbuf[STRLEN]; nparam_found = 0; @@ -1605,14 +1605,14 @@ static int natom_match(t_param *pi, } } -static gmx_bool default_params(int ftype, t_params bt[], - t_atoms *at, gpp_atomtype_t atype, - t_param *p, gmx_bool bB, - t_param **param_def, - int *nparam_def) +static bool default_params(int ftype, t_params bt[], + t_atoms *at, gpp_atomtype_t atype, + t_param *p, bool bB, + t_param **param_def, + int *nparam_def) { int nparam_found; - gmx_bool bFound, bSame; + bool bFound, bSame; t_param *pi = nullptr; t_param *pj = nullptr; int nr = bt[ftype].nr; @@ -1726,8 +1726,8 @@ static gmx_bool default_params(int ftype, t_params bt[], void push_bond(directive d, t_params bondtype[], t_params bond[], t_atoms *at, gpp_atomtype_t atype, char *line, - gmx_bool bBonded, gmx_bool bGenPairs, real fudgeQQ, - gmx_bool bZero, gmx_bool *bWarn_copy_A_B, + bool bBonded, bool bGenPairs, real fudgeQQ, + bool bZero, bool *bWarn_copy_A_B, warninp_t wi) { const char *aaformat[MAXATOMLIST] = { @@ -1753,7 +1753,7 @@ void push_bond(directive d, t_params bondtype[], t_params bond[], double cc[MAXFORCEPARAM+1]; int aa[MAXATOMLIST+1]; t_param param, *param_defA, *param_defB; - gmx_bool bFoundA = FALSE, bFoundB = FALSE, bDef, bPert, bSwapParity = FALSE; + bool bFoundA = FALSE, bFoundB = FALSE, bDef, bPert, bSwapParity = FALSE; int nparam_defA, nparam_defB; char errbuf[STRLEN]; @@ -2148,7 +2148,7 @@ void push_cmap(directive d, t_params bondtype[], t_params bond[], int cmap_type; int aa[MAXATOMLIST+1]; char errbuf[STRLEN]; - gmx_bool bFound; + bool bFound; t_param param; ftype = ifunc_index(d, 1); @@ -2663,7 +2663,7 @@ static void generate_LJCpairsNB(t_molinfo *mol, int nb_funct, t_params *nbp, war int n, ntype, i, j, k; t_atom *atom; t_blocka *excl; - gmx_bool bExcl; + bool bExcl; t_param param; char errbuf[STRLEN]; @@ -2776,7 +2776,7 @@ static void decouple_atoms(t_atoms *atoms, int atomtype_decouple, void convert_moltype_couple(t_molinfo *mol, int atomtype_decouple, real fudgeQQ, int couple_lam0, int couple_lam1, - gmx_bool bCoupleIntra, int nb_funct, t_params *nbp, + bool bCoupleIntra, int nb_funct, t_params *nbp, warninp_t wi) { convert_pairs_to_pairsQ(mol->plist, fudgeQQ, &mol->atoms); diff --git a/src/gromacs/gmxpreprocess/toppush.h b/src/gromacs/gmxpreprocess/toppush.h index 3c6e2bc57f..efc892c298 100644 --- a/src/gromacs/gmxpreprocess/toppush.h +++ b/src/gromacs/gmxpreprocess/toppush.h @@ -86,8 +86,8 @@ void push_atom(struct t_symtab *symtab, void push_bond(directive d, t_params bondtype[], t_params bond[], t_atoms *at, gpp_atomtype_t atype, char *line, - gmx_bool bBonded, gmx_bool bGenPairs, real fudgeQQ, - gmx_bool bZero, gmx_bool *bWarn_copy_A_B, + bool bBonded, bool bGenPairs, real fudgeQQ, + bool bZero, bool *bWarn_copy_A_B, warninp_t wi); void push_cmap(directive d, t_params bondtype[], t_params bond[], @@ -126,7 +126,7 @@ int add_atomtype_decoupled(struct t_symtab *symtab, gpp_atomtype_t at, void convert_moltype_couple(t_molinfo *mol, int atomtype_decouple, real fudgeQQ, int couple_lam0, int couple_lam1, - gmx_bool bCoupleIntra, + bool bCoupleIntra, int nb_funct, t_params *nbp, warninp_t wi); /* Setup mol such that the B-state has no interaction with the rest diff --git a/src/gromacs/gmxpreprocess/topshake.cpp b/src/gromacs/gmxpreprocess/topshake.cpp index 854c422340..4a3725a0e8 100644 --- a/src/gromacs/gmxpreprocess/topshake.cpp +++ b/src/gromacs/gmxpreprocess/topshake.cpp @@ -111,7 +111,7 @@ void make_shake (t_params plist[], t_atoms *atoms, int nshake) t_param p, *bond, *ang; real b_ij, b_jk; int i, j, ftype, ftype_a; - gmx_bool bFound; + bool bFound; if (nshake != eshNONE) { diff --git a/src/gromacs/gmxpreprocess/toputil.cpp b/src/gromacs/gmxpreprocess/toputil.cpp index 1a5108bc02..7689c5afd1 100644 --- a/src/gromacs/gmxpreprocess/toputil.cpp +++ b/src/gromacs/gmxpreprocess/toputil.cpp @@ -205,7 +205,7 @@ void done_mi(t_molinfo *mi) static void print_bt(FILE *out, directive d, gpp_atomtype_t at, int ftype, int fsubtype, t_params plist[], - gmx_bool bFullDih) + bool bFullDih) { /* This dihp is a DIRTY patch because the dih-types do not use * all four atoms to determine the type. @@ -213,7 +213,7 @@ static void print_bt(FILE *out, directive d, gpp_atomtype_t at, const int dihp[2][2] = { { 1, 2 }, { 0, 3 } }; t_params *bt; int i, j, f, nral, nrfp; - gmx_bool bDih = FALSE, bSwapParity; + bool bDih = FALSE, bSwapParity; bt = &(plist[ftype]); @@ -385,7 +385,7 @@ void print_blocka(FILE *out, const char *szName, void print_excl(FILE *out, int natoms, t_excls excls[]) { int i; - gmx_bool have_excl; + bool have_excl; int j; have_excl = FALSE; @@ -432,7 +432,7 @@ static double get_residue_charge(const t_atoms *atoms, int at) } void print_atoms(FILE *out, gpp_atomtype_t atype, t_atoms *at, int *cgnr, - gmx_bool bRTPresname) + bool bRTPresname) { int i, ri; int tpA, tpB; diff --git a/src/gromacs/gmxpreprocess/toputil.h b/src/gromacs/gmxpreprocess/toputil.h index 5dab27282a..7c859fba5e 100644 --- a/src/gromacs/gmxpreprocess/toputil.h +++ b/src/gromacs/gmxpreprocess/toputil.h @@ -69,7 +69,7 @@ void print_blocka(FILE *out, const char *szName, const char *szIndex, const char *szA, t_blocka *block); void print_atoms(FILE *out, gpp_atomtype_t atype, t_atoms *at, int *cgnr, - gmx_bool bRTPresname); + bool bRTPresname); void print_bondeds(FILE *out, int natoms, directive d, int ftype, int fsubtype, t_params plist[]); diff --git a/src/gromacs/gmxpreprocess/vsite_parm.cpp b/src/gromacs/gmxpreprocess/vsite_parm.cpp index 7c4162eb82..cede9478b6 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.cpp +++ b/src/gromacs/gmxpreprocess/vsite_parm.cpp @@ -149,7 +149,7 @@ static void get_bondeds(int nrat, const t_iatom atoms[], static at2vsitebond_t *make_at2vsitebond(int natoms, t_params plist[]) { - gmx_bool *bVSI; + bool *bVSI; int ftype, i, j, nrcheck, nr; t_iatom *aa; at2vsitebond_t *at2vb; @@ -217,7 +217,7 @@ static void done_at2vsitebond(int natoms, at2vsitebond_t *at2vb) static at2vsitecon_t *make_at2vsitecon(int natoms, t_params plist[]) { - gmx_bool *bVSI; + bool *bVSI; int ftype, i, j, ai, aj, nr; at2vsitecon_t *at2vc; @@ -414,17 +414,17 @@ static char *get_atomtype_name_AB(t_atom *atom, gpp_atomtype_t atype) return name; } -static gmx_bool calc_vsite3_param(gpp_atomtype_t atype, - t_param *param, t_atoms *at, - int nrbond, t_mybonded *bonds, - int nrang, t_mybonded *angles ) +static bool calc_vsite3_param(gpp_atomtype_t atype, + t_param *param, t_atoms *at, + int nrbond, t_mybonded *bonds, + int nrang, t_mybonded *angles ) { /* i = virtual site | ,k * j = 1st bonded heavy atom | i-j * k,l = 2nd bonded atoms | `l */ - gmx_bool bXH3, bError; + bool bXH3, bError; 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*) */ @@ -511,16 +511,16 @@ static gmx_bool calc_vsite3_param(gpp_atomtype_t atype, return bError; } -static gmx_bool calc_vsite3fd_param(t_param *param, - int nrbond, t_mybonded *bonds, - int nrang, t_mybonded *angles) +static bool calc_vsite3fd_param(t_param *param, + int nrbond, t_mybonded *bonds, + int nrang, t_mybonded *angles) { /* i = virtual site | ,k * j = 1st bonded heavy atom | i-j * k,l = 2nd bonded atoms | `l */ - gmx_bool bError; + bool bError; real bij, bjk, bjl, aijk, aijl, rk, rl; bij = get_bond_length(nrbond, bonds, param->ai(), param->aj()); @@ -544,9 +544,9 @@ static gmx_bool calc_vsite3fd_param(t_param *param, return bError; } -static gmx_bool calc_vsite3fad_param(t_param *param, - int nrbond, t_mybonded *bonds, - int nrang, t_mybonded *angles) +static bool calc_vsite3fad_param(t_param *param, + int nrbond, t_mybonded *bonds, + int nrang, t_mybonded *angles) { /* i = virtual site | * j = 1st bonded heavy atom | i-j @@ -554,7 +554,7 @@ static gmx_bool calc_vsite3fad_param(t_param *param, * l = 3d bonded heavy atom | */ - gmx_bool bSwapParity, bError; + bool bSwapParity, bError; real bij, aijk; bSwapParity = ( param->c1() == -1 ); @@ -579,10 +579,10 @@ static gmx_bool calc_vsite3fad_param(t_param *param, return bError; } -static gmx_bool calc_vsite3out_param(gpp_atomtype_t atype, - t_param *param, t_atoms *at, - int nrbond, t_mybonded *bonds, - int nrang, t_mybonded *angles) +static bool calc_vsite3out_param(gpp_atomtype_t atype, + t_param *param, t_atoms *at, + int nrbond, t_mybonded *bonds, + int nrang, t_mybonded *angles) { /* i = virtual site | ,k * j = 1st bonded heavy atom | i-j @@ -590,7 +590,7 @@ static gmx_bool calc_vsite3out_param(gpp_atomtype_t atype, * NOTE: i is out of the j-k-l plane! */ - gmx_bool bXH3, bError, bSwapParity; + bool bXH3, bError, bSwapParity; real bij, bjk, bjl, aijk, aijl, akjl, pijk, pijl, a, b, c; /* check if this is part of a NH2-umbrella, NH3 or CH3 group, @@ -691,16 +691,16 @@ static gmx_bool calc_vsite3out_param(gpp_atomtype_t atype, return bError; } -static gmx_bool calc_vsite4fd_param(t_param *param, - int nrbond, t_mybonded *bonds, - int nrang, t_mybonded *angles) +static bool calc_vsite4fd_param(t_param *param, + int nrbond, t_mybonded *bonds, + int nrang, t_mybonded *angles) { /* i = virtual site | ,k * j = 1st bonded heavy atom | i-j-m * k,l,m = 2nd bonded atoms | `l */ - gmx_bool bError; + bool bError; real bij, bjk, bjl, bjm, aijk, aijl, aijm, akjm, akjl; real pk, pl, pm, cosakl, cosakm, sinakl, sinakm, cl, cm; @@ -752,7 +752,7 @@ static gmx_bool calc_vsite4fd_param(t_param *param, } -static gmx_bool +static bool calc_vsite4fdn_param(t_param *param, int nrbond, t_mybonded *bonds, int nrang, t_mybonded *angles) @@ -762,7 +762,7 @@ calc_vsite4fdn_param(t_param *param, * k,l,m = 2nd bonded atoms | `l */ - gmx_bool bError; + bool bError; real bij, bjk, bjl, bjm, aijk, aijl, aijm; real pk, pl, pm, a, b; @@ -816,12 +816,12 @@ calc_vsite4fdn_param(t_param *param, -int set_vsites(gmx_bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, +int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, t_params plist[]) { int i, j, ftype; int nvsite, nrbond, nrang, nridih, nrset; - gmx_bool bFirst, bSet, bERROR; + bool bFirst, bSet, bERROR; at2vsitebond_t *at2vb; t_mybonded *bonds; t_mybonded *angles; @@ -952,7 +952,7 @@ int set_vsites(gmx_bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, return nvsite; } -void set_vsites_ptype(gmx_bool bVerbose, gmx_moltype_t *molt) +void set_vsites_ptype(bool bVerbose, gmx_moltype_t *molt) { int ftype, i; int nra, nrd; @@ -1034,7 +1034,7 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], int ftype, i, j, k, m, n, nvsite, nOut, kept_i; int nconverted, nremoved; int atom, oatom, at1, at2; - gmx_bool bKeep, bRemove, bUsed, bPresent, bThisFD, bThisOUT, bAllFD, bFirstTwo; + bool bKeep, bRemove, bUsed, bPresent, bThisFD, bThisOUT, bAllFD, bFirstTwo; t_params *ps; if (cftype == F_CONNBONDS) @@ -1298,7 +1298,7 @@ static void clean_vsite_angles(t_params *plist, t_pindex pindex[], { int i, j, k, m, n, nvsite, kept_i; int atom, at1, at2; - gmx_bool bKeep, bUsed, bPresent, bAll3FAD, bFirstTwo; + bool bKeep, bUsed, bPresent, bAll3FAD, bFirstTwo; t_params *ps; ps = &(plist[cftype]); @@ -1444,7 +1444,7 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[], int vsnral = 0; const int *first_atoms = nullptr; int atom; - gmx_bool bKeep, bUsed, bPresent; + bool bKeep, bUsed, bPresent; bKeep = FALSE; @@ -1553,7 +1553,7 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[], ps->nr = kept_i; } -void clean_vsite_bondeds(t_params *plist, int natoms, gmx_bool bRmVSiteBds) +void clean_vsite_bondeds(t_params *plist, int natoms, bool bRmVSiteBds) { int i, k, nvsite, ftype, vsite, parnr; int *vsite_type; diff --git a/src/gromacs/gmxpreprocess/vsite_parm.h b/src/gromacs/gmxpreprocess/vsite_parm.h index d9ed5a0609..682f97a54d 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.h +++ b/src/gromacs/gmxpreprocess/vsite_parm.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,17 +43,17 @@ struct gmx_moltype_t; -int set_vsites(gmx_bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, +int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, t_params plist[]); /* set parameters for virtual sites, return number of virtual sites */ -void set_vsites_ptype(gmx_bool bVerbose, gmx_moltype_t *molt); +void set_vsites_ptype(bool bVerbose, gmx_moltype_t *molt); /* set ptype to VSite for virtual sites */ /*! \brief Clean up the bonded interactions * * Throw away all obsolete bonds, angles and dihedrals. * Throw away all constraints. */ -void clean_vsite_bondeds(t_params *ps, int natoms, gmx_bool bRmVSiteBds); +void clean_vsite_bondeds(t_params *ps, int natoms, bool bRmVSiteBds); #endif diff --git a/src/gromacs/gmxpreprocess/x2top.cpp b/src/gromacs/gmxpreprocess/x2top.cpp index 7ba88372c0..4cb770a14b 100644 --- a/src/gromacs/gmxpreprocess/x2top.cpp +++ b/src/gromacs/gmxpreprocess/x2top.cpp @@ -68,7 +68,7 @@ #define MARGIN_FAC 1.1 -static gmx_bool is_bond(int nnm, t_nm2type nmt[], char *ai, char *aj, real blen) +static bool is_bond(int nnm, t_nm2type nmt[], char *ai, char *aj, real blen) { int i, j; @@ -91,7 +91,7 @@ static gmx_bool is_bond(int nnm, t_nm2type nmt[], char *ai, char *aj, real blen) static void mk_bonds(int nnm, t_nm2type nmt[], t_atoms *atoms, const rvec x[], t_params *bond, int nbond[], - gmx_bool bPBC, matrix box) + bool bPBC, matrix box) { t_param b; int i, j; @@ -152,7 +152,7 @@ static void mk_bonds(int nnm, t_nm2type nmt[], fflush(stderr); } -static int *set_cgnr(t_atoms *atoms, gmx_bool bUsePDBcharge, real *qtot, real *mtot) +static int *set_cgnr(t_atoms *atoms, bool bUsePDBcharge, real *qtot, real *mtot) { int i, n = 1; int *cgnr; @@ -200,8 +200,8 @@ static gpp_atomtype_t set_atom_type(t_symtab *tab, t_atoms *atoms, t_params *bon return atype; } -static void lo_set_force_const(t_params *plist, real c[], int nrfp, gmx_bool bRound, - gmx_bool bDih, gmx_bool bParam) +static void lo_set_force_const(t_params *plist, real c[], int nrfp, bool bRound, + bool bDih, bool bParam) { int i, j; double cc; @@ -250,8 +250,8 @@ static void lo_set_force_const(t_params *plist, real c[], int nrfp, gmx_bool bRo } } -static void set_force_const(t_params plist[], real kb, real kt, real kp, gmx_bool bRound, - gmx_bool bParam) +static void set_force_const(t_params plist[], real kb, real kt, real kp, bool bRound, + bool bParam) { real c[MAXFORCEPARAM]; @@ -265,7 +265,7 @@ static void set_force_const(t_params plist[], real kb, real kt, real kp, gmx_boo lo_set_force_const(&plist[F_PDIHS], c, 3, bRound, TRUE, bParam); } -static void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], gmx_bool bPBC, +static void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], bool bPBC, matrix box) { int i, ai, aj, ak, al, t1, t2, t3; @@ -427,7 +427,7 @@ int gmx_x2top(int argc, char *argv[]) matrix box; /* box length matrix */ int natoms; /* number of atoms in one molecule */ int epbc; - gmx_bool bRTP, bTOP, bOPLS; + bool bRTP, bTOP, bOPLS; t_symtab symtab; real qtot, mtot; char n2t[STRLEN]; @@ -441,13 +441,13 @@ int gmx_x2top(int argc, char *argv[]) #define NFILE asize(fnm) real kb = 4e5, kt = 400, kp = 5; t_restp rtp_header_settings = { nullptr }; - gmx_bool bRemoveDihedralIfWithImproper = FALSE; - gmx_bool bGenerateHH14Interactions = TRUE; - gmx_bool bKeepAllGeneratedDihedrals = FALSE; + bool bRemoveDihedralIfWithImproper = FALSE; + bool bGenerateHH14Interactions = TRUE; + bool bKeepAllGeneratedDihedrals = FALSE; int nrexcl = 3; - gmx_bool bParam = TRUE, bRound = TRUE; - gmx_bool bPairs = TRUE, bPBC = TRUE; - gmx_bool bUsePDBcharge = FALSE, bVerbose = FALSE; + bool bParam = TRUE, bRound = TRUE; + bool bPairs = TRUE, bPBC = TRUE; + bool bUsePDBcharge = FALSE, bVerbose = FALSE; const char *molnm = "ICE"; const char *ff = "oplsaa"; t_pargs pa[] = { diff --git a/src/gromacs/gmxpreprocess/xlate.cpp b/src/gromacs/gmxpreprocess/xlate.cpp index 760fd0c1d7..bf2a7d635a 100644 --- a/src/gromacs/gmxpreprocess/xlate.cpp +++ b/src/gromacs/gmxpreprocess/xlate.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -135,8 +135,8 @@ static void done_xlatom(int nxlate, t_xlate_atom *xlatom) void rename_atoms(const char *xlfile, const char *ffdir, t_atoms *atoms, t_symtab *symtab, const t_restp *restp, - gmx_bool bResname, gmx_residuetype_t *rt, gmx_bool bReorderNum, - gmx_bool bVerbose) + bool bResname, gmx_residuetype_t *rt, bool bReorderNum, + bool bVerbose) { FILE *fp; int nxlate, a, i, resind; @@ -144,8 +144,8 @@ void rename_atoms(const char *xlfile, const char *ffdir, int nf; char **f; char c, *rnm, atombuf[32], *ptr0, *ptr1; - gmx_bool bReorderedNum, bRenamed, bMatch; - gmx_bool bStartTerm, bEndTerm; + bool bReorderedNum, bRenamed, bMatch; + bool bStartTerm, bEndTerm; nxlate = 0; xlatom = nullptr; diff --git a/src/gromacs/gmxpreprocess/xlate.h b/src/gromacs/gmxpreprocess/xlate.h index 45c2a8fff3..1b8da84fdf 100644 --- a/src/gromacs/gmxpreprocess/xlate.h +++ b/src/gromacs/gmxpreprocess/xlate.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -50,7 +50,7 @@ struct t_symtab; */ void rename_atoms(const char *xlfile, const char *ffdir, struct t_atoms *atoms, struct t_symtab *symtab, const t_restp *restp, - gmx_bool bResname, struct gmx_residuetype_t *rt, gmx_bool bReorderNum, - gmx_bool bVerbose); + bool bResname, struct gmx_residuetype_t *rt, bool bReorderNum, + bool bVerbose); #endif -- 2.22.0