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;
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;
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);
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
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++)
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;
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;
int fflib_search_file_end(const char *ffdir,
const char *file_end,
- gmx_bool bFatalError,
+ bool bFatalError,
char ***filenames)
{
try
return result;
}
-gmx_bool fflib_fexist(const char *file)
+bool fflib_fexist(const char *file)
{
char *file_fullpath;
/*
* 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.
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);
#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)
{
}
-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())))
}
-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()))
{
/* 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;
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
}
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;
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');
}
}
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;
/* 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;
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
*
* 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.
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
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
*/
* 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));
{
/* 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) &&
gmx_residuetype_t *rt)
{
int type;
- gmx_bool bNterm;
+ bool bNterm;
int j;
t_restp *rtpp;
gmx_residuetype_t *rt)
{
real mass;
- gmx_bool bNterm;
+ bool bNterm;
int j;
t_restp *rtpp;
int nrheavies, int heavies[])
{
int i, j, ftype, other, moreheavy;
- gmx_bool bSwapParity;
+ bool bSwapParity;
for (i = 0; i < nrHatoms; i++)
{
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 {
return nvsite;
}
-static gmx_bool is_vsite(int vsite_type)
+static bool is_vsite(int vsite_type)
{
if (vsite_type == NOTSET)
{
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
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;
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;
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! */
{
/* 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)
{
}
void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult,
- gmx_bool bDeuterate)
+ bool bDeuterate)
{
int i, j, a;
*
* 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.
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
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[] = {
}
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;
}
-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;
}
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++)
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++)
{
}
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;
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;
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;
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;
*
* 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.
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.
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 == '_');
}
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))
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));
}
const char *ptr, *ptr2;
char *name;
char *dname, *dval;
- gmx_bool bEOF;
+ bool bEOF;
if (!handle)
{
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);
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;
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 */
#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.
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 */
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 */
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;
}
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)
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 &&
/* 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)
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[],
}
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;
}
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;
}
close_trx(fp);
/* Search for a frame without velocities */
- bReadVel = FALSE;
+ bReadVel = false;
read_first_frame(oenv, &fp, slog, &fr, TRX_NEED_X);
}
}
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);
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
{
/* 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;
}
/* 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)
{
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)
* 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))
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",
"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 },
#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},
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++)
{
int i, k;
int foundPos = -1;
- gmx_bool atomsMatch;
+ bool atomsMatch;
for (i = 0; i < nlist && foundPos < 0; i++)
{
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;
*
* 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.
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]; }
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;
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]; }
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 '+'
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;
}
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;
}
}
-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;
};
#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;
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;
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;
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])
{
if (r == r_end[j])
{
- bEnd = TRUE;
+ bEnd = true;
}
}
}
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;
}
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;
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)
{
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;
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;
int nid_used;
int this_chainstart;
int prev_chainstart;
- gmx_bool bMerged;
+ bool bMerged;
int nchainmerges;
gmx_atomprop_t aps;
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];
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))
}
else if (!strncmp(merge[0], "all", 3))
{
- bMerged = TRUE;
+ bMerged = true;
}
}
{
int j, k, nmiss;
char *name;
- gmx_bool bFound;
+ bool bFound;
nmiss = 0;
for (j = 0; j < rp->natom; j++)
return nmiss;
}
-gmx_bool is_int(double x)
+bool is_int(double x)
{
const double tol = 1e-4;
int ix;
{
int i, j, prevresind, resind, i0, prevcg, cg, curcg;
char *name;
- gmx_bool bNterm;
+ bool bNterm;
double qt;
int nmissat;
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);
void print_top_comment(FILE *out,
const char *filename,
const char *ffdir,
- gmx_bool bITP)
+ bool bITP)
{
char ffdir_parent[STRLEN];
char *p;
}
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;
}
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! */
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;
}
}
-void print_sums(t_atoms *atoms, gmx_bool bSystem)
+void print_sums(t_atoms *atoms, bool bSystem)
{
double m, qtot;
int i;
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);
}
}
-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)
}
}
-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;
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;
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;
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;
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;
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,
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! */
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
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)
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;
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;
*
* 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.
*/
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.
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);
-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)
{
}
}
-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);
}
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]);
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);
* \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);
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)
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.
int nelem, i, j, k, nr;
char *names[EGP_MAX];
char ***gnames;
- gmx_bool bSet;
+ bool bSet;
gnames = groups->grpname;
void do_index(const char* mdparin, const char *ndx,
gmx_mtop_t *mtop,
- gmx_bool bVerbose,
+ bool bVerbose,
t_inputrec *ir,
warninp_t wi)
{
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;
}
}
-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;
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;
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)
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,
{
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;
if (ir->bPull)
{
- gmx_bool bWarned;
+ bool bWarned;
bWarned = FALSE;
for (i = 0; i < ir->pull->ncoord && !bWarned; i++)
}
void double_check(t_inputrec *ir, matrix box,
- gmx_bool bHasNormalConstraints,
- gmx_bool bHasAnyConstraints,
+ bool bHasNormalConstraints,
+ bool bHasAnyConstraints,
warninp_t wi)
{
real min_size;
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 */
/* 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 */
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.
/* 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
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];
/* 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;
}
}
-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];
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;
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);
* SEARCH ROUTINES
*
***********************************************************/
-static gmx_bool is_sign(char c)
+static bool is_sign(char c)
{
return (c == '+' || c == '-');
}
*
* 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.
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[],
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;
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)
if (buf2[0] && (!strstr(buf2, " water")) )
{
sprintf(buf, "%s in water\n", buf2);
- bSystem = FALSE;
+ bSystem = false;
}
}
else if (bMolecules)
nsol -= i;
if (nsol < 0)
{
- bSkip = TRUE;
+ bSkip = true;
nsol += i;
}
}
*
* 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.
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/strdb.h"
-gmx_bool yesno(void)
+bool yesno(void)
{
char c;
}
}
-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;
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;
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)
{
*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;
*
* 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.
#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
#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;
*/
int i, j, n, none_idx;
- gmx_bool found;
+ bool found;
char *s;
t_hackblock **list;
*
* 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.
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);
t_gromppopts *opts,
real *fudgeQQ,
std::vector<gmx_molblock_t> *molblock,
- gmx_bool bFEP,
- gmx_bool bZero,
- gmx_bool usingFullRangeElectrostatics,
+ bool bFEP,
+ bool bZero,
+ bool usingFullRangeElectrostatics,
warninp_t wi)
{
FILE *out;
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;
case d_molecules:
{
int whichmol;
- gmx_bool bCouple;
+ bool bCouple;
push_mol(nmol, *molinfo, pline, &whichmol, &nrcopies, wi);
mi0 = &((*molinfo)[whichmol]);
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,
*/
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.
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];
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,
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);
const t_param * b,
int nral,
int ftype,
- gmx_bool bAllowRepeat,
+ bool bAllowRepeat,
const char * line,
warninp_t wi)
{
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.
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)
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);
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;
}
}
-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;
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] = {
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];
int cmap_type;
int aa[MAXATOMLIST+1];
char errbuf[STRLEN];
- gmx_bool bFound;
+ bool bFound;
t_param param;
ftype = ifunc_index(d, 1);
int n, ntype, i, j, k;
t_atom *atom;
t_blocka *excl;
- gmx_bool bExcl;
+ bool bExcl;
t_param param;
char errbuf[STRLEN];
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);
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[],
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
t_param p, *bond, *ang;
real b_ij, b_jk;
int i, j, ftype, ftype_a;
- gmx_bool bFound;
+ bool bFound;
if (nshake != eshNONE)
{
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.
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]);
void print_excl(FILE *out, int natoms, t_excls excls[])
{
int i;
- gmx_bool have_excl;
+ bool have_excl;
int j;
have_excl = FALSE;
}
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;
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[]);
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;
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;
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*) */
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());
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
* l = 3d bonded heavy atom |
*/
- gmx_bool bSwapParity, bError;
+ bool bSwapParity, bError;
real bij, aijk;
bSwapParity = ( param->c1() == -1 );
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
* 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,
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;
}
-static gmx_bool
+static bool
calc_vsite4fdn_param(t_param *param,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
* 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;
-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;
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;
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)
{
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]);
int vsnral = 0;
const int *first_atoms = nullptr;
int atom;
- gmx_bool bKeep, bUsed, bPresent;
+ bool bKeep, bUsed, bPresent;
bKeep = FALSE;
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;
*
* 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.
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
#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;
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;
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;
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;
}
}
-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];
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;
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];
#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[] = {
*
* 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.
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;
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;
*
* 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.
*/
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