From: Rossen Apostolov Date: Wed, 25 Aug 2010 19:53:29 +0000 (+0200) Subject: Redefine the default boolean type to gmx_bool. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=0ee18313f23725a6ffdaa515f4da0b54e1676903;p=alexxy%2Fgromacs.git Redefine the default boolean type to gmx_bool. There is no standard size for 'bool' in C++, so when we previously defined it to int for C code the data types (and structs) would have different size depending on your compiler, both at gromacs build time and when you use the library. The only way around this is to NOT assume anything about the C++ type, so we cannot use the name 'bool' in our C code anymore. The new gmx_bool is of type unsigned char. --- diff --git a/include/3dview.h b/include/3dview.h index 2ca22410f9..0ffdab0a97 100644 --- a/include/3dview.h +++ b/include/3dview.h @@ -92,7 +92,7 @@ extern t_3dview *init_view(matrix box); * reset the view */ -extern bool zoom_3d(t_3dview *view,real fac); +extern gmx_bool zoom_3d(t_3dview *view,real fac); /* Zoom in or out with factor fac, returns TRUE when zoom successful, * FALSE otherwise. */ @@ -100,10 +100,10 @@ extern bool zoom_3d(t_3dview *view,real fac); extern void init_rotate_3d(t_3dview *view); /* Initiates the state of 3d rotation matrices in the structure */ -extern void rotate_3d(t_3dview *view,int axis,bool bPositive); +extern void rotate_3d(t_3dview *view,int axis,gmx_bool bPositive); /* Rotate the eye around the center of the box, around axis */ -extern void translate_view(t_3dview *view,int axis,bool bPositive); +extern void translate_view(t_3dview *view,int axis,gmx_bool bPositive); /* Translate the origin at which one is looking */ extern void reset_view(t_3dview *view); diff --git a/include/atomprop.h b/include/atomprop.h index 11fc31a16f..479a65e189 100644 --- a/include/atomprop.h +++ b/include/atomprop.h @@ -58,7 +58,7 @@ char *gmx_atomprop_element(gmx_atomprop_t aps,int atomnumber); int gmx_atomprop_atomnumber(gmx_atomprop_t aps,const char *element); -bool gmx_atomprop_query(gmx_atomprop_t aps, +gmx_bool gmx_atomprop_query(gmx_atomprop_t aps, int eprop,const char *resnm,const char *atomnm, real *value); /* Extract a value from the database. Returns TRUE on succes, diff --git a/include/bondf.h b/include/bondf.h index 8d2e472a8e..9d40a3fa92 100644 --- a/include/bondf.h +++ b/include/bondf.h @@ -63,7 +63,7 @@ void calc_bonds(FILE *fplog,const gmx_multisim_t *ms, const t_mdatoms *md, t_fcdata *fcd,int *ddgatindex, t_atomtypes *atype, gmx_genborn_t *born, - bool bPrintSepPot,gmx_large_int_t step); + gmx_bool bPrintSepPot,gmx_large_int_t step); /* * The function calc_bonds() calculates all bonded force interactions. * The "bonds" are specified as follows: @@ -82,7 +82,7 @@ void calc_bonds(FILE *fplog,const gmx_multisim_t *ms, * total potential energy split up over the function types. * int *ddgatindex * global atom number indices, should be NULL when not using DD. - * bool bPrintSepPot + * gmx_bool bPrintSepPot * if TRUE print local potential and dVdlambda for each bonded type. * int step * used with bPrintSepPot diff --git a/include/calcmu.h b/include/calcmu.h index 2ef623c4a9..0ecdf00b0f 100644 --- a/include/calcmu.h +++ b/include/calcmu.h @@ -48,7 +48,7 @@ void calc_mu(int start,int homenr,rvec x[],real q[],real qB[], int nChargePerturbed, dvec mu,dvec mu_B); -bool read_mu(FILE *fp,rvec mu,real *vol); +gmx_bool read_mu(FILE *fp,rvec mu,real *vol); /* Return true on succes */ #ifdef __cplusplus diff --git a/include/centerofmass.h b/include/centerofmass.h index 86583cb3cd..b66ca76ba8 100644 --- a/include/centerofmass.h +++ b/include/centerofmass.h @@ -48,7 +48,7 @@ * - gmx_calc_com(): Calculates the center of mass (COM) of a given group * of atoms. * - gmx_calc_comg(): Calculates either the COM or COG, based on a - * boolean flag. + * gmx_boolean flag. * * A second set of routines is provided for calculating the centers for groups * that wrap over periodic boundaries (gmx_calc_cog_pbc(), gmx_calc_com_pbc(), @@ -86,11 +86,11 @@ gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout /** Calculate a single center of mass/geometry. */ int gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[], - bool bMass, rvec xout); + gmx_bool bMass, rvec xout); /** Calculate force on a single center of mass/geometry. */ int gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, atom_id index[], - bool bMass, rvec fout); + gmx_bool bMass, rvec fout); /** Calculate a single center of geometry iteratively, taking PBC into account. */ int @@ -103,7 +103,7 @@ gmx_calc_com_pbc(t_topology *top, rvec x[], t_pbc *pbc, /** Calculate a single center of mass/geometry iteratively with PBC. */ int gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc, - int nrefat, atom_id index[], bool bMass, rvec xout); + int nrefat, atom_id index[], gmx_bool bMass, rvec xout); /** Calculate centers of geometry for a blocked index. */ int @@ -120,19 +120,19 @@ gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block, /** Calculate centers of mass/geometry for a blocked index. */ int gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block, - atom_id index[], bool bMass, rvec xout[]); + atom_id index[], gmx_bool bMass, rvec xout[]); /** Calculate forces on centers of mass/geometry for a blocked index. */ int gmx_calc_comg_f_block(t_topology *top, rvec f[], t_block *block, - atom_id index[], bool bMass, rvec fout[]); + atom_id index[], gmx_bool bMass, rvec fout[]); /** Calculate centers of mass/geometry for a set of blocks; */ int gmx_calc_comg_blocka(t_topology *top, rvec x[], t_blocka *block, - bool bMass, rvec xout[]); + gmx_bool bMass, rvec xout[]); /** Calculate forces on centers of mass/geometry for a set of blocks; */ int gmx_calc_comg_f_blocka(t_topology *top, rvec x[], t_blocka *block, - bool bMass, rvec xout[]); + gmx_bool bMass, rvec xout[]); #ifdef __cplusplus } diff --git a/include/checkpoint.h b/include/checkpoint.h index b6a57b8d85..9dcac9461b 100644 --- a/include/checkpoint.h +++ b/include/checkpoint.h @@ -51,7 +51,7 @@ extern "C" { * Appends the _step.cpt with bNumberAndKeep, * otherwise moves the previous .cpt to _prev.cpt */ -void write_checkpoint(const char *fn,bool bNumberAndKeep, +void write_checkpoint(const char *fn,gmx_bool bNumberAndKeep, FILE *fplog,t_commrec *cr, int eIntegrator,int simulation_part, gmx_large_int_t step,double t, @@ -64,10 +64,10 @@ void write_checkpoint(const char *fn,bool bNumberAndKeep, * but not the state itself. */ void load_checkpoint(const char *fn,FILE **fplog, - t_commrec *cr,bool bPartDecomp,ivec dd_nc, - t_inputrec *ir,t_state *state,bool *bReadRNG, - bool *bReadEkin, - bool bTruncateOutputFiles); + t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc, + t_inputrec *ir,t_state *state,gmx_bool *bReadRNG, + gmx_bool *bReadEkin, + gmx_bool bTruncateOutputFiles); /* Read the state from checkpoint file. * Arrays in state that are NULL are allocated. @@ -93,11 +93,11 @@ void list_checkpoint(const char *fn,FILE *out); * When TRUE is returned, bAddPart will tell whether the simulation part * needs to be added to the output file name. */ -bool read_checkpoint_simulation_part(const char *filename,int *simulation_part, +gmx_bool read_checkpoint_simulation_part(const char *filename,int *simulation_part, gmx_large_int_t *step,t_commrec *cr, - bool bAppendReq, + gmx_bool bAppendReq, int nfile,const t_filenm fnm[], - const char *part_suffix,bool *bAddPart); + const char *part_suffix,gmx_bool *bAddPart); #ifdef __cplusplus } diff --git a/include/confio.h b/include/confio.h index 1f0c814877..2a2cb66608 100644 --- a/include/confio.h +++ b/include/confio.h @@ -46,7 +46,7 @@ extern "C" { #endif -void init_t_atoms(t_atoms *atoms, int natoms, bool bPdbinfo); +void init_t_atoms(t_atoms *atoms, int natoms, gmx_bool bPdbinfo); /* allocate memory for the arrays, set nr to natoms and nres to 0 * set pdbinfo to NULL or allocate memory for it */ @@ -63,7 +63,7 @@ void write_g96_conf(FILE *out,t_trxframe *fr,int nindex,atom_id *index); /* write a Gromos96 coordinate file or trajectory frame * * index can be NULL */ -bool gro_next_x_or_v(FILE *status,t_trxframe *fr); +gmx_bool gro_next_x_or_v(FILE *status,t_trxframe *fr); int gro_first_x_or_v(FILE *status,t_trxframe *fr); /* read first/next x and/or v frame from gro file */ diff --git a/include/constr.h b/include/constr.h index 9028d2330e..bc0419e428 100644 --- a/include/constr.h +++ b/include/constr.h @@ -61,7 +61,7 @@ void too_many_constraint_warnings(int eConstrAlg,int warncount); gmx_shakedata_t shake_init(); /* Initializes and return the SHAKE data structure */ -bool bshakef(FILE *log, /* Log file */ +gmx_bool bshakef(FILE *log, /* Log file */ gmx_shakedata_t shaked, /* SHAKE data */ int natoms, /* Total number of atoms */ real invmass[], /* Atomic masses */ @@ -78,9 +78,9 @@ bool bshakef(FILE *log, /* Log file */ real *dvdlambda, /* FEP force */ real invdt, /* 1/delta_t */ rvec *v, /* Also constrain v if v!=NULL */ - bool bCalcVir, /* Calculate r x m delta_r */ + gmx_bool bCalcVir, /* Calculate r x m delta_r */ tensor rmdr, /* sum r x m delta_r */ - bool bDumpOnError, /* Dump debugging stuff on error*/ + gmx_bool bDumpOnError, /* Dump debugging stuff on error*/ int econq, /* which type of constrainint is occurring */ t_vetavars *vetavar); /* veta for pressure control */ /* Shake all the atoms blockwise. It is assumed that all the constraints @@ -103,7 +103,7 @@ void csettle(gmx_settledata_t settled, real after[], /* New coords, to be settled */ real invdt, /* 1/delta_t */ real *v, /* Also constrain v if v!=NULL */ - bool bCalcVir, /* Calculate r x m delta_r */ + gmx_bool bCalcVir, /* Calculate r x m delta_r */ tensor rmdr, /* sum r x m delta_r */ int *xerror, t_vetavars *vetavar /* variables for pressure control */ @@ -113,7 +113,7 @@ void settle_proj(FILE *fp, gmx_settledata_t settled,int econq, int nsettle, t_iatom iatoms[],rvec x[], rvec *der,rvec *derp, - bool bCalcVir,tensor rmdder, t_vetavars *vetavar); + gmx_bool bCalcVir,tensor rmdder, t_vetavars *vetavar); /* Analytical algorithm to subtract the components of derivatives * of coordinates working on settle type constraint. */ @@ -127,7 +127,7 @@ void crattle(atom_id iatom[],int ncon,int *nnit,int maxnit, real dist2[],real vp[],real rij[],real m2[],real omega, real invmass[],real tt[],real lagr[],int *nerror,real invdt,t_vetavars *vetavar); -bool constrain(FILE *log,bool bLog,bool bEner, +gmx_bool constrain(FILE *log,gmx_bool bLog,gmx_bool bEner, gmx_constr_t constr, t_idef *idef, t_inputrec *ir, @@ -138,7 +138,7 @@ bool constrain(FILE *log,bool bLog,bool bEner, rvec *x,rvec *xprime,rvec *min_proj,matrix box, real lambda,real *dvdlambda, rvec *v,tensor *vir, - t_nrnb *nrnb,int econq, bool bPscal, real veta, real vetanew); + t_nrnb *nrnb,int econq, gmx_bool bPscal, real veta, real vetanew); /* * When econq=econqCoord constrains coordinates xprime using th * directions in x, min_proj is not used. @@ -189,7 +189,7 @@ void set_constraints(gmx_constr_t constr, t_blocka make_at2con(int start,int natoms, t_ilist *ilist,t_iparams *iparams, - bool bDynamics,int *nflexiblecons); + gmx_bool bDynamics,int *nflexiblecons); /* Returns a block struct to go from atoms to constraints */ t_blocka *atom2constraints_moltype(gmx_constr_t constr); @@ -201,7 +201,7 @@ t_blocka *atom2constraints_moltype(gmx_constr_t constr); * are concatenated. */ -bool inter_charge_group_constraints(gmx_mtop_t *mtop); +gmx_bool inter_charge_group_constraints(gmx_mtop_t *mtop); /* Returns if there are inter charge group constraints */ real *constr_rmsd_data(gmx_constr_t constr); @@ -209,22 +209,22 @@ real *constr_rmsd_data(gmx_constr_t constr); * Returns NULL when LINCS is not used. */ -real constr_rmsd(gmx_constr_t constr,bool bSD2); +real constr_rmsd(gmx_constr_t constr,gmx_bool bSD2); /* Return the RMSD of the constraint, bSD2 selects the second SD step */ real *lincs_rmsd_data(gmx_lincsdata_t lincsd); /* Return the data for determining constraint RMS relative deviations */ -real lincs_rmsd(gmx_lincsdata_t lincsd,bool bSD2); +real lincs_rmsd(gmx_lincsdata_t lincsd,gmx_bool bSD2); /* Return the RMSD of the constraint, bSD2 selects the second SD step */ gmx_lincsdata_t init_lincs(FILE *fplog,gmx_mtop_t *mtop, int nflexcon_global,t_blocka *at2con, - bool bPLINCS,int nIter,int nProjOrder); + gmx_bool bPLINCS,int nIter,int nProjOrder); /* Initializes and returns the lincs data struct */ void set_lincs(t_idef *idef,t_mdatoms *md, - bool bDynamics,t_commrec *cr, + gmx_bool bDynamics,t_commrec *cr, gmx_lincsdata_t li); /* Initialize lincs stuff */ @@ -236,7 +236,7 @@ real constr_r_max(FILE *fplog,gmx_mtop_t *mtop,t_inputrec *ir); * required for LINCS. */ -bool constrain_lincs(FILE *log,bool bLog,bool bEner, +gmx_bool constrain_lincs(FILE *log,gmx_bool bLog,gmx_bool bEner, t_inputrec *ir, gmx_large_int_t step, gmx_lincsdata_t lincsd,t_mdatoms *md, @@ -244,7 +244,7 @@ bool constrain_lincs(FILE *log,bool bLog,bool bEner, rvec *x,rvec *xprime,rvec *min_proj,matrix box, real lambda,real *dvdlambda, real invdt,rvec *v, - bool bCalcVir,tensor rmdr, + gmx_bool bCalcVir,tensor rmdr, int econ, t_nrnb *nrnb, int maxwarn,int *warncount); diff --git a/include/copyrite.h b/include/copyrite.h index 56d7284749..1fa60b888c 100644 --- a/include/copyrite.h +++ b/include/copyrite.h @@ -89,7 +89,7 @@ bromacs(char *retstring, int retsize); void cool_quote(char *retstring, int retsize, int *cqnum); -bool +gmx_bool be_cool(void); /* Return TRUE when the user is COOL, FALSE otherwise */ diff --git a/include/coulomb.h b/include/coulomb.h index 85bd8b0282..62c4023ac6 100644 --- a/include/coulomb.h +++ b/include/coulomb.h @@ -56,7 +56,7 @@ calc_ewaldcoeff(real rc,real dtol); real -do_ewald(FILE *log, bool bVerbose, +do_ewald(FILE *log, gmx_bool bVerbose, t_inputrec *ir, rvec x[], rvec f[], real chargeA[], real chargeB[], @@ -92,7 +92,7 @@ real shift_LRcorrection(FILE *fp,int start,int natoms, t_commrec *cr,t_forcerec *fr, real charge[],t_blocka *excl,rvec x[], - bool bOld,matrix box,matrix lrvir); + gmx_bool bOld,matrix box,matrix lrvir); /* Calculate the self energy and forces * when using long range electrostatics methods. * Part of this is a constant, it is computed only once and stored in diff --git a/include/displacement.h b/include/displacement.h index 2b3504f296..3fd9de04a1 100644 --- a/include/displacement.h +++ b/include/displacement.h @@ -64,7 +64,7 @@ int gmx_ana_displ_time_to_steps(gmx_ana_displ_t *d, real time, int *nsteps); /** Stores the position of a particle for displacement calculation. */ int -gmx_ana_displ_store(gmx_ana_displ_t *d, atom_id id, rvec x, bool bPres); +gmx_ana_displ_store(gmx_ana_displ_t *d, atom_id id, rvec x, gmx_bool bPres); /** Convenience function for storing an array of particle positions for displacement calculation. */ int gmx_ana_displ_store_array(gmx_ana_displ_t *d, int n, atom_id id[], rvec x[]); @@ -77,16 +77,16 @@ gmx_ana_displ_store_pos(gmx_ana_displ_t *d, struct gmx_ana_pos_t *p); /** Calculates the displacement vector for a particle. */ int gmx_ana_displ_vector(gmx_ana_displ_t *d, int step, t_pbc *pbc, - atom_id id, rvec x, rvec xout, bool *pout); + atom_id id, rvec x, rvec xout, gmx_bool *pout); /** Calculates the displacement vectors for a list of particles. */ int gmx_ana_displ_vectors(gmx_ana_displ_t *d, int step, t_pbc *pbc, int n, atom_id id[], rvec x[], - rvec xout[], bool *pout); + rvec xout[], gmx_bool *pout); /** Calculates the displacement vectors for all particles, including unselected. */ int gmx_ana_displ_vectors_all(gmx_ana_displ_t *d, int step, t_pbc *pbc, - rvec x[], rvec xout[], bool *pout); + rvec x[], rvec xout[], gmx_bool *pout); /** Frees the memory allocated for displacement calculation. */ void gmx_ana_displ_free(gmx_ana_displ_t *d); diff --git a/include/disre.h b/include/disre.h index 003ab7f0a3..9648f68e65 100644 --- a/include/disre.h +++ b/include/disre.h @@ -45,7 +45,7 @@ extern "C" { #endif void init_disres(FILE *fplog,const gmx_mtop_t *mtop, - t_inputrec *ir,const t_commrec *cr,bool bPartDecomp, + t_inputrec *ir,const t_commrec *cr,gmx_bool bPartDecomp, t_fcdata *fcd,t_state *state); /* Initiate *fcd data, must be called once, nbonds is the number * of iatoms in the ilist of the idef struct. diff --git a/include/do_fit.h b/include/do_fit.h index f68b6f9793..9ab20d1d43 100644 --- a/include/do_fit.h +++ b/include/do_fit.h @@ -42,7 +42,7 @@ extern "C" { #endif -real calc_similar_ind(bool bRho,int nind,atom_id *index,real mass[], +real calc_similar_ind(gmx_bool bRho,int nind,atom_id *index,real mass[], rvec x[],rvec xp[]); /* Returns RMSD or Rho (depending on bRho) over all atoms in index */ diff --git a/include/domdec.h b/include/domdec.h index 4513d52dfb..64b4d20a24 100644 --- a/include/domdec.h +++ b/include/domdec.h @@ -44,7 +44,7 @@ int ddglatnr(gmx_domdec_t *dd,int i); t_block *dd_charge_groups_global(gmx_domdec_t *dd); /* Return a block struct for the charge groups of the whole system */ -bool dd_filled_nsgrid_home(gmx_domdec_t *dd); +gmx_bool dd_filled_nsgrid_home(gmx_domdec_t *dd); /* Is the ns grid already filled with the home particles? */ void dd_store_state(gmx_domdec_t *dd,t_state *state); @@ -66,7 +66,7 @@ real dd_cutoff_mbody(gmx_domdec_t *dd); real dd_cutoff_twobody(gmx_domdec_t *dd); -bool gmx_pmeonlynode(t_commrec *cr,int nodeid); +gmx_bool gmx_pmeonlynode(t_commrec *cr,int nodeid); /* Return if nodeid in cr->mpi_comm_mysim is a PME-only node */ void get_pme_ddnodes(t_commrec *cr,int pmenodeid, @@ -97,7 +97,7 @@ init_domain_decomposition(FILE *fplog, void dd_init_bondeds(FILE *fplog, gmx_domdec_t *dd,gmx_mtop_t *mtop, gmx_vsite_t *vsite,gmx_constr_t constr, - t_inputrec *ir,bool bBCheck,cginfo_mb_t *cginfo_mb); + t_inputrec *ir,gmx_bool bBCheck,cginfo_mb_t *cginfo_mb); /* Initialize data structures for bonded interactions */ void set_dd_parameters(FILE *fplog,gmx_domdec_t *dd,real dlb_scale, @@ -144,7 +144,7 @@ void dd_atom_sum_real(gmx_domdec_t *dd,real v[]); void dd_partition_system(FILE *fplog, gmx_large_int_t step, t_commrec *cr, - bool bMasterState, + gmx_bool bMasterState, int nstglobalcomm, t_state *state_global, gmx_mtop_t *top_global, @@ -159,7 +159,7 @@ void dd_partition_system(FILE *fplog, gmx_constr_t constr, t_nrnb *nrnb, gmx_wallcycle_t wcycle, - bool bVerbose); + gmx_bool bVerbose); /* Partition the system over the nodes. * step is only used for printing error messages. * If bMasterState==TRUE then state_global from the master node is used, @@ -212,7 +212,7 @@ void dd_print_missing_interactions(FILE *fplog,t_commrec *cr, void dd_make_reverse_top(FILE *fplog, gmx_domdec_t *dd,gmx_mtop_t *mtop, gmx_vsite_t *vsite,gmx_constr_t constr, - t_inputrec *ir,bool bBCheck); + t_inputrec *ir,gmx_bool bBCheck); void dd_make_local_cgs(gmx_domdec_t *dd,t_block *lcgs); @@ -238,7 +238,7 @@ t_blocka *make_charge_group_links(gmx_mtop_t *mtop,gmx_domdec_t *dd, void dd_bonded_cg_distance(FILE *fplog, gmx_domdec_t *dd,gmx_mtop_t *mtop, t_inputrec *ir,rvec *x,matrix box, - bool bBCheck, + gmx_bool bBCheck, real *r_2b,real *r_mb); void write_dd_pdb(const char *fn,gmx_large_int_t step,const char *title, @@ -258,9 +258,9 @@ real comm_box_frac(ivec dd_nc,real cutoff,gmx_ddbox_t *ddbox); real dd_choose_grid(FILE *fplog, t_commrec *cr,gmx_domdec_t *dd,t_inputrec *ir, gmx_mtop_t *mtop,matrix box,gmx_ddbox_t *ddbox, - bool bDynLoadBal,real dlb_scale, + gmx_bool bDynLoadBal,real dlb_scale, real cellsize_limit,real cutoff_dd, - bool bInterCGBondeds,bool bInterCGMultiBody); + gmx_bool bInterCGBondeds,gmx_bool bInterCGMultiBody); /* Determines the optimal DD cell setup dd->nc and possibly npmenodes * for the system. * On the master node returns the actual cellsize limit used. @@ -269,9 +269,9 @@ real dd_choose_grid(FILE *fplog, /* In domdec_box.c */ -void set_ddbox(gmx_domdec_t *dd,bool bMasterState,t_commrec *cr_sum, +void set_ddbox(gmx_domdec_t *dd,gmx_bool bMasterState,t_commrec *cr_sum, t_inputrec *ir,matrix box, - bool bCalcUnboundedSize,t_block *cgs,rvec *x, + gmx_bool bCalcUnboundedSize,t_block *cgs,rvec *x, gmx_ddbox_t *ddbox); void set_ddbox_cr(t_commrec *cr,ivec *dd_nc, diff --git a/include/ebin.h b/include/ebin.h index 8c4c0276f4..6298789429 100644 --- a/include/ebin.h +++ b/include/ebin.h @@ -71,14 +71,14 @@ int get_ebin_space(t_ebin *eb,int nener,const char *enm[],const char *unit); * calls to add_ebin. */ -void add_ebin(t_ebin *eb,int index,int nener,real ener[],bool bSum); +void add_ebin(t_ebin *eb,int index,int nener,real ener[],gmx_bool bSum); /* Add nener reals (eg. energies, box-lengths, pressures) to the * energy bin at position index. * If bSum is TRUE then the reals are also added to the sum * and sum of squares. */ -void ebin_increase_count(t_ebin *eb,bool bSum); +void ebin_increase_count(t_ebin *eb,gmx_bool bSum); /* Increase the counters for the sums. * This routine should be called AFTER all add_ebin calls for this step. */ @@ -87,7 +87,7 @@ void reset_ebin_sums(t_ebin *eb); /* Reset the average and fluctuation sums */ void pr_ebin(FILE *fp,t_ebin *eb,int index,int nener,int nperline, - int prmode,bool bPrHead); + int prmode,gmx_bool bPrHead); /* Print the contents of the energy bin. If nener = -1 ALL energies from * index to the end will be printed. We will print nperline entries on a text * line (advisory <= 5). prmode may be any of the above listed enum values. diff --git a/include/enxio.h b/include/enxio.h index 910941e98b..9f7447b019 100644 --- a/include/enxio.h +++ b/include/enxio.h @@ -180,7 +180,7 @@ extern "C" { void free_enxnms(int n,gmx_enxnm_t *nms); /* Frees nms and all strings in it */ - bool do_enx(ener_file_t ef,t_enxframe *fr); + gmx_bool do_enx(ener_file_t ef,t_enxframe *fr); /* Reads enx_frames, memory in fr is (re)allocated if necessary */ void get_enx_state(const char *fn, real t, diff --git a/include/filenm.h b/include/filenm.h index 3d59c608f8..3586ad8bcf 100644 --- a/include/filenm.h +++ b/include/filenm.h @@ -74,7 +74,7 @@ void pr_fopts(FILE *fp,int nf,const t_filenm tfn[], int shell); /* prints file options in tcsh 'complete' format */ void parse_file_args(int *argc,char *argv[],int nf,t_filenm fnm[], - bool bKeep, bool bReadNode); + gmx_bool bKeep, gmx_bool bReadNode); /* Parse command line for file names. When bKeep is set args are * not removed from argv. */ @@ -115,10 +115,10 @@ char *ftp2filter(int ftp); #define ftp2FILE(ftp,nfile,fnm,mode) ffopen(ftp2fn(ftp,nfile,fnm),mode) /* Return a file pointer from the filename (see above) */ -bool ftp2bSet(int ftp,int nfile,const t_filenm fnm[]); +gmx_bool ftp2bSet(int ftp,int nfile,const t_filenm fnm[]); /* Return TRUE when this file type has been found on the cmd-line */ -bool opt2bSet(const char *opt,int nfile,const t_filenm fnm[]); +gmx_bool opt2bSet(const char *opt,int nfile,const t_filenm fnm[]); /* Return TRUE when this option has been found on the cmd-line */ const char *opt2fn_null(const char *opt,int nfile,const t_filenm fnm[]); @@ -132,13 +132,13 @@ const char *ftp2fn_null(int ftp,int nfile,const t_filenm fnm[]); * Also return NULL when ftp is optional and option is not set. */ -bool is_optional(const t_filenm *fnm); +gmx_bool is_optional(const t_filenm *fnm); /* Return whether or not this filenm is optional */ -bool is_output(const t_filenm *fnm); +gmx_bool is_output(const t_filenm *fnm); /* Return whether or not this filenm is output */ -bool is_set(const t_filenm *fnm); +gmx_bool is_set(const t_filenm *fnm); /* Return whether or not this filenm is set */ /* When we do checkpointing, this routine is called to check for previous diff --git a/include/force.h b/include/force.h index e49b5c464a..af4e0c86ec 100644 --- a/include/force.h +++ b/include/force.h @@ -51,7 +51,7 @@ extern "C" { static const char *sepdvdlformat=" %-30s V %12.5e dVdl %12.5e\n"; void calc_vir(FILE *fplog,int nxf,rvec x[],rvec f[],tensor vir, - bool bScrewPBC,matrix box); + gmx_bool bScrewPBC,matrix box); /* Calculate virial for nxf atoms, and add it to vir */ void f_calc_vir(FILE *fplog,int i0,int i1,rvec x[],rvec f[],tensor vir, @@ -97,7 +97,7 @@ t_forcerec *mk_forcerec(void); #define GMX_MAKETABLES_14ONLY (1<<1) t_forcetable make_tables(FILE *fp,const output_env_t oenv, - const t_forcerec *fr, bool bVerbose, + const t_forcerec *fr, gmx_bool bVerbose, const char *fn, real rtab,int flags); /* Return tables for inner loops. When bVerbose the tables are printed * to .xvg files @@ -123,8 +123,8 @@ forcerec_set_ranges(t_forcerec *fr, int natoms_force_constr,int natoms_f_novirsum); /* Set the number of cg's and atoms for the force calculation */ -bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop, - bool bPrintNote,t_commrec *cr,FILE *fp); +gmx_bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop, + gmx_bool bPrintNote,t_commrec *cr,FILE *fp); /* Returns if we can use all-vs-all loops. * If bPrintNote==TRUE, prints a note, if necessary, to stderr * and fp (if !=NULL) on the master node. @@ -138,14 +138,14 @@ void init_forcerec(FILE *fplog, const gmx_mtop_t *mtop, const t_commrec *cr, matrix box, - bool bMolEpot, + gmx_bool bMolEpot, const char *tabfn, const char *tabpfn, const char *tabbfn, - bool bNoSolvOpt, + gmx_bool bNoSolvOpt, real print_force); /* The Force rec struct must be created with mk_forcerec - * The booleans have the following meaning: + * The gmx_booleans have the following meaning: * bSetQ: Copy the charges [ only necessary when they change ] * bMolEpot: Use the free energy stuff per molecule * print_force >= 0: print forces for atoms with force >= print_force @@ -158,9 +158,9 @@ void destroy_enerdata(gmx_enerdata_t *enerd); /* Free all memory associated with enerd */ void reset_enerdata(t_grpopts *opts, - t_forcerec *fr,bool bNS, + t_forcerec *fr,gmx_bool bNS, gmx_enerdata_t *enerd, - bool bMaster); + gmx_bool bMaster); /* Resets the energy data, if bNS=TRUE also zeros the long-range part */ void sum_epot(t_grpopts *opts,gmx_enerdata_t *enerd); @@ -213,7 +213,7 @@ void do_force(FILE *log,t_commrec *cr, real lambda,t_graph *graph, t_forcerec *fr,gmx_vsite_t *vsite,rvec mu_tot, double t,FILE *field,gmx_edsam_t ed, - bool bBornRadii, + gmx_bool bBornRadii, int flags); /* Communicate coordinates (if parallel). * Do neighbor searching (if necessary). @@ -237,9 +237,9 @@ void ns(FILE *fplog, real lambda, real *dvdlambda, gmx_grppairener_t *grppener, - bool bFillGrid, - bool bDoLongRange, - bool bDoForces, + gmx_bool bFillGrid, + gmx_bool bDoLongRange, + gmx_bool bDoForces, rvec *f); /* Call the neighborsearcher */ @@ -262,7 +262,7 @@ void do_force_lowlevel(FILE *fplog, gmx_localtop_t *top, gmx_genborn_t *born, t_atomtypes *atype, - bool bBornRadii, + gmx_bool bBornRadii, matrix box, real lambda, t_graph *graph, diff --git a/include/futil.h b/include/futil.h index ecbea5f133..90f911cdf0 100644 --- a/include/futil.h +++ b/include/futil.h @@ -87,22 +87,22 @@ extern "C" { void no_buffers(void); /* Turn off buffering of files (which is default) for debugging purposes */ -bool gmx_fexist(const char *fname); +gmx_bool gmx_fexist(const char *fname); /* Return TRUE when fname exists, FALSE otherwise */ -bool gmx_fexist_master(const char *fname, t_commrec *cr); +gmx_bool gmx_fexist_master(const char *fname, t_commrec *cr); /* Return TRUE when fname exists, FALSE otherwise, bcast from master to others */ -bool gmx_eof(FILE *fp); +gmx_bool gmx_eof(FILE *fp); /* Return TRUE on end-of-file, FALSE otherwise */ -bool is_pipe(FILE *fp); +gmx_bool is_pipe(FILE *fp); /* Check whether the file (opened by ffopen) is a pipe */ /* Make a backup of file if necessary. Return false if there was a problem. */ -bool make_backup(const char * file); +gmx_bool make_backup(const char * file); FILE *ffopen(const char *file, const char *mode); /* Return a valid file pointer when successful, exits otherwise @@ -127,7 +127,7 @@ gmx_off_t gmx_ftell(FILE *stream); /* OS-independent fseek. 64-bit when available. */ -bool is_pipe(FILE *fp); +gmx_bool is_pipe(FILE *fp); char *gmxlibfn(const char *file); /* allocates and returns a string with the full file name for a library file */ @@ -164,11 +164,11 @@ gmx_directory_close(gmx_directory_t gmxdir); -bool get_libdir(char *libdir); +gmx_bool get_libdir(char *libdir); -char *low_gmxlibfn(const char *file,bool bAddCWD,bool bFatal); +char *low_gmxlibfn(const char *file,gmx_bool bAddCWD,gmx_bool bFatal); -FILE *low_libopen(const char *file,bool bFatal); +FILE *low_libopen(const char *file,gmx_bool bFatal); /* The same as the above, but does not terminate if (!bFatal) */ /* Create unique name for temp file (wrapper around mkstemp). @@ -185,7 +185,7 @@ int gmx_file_rename(const char *oldname, const char *newname); /* copy the file (data only) oldname to newname. if copy_if_empty==FALSE, the file won't be copied if it's empty.*/ -int gmx_file_copy(const char *oldname, const char *newname, bool copy_if_empty); +int gmx_file_copy(const char *oldname, const char *newname, gmx_bool copy_if_empty); /* do an fsync() on an open file pointer. Only use this during checkpointing! */ diff --git a/include/gbutil.h b/include/gbutil.h index 7593c29489..11e530390a 100644 --- a/include/gbutil.h +++ b/include/gbutil.h @@ -50,7 +50,7 @@ void orient(int natom,rvec *x,rvec *v, rvec angle,matrix box); void genconf(t_atoms *atoms,rvec *x,rvec *v,real *r,matrix box,ivec n_box); /*genconf() generates a new configuration by adding boxes*/ void gen_box(int NTB,int natoms,rvec *x, matrix box,rvec box_space, - bool bCenter); + gmx_bool bCenter); /* gen_box() generates a box around a configuration, box_space is optional * extra space around it. If NTB = 1 then a truncated octahedon will be * generated (don't!) if bCenter then coordinates will be centered in the diff --git a/include/gen_ad.h b/include/gen_ad.h index cff2f45e4e..baf479241c 100644 --- a/include/gen_ad.h +++ b/include/gen_ad.h @@ -48,9 +48,9 @@ extern "C" { void generate_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]); void clean_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]); -void gen_pad(t_nextnb *nnb, t_atoms *atoms, int nrexcl, bool bH14, +void gen_pad(t_nextnb *nnb, t_atoms *atoms, int nrexcl, gmx_bool bH14, t_params plist[], t_excls excls[], t_hackblock hb[], - bool bAlldih, bool bRemoveDih, bool bAllowMissing); + gmx_bool bAlldih, gmx_bool bRemoveDih, gmx_bool bAllowMissing); #ifdef __cplusplus } diff --git a/include/genborn.h b/include/genborn.h index 28e709301f..bea7163118 100644 --- a/include/genborn.h +++ b/include/genborn.h @@ -88,7 +88,7 @@ convert_gb_params(gmx_ffparams_t *ffparams, t_functype ftype, t_params *gb_plist /* Functions for calculating adjustments due to ie chain rule terms */ void calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top, const t_atomtypes *atype, - rvec x[], rvec f[], t_forcerec *fr,t_idef *idef,int gb_algorithm, t_nrnb *nrnb, bool bRad, + rvec x[], rvec f[], t_forcerec *fr,t_idef *idef,int gb_algorithm, t_nrnb *nrnb, gmx_bool bRad, const t_pbc *pbc, const t_graph *graph, gmx_enerdata_t *enerd); diff --git a/include/gmx_fatal.h b/include/gmx_fatal.h index 83eab81fa6..8108af7912 100644 --- a/include/gmx_fatal.h +++ b/include/gmx_fatal.h @@ -113,11 +113,11 @@ void _unexpected_eof(const char *fn,int line,const char *srcfn,int srcline); * if (debug) fprintf(debug,"%s","Hallo"); */ extern FILE *debug; -extern bool gmx_debug_at; +extern gmx_bool gmx_debug_at; void init_debug (const int dbglevel,const char *dbgfile); -bool bDebugMode(void); +gmx_bool bDebugMode(void); /* Return TRUE when the program was started in debug mode */ #if (defined __sgi && defined USE_SGI_FPE) diff --git a/include/gmx_ga2la.h b/include/gmx_ga2la.h index 9e95642fa2..9e385eed1e 100644 --- a/include/gmx_ga2la.h +++ b/include/gmx_ga2la.h @@ -56,7 +56,7 @@ typedef struct { } gmx_lal_t; typedef struct gmx_ga2la { - bool bAll; + gmx_bool bAll; int mod; int nalloc; gmx_laa_t *laa; @@ -256,7 +256,7 @@ static void ga2la_change_la(gmx_ga2la_t ga2la,int a_gl,int a_loc) * in which case it indicates that it is more than one cell away * in zone cell - #zones. */ -static bool ga2la_get(const gmx_ga2la_t ga2la,int a_gl,int *a_loc,int *cell) +static gmx_bool ga2la_get(const gmx_ga2la_t ga2la,int a_gl,int *a_loc,int *cell) { int ind; @@ -288,7 +288,7 @@ static bool ga2la_get(const gmx_ga2la_t ga2la,int a_gl,int *a_loc,int *cell) /* Returns if the global atom a_gl is a home atom. * Sets the local atom. */ -static bool ga2la_get_home(const gmx_ga2la_t ga2la,int a_gl,int *a_loc) +static gmx_bool ga2la_get_home(const gmx_ga2la_t ga2la,int a_gl,int *a_loc) { int ind; @@ -324,7 +324,7 @@ static bool ga2la_get_home(const gmx_ga2la_t ga2la,int a_gl,int *a_loc) /* Returns if the global atom a_gl is a home atom. */ -static bool ga2la_is_home(const gmx_ga2la_t ga2la,int a_gl) +static gmx_bool ga2la_is_home(const gmx_ga2la_t ga2la,int a_gl) { int ind; diff --git a/include/gmx_parallel_3dfft.h b/include/gmx_parallel_3dfft.h index 05d8fcbd6c..85aabb5771 100644 --- a/include/gmx_parallel_3dfft.h +++ b/include/gmx_parallel_3dfft.h @@ -63,7 +63,7 @@ gmx_parallel_3dfft_init (gmx_parallel_3dfft_t * pfft_setup, MPI_Comm comm[2], int * slab2index_major, int * slab2index_minor, - bool bReproducible); + gmx_bool bReproducible); diff --git a/include/gmx_wallcycle.h b/include/gmx_wallcycle.h index 35a1c20e53..9d5c5cf23b 100644 --- a/include/gmx_wallcycle.h +++ b/include/gmx_wallcycle.h @@ -45,7 +45,7 @@ extern "C" { enum { ewcRUN, ewcSTEP, ewcPPDURINGPME, ewcDOMDEC, ewcDDCOMMLOAD, ewcDDCOMMBOUND, ewcVSITECONSTR, ewcPP_PMESENDX, ewcMOVEX, ewcNS, ewcGB, ewcFORCE, ewcMOVEF, ewcPMEMESH, ewcPME_REDISTXF, ewcPME_SPREADGATHER, ewcPME_FFT, ewcPME_SOLVE, ewcPMEWAITCOMM, ewcPP_PMEWAITRECVF, ewcVSITESPREAD, ewcTRAJ, ewcUPDATE, ewcCONSTR, ewcMoveE, ewcTEST, ewcNR }; -bool wallcycle_have_counter(void); +gmx_bool wallcycle_have_counter(void); /* Returns if cycle counting is supported */ gmx_wallcycle_t wallcycle_init(FILE *fplog,int resetstep,t_commrec *cr); diff --git a/include/gmxfio.h b/include/gmxfio.h index f440aef58a..da5acaa199 100644 --- a/include/gmxfio.h +++ b/include/gmxfio.h @@ -110,7 +110,7 @@ int gmx_fio_fclose(FILE *fp); * Change properties of the open file ********************************************************/ -void gmx_fio_setprecision(t_fileio *fio,bool bDouble); +void gmx_fio_setprecision(t_fileio *fio,gmx_bool bDouble); /* Select the floating point precision for reading and writing files */ char *gmx_fio_getname(t_fileio *fio); @@ -122,13 +122,13 @@ int gmx_fio_getftp(t_fileio *fio); was opened as a specific file type and changing that midway is most likely an evil hack. */ -void gmx_fio_setdebug(t_fileio *fio,bool bDebug); +void gmx_fio_setdebug(t_fileio *fio,gmx_bool bDebug); /* Set the debug mode */ -bool gmx_fio_getdebug(t_fileio *fio); +gmx_bool gmx_fio_getdebug(t_fileio *fio); /* Return whether debug mode is on in fio */ -bool gmx_fio_getread(t_fileio *fio); +gmx_bool gmx_fio_getread(t_fileio *fio); /* Return whether read mode is on in fio */ @@ -236,143 +236,143 @@ void gmx_fio_unset_comment(t_fileio *fio); /* basic reading & writing */ -bool gmx_fio_reade_real(t_fileio *fio, real *item, +gmx_bool gmx_fio_reade_real(t_fileio *fio, real *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_float(t_fileio *fio, float *item, +gmx_bool gmx_fio_reade_float(t_fileio *fio, float *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_double(t_fileio *fio, double *item, +gmx_bool gmx_fio_reade_double(t_fileio *fio, double *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_int(t_fileio *fio, int *item, +gmx_bool gmx_fio_reade_int(t_fileio *fio, int *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, +gmx_bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_uchar(t_fileio *fio, unsigned char *item, +gmx_bool gmx_fio_reade_uchar(t_fileio *fio, unsigned char *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_ushort(t_fileio *fio, unsigned short *item, +gmx_bool gmx_fio_reade_ushort(t_fileio *fio, unsigned short *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_rvec(t_fileio *fio, rvec *item, +gmx_bool gmx_fio_reade_rvec(t_fileio *fio, rvec *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_ivec(t_fileio *fio, ivec *item, +gmx_bool gmx_fio_reade_ivec(t_fileio *fio, ivec *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_reade_string(t_fileio *fio, char *item, +gmx_bool gmx_fio_reade_string(t_fileio *fio, char *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_real(t_fileio *fio, real item, +gmx_bool gmx_fio_writee_real(t_fileio *fio, real item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_float(t_fileio *fio, float item, +gmx_bool gmx_fio_writee_float(t_fileio *fio, float item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_double(t_fileio *fio, double item, +gmx_bool gmx_fio_writee_double(t_fileio *fio, double item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_int(t_fileio *fio, int item, +gmx_bool gmx_fio_writee_int(t_fileio *fio, int item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_large_int_t item, +gmx_bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_large_int_t item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_uchar(t_fileio *fio, unsigned char item, +gmx_bool gmx_fio_writee_uchar(t_fileio *fio, unsigned char item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_ushort(t_fileio *fio, unsigned short item, +gmx_bool gmx_fio_writee_ushort(t_fileio *fio, unsigned short item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_rvec(t_fileio *fio, rvec *item, +gmx_bool gmx_fio_writee_rvec(t_fileio *fio, rvec *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_ivec(t_fileio *fio, ivec *item, +gmx_bool gmx_fio_writee_ivec(t_fileio *fio, ivec *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_writee_string(t_fileio *fio, const char *item, +gmx_bool gmx_fio_writee_string(t_fileio *fio, const char *item, const char *desc, const char *srcfile, int line); /* reading or writing, depending on the file's opening mode string */ -bool gmx_fio_doe_real(t_fileio *fio, real *item, +gmx_bool gmx_fio_doe_real(t_fileio *fio, real *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_float(t_fileio *fio, float *item, +gmx_bool gmx_fio_doe_float(t_fileio *fio, float *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_double(t_fileio *fio, double *item, +gmx_bool gmx_fio_doe_double(t_fileio *fio, double *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_bool(t_fileio *fio, bool *item, +gmx_bool gmx_fio_doe_gmx_bool(t_fileio *fio, gmx_bool *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_int(t_fileio *fio, int *item, +gmx_bool gmx_fio_doe_int(t_fileio *fio, int *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, +gmx_bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_uchar(t_fileio *fio, unsigned char *item, +gmx_bool gmx_fio_doe_uchar(t_fileio *fio, unsigned char *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_ushort(t_fileio *fio, unsigned short *item, +gmx_bool gmx_fio_doe_ushort(t_fileio *fio, unsigned short *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_rvec(t_fileio *fio, rvec *item, +gmx_bool gmx_fio_doe_rvec(t_fileio *fio, rvec *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_ivec(t_fileio *fio, ivec *item, +gmx_bool gmx_fio_doe_ivec(t_fileio *fio, ivec *item, const char *desc, const char *srcfile, int line); -bool gmx_fio_doe_string(t_fileio *fio, char *item, +gmx_bool gmx_fio_doe_string(t_fileio *fio, char *item, const char *desc, const char *srcfile, int line); /* array reading & writing */ -bool gmx_fio_nreade_real(t_fileio *fio, real *item, int n, +gmx_bool gmx_fio_nreade_real(t_fileio *fio, real *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_float(t_fileio *fio, float *item, int n, +gmx_bool gmx_fio_nreade_float(t_fileio *fio, float *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_double(t_fileio *fio, double *item, int n, +gmx_bool gmx_fio_nreade_double(t_fileio *fio, double *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_int(t_fileio *fio, int *item, int n, +gmx_bool gmx_fio_nreade_int(t_fileio *fio, int *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n, +gmx_bool gmx_fio_nreade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_uchar(t_fileio *fio, unsigned char *item, int n, +gmx_bool gmx_fio_nreade_uchar(t_fileio *fio, unsigned char *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_ushort(t_fileio *fio, unsigned short *item, int n, +gmx_bool gmx_fio_nreade_ushort(t_fileio *fio, unsigned short *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_rvec(t_fileio *fio, rvec *item, int n, +gmx_bool gmx_fio_nreade_rvec(t_fileio *fio, rvec *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_ivec(t_fileio *fio, ivec *item, int n, +gmx_bool gmx_fio_nreade_ivec(t_fileio *fio, ivec *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nreade_string(t_fileio *fio, char *item[], int n, +gmx_bool gmx_fio_nreade_string(t_fileio *fio, char *item[], int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_real(t_fileio *fio, const real *item, int n, +gmx_bool gmx_fio_nwritee_real(t_fileio *fio, const real *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_float(t_fileio *fio, const float *item, int n, +gmx_bool gmx_fio_nwritee_float(t_fileio *fio, const float *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_double(t_fileio *fio, const double *item, int n, +gmx_bool gmx_fio_nwritee_double(t_fileio *fio, const double *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_int(t_fileio *fio, const int *item, int n, +gmx_bool gmx_fio_nwritee_int(t_fileio *fio, const int *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_gmx_large_int(t_fileio *fio, +gmx_bool gmx_fio_nwritee_gmx_large_int(t_fileio *fio, const gmx_large_int_t *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_uchar(t_fileio *fio, const unsigned char *item, int n, +gmx_bool gmx_fio_nwritee_uchar(t_fileio *fio, const unsigned char *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_ushort(t_fileio *fio, const unsigned short *item, int n, +gmx_bool gmx_fio_nwritee_ushort(t_fileio *fio, const unsigned short *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_rvec(t_fileio *fio, const rvec *item, int n, +gmx_bool gmx_fio_nwritee_rvec(t_fileio *fio, const rvec *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_ivec(t_fileio *fio, const ivec *item, int n, +gmx_bool gmx_fio_nwritee_ivec(t_fileio *fio, const ivec *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_nwritee_string(t_fileio *fio, const char *item[], int n, +gmx_bool gmx_fio_nwritee_string(t_fileio *fio, const char *item[], int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_real(t_fileio *fio, real *item, int n, +gmx_bool gmx_fio_ndoe_real(t_fileio *fio, real *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_float(t_fileio *fio, float *item, int n, +gmx_bool gmx_fio_ndoe_float(t_fileio *fio, float *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_double(t_fileio *fio, double *item, int n, +gmx_bool gmx_fio_ndoe_double(t_fileio *fio, double *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_bool(t_fileio *fio, bool *item, int n, +gmx_bool gmx_fio_ndoe_gmx_bool(t_fileio *fio, gmx_bool *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_int(t_fileio *fio, int *item, int n, +gmx_bool gmx_fio_ndoe_int(t_fileio *fio, int *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n, +gmx_bool gmx_fio_ndoe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_uchar(t_fileio *fio, unsigned char *item, int n, +gmx_bool gmx_fio_ndoe_uchar(t_fileio *fio, unsigned char *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_ushort(t_fileio *fio, unsigned short *item, int n, +gmx_bool gmx_fio_ndoe_ushort(t_fileio *fio, unsigned short *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_rvec(t_fileio *fio, rvec *item, int n, +gmx_bool gmx_fio_ndoe_rvec(t_fileio *fio, rvec *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_ivec(t_fileio *fio, ivec *item, int n, +gmx_bool gmx_fio_ndoe_ivec(t_fileio *fio, ivec *item, int n, const char *desc, const char *srcfile, int line); -bool gmx_fio_ndoe_string(t_fileio *fio, char *item[], int n, +gmx_bool gmx_fio_ndoe_string(t_fileio *fio, char *item[], int n, const char *desc, const char *srcfile, int line); @@ -403,7 +403,7 @@ bool gmx_fio_ndoe_string(t_fileio *fio, char *item[], int n, #define gmx_fio_do_real(fio, item) gmx_fio_doe_real(fio, &item, (#item), __FILE__, __LINE__) #define gmx_fio_do_float(fio, item) gmx_fio_doe_float(fio, &item, (#item), __FILE__, __LINE__) #define gmx_fio_do_double(fio, item) gmx_fio_doe_double(fio, &item, (#item), __FILE__, __LINE__) -#define gmx_fio_do_bool(fio, item) gmx_fio_doe_bool(fio, &item, (#item), __FILE__, __LINE__) +#define gmx_fio_do_gmx_bool(fio, item) gmx_fio_doe_gmx_bool(fio, &item, (#item), __FILE__, __LINE__) #define gmx_fio_do_int(fio, item) gmx_fio_doe_int(fio, &item, (#item), __FILE__, __LINE__) #define gmx_fio_do_gmx_large_int(fio, item) gmx_fio_doe_gmx_large_int(fio, &item, (#item), __FILE__, __LINE__) #define gmx_fio_do_uchar(fio, item) gmx_fio_doe_uchar(fio, &item, (#item), __FILE__, __LINE__) @@ -440,7 +440,7 @@ bool gmx_fio_ndoe_string(t_fileio *fio, char *item[], int n, #define gmx_fio_ndo_real(fio, item, n) gmx_fio_ndoe_real(fio, item, n, (#item), __FILE__, __LINE__) #define gmx_fio_ndo_float(fio, item, n) gmx_fio_ndoe_float(fio, item, n, (#item), __FILE__, __LINE__) #define gmx_fio_ndo_double(fio, item, n) gmx_fio_ndoe_double(fio, item, n, (#item), __FILE__, __LINE__) -#define gmx_fio_ndo_bool(fio, item, n) gmx_fio_ndoe_bool(fio, item, n, (#item), __FILE__, __LINE__) +#define gmx_fio_ndo_gmx_bool(fio, item, n) gmx_fio_ndoe_gmx_bool(fio, item, n, (#item), __FILE__, __LINE__) #define gmx_fio_ndo_int(fio, item, n) gmx_fio_ndoe_int(fio, item, n, (#item), __FILE__, __LINE__) #define gmx_fio_ndo_gmx_large_int(fio, item, n) gmx_fio_ndoe_gmx_large_int(fio, item, n, (#item), __FILE__, __LINE__) #define gmx_fio_ndo_uchar(fio, item, n) gmx_fio_ndoe_uchar(fio, item, n, (#item), __FILE__, __LINE__) diff --git a/include/gpp_atomtype.h b/include/gpp_atomtype.h index 5446286be8..d76f6f297a 100644 --- a/include/gpp_atomtype.h +++ b/include/gpp_atomtype.h @@ -107,7 +107,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,bool bVerbose); + gpp_atomtype_t at,gmx_bool bVerbose); void copy_atomtype_atomtypes(gpp_atomtype_t atype,t_atomtypes *atypes); /* Copy from one structure to another */ diff --git a/include/grompp.h b/include/grompp.h index 5a25a651f4..8121f99741 100644 --- a/include/grompp.h +++ b/include/grompp.h @@ -47,7 +47,7 @@ extern "C" { #define MAXSLEN 32 typedef struct { - bool bSet; /* Has this combination been set */ + gmx_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 @@ -87,8 +87,8 @@ typedef struct { typedef struct { char **name; int nrexcl; /* Number of exclusions per atom */ - bool excl_set; /* Have exclusions been generated? */ - bool bProcessed; /* Has the mol been processed */ + gmx_bool excl_set; /* Have exclusions been generated? */ + gmx_bool bProcessed; /* Has the mol been processed */ t_atoms atoms; /* Atoms */ t_block cgs; /* Charge groups */ t_block mols; /* Molecules */ @@ -101,7 +101,7 @@ typedef struct { int nr; } t_mols; -bool is_int(double x); +gmx_bool is_int(double x); /* Returns TRUE when x is integer */ typedef enum { diff --git a/include/gstat.h b/include/gstat.h index 7aa416937d..f2d2b3761e 100644 --- a/include/gstat.h +++ b/include/gstat.h @@ -114,21 +114,21 @@ t_pargs *add_acf_pargs(int *npargs,t_pargs *pa); void cross_corr(int n,real f[],real g[],real corr[]); /* Simple minded cross correlation algorithm */ -real fit_acf(int ncorr,int fitfn,const output_env_t oenv,bool bVerbose, +real fit_acf(int ncorr,int fitfn,const output_env_t oenv,gmx_bool bVerbose, real tbeginfit,real tendfit,real dt,real c1[],real *fit); /* Fit an ACF to a given function */ void do_autocorr(const char *fn,const output_env_t oenv, const char *title, int nframes,int nitem,real **c1, - real dt,unsigned long mode,bool bAver); + real dt,unsigned long mode,gmx_bool bAver); /* Calls low_do_autocorr (see below). After calling add_acf_pargs */ void low_do_autocorr(const char *fn,const output_env_t oenv, const char *title, int nframes,int nitem, int nout,real **c1, real dt,unsigned long mode, - int nrestart, bool bAver,bool bNormalize, - bool bVerbose,real tbeginfit,real tendfit, + int nrestart, gmx_bool bAver,gmx_bool bNormalize, + gmx_bool bVerbose,real tbeginfit,real tendfit, int nfitparm,int nskip); /* * do_autocorr calculates autocorrelation functions for many things. @@ -240,7 +240,7 @@ void expfit(int n, real x[], real y[], real Dy[], void ana_dih_trans(const char *fn_trans,const char *fn_histo, real **dih,int nframes,int nangles, - const char *grpname,real t0,real dt,bool bRb, + const char *grpname,real t0,real dt,gmx_bool bRb, const output_env_t oenv); /* * Analyse dihedral transitions, by counting transitions per dihedral @@ -265,11 +265,11 @@ void ana_dih_trans(const char *fn_trans,const char *fn_histo, * (trans = 0) */ -void low_ana_dih_trans(bool bTrans, const char *fn_trans, - bool bHisto, const char *fn_histo, int maxchi, +void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans, + gmx_bool bHisto, const char *fn_histo, int maxchi, real **dih, int nlist, t_dlist dlist[], int nframes, int nangles, const char *grpname, - int xity[], real t0, real dt, bool bRb, + int xity[], real t0, real dt, gmx_bool bRb, real core_frac, const output_env_t oenv); /* as above but passes dlist so can copy occupancies into it, and xity[] * (1..nangles, corresp to dih[this][], so can have non-3 multiplicity of @@ -281,7 +281,7 @@ void low_ana_dih_trans(bool bTrans, const char *fn_trans, void read_ang_dih(const char *trj_fn, - bool bAngles,bool bSaveAll,bool bRb,bool bPBC, + gmx_bool bAngles,gmx_bool bSaveAll,gmx_bool bRb,gmx_bool bPBC, int maxangstat,int angstat[], int *nframes,real **time, int isize,atom_id index[], @@ -349,7 +349,7 @@ real fit_function(int eFitFn,real *parm,real x); /* Or: "There is no KILL like OVERKILL", Dr. Ir. D. van der Spoel */ real do_lmfit(int ndata,real c1[],real sig[],real dt,real *x, real begintimefit,real endtimefit,const output_env_t oenv, - bool bVerbose, int eFitFn,real fitparms[],int fix); + gmx_bool bVerbose, int eFitFn,real fitparms[],int fix); /* Returns integral. * If x == NULL, the timestep dt will be used to create a time axis. * fix fixes fit parameter i at it's starting value, when the i'th bit @@ -387,15 +387,15 @@ int get_acffitfn(void); void do_pp2shifts(FILE *fp,int nframes, int nlist,t_dlist dlist[],real **dih); -bool has_dihedral(int Dih,t_dlist *dl); +gmx_bool has_dihedral(int Dih,t_dlist *dl); t_dlist *mk_dlist(FILE *log, t_atoms *atoms, int *nlist, - bool bPhi, bool bPsi, bool bChi, bool bHChi, + gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, gmx_bool bHChi, int maxchi,int r0,int naa,char **aa); void pr_dlist(FILE *fp,int nl,t_dlist dl[],real dt, int printtype, - bool bPhi, bool bPsi,bool bChi,bool bOmega, int maxchi); + gmx_bool bPhi, gmx_bool bPsi,gmx_bool bChi,gmx_bool bOmega, int maxchi); int pr_trans(FILE *fp,int nl,t_dlist dl[],real dt,int Xi); @@ -408,8 +408,8 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih, void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,int maxchi, t_dlist dlist[], real time[], int **lookup,int *xity, - bool bRb,bool bNormalize, - real core_frac,bool bAll,const char *fnall, + gmx_bool bRb,gmx_bool bNormalize, + real core_frac,gmx_bool bAll,const char *fnall, const output_env_t oenv); void print_one (const output_env_t oenv, const char *base, diff --git a/include/hackblock.h b/include/hackblock.h index d539ed3d6d..8827987e54 100644 --- a/include/hackblock.h +++ b/include/hackblock.h @@ -80,10 +80,10 @@ typedef struct { char ***atomname; int *cgnr; /* Bonded interaction setup */ - bool bAlldih; + gmx_bool bAlldih; int nrexcl; - bool HH14; - bool bRemoveDih; + gmx_bool HH14; + gmx_bool bRemoveDih; /* list of bonded interactions to add */ t_rbondeds rb[ebtsNR]; } t_restp; @@ -103,8 +103,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 */ - bool bAlreadyPresent; - bool bXSet; + gmx_bool bAlreadyPresent; + gmx_bool bXSet; rvec newx; /* calculated new position */ atom_id newi; /* new atom index number (after additions) */ } t_hack; @@ -121,7 +121,7 @@ typedef struct { /* all libraries and other data to protonate a structure or trajectory */ typedef struct { - bool bInit; /* true after init; set false by init_t_protonate */ + gmx_bool bInit; /* true after init; set false by init_t_protonate */ /* force field name: */ char FF[10]; /* libarary data: */ @@ -161,8 +161,8 @@ void clear_t_hackblock(t_hackblock *hb); void clear_t_hack(t_hack *hack); /* reset struct */ -bool merge_t_bondeds(t_rbondeds s[], t_rbondeds d[], - bool bMin, bool bPlus); +gmx_bool merge_t_bondeds(t_rbondeds s[], t_rbondeds d[], + gmx_bool bMin, gmx_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/include/histogram.h b/include/histogram.h index 2d46e99f7e..dd751685f6 100644 --- a/include/histogram.h +++ b/include/histogram.h @@ -91,7 +91,7 @@ gmx_histogram_create(gmx_histogram_t **h, e_histogram_t type, int nbins); /** Initialize calculation of a histogram for a range. */ int gmx_histogram_create_range(gmx_histogram_t **h, e_histogram_t type, - real start, real end, real binw, bool bIntegerBins); + real start, real end, real binw, gmx_bool bIntegerBins); /** Clears the bins in the histogram. */ void gmx_histogram_clear(gmx_histogram_t *h); @@ -106,10 +106,10 @@ int gmx_histogram_set_range(gmx_histogram_t *h, real start, real end); /** Sets histogram bins to center at integer values. */ void -gmx_histogram_set_integerbins(gmx_histogram_t *h, bool bIntegerBins); +gmx_histogram_set_integerbins(gmx_histogram_t *h, gmx_bool bIntegerBins); /** Sets histogram to include outlying values in the bins at the edges. */ void -gmx_histogram_set_all(gmx_histogram_t *h, bool bAll); +gmx_histogram_set_all(gmx_histogram_t *h, gmx_bool bAll); /** Sets block size for histogram averaging. */ int gmx_histogram_set_blocksize(gmx_histogram_t *h, int bsize); @@ -183,7 +183,7 @@ gmx_histogram_finish(gmx_histogram_t *h); /** Creates a new histogram with double the binwidth. */ void gmx_histogram_resample_dblbw(gmx_histogram_t **dest, gmx_histogram_t *src, - bool bIntegerBins); + gmx_bool bIntegerBins); /** Makes a clone of a histogram. */ void gmx_histogram_clone(gmx_histogram_t **dest, gmx_histogram_t *src); @@ -198,15 +198,15 @@ void gmx_histogram_scale_vec(gmx_histogram_t *h, real norm[]); /** Writes a single histogram to a file. */ void -gmx_histogram_write(FILE *fp, gmx_histogram_t *h, bool bErrors); +gmx_histogram_write(FILE *fp, gmx_histogram_t *h, gmx_bool bErrors); /** Writes a set of histograms to a file. */ void gmx_histogram_write_array(FILE *fp, int n, gmx_histogram_t *h[], - bool bValue, bool bErrors); + gmx_bool bValue, gmx_bool bErrors); /** Writes a set of cumulative histograms to a file. */ void gmx_histogram_write_cum_array(FILE *fp, int n, gmx_histogram_t *h[], - bool bValue, bool bErrors); + gmx_bool bValue, gmx_bool bErrors); /*@}*/ #ifdef __cplusplus diff --git a/include/index.h b/include/index.h index 4a58833516..b327bd34d9 100644 --- a/include/index.h +++ b/include/index.h @@ -114,13 +114,13 @@ gmx_residuetype_get_alltypes(gmx_residuetype_t rt, const char *** p_typenames, int * ntypes); -bool +gmx_bool gmx_residuetype_is_protein(gmx_residuetype_t rt, const char *resnm); -bool +gmx_bool gmx_residuetype_is_dna(gmx_residuetype_t rt, const char *resnm); -bool +gmx_bool gmx_residuetype_is_rna(gmx_residuetype_t rt, const char *resnm); @@ -138,7 +138,7 @@ void add_grp(t_blocka *b,char ***gnames,int nra,atom_id a[],const char *name); /* Ads group a with name name to block b and namelist gnames */ void analyse(t_atoms *atoms,t_blocka *gb,char ***gn, - bool bASK,bool bVerb); + gmx_bool bASK,gmx_bool bVerb); /* Makes index groups gb with names gn for atoms in atoms. * bASK=FALSE gives default groups. */ diff --git a/include/indexutil.h b/include/indexutil.h index 14dcbade9d..6af9d9d6c0 100644 --- a/include/indexutil.h +++ b/include/indexutil.h @@ -174,7 +174,7 @@ typedef struct gmx_ana_indexmap_t * gmx_ana_indexmap_update() does not take any time if the group is * actually static. */ - bool bStatic; + gmx_bool bStatic; /*! \brief * TRUE if the current mapping is for the whole group (internal use only). * @@ -182,7 +182,7 @@ typedef struct gmx_ana_indexmap_t * gmx_ana_indexmap_update() does not take any time if the group is * actually static. */ - bool bMapStatic; + gmx_bool bMapStatic; } gmx_ana_indexmap_t; @@ -195,7 +195,7 @@ gmx_ana_indexgrps_alloc(gmx_ana_indexgrps_t **g, int ngrps); /** Initializes index groups from arrays. */ void gmx_ana_indexgrps_set(gmx_ana_indexgrps_t **g, int ngrps, int *isize, - atom_id **index, char **name, bool bFree); + atom_id **index, char **name, gmx_bool bFree); /** Reads index groups from a file or constructs them from topology. */ void gmx_ana_indexgrps_init(gmx_ana_indexgrps_t **g, t_topology *top, @@ -215,17 +215,17 @@ gmx_ana_indexgrps_free(gmx_ana_indexgrps_t *g); void gmx_ana_indexgrps_clone(gmx_ana_indexgrps_t **dest, gmx_ana_indexgrps_t *src); /** Returns TRUE if the index group structure is emtpy. */ -bool +gmx_bool gmx_ana_indexgrps_is_empty(gmx_ana_indexgrps_t *g); /** Returns a pointer to an index group. */ gmx_ana_index_t * gmx_ana_indexgrps_get_grp(gmx_ana_indexgrps_t *g, int n); /** Extracts a single index group. */ -bool +gmx_bool gmx_ana_indexgrps_extract(gmx_ana_index_t *dest, gmx_ana_indexgrps_t *src, int n); /** Finds and extracts a single index group by name. */ -bool +gmx_bool gmx_ana_indexgrps_find(gmx_ana_index_t *dest, gmx_ana_indexgrps_t *src, char *name); /** Writes out a list of index groups. */ @@ -257,7 +257,7 @@ void gmx_ana_index_deinit(gmx_ana_index_t *g); /** Copies a \c gmx_ana_index_t. */ void -gmx_ana_index_copy(gmx_ana_index_t *dest, gmx_ana_index_t *src, bool bAlloc); +gmx_ana_index_copy(gmx_ana_index_t *dest, gmx_ana_index_t *src, gmx_bool bAlloc); /** Writes out the contents of a index group. */ void @@ -267,7 +267,7 @@ gmx_ana_index_dump(gmx_ana_index_t *g, int i, int maxn); void gmx_ana_index_check(gmx_ana_index_t *g, int natoms); /** Checks whether an index group is sorted. */ -bool +gmx_bool gmx_ana_index_check_sorted(gmx_ana_index_t *g); /*@}*/ @@ -278,10 +278,10 @@ gmx_ana_index_check_sorted(gmx_ana_index_t *g); void gmx_ana_index_sort(gmx_ana_index_t *g); /** Checks whether two index groups are equal. */ -bool +gmx_bool gmx_ana_index_equals(gmx_ana_index_t *a, gmx_ana_index_t *b); /** Checks whether a sorted index group contains another sorted index group. */ -bool +gmx_bool gmx_ana_index_contains(gmx_ana_index_t *a, gmx_ana_index_t *b); /** Calculates the intersection between two sorted index groups. */ @@ -315,15 +315,15 @@ gmx_ana_index_partition(gmx_ana_index_t *dest1, gmx_ana_index_t *dest2, /** Partition a group based on topology information. */ void gmx_ana_index_make_block(t_blocka *t, t_topology *top, gmx_ana_index_t *g, - e_index_t type, bool bComplete); + e_index_t type, gmx_bool bComplete); /** Checks whether a group consists of full blocks. */ -bool +gmx_bool gmx_ana_index_has_full_blocks(gmx_ana_index_t *g, t_block *b); /** Checks whether a group consists of full blocks. */ -bool +gmx_bool gmx_ana_index_has_full_ablocks(gmx_ana_index_t *g, t_blocka *b); /** Checks whether a group consists of full residues/molecules. */ -bool +gmx_bool gmx_ana_index_has_complete_elems(gmx_ana_index_t *g, e_index_t type, t_topology *top); /** Initializes an empty index group mapping. */ @@ -344,10 +344,10 @@ void gmx_ana_indexmap_deinit(gmx_ana_indexmap_t *m); /** Makes a deep copy of an index group mapping. */ void -gmx_ana_indexmap_copy(gmx_ana_indexmap_t *dest, gmx_ana_indexmap_t *src, bool bFirst); +gmx_ana_indexmap_copy(gmx_ana_indexmap_t *dest, gmx_ana_indexmap_t *src, gmx_bool bFirst); /** Updates an index group mapping. */ void -gmx_ana_indexmap_update(gmx_ana_indexmap_t *m, gmx_ana_index_t *g, bool bMaskOnly); +gmx_ana_indexmap_update(gmx_ana_indexmap_t *m, gmx_ana_index_t *g, gmx_bool bMaskOnly); /*@}*/ #ifdef __cplusplus diff --git a/include/main.h b/include/main.h index 43302d788d..81bca08603 100644 --- a/include/main.h +++ b/include/main.h @@ -44,7 +44,7 @@ extern "C" { #endif -bool gmx_parallel_env_initialized(void); +gmx_bool gmx_parallel_env_initialized(void); /* 1 when running in a parallel environment, so could also be 1 if mdrun was started with: mpirun -np 1. @@ -55,7 +55,7 @@ bool gmx_parallel_env_initialized(void); void gmx_log_open(const char *fn,const t_commrec *cr, - bool bMasterOnly, unsigned long Flags, FILE**); + gmx_bool bMasterOnly, unsigned long Flags, FILE**); /* Open the log file, if necessary (nprocs > 1) the logfile name is * communicated around the ring. */ @@ -71,7 +71,7 @@ void check_multi_int(FILE *log,const gmx_multisim_t *ms, */ void init_multisystem(t_commrec *cr,int nsim,int nfile, - const t_filenm fnm[], bool bParFn); + const t_filenm fnm[], gmx_bool bParFn); /* Splits the communication into nsim separate simulations * and creates a communication structure between the master * these simulations. diff --git a/include/matio.h b/include/matio.h index 16f13f8e49..1a5238a18a 100644 --- a/include/matio.h +++ b/include/matio.h @@ -42,7 +42,7 @@ extern "C" { #endif -bool matelmt_cmp(t_xpmelmt e1, t_xpmelmt e2); +gmx_bool matelmt_cmp(t_xpmelmt e1, t_xpmelmt e2); t_matelmt searchcmap(int n,t_mapping map[],t_xpmelmt c); /* Seach in the map for code 'c' and return entry number. @@ -90,7 +90,7 @@ void write_xpm_split(FILE *out,unsigned int flags, real lo_top,real hi_top,int *nlevel_top, t_rgb rlo_top,t_rgb rhi_top, real lo_bot,real hi_bot,int *nlevel_bot, - bool bDiscreteColor, + gmx_bool bDiscreteColor, t_rgb rlo_bot,t_rgb rhi_bot); /* See write_xpm. * Writes a colormap with separate above and below diagonal colormaps. @@ -126,7 +126,7 @@ void write_xpm(FILE *out,unsigned int flags, * nlevels number of color levels for the output */ -real **mk_matrix(int nx, int ny, bool b1D); +real **mk_matrix(int nx, int ny, gmx_bool b1D); void done_matrix(int nx, real ***m); diff --git a/include/mdatoms.h b/include/mdatoms.h index 4dc2769b01..99e11c092f 100644 --- a/include/mdatoms.h +++ b/include/mdatoms.h @@ -42,7 +42,7 @@ extern "C" { #endif -t_mdatoms *init_mdatoms(FILE *fp,gmx_mtop_t *mtop,bool bFreeEnergy); +t_mdatoms *init_mdatoms(FILE *fp,gmx_mtop_t *mtop,gmx_bool bFreeEnergy); void atoms2md(gmx_mtop_t *mtop,t_inputrec *ir, int nindex,int *index, diff --git a/include/mdebin.h b/include/mdebin.h index 2f8922c760..20994b822d 100644 --- a/include/mdebin.h +++ b/include/mdebin.h @@ -67,19 +67,19 @@ typedef struct { int mde_n,mdeb_n; real *tmp_r; rvec *tmp_v; - bool bConstr; - bool bConstrVir; - bool bTricl; - bool bDynBox; - bool bNHC_trotter; - bool bMTTK; + gmx_bool bConstr; + gmx_bool bConstrVir; + gmx_bool bTricl; + gmx_bool bDynBox; + gmx_bool bNHC_trotter; + gmx_bool bMTTK; int f_nre; int epc; tensor ref_p; int etc; int nCrmsd; - bool bEner[F_NRE]; - bool bEInd[egNR]; + gmx_bool bEner[F_NRE]; + gmx_bool bEInd[egNR]; char **print_grpnms; FILE *fp_dhdl; /* the dhdl.xvg output file */ @@ -99,8 +99,8 @@ FILE *open_dhdl(const char *filename,const t_inputrec *ir, /* update the averaging structures. Called every time the energies are evaluated. */ void upd_mdebin(t_mdebin *md, - bool write_dhdl, - bool bSum, + gmx_bool write_dhdl, + gmx_bool bSum, double time, real tmass, gmx_enerdata_t *enerd, @@ -119,10 +119,10 @@ void upd_mdebin_step(t_mdebin *md); void print_ebin_header(FILE *log,gmx_large_int_t steps,double time,real lamb); -void print_ebin(ener_file_t fp_ene,bool bEne,bool bDR,bool bOR, +void print_ebin(ener_file_t fp_ene,gmx_bool bEne,gmx_bool bDR,gmx_bool bOR, FILE *log, gmx_large_int_t step,double time, - int mode,bool bCompact, + int mode,gmx_bool bCompact, t_mdebin *md,t_fcdata *fcd, gmx_groups_t *groups,t_grpopts *opts); diff --git a/include/mdrun.h b/include/mdrun.h index a03ab22358..7bf44346d9 100644 --- a/include/mdrun.h +++ b/include/mdrun.h @@ -126,7 +126,7 @@ typedef struct { int xtc_prec; ener_file_t fp_ene; const char *fn_cpt; - bool bKeepAndNumCPT; + gmx_bool bKeepAndNumCPT; int eIntegrator; int simulation_part; FILE *fp_dhdl; @@ -151,8 +151,8 @@ extern tMPI_Thread_mutex_t deform_init_box_mutex; typedef double gmx_integrator_t(FILE *log,t_commrec *cr, int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose, - bool bCompact, int nstglobalcomm, + const output_env_t oenv, gmx_bool bVerbose, + gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout, t_inputrec *inputrec, @@ -220,7 +220,7 @@ void global_stat(FILE *log,gmx_global_stat_t gs, gmx_constr_t constr,t_vcm *vcm, int nsig,real *sig, gmx_mtop_t *top_global, t_state *state_local, - bool bSumEkinhOld, int flags); + gmx_bool bSumEkinhOld, int flags); /* Communicate statistics over cr->mpi_comm_mysim */ gmx_mdoutf_t *init_mdoutf(int nfile,const t_filenm fnm[], @@ -284,7 +284,7 @@ void finish_run(FILE *log,t_commrec *cr,const char *confout, t_inputrec *inputrec, t_nrnb nrnb[],gmx_wallcycle_t wcycle, gmx_runtime_t *runtime, - bool bWriteStat); + gmx_bool bWriteStat); void calc_enervirdiff(FILE *fplog,int eDispCorr,t_forcerec *fr); @@ -327,7 +327,7 @@ void do_constrain_first(FILE *log,gmx_constr_t constr, t_graph *graph,t_commrec *cr,t_nrnb *nrnb, t_forcerec *fr, gmx_localtop_t *top, tensor shake_vir); -void dynamic_load_balancing(bool bVerbose,t_commrec *cr,real capacity[], +void dynamic_load_balancing(gmx_bool bVerbose,t_commrec *cr,real capacity[], int dimension,t_mdatoms *md,t_topology *top, rvec x[],rvec v[],matrix box); /* Perform load balancing, i.e. split the particles over processors @@ -335,8 +335,8 @@ void dynamic_load_balancing(bool bVerbose,t_commrec *cr,real capacity[], */ int mdrunner(int nthreads_requested, FILE *fplog,t_commrec *cr,int nfile, - const t_filenm fnm[], const output_env_t oenv, bool bVerbose, - bool bCompact, int nstglobalcomm, ivec ddxyz,int dd_node_order, + const t_filenm fnm[], const output_env_t oenv, gmx_bool bVerbose, + gmx_bool bCompact, int nstglobalcomm, ivec ddxyz,int dd_node_order, real rdd, real rconstr, const char *dddlb_opt,real dlb_scale, const char *ddcsx,const char *ddcsy,const char *ddcsz, int nstepout, int resetstep, int nmultisim, int repl_ex_nst, @@ -359,7 +359,7 @@ void init_md(FILE *fplog, gmx_mdoutf_t **outf,t_mdebin **mdebin, tensor force_vir,tensor shake_vir, rvec mu_tot, - bool *bSimAnn,t_vcm **vcm, + gmx_bool *bSimAnn,t_vcm **vcm, t_state *state, unsigned long Flags); /* Routine in sim_util.c */ diff --git a/include/mshift.h b/include/mshift.h index 9db124ac85..0c9ed96b3e 100644 --- a/include/mshift.h +++ b/include/mshift.h @@ -44,7 +44,7 @@ extern "C" { t_graph *mk_graph(FILE *fplog, t_idef *idef,int at_start,int at_end, - bool bShakeOnly,bool bSettle); + gmx_bool bShakeOnly,gmx_bool bSettle); /* Build a graph from an idef description. The graph can be used * to generate mol-shift indices. * If bShakeOnly, only the connections in the shake list are used. @@ -53,7 +53,7 @@ t_graph *mk_graph(FILE *fplog, void mk_graph_ilist(FILE *fplog, t_ilist *ilist,int at_start,int at_end, - bool bShakeOnly,bool bSettle, + gmx_bool bShakeOnly,gmx_bool bSettle, t_graph *g); /* As mk_graph, but takes t_ilist iso t_idef and does not allocate g */ diff --git a/include/mtop_util.h b/include/mtop_util.h index d2e15d775b..a9a43b25ee 100644 --- a/include/mtop_util.h +++ b/include/mtop_util.h @@ -109,7 +109,7 @@ gmx_mtop_atomloop_all_init(const gmx_mtop_t *mtop); * ... * } */ -bool +gmx_bool gmx_mtop_atomloop_all_next(gmx_mtop_atomloop_all_t aloop, int *at_global,t_atom **atom); @@ -149,7 +149,7 @@ gmx_mtop_atomloop_block_init(const gmx_mtop_t *mtop); * ... * } */ -bool +gmx_bool gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop, t_atom **atom,int *nmol); @@ -168,7 +168,7 @@ gmx_mtop_ilistloop_init(const gmx_mtop_t *mtop); * writes the number of molecules for this ilist in *nmol. * When at the end, destroys iloop and returns FALSE. */ -bool +gmx_bool gmx_mtop_ilistloop_next(gmx_mtop_ilistloop_t iloop, t_ilist **ilist_mol,int *nmol); @@ -190,7 +190,7 @@ gmx_mtop_ilistloop_all_init(const gmx_mtop_t *mtop); * writes the atom offset which should be added to iatoms in atnr_offset. * When at the end, destroys iloop and returns FALSE. */ -bool +gmx_bool gmx_mtop_ilistloop_all_next(gmx_mtop_ilistloop_all_t iloop, t_ilist **ilist_mol,int *atnr_offset); @@ -215,7 +215,7 @@ gmx_mtop_global_atoms(const gmx_mtop_t *mtop); * that consist of a single charge group. */ void -gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop,bool bKeepSingleMolCG); +gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop,gmx_bool bKeepSingleMolCG); /* Generate a 'local' topology for the whole system. diff --git a/include/mvdata.h b/include/mvdata.h index f1dccd700b..21767fac18 100644 --- a/include/mvdata.h +++ b/include/mvdata.h @@ -53,7 +53,7 @@ void bcast_state_setup(const t_commrec *cr,t_state *state); * The arrays are not broadcasted. */ -void bcast_state(const t_commrec *cr,t_state *state,bool bAlloc); +void bcast_state(const t_commrec *cr,t_state *state,gmx_bool bAlloc); /* Broadcasts state from the master to all nodes in cr->mpi_comm_mygroup. * The arrays in state are allocated when bAlloc is TRUE. */ @@ -63,11 +63,11 @@ void bcast_state(const t_commrec *cr,t_state *state,bool bAlloc); void move_cgcm(FILE *log,const t_commrec *cr,rvec cg_cm[]); -void move_rvecs(const t_commrec *cr,bool bForward,bool bSum, +void move_rvecs(const t_commrec *cr,gmx_bool bForward,gmx_bool bSum, int left,int right,rvec vecs[],rvec buf[], int shift,t_nrnb *nrnb); -void move_reals(const t_commrec *cr,bool bForward,bool bSum, +void move_reals(const t_commrec *cr,gmx_bool bForward,gmx_bool bSum, int left,int right,real reals[],real buf[], int shift,t_nrnb *nrnb); diff --git a/include/nbsearch.h b/include/nbsearch.h index cdbf279139..5dd73521ea 100644 --- a/include/nbsearch.h +++ b/include/nbsearch.h @@ -72,10 +72,10 @@ gmx_ana_nbsearch_pos_init(gmx_ana_nbsearch_t *d, t_pbc *pbc, int gmx_ana_nbsearch_set_excl(gmx_ana_nbsearch_t *d, int nexcl, int excl[]); /** Check whether a point is within a neighborhood. */ -bool +gmx_bool gmx_ana_nbsearch_is_within(gmx_ana_nbsearch_t *d, rvec x); /** Check whether a position is within a neighborhood. */ -bool +gmx_bool gmx_ana_nbsearch_pos_is_within(gmx_ana_nbsearch_t *d, struct gmx_ana_pos_t *p, int i); /** Calculates the minimun distance from the reference points. */ @@ -86,14 +86,14 @@ real gmx_ana_nbsearch_pos_mindist(gmx_ana_nbsearch_t *d, struct gmx_ana_pos_t *p, int i); /** Finds the first reference position within the cutoff. */ -bool +gmx_bool gmx_ana_nbsearch_first_within(gmx_ana_nbsearch_t *d, rvec x, int *jp); /** Finds the first reference position within the cutoff. */ -bool +gmx_bool gmx_ana_nbsearch_pos_first_within(gmx_ana_nbsearch_t *d, struct gmx_ana_pos_t *p, int i, int *jp); /** Finds the next reference position within the cutoff. */ -bool +gmx_bool gmx_ana_nbsearch_next_within(gmx_ana_nbsearch_t *d, int *jp); #ifdef __cplusplus diff --git a/include/network.h b/include/network.h index 3c7cc8ec85..d1e05e3e29 100644 --- a/include/network.h +++ b/include/network.h @@ -65,7 +65,7 @@ int gmx_node_rank(void); void gmx_setup_nodecomm(FILE *fplog,t_commrec *cr); /* Sets up fast global communication for clusters with multi-core nodes */ -bool gmx_mpi_initialized(void); +gmx_bool gmx_mpi_initialized(void); /* return TRUE when MPI_Init has been called. * return FALSE when MPI_Init has not been called OR * when GROMACS was compiled without MPI support. diff --git a/include/nonbonded.h b/include/nonbonded.h index 2ff2a76efb..c0a5dcc5ca 100644 --- a/include/nonbonded.h +++ b/include/nonbonded.h @@ -46,7 +46,7 @@ extern "C" { #endif -void gmx_setup_kernels(FILE *fplog,bool bGenericKernelOnly); +void gmx_setup_kernels(FILE *fplog,gmx_bool bGenericKernelOnly); #define GMX_DONB_LR (1<<0) #define GMX_DONB_FORCES (1<<1) diff --git a/include/nrama.h b/include/nrama.h index 7ec2ba5e4f..851c41f52b 100644 --- a/include/nrama.h +++ b/include/nrama.h @@ -45,7 +45,7 @@ extern "C" { #endif typedef struct { - bool bShow; + gmx_bool bShow; char *label; int iphi,ipsi; /* point in the dih array of xr... */ } t_phipsi; @@ -76,7 +76,7 @@ typedef struct { t_topology *init_rama(const output_env_t oenv, const char *infile, const char *topfile, t_xrama *xr,int mult); -bool new_data(t_xrama *xr); +gmx_bool new_data(t_xrama *xr); #ifdef __cplusplus } diff --git a/include/ns.h b/include/ns.h index d2d16f77be..526b926c59 100644 --- a/include/ns.h +++ b/include/ns.h @@ -88,15 +88,15 @@ int search_neighbours(FILE *log,t_forcerec *fr, t_nrnb *nrnb,t_mdatoms *md, real lambda,real *dvdlambda, gmx_grppairener_t *grppener, - bool bFillGrid, - bool bDoLongRange, - bool bDoForces,rvec *f); + gmx_bool bFillGrid, + gmx_bool bDoLongRange, + gmx_bool bDoForces,rvec *f); /* Debugging routines from wnblist.c */ void dump_nblist(FILE *out,t_commrec *cr,t_forcerec *fr,int nDNL); -int read_nblist(FILE *in,FILE *out,int **mat,int natoms,bool bSymm); +int read_nblist(FILE *in,FILE *out,int **mat,int natoms,gmx_bool bSymm); /* Returns total number of neighbors. If bSymm the matrix is symmetrized. */ int natoms_beyond_ns_buffer(t_inputrec *ir,t_forcerec *fr,t_block *cgs, diff --git a/include/oenv.h b/include/oenv.h index d7dea976cd..70604fe50c 100644 --- a/include/oenv.h +++ b/include/oenv.h @@ -67,7 +67,7 @@ typedef enum { exvgNULL, exvgXMGRACE, exvgXMGR, exvgNONE } xvg_format_t; struct output_env { time_unit_t time_unit; /* the time unit, enum defined in statuti.h */ - bool view; /* view of file requested */ + gmx_bool view; /* view of file requested */ xvg_format_t xvg_format; /* xvg output format, enum defined in statutil.h */ int verbosity; /* The level of verbosity for this program */ int debug_level; /* the debug level */ @@ -78,10 +78,10 @@ struct output_env void output_env_init(output_env_t oenv, int argc, char *argv[], - time_unit_t tmu, bool view, xvg_format_t xvg_format, + time_unit_t tmu, gmx_bool view, xvg_format_t xvg_format, int verbosity, int debug_level); /* initialize an output_env structure, setting the command line, - the default time value a boolean view that is set to TRUE when the + the default time value a gmx_boolean view that is set to TRUE when the user requests direct viewing of graphs, the graph formatting type, the verbosity, and debug level */ @@ -120,7 +120,7 @@ real output_env_conv_time(const output_env_t oenv, real time); void output_env_conv_times(const output_env_t oenv, int n, real *time); /* convert array of times */ -bool output_env_get_view(const output_env_t oenv); +gmx_bool output_env_get_view(const output_env_t oenv); /* Return TRUE when user requested viewing of the file */ diff --git a/include/partdec.h b/include/partdec.h index 746b5a2a64..8ac73bce13 100644 --- a/include/partdec.h +++ b/include/partdec.h @@ -115,7 +115,7 @@ gmx_localtop_t *split_system(FILE *log, t_commrec *cr); /* Split the system over N processors. */ -bool setup_parallel_vsites(t_idef *idef,t_commrec *cr, +gmx_bool setup_parallel_vsites(t_idef *idef,t_commrec *cr, t_comm_vsites *vsitecomm); t_state *partdec_init_local_state(t_commrec *cr,t_state *state_global); diff --git a/include/pbc.h b/include/pbc.h index 0bedb9cb24..bf92c8db46 100644 --- a/include/pbc.h +++ b/include/pbc.h @@ -82,7 +82,7 @@ extern "C" { int guess_ePBC(matrix box); /* Guesses the type of periodic boundary conditions using the box */ - bool correct_box(FILE *fplog,int step,tensor box,t_graph *graph); + gmx_bool correct_box(FILE *fplog,int step,tensor box,t_graph *graph); /* Checks for un-allowed box angles and corrects the box * and the integer shift vectors in the graph (if graph!=NULL) if necessary. * Returns TRUE when the box was corrected. @@ -99,7 +99,7 @@ extern "C" { */ t_pbc *set_pbc_dd(t_pbc *pbc,int ePBC, - gmx_domdec_t *dd,bool bSingleDir,matrix box); + gmx_domdec_t *dd,gmx_bool bSingleDir,matrix box); /* As set_pbc, but additionally sets that correct distances can * be obtained using (combinations of) single box-vector shifts. * Should be used with pbc_dx_aiuc. @@ -136,7 +136,7 @@ extern "C" { * set_pbc must be called before ever calling this routine. */ - bool image_rect(ivec xi,ivec xj,ivec box_size, + gmx_bool image_rect(ivec xi,ivec xj,ivec box_size, real rlong2,int *shift,real *r2); /* Calculate the distance between xi and xj for a rectangular box. * When the distance is SMALLER than rlong2 return TRUE, return @@ -145,7 +145,7 @@ extern "C" { * It is assumed that rlong2 is scaled the same way as the ivecs xi and xj. */ - bool image_tri(ivec xi,ivec xj,imatrix box, + gmx_bool image_tri(ivec xi,ivec xj,imatrix box, real rlong2,int *shift,real *r2); /* Calculate the distance between xi and xj for a triclinic box. * When the distance is SMALLER than rlong2 return TRUE, return @@ -154,7 +154,7 @@ extern "C" { * It is assumed that rlong2 is scaled the same way as the ivecs xi and xj. */ - bool image_cylindric(ivec xi,ivec xj,ivec box_size,real rlong2, + gmx_bool image_cylindric(ivec xi,ivec xj,ivec box_size,real rlong2, int *shift,real *r2); /* Calculate the distance between xi and xj for a rectangular box * using a cylindric cutoff for long-range only. diff --git a/include/pdb2top.h b/include/pdb2top.h index 8a1b2d3473..58d7c46514 100644 --- a/include/pdb2top.h +++ b/include/pdb2top.h @@ -78,15 +78,15 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[], t_atoms *pdba,rvec *x, - bool bVerbose); + gmx_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 *generator,bool bITP); +void print_top_comment(FILE *out,const char *filename,const char *generator,gmx_bool bITP); -void print_top_header(FILE *out,const char *filename,const char *title,bool bITP, +void print_top_header(FILE *out,const char *filename,const char *title,gmx_bool bITP, const char *ffdir,real mHmult); void print_top_mols(FILE *out, @@ -95,7 +95,7 @@ void print_top_mols(FILE *out, int nmol, t_mols *mols); void write_top(FILE *out, char *pr,char *molname, - t_atoms *at,bool bRTPresname, + t_atoms *at,gmx_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! */ @@ -107,17 +107,17 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname, int nrtp, t_restp rtp[], t_restp *restp, t_hackblock *hb, int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb, - int *rn, int *rc, bool bAllowMissing, - bool bVsites, bool bVsiteAromatics, + int *rn, int *rc, gmx_bool bAllowMissing, + gmx_bool bVsites, gmx_bool bVsiteAromatics, const char *ff, const char *ffdir, real mHmult, int nssbonds, t_ssbond ssbonds[], real long_bond_dist, real short_bond_dist, - bool bDeuterate, bool bChargeGroups, bool bCmap, - bool bRenumRes,bool bRTPresname); + gmx_bool bDeuterate, gmx_bool bChargeGroups, gmx_bool bCmap, + gmx_bool bRenumRes,gmx_bool bRTPresname); /* Create a topology ! */ -void print_sums(t_atoms *atoms, bool bSystem); +void print_sums(t_atoms *atoms, gmx_bool bSystem); #endif /* _pdb2top_h */ diff --git a/include/pdbio.h b/include/pdbio.h index 1da2bbfccf..77aa6c07cd 100644 --- a/include/pdbio.h +++ b/include/pdbio.h @@ -61,10 +61,10 @@ enum { epdbATOM, epdbHETATM, epdbANISOU, epdbCRYST1, epdbCOMPND, /* Enumerated value for indexing an uij entry (anisotropic temperature factors) */ enum { U11, U22, U33, U12, U13, U23 }; -void set_pdb_wide_format(bool bSet); +void set_pdb_wide_format(gmx_bool bSet); /* If bSet, use wider format for occupancy and bfactor */ -void pdb_use_ter(bool bSet); +void pdb_use_ter(gmx_bool bSet); /* set read_pdbatoms to read upto 'TER' or 'ENDMDL' (default, bSet=FALSE). This function is fundamentally broken as far as thread-safety is concerned.*/ @@ -77,12 +77,12 @@ void gmx_write_pdb_box(FILE *out,int ePBC,matrix box); void write_pdbfile_indexed(FILE *out,const char *title,t_atoms *atoms, rvec x[],int ePBC,matrix box,char chain, int model_nr,atom_id nindex,atom_id index[], - gmx_conect conect,bool bTerSepChains); + gmx_conect conect,gmx_bool bTerSepChains); /* REALLY low level */ void write_pdbfile(FILE *out,const char *title,t_atoms *atoms, rvec x[],int ePBC,matrix box,char chain, - int model_nr,gmx_conect conect,bool bTerSepChains); + int model_nr,gmx_conect conect,gmx_bool bTerSepChains); /* Low level pdb file writing routine. * * ONLY FOR SPECIAL PURPOSES, @@ -101,14 +101,14 @@ void get_pdb_atomnumber(t_atoms *atoms,gmx_atomprop_t aps); int read_pdbfile(FILE *in,char *title,int *model_nr, t_atoms *atoms,rvec x[],int *ePBC,matrix box, - bool bChange,gmx_conect conect); + gmx_bool bChange,gmx_conect conect); /* Function returns number of atoms found. * ePBC and gmx_conect structure may be NULL. */ void read_pdb_conf(const char *infile,char *title, t_atoms *atoms,rvec x[],int *ePBC,matrix box, - bool bChange,gmx_conect conect); + gmx_bool bChange,gmx_conect conect); /* Read a pdb file and extract ATOM and HETATM fields. * Read a box from the CRYST1 line, return 0 box when no CRYST1 is found. * Change atom names according to protein conventions if wanted. @@ -118,16 +118,16 @@ void read_pdb_conf(const char *infile,char *title, void get_pdb_coordnum(FILE *in,int *natoms); /* Read a pdb file and count the ATOM and HETATM fields. */ -bool is_hydrogen(const char *nm); +gmx_bool is_hydrogen(const char *nm); /* Return whether atom nm is a hydrogen */ -bool is_dummymass(const char *nm); +gmx_bool is_dummymass(const char *nm); /* Return whether atom nm is a dummy mass */ /* Routines to handle CONECT records if they have been read in */ void gmx_conect_dump(FILE *fp,gmx_conect conect); -bool gmx_conect_exist(gmx_conect conect,int ai,int aj); +gmx_bool gmx_conect_exist(gmx_conect conect,int ai,int aj); /* Return TRUE if there is a conection between the atoms */ void gmx_conect_add(gmx_conect conect,int ai,int aj); diff --git a/include/perf_est.h b/include/perf_est.h index cee8bc1466..0dba685d66 100644 --- a/include/perf_est.h +++ b/include/perf_est.h @@ -40,7 +40,7 @@ extern "C" { #endif -int n_bonded_dx(gmx_mtop_t *mtop,bool bExcl); +int n_bonded_dx(gmx_mtop_t *mtop,gmx_bool bExcl); /* Returns the number of pbc_rvec_sub calls required for bonded interactions. * This number is also roughly proportional to the computational cost. */ diff --git a/include/pme.h b/include/pme.h index 18a9d313bc..75c76443e8 100644 --- a/include/pme.h +++ b/include/pme.h @@ -52,7 +52,7 @@ enum { GMX_SUM_QGRID_FORWARD, GMX_SUM_QGRID_BACKWARD }; int gmx_pme_init(gmx_pme_t *pmedata,t_commrec *cr, int nnodes_major,int nnodes_minor, t_inputrec *ir,int homenr, - bool bFreeEnergy, bool bReproducible); + gmx_bool bFreeEnergy, gmx_bool bReproducible); int gmx_pme_destroy(FILE *log,gmx_pme_t *pmedata); /* Initialize and destroy the pme data structures resepectively. @@ -83,7 +83,7 @@ int gmx_pme_do(gmx_pme_t pme, int gmx_pmeonly(gmx_pme_t pme, t_commrec *cr, t_nrnb *mynrnb, gmx_wallcycle_t wcycle, - real ewaldcoeff, bool bGatherOnly, + real ewaldcoeff, gmx_bool bGatherOnly, t_inputrec *ir); /* Called on the nodes that do PME exclusively (as slaves) */ @@ -105,13 +105,13 @@ gmx_pme_pp_t gmx_pme_pp_init(t_commrec *cr); /* Initialize the PME-only side of the PME <-> PP communication */ void gmx_pme_send_q(t_commrec *cr, - bool bFreeEnergy, real *chargeA, real *chargeB, + gmx_bool bFreeEnergy, real *chargeA, real *chargeB, int maxshift_x, int maxshift_y); /* Send the charges and maxshift to out PME-only node. */ void gmx_pme_send_x(t_commrec *cr, matrix box, rvec *x, - bool bFreeEnergy, real lambda, - bool bEnerVir, + gmx_bool bFreeEnergy, real lambda, + gmx_bool bEnerVir, gmx_large_int_t step); /* Send the coordinates to our PME-only node and request a PME calculation */ @@ -128,8 +128,8 @@ int gmx_pme_recv_q_x(gmx_pme_pp_t pme_pp, real **chargeA, real **chargeB, matrix box, rvec **x,rvec **f, int *maxshift_x,int *maxshift_y, - bool *bFreeEnergy,real *lambda, - bool *bEnerVir, + gmx_bool *bFreeEnergy,real *lambda, + gmx_bool *bEnerVir, gmx_large_int_t *step); /* Receive charges and/or coordinates from the PP-only nodes. * Returns the number of atoms, or -1 when the run is finished. diff --git a/include/poscalc.h b/include/poscalc.h index 56164a9f77..aaac1836df 100644 --- a/include/poscalc.h +++ b/include/poscalc.h @@ -134,7 +134,7 @@ int gmx_ana_poscalc_type_from_enum(const char *post, e_poscalc_t *type, int *flags); /** Creates a list of strings for position enum parameter handling. */ const char ** -gmx_ana_poscalc_create_type_enum(bool bAtom); +gmx_ana_poscalc_create_type_enum(gmx_bool bAtom); /** Creates a new position calculation collection object. */ int @@ -170,7 +170,7 @@ gmx_ana_poscalc_init_pos(gmx_ana_poscalc_t *pc, struct gmx_ana_pos_t *p); void gmx_ana_poscalc_free(gmx_ana_poscalc_t *pc); /** Returns TRUE if the position calculation requires topology information. */ -bool +gmx_bool gmx_ana_poscalc_requires_top(gmx_ana_poscalc_t *pc); /** Initializes evaluation for a position calculation collection. */ diff --git a/include/position.h b/include/position.h index b6df58166c..4e27d513ae 100644 --- a/include/position.h +++ b/include/position.h @@ -102,7 +102,7 @@ void gmx_ana_pos_free(gmx_ana_pos_t *pos); /** Copies the evaluated positions to a preallocated data structure. */ void -gmx_ana_pos_copy(gmx_ana_pos_t *dest, gmx_ana_pos_t *src, bool bFirst); +gmx_ana_pos_copy(gmx_ana_pos_t *dest, gmx_ana_pos_t *src, gmx_bool bFirst); /** Sets the number of positions in a position structure. */ void diff --git a/include/pppm.h b/include/pppm.h index 4e97289504..887a263114 100644 --- a/include/pppm.h +++ b/include/pppm.h @@ -45,17 +45,17 @@ extern "C" { #endif int gmx_pppm_init(FILE *log, t_commrec *cr, - const output_env_t oenv, bool bVerbose, - bool bOld, matrix box, + const output_env_t oenv, gmx_bool bVerbose, + gmx_bool bOld, matrix box, char *ghatfn, t_inputrec *ir, - bool bReproducible); + gmx_bool bReproducible); /* Setup stuff for PPPM. * Either reads a ghat function from file (when the file exists) * or generate a ghat function from scratch. */ int gmx_pppm_do(FILE *log, gmx_pme_t pme, - bool bVerbose, + gmx_bool bVerbose, rvec x[], rvec f[], real charge[], rvec box, real phi[], t_commrec *cr, @@ -80,7 +80,7 @@ void pr_scalar_gk(const char *fn,const output_env_t oenv, int nx,int ny,int nz, rvec box,real ***ghat); void mk_ghat(FILE *fp,int nx,int ny,int nz, - real ***ghat, rvec box,real r1,real rc,bool bSym,bool bOld); + real ***ghat, rvec box,real r1,real rc,gmx_bool bSym,gmx_bool bOld); /* Generate a Ghat function from scratch. The ghat grid should * be allocated using the mk_rgrid function. When bSym, only * the first octant of the function is generated by direct calculation @@ -107,7 +107,7 @@ real ***rd_ghat(FILE *log,const output_env_t oenv,char *fn,ivec igrid, void wr_ghat(const char *fn,const output_env_t oenv, int n1max,int n2max, int n3max,real h1, real h2,real h3,real ***ghat,int nalias, - int porder,int niter,bool bSym,rvec beta, + int porder,int niter,gmx_bool bSym,rvec beta, real r1,real rc,real pval,real zval,real eref,real qopt); /* Write a ghat file. (see above) */ diff --git a/include/princ.h b/include/princ.h index 2817220857..fde9802447 100644 --- a/include/princ.h +++ b/include/princ.h @@ -56,14 +56,14 @@ void orient_princ(t_atoms *atoms, int isize, atom_id *index, /* rotates molecule to align principal axes with coordinate axes */ real calc_xcm(rvec x[],int gnx,atom_id *index,t_atom *atom,rvec xcm, - bool bQ); + gmx_bool bQ); /* Calculate the center of mass of the atoms in index. if bQ then the atoms * will be charge weighted rather than mass weighted. * Returns the total mass/charge. */ real sub_xcm(rvec x[],int gnx,atom_id *index,t_atom atom[],rvec xcm, - bool bQ); + gmx_bool bQ); /* Calc. the center of mass and subtract it from all coordinates. * Returns the original center of mass in xcm * Returns the total mass diff --git a/include/pull.h b/include/pull.h index c904ec23b4..b9008b8aa2 100644 --- a/include/pull.h +++ b/include/pull.h @@ -81,7 +81,7 @@ void init_pull(FILE *fplog, gmx_mtop_t *mtop, /* the topology of the whole system */ t_commrec * cr, /* struct for communication info */ const output_env_t oenv, /* output options */ - bool bOutFile, /* open output files */ + gmx_bool bOutFile, /* open output files */ unsigned long Flags); /* Close the pull output files */ diff --git a/include/readinp.h b/include/readinp.h index f78f49fc47..9abada7f5d 100644 --- a/include/readinp.h +++ b/include/readinp.h @@ -46,8 +46,8 @@ extern "C" { typedef struct { int count; /* sort order for output */ - bool bObsolete; /* whether it is an obsolete param value */ - bool bSet; /* whether it it has been read out */ + gmx_bool bObsolete; /* whether it is an obsolete param value */ + gmx_bool bSet; /* whether it it has been read out */ char *name; /* name of the parameter */ char *value; /* parameter value string */ int inp_count; /* number of einps read. Only valid for the first item @@ -68,7 +68,7 @@ t_inpfile *read_inpfile(const char *fn,int *ninp, cppopts = the cpp-style options for #include paths and #defines */ void write_inpfile(const char *fn,int ninp,t_inpfile inp[], - bool bHaltOnUnknown, + gmx_bool bHaltOnUnknown, warninp_t wi); void replace_inp_entry(int ninp,t_inpfile *inp, @@ -117,12 +117,12 @@ enum { /* names to print in help info */ static const char *argtp[etNR] = { - "int", "step", "real", "time", "string", "bool", "vector", "enum" + "int", "step", "real", "time", "string", "gmx_bool", "vector", "enum" }; typedef struct { const char *option; - bool bSet; + gmx_bool bSet; int type; union { void *v; /* This is a nasty workaround, to be able to use initialized */ @@ -131,21 +131,21 @@ typedef struct { real *r; const char **c; /* Must be pointer to string (when type == etSTR) */ /* or null terminated list of enums (when type == etENUM) */ - bool *b; + gmx_bool *b; rvec *rv; } u; const char *desc; } t_pargs; void get_pargs(int *argc,char *argv[],int nparg,t_pargs pa[], - bool bKeepArgs); + gmx_bool bKeepArgs); /* Read a number of arguments from the command line. * For etINT, etREAL and etCHAR an extra argument is read (when present) - * for etBOOL the boolean option is changed to the negate value + * for etBOOL the gmx_boolean option is changed to the negate value * If !bKeepArgs, the command line arguments are removed from the command line */ -bool is_hidden(t_pargs *pa); +gmx_bool is_hidden(t_pargs *pa); /* Return TRUE when the option is a secret one */ char *pa_val(t_pargs *pa,char *buf, int sz); @@ -155,7 +155,7 @@ char *pa_val(t_pargs *pa,char *buf, int sz); int opt2parg_int(const char *option,int nparg,t_pargs pa[]); -bool opt2parg_bool(const char *option,int nparg,t_pargs pa[]); +gmx_bool opt2parg_gmx_bool(const char *option,int nparg,t_pargs pa[]); real opt2parg_real(const char *option,int nparg,t_pargs pa[]); @@ -163,11 +163,11 @@ const char *opt2parg_str(const char *option,int nparg,t_pargs pa[]); const char *opt2parg_enum(const char *option,int nparg,t_pargs pa[]); -bool opt2parg_bSet(const char *option,int nparg,t_pargs pa[]); +gmx_bool opt2parg_bSet(const char *option,int nparg,t_pargs pa[]); -void print_pargs(FILE *fp, int npargs,t_pargs pa[],bool bLeadingSpace); +void print_pargs(FILE *fp, int npargs,t_pargs pa[],gmx_bool bLeadingSpace); -char *pargs_print_line(t_pargs *pa,bool bLeadingSpace); +char *pargs_print_line(t_pargs *pa,gmx_bool bLeadingSpace); void pr_enums(FILE *fp, int npargs,t_pargs pa[],int shell); diff --git a/include/resall.h b/include/resall.h index e23f808009..69cbb1f843 100644 --- a/include/resall.h +++ b/include/resall.h @@ -61,7 +61,7 @@ gpp_atomtype_t read_atype(const char *ffdir,t_symtab *tab); void read_resall(char *resdb, int *nrtp,t_restp **rtp, gpp_atomtype_t atype, t_symtab *tab, - bool bAllowOverrideRTP); + gmx_bool bAllowOverrideRTP); /* read rtp database, append to the existing database */ void print_resall(FILE *out, int nrtp, t_restp rtp[], diff --git a/include/selection.h b/include/selection.h index 3bf5f9bb87..0b2fbe8286 100644 --- a/include/selection.h +++ b/include/selection.h @@ -76,11 +76,11 @@ typedef struct gmx_ana_selection_t /** Pointer to the index group that holds the selected atoms. */ struct gmx_ana_index_t *g; /** TRUE if the value can change as a function of time. */ - bool bDynamic; + gmx_bool bDynamic; /** Type of the covered fraction. */ e_coverfrac_t cfractype; /** TRUE if the covered fraction depends on the frame. */ - bool bCFracDyn; + gmx_bool bCFracDyn; /** Covered fraction of the selection for the current frame. */ real cfrac; /** The average covered fraction (over the trajectory). */ @@ -110,7 +110,7 @@ gmx_ana_selection_name(gmx_ana_selection_t *sel); void gmx_ana_selection_print_info(gmx_ana_selection_t *sel); /** Initializes the information for covered fraction. */ -bool +gmx_bool gmx_ana_selection_init_coverfrac(gmx_ana_selection_t *sel, e_coverfrac_t type); /** Creates a new empty selection collection. */ @@ -126,15 +126,15 @@ gmx_ana_selcollection_set_refpostype(gmx_ana_selcollection_t *sc, const char *ty /** Sets the default output position handling for a selection collection. */ void gmx_ana_selcollection_set_outpostype(gmx_ana_selcollection_t *sc, - const char *type, bool bMaskOnly); + const char *type, gmx_bool bMaskOnly); /** Request evaluation of velocities for selections. */ void gmx_ana_selcollection_set_veloutput(gmx_ana_selcollection_t *sc, - bool bVelOut); + gmx_bool bVelOut); /** Request evaluation of forces for selections. */ void gmx_ana_selcollection_set_forceoutput(gmx_ana_selcollection_t *sc, - bool bForceOut); + gmx_bool bForceOut); /** Sets the topology for a selection collection. */ int gmx_ana_selcollection_set_topology(gmx_ana_selcollection_t *sc, t_topology *top, @@ -146,11 +146,11 @@ gmx_ana_selcollection_get_count(gmx_ana_selcollection_t *sc); gmx_ana_selection_t * gmx_ana_selcollection_get_selection(gmx_ana_selcollection_t *sc, int i); /** Returns TRUE if the collection requires topology information for evaluation. */ -bool +gmx_bool gmx_ana_selcollection_requires_top(gmx_ana_selcollection_t *sc); /** Prints a human-readable version of the internal selection element tree. */ void -gmx_ana_selcollection_print_tree(FILE *fp, gmx_ana_selcollection_t *sc, bool bValues); +gmx_ana_selcollection_print_tree(FILE *fp, gmx_ana_selcollection_t *sc, gmx_bool bValues); /** Prints the selection strings into an XVGR file as comments. */ void xvgr_selcollection(FILE *fp, gmx_ana_selcollection_t *sc, @@ -161,7 +161,7 @@ xvgr_selcollection(FILE *fp, gmx_ana_selcollection_t *sc, int gmx_ana_selcollection_parse_stdin(gmx_ana_selcollection_t *sc, int nr, gmx_ana_indexgrps_t *grps, - bool bInteractive); + gmx_bool bInteractive); /** Parses selection(s) from a file. */ int gmx_ana_selcollection_parse_file(gmx_ana_selcollection_t *sc, const char *fnm, @@ -174,7 +174,7 @@ gmx_ana_selcollection_parse_str(gmx_ana_selcollection_t *sc, const char *str, /* In compiler.c */ /** Set debugging flag for selection compilation. */ void -gmx_ana_selcollection_set_compile_debug(gmx_ana_selcollection_t *sc, bool bDebug); +gmx_ana_selcollection_set_compile_debug(gmx_ana_selcollection_t *sc, gmx_bool bDebug); /** Prepares the selections for evaluation and performs some optimizations. */ int gmx_ana_selcollection_compile(gmx_ana_selcollection_t *sc); diff --git a/include/selvalue.h b/include/selvalue.h index 7972d0b3c7..8460fe89a3 100644 --- a/include/selvalue.h +++ b/include/selvalue.h @@ -47,7 +47,7 @@ extern "C" /** Defines the value type of a different selection objects. */ typedef enum { - NO_VALUE, /**< No value; either an error condition or an boolean + NO_VALUE, /**< No value; either an error condition or an gmx_boolean parameter. */ INT_VALUE, /**< One or more integer values. */ REAL_VALUE, /**< One or more real values. */ @@ -93,7 +93,7 @@ typedef struct gmx_ana_selvalue_t /** Group value (type \ref GROUP_VALUE). */ struct gmx_ana_index_t *g; /** Boolean value (only parameters of type \ref NO_VALUE); */ - bool *b; + gmx_bool *b; } u; /*! \brief * Number of elements allocated for the value array. diff --git a/include/sfactor.h b/include/sfactor.h index c2258945b1..8458a87142 100644 --- a/include/sfactor.h +++ b/include/sfactor.h @@ -78,7 +78,7 @@ double CMSF (gmx_structurefactors_t *gsf,int type,int nh,double lambda, double s int return_atom_type (const char *name,gmx_structurefactors_t *gsf); void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, atom_id * index, - int isize, t_topology * top, bool flag,gmx_structurefactors_t *gsf); + int isize, t_topology * top, gmx_bool flag,gmx_structurefactors_t *gsf); int do_scattering_intensity (const char* fnTPS, const char* fnNDX, const char* fnXVG, const char *fnTRX, diff --git a/include/shellfc.h b/include/shellfc.h index aba70cdd37..9eeed7b8e1 100644 --- a/include/shellfc.h +++ b/include/shellfc.h @@ -51,10 +51,10 @@ void make_local_shells(t_commrec *cr,t_mdatoms *md, gmx_shellfc_t shfc); /* Optimize shell positions */ -int relax_shell_flexcon(FILE *log,t_commrec *cr,bool bVerbose, +int relax_shell_flexcon(FILE *log,t_commrec *cr,gmx_bool bVerbose, gmx_large_int_t mdstep,t_inputrec *inputrec, - bool bDoNS,int force_flags, - bool bStopCM, + gmx_bool bDoNS,int force_flags, + gmx_bool bStopCM, gmx_localtop_t *top, gmx_mtop_t *mtop, gmx_constr_t constr, @@ -67,9 +67,9 @@ int relax_shell_flexcon(FILE *log,t_commrec *cr,bool bVerbose, gmx_groups_t *groups, gmx_shellfc_t shfc, t_forcerec *fr, - bool bBornRadii, + gmx_bool bBornRadii, double t,rvec mu_tot, - int natoms,bool *bConverged, + int natoms,gmx_bool *bConverged, gmx_vsite_t *vsite, FILE *fp_field); diff --git a/include/sighandler.h b/include/sighandler.h index 7c8a2bcb72..cf40bbbd93 100644 --- a/include/sighandler.h +++ b/include/sighandler.h @@ -78,7 +78,7 @@ const char *gmx_get_signal_name(void); /* check whether we received a USR1 signal. The condition is reset once a TRUE value is returned, so this function only returns TRUE once for a single signal. */ -bool gmx_got_usr_signal(void); +gmx_bool gmx_got_usr_signal(void); #ifdef __cplusplus diff --git a/include/sparsematrix.h b/include/sparsematrix.h index eb412c8b2b..27993c2f16 100644 --- a/include/sparsematrix.h +++ b/include/sparsematrix.h @@ -103,7 +103,7 @@ gmx_sparsematrix_entry typedef struct gmx_sparsematrix { - bool compressed_symmetric; /*!< Store half elements and assume symmetry. */ + gmx_bool compressed_symmetric; /*!< Store half elements and assume symmetry. */ int nrow; /*!< Number of rows in matrix */ int * ndata; /*!< Number of entries on each row (list) */ int * nalloc; /*!< Allocated entry list length for each row */ diff --git a/include/splitter.h b/include/splitter.h index 31d34da66b..5fb0832f10 100644 --- a/include/splitter.h +++ b/include/splitter.h @@ -57,7 +57,7 @@ void split_top(FILE *fp,int nnodes,gmx_localtop_t *top, void gen_sblocks(FILE *fp,int at_start,int at_end, t_idef *idef,t_blocka *sblock, - bool bSettle); + gmx_bool bSettle); /* Generate shake blocks from the constraint list. Set bSettle to yes for shake * blocks including settles. You normally do not want this. */ diff --git a/include/statutil.h b/include/statutil.h index 9513e15ee4..d66f4fcc85 100644 --- a/include/statutil.h +++ b/include/statutil.h @@ -60,7 +60,7 @@ extern "C" { */ enum { TBEGIN, TEND, TDELTA, TNR }; -bool bTimeSet(int tcontrol); +gmx_bool bTimeSet(int tcontrol); real rTimeValue(int tcontrol); @@ -74,7 +74,7 @@ typedef struct t_trxstatus t_trxstatus; typedef int t_first_x(t_trxstatus **status,const char *fn,real *t,rvec **x, matrix box); -typedef bool t_next_x(t_trxstatus *status,real *t,int natoms,rvec x[], +typedef gmx_bool t_next_x(t_trxstatus *status,real *t,int natoms,rvec x[], matrix box); /* I/O function types */ @@ -108,8 +108,8 @@ const char *ShortProgram(void); int prec2ndec(real prec); /* Convert precision in 1/(nm) to number of decimal places */ -void clear_trxframe(t_trxframe *fr,bool bFirst); -/* Set all content booleans to FALSE. +void clear_trxframe(t_trxframe *fr,gmx_bool bFirst); +/* Set all content gmx_booleans to FALSE. * When bFirst = TRUE, set natoms=-1, all pointers to NULL * and all data to zero. */ @@ -126,7 +126,7 @@ int write_trxframe_indexed(t_trxstatus *status,t_trxframe *fr,int nind, int write_trxframe(t_trxstatus *status,t_trxframe *fr,gmx_conect gc); /* Write a frame to a TRX file. - * Only entries for which the boolean is TRUE will be written, + * Only entries for which the gmx_boolean is TRUE will be written, * except for step, time, lambda and/or box, which may not be * omitted for certain trajectory formats. * The precision for .xtc and .gro is fr->prec, when fr->bPrec=FALSE, @@ -154,7 +154,7 @@ t_trxstatus *open_trx(const char *outfile,const char *filemode); t_fileio *trx_get_fileio(t_trxstatus *status); -bool bRmod_fd(double a, double b, double c,bool bDouble); +gmx_bool bRmod_fd(double a, double b, double c,gmx_bool bDouble); /* Returns TRUE when (a - b) MOD c = 0, using a margin which is slightly * larger than the float/double precision. */ @@ -165,7 +165,7 @@ bool bRmod_fd(double a, double b, double c,bool bDouble); #define bRmod(a,b,c) bRmod_fd(a,b,c,FALSE) #endif -int check_times2(real t,real t0,real tp,real tpp,bool bDouble); +int check_times2(real t,real t0,real tp,real tpp,gmx_bool bDouble); /* This routine checkes if the read-in time is correct or not; * returns -1 if tflags. * Returns TRUE when succeeded, FALSE otherwise. @@ -230,7 +230,7 @@ int read_first_x(const output_env_t oenv,t_trxstatus **status, * The integer in status should be passed to calls of read_next_x */ -bool read_next_x(const output_env_t oenv,t_trxstatus *status,real *t, +gmx_bool read_next_x(const output_env_t oenv,t_trxstatus *status,real *t, int natoms, rvec x[],matrix box); /* Read coordinates and box from a trajectory file. Return TRUE when all well, * or FALSE when end of file (or last frame requested by user). diff --git a/include/strdb.h b/include/strdb.h index 8f44b6c5db..bfdf077618 100644 --- a/include/strdb.h +++ b/include/strdb.h @@ -43,13 +43,13 @@ extern "C" { #endif -bool get_a_line(FILE *fp,char line[],int n); +gmx_bool get_a_line(FILE *fp,char line[],int n); /* Read a line of at most n characters form *fp to line. * Comment ';...' and leading spaces are removed, empty lines are skipped. * Return FALSE when eof. */ -bool get_header(char line[],char header[]); +gmx_bool get_header(char line[],char header[]); /* Read a header between '[' and ']' from line to header. * Returns FALSE no header is found. */ diff --git a/include/string2.h b/include/string2.h index 5077c3409b..6d949384c4 100644 --- a/include/string2.h +++ b/include/string2.h @@ -109,7 +109,7 @@ char *gmx_strsep(char **stringp, const char *delim); char *wrap_lines(const char *buf,int line_width, int indent, - bool bIndentFirst); + gmx_bool bIndentFirst); /* wraps lines at 'linewidth', indenting all following * lines by 'indent' spaces. A temp buffer is allocated and returned, * which can be disposed of if no longer needed. diff --git a/include/tgroup.h b/include/tgroup.h index 63f2b9235a..1cf5cc01c2 100644 --- a/include/tgroup.h +++ b/include/tgroup.h @@ -59,7 +59,7 @@ void accumulate_u(t_commrec *cr,t_grpopts *opts, */ real sum_ekin(t_grpopts *opts,gmx_ekindata_t *ekind, real *dekindlambda, - bool bEkinFullStep,bool bSaveEkinOld, bool bScaleEkin); + gmx_bool bEkinFullStep,gmx_bool bSaveEkinOld, gmx_bool bScaleEkin); /* Sum the group ekins into total ekin and calc temp per group, * return total temperature. */ diff --git a/include/topsort.h b/include/topsort.h index cd755bd08d..9b11a9f8d6 100644 --- a/include/topsort.h +++ b/include/topsort.h @@ -10,7 +10,7 @@ extern "C" { /* Returns if the are bonded interactions for free energy calculations */ -bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop); +gmx_bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop); /* Sort all the bonded ilists in idef to have the perturbed ones at the end * and set nr_nr_nonperturbed in ilist. diff --git a/include/toputil.h b/include/toputil.h index b69aad3421..f85bec1db5 100644 --- a/include/toputil.h +++ b/include/toputil.h @@ -80,7 +80,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, - bool bRTPresname); + gmx_bool bRTPresname); void print_bondeds(FILE *out,int natoms,directive d, int ftype,int fsubtype,t_params plist[]); diff --git a/include/tpxio.h b/include/tpxio.h index ff5e4692d1..f4a5c8cdcd 100644 --- a/include/tpxio.h +++ b/include/tpxio.h @@ -85,7 +85,7 @@ t_fileio *open_tpx(const char *fn, const char *mode); void close_tpx(t_fileio *fio); /* Close the file corresponding to fio */ -void read_tpxheader(const char *fn, t_tpxheader *tpx, bool TopOnlyOK, +void read_tpxheader(const char *fn, t_tpxheader *tpx, gmx_bool TopOnlyOK, int *version, int *generation); /* Read the header from a tpx file and then close it again. * By setting TopOnlyOK to true, it is possible to read future @@ -122,11 +122,11 @@ int read_tpx_top(const char *fn, rvec *x,rvec *v,rvec *f,t_topology *top); /* As read_tpx, but for the old t_topology struct */ -bool fn2bTPX(const char *file); +gmx_bool fn2bTPX(const char *file); /* return if *file is one of the TPX file types */ -bool read_tps_conf(const char *infile,char *title,t_topology *top, - int *ePBC, rvec **x,rvec **v,matrix box,bool bMass); +gmx_bool read_tps_conf(const char *infile,char *title,t_topology *top, + int *ePBC, rvec **x,rvec **v,matrix box,gmx_bool bMass); /* Read title, top.atoms, x, v (if not NULL) and box from an STX file, * memory for atoms, x and v will be allocated. * Return TRUE if a complete topology was read. diff --git a/include/trajana.h b/include/trajana.h index 933eb8dad8..8000a81033 100644 --- a/include/trajana.h +++ b/include/trajana.h @@ -195,10 +195,10 @@ int gmx_ana_set_nanagrps(gmx_ana_traj_t *d, int nanagrps); /** Sets whether PBC are used. */ int -gmx_ana_set_pbc(gmx_ana_traj_t *d, bool bPBC); +gmx_ana_set_pbc(gmx_ana_traj_t *d, gmx_bool bPBC); /** Sets whether molecules are made whole. */ int -gmx_ana_set_rmpbc(gmx_ana_traj_t *d, bool bRmPBC); +gmx_ana_set_rmpbc(gmx_ana_traj_t *d, gmx_bool bRmPBC); /** Sets flags that determine what to read from the trajectory. */ int gmx_ana_set_frflags(gmx_ana_traj_t *d, int frflags); @@ -218,11 +218,11 @@ int gmx_ana_init_coverfrac(gmx_ana_traj_t *d, e_coverfrac_t type); /** Returns whether PBC should be used. */ -bool +gmx_bool gmx_ana_has_pbc(gmx_ana_traj_t *d); /** Gets the topology information. */ int -gmx_ana_get_topology(gmx_ana_traj_t *d, bool bReq, t_topology **top, bool *bTop); +gmx_ana_get_topology(gmx_ana_traj_t *d, gmx_bool bReq, t_topology **top, gmx_bool *bTop); /** Gets the configuration from the topology. */ int gmx_ana_get_topconf(gmx_ana_traj_t *d, rvec **x, matrix box, int *ePBC); diff --git a/include/trnio.h b/include/trnio.h index f14908ea9f..192f4b19a5 100644 --- a/include/trnio.h +++ b/include/trnio.h @@ -61,7 +61,7 @@ extern "C" { typedef struct /* This struct describes the order and the */ /* sizes of the structs in a trjfile, sizes are given in bytes. */ { - bool bDouble; /* Double precision? */ + gmx_bool bDouble; /* Double precision? */ int ir_size; /* Backward compatibility */ int e_size; /* Backward compatibility */ int box_size; /* Non zero if a box is present */ @@ -86,7 +86,7 @@ t_fileio *open_trn(const char *fn,const char *mode); void close_trn(t_fileio *fio); /* Close it */ -bool fread_trnheader(t_fileio *fio,t_trnheader *trn,bool *bOK); +gmx_bool fread_trnheader(t_fileio *fio,t_trnheader *trn,gmx_bool *bOK); /* Read the header of a trn file. Return FALSE if there is no frame. * bOK will be FALSE when the header is incomplete. */ @@ -98,7 +98,7 @@ void read_trnheader(const char *fn,t_trnheader *header); void pr_trnheader(FILE *fp,int indent,char *title,t_trnheader *sh); /* Print the header of a trn file to fp */ -bool is_trn(FILE *fp); +gmx_bool is_trn(FILE *fp); /* Return true when the file is a trn file. File will be rewound * afterwards. */ @@ -107,14 +107,14 @@ void fwrite_trn(t_fileio *fio,int step,real t,real lambda, rvec *box,int natoms,rvec *x,rvec *v,rvec *f); /* Write a trn frame to file fp, box, x, v, f may be NULL */ -bool fread_htrn(t_fileio *fio,t_trnheader *sh, +gmx_bool fread_htrn(t_fileio *fio,t_trnheader *sh, rvec *box,rvec *x,rvec *v,rvec *f); /* Extern read a frame except the header (that should be pre-read, * using routine read_trnheader, see above) from a trn file. * Return FALSE on error */ -bool fread_trn(t_fileio *fio,int *step,real *t,real *lambda, +gmx_bool fread_trn(t_fileio *fio,int *step,real *t,real *lambda, rvec *box,int *natoms,rvec *x,rvec *v,rvec *f); /* Read a trn frame, including the header from fp. box, x, v, f may * be NULL, in which case the data will be skipped over. diff --git a/include/txtdump.h b/include/txtdump.h index 1b91b75514..79191b09b5 100644 --- a/include/txtdump.h +++ b/include/txtdump.h @@ -56,30 +56,30 @@ int available(FILE *fp,void *p,int indent,const char *title); int pr_title(FILE *fp,int indent,const char *title); int pr_title_n(FILE *fp,int indent,const char *title,int n); int pr_title_nxn(FILE *fp,int indent,const char *title,int n1,int n2); -void pr_ivec(FILE *fp,int indent,const char *title,int vec[],int n, bool bShowNumbers); -void pr_ivecs(FILE *fp,int indent,const char *title,ivec vec[],int n, bool bShowNumbers); -void pr_bvec(FILE *fp,int indent,const char *title,bool vec[],int n, bool bShowNnumbers); -void pr_rvec(FILE *fp,int indent,const char *title,real vec[],int n, bool bShowNumbers); -void pr_dvec(FILE *fp,int indent,const char *title,double vec[],int n, bool bShowNumbers); +void pr_ivec(FILE *fp,int indent,const char *title,int vec[],int n, gmx_bool bShowNumbers); +void pr_ivecs(FILE *fp,int indent,const char *title,ivec vec[],int n, gmx_bool bShowNumbers); +void pr_bvec(FILE *fp,int indent,const char *title,gmx_bool vec[],int n, gmx_bool bShowNnumbers); +void pr_rvec(FILE *fp,int indent,const char *title,real vec[],int n, gmx_bool bShowNumbers); +void pr_dvec(FILE *fp,int indent,const char *title,double vec[],int n, gmx_bool bShowNumbers); void pr_rvecs(FILE *fp,int indent,const char *title,rvec vec[],int n); void pr_rvecs_len(FILE *fp,int indent,const char *title,rvec vec[],int n); void pr_reals(FILE *fp,int indent,const char *title,real vec[],int n); void pr_doubles(FILE *fp,int indent,const char *title,double *vec,int n); -void pr_block(FILE *fp,int indent,const char *title,t_block *block,bool bShowNumbers); -void pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block,bool bShowNumbers); +void pr_block(FILE *fp,int indent,const char *title,t_block *block,gmx_bool bShowNumbers); +void pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block,gmx_bool bShowNumbers); void pr_ilist(FILE *fp,int indent,const char *title, - t_functype *functype,t_ilist *ilist, bool bShowNumbers); + t_functype *functype,t_ilist *ilist, gmx_bool bShowNumbers); void pr_iparams(FILE *fp,t_functype ftype,t_iparams *iparams); -void pr_idef(FILE *fp,int indent,const char *title,t_idef *idef, bool bShowNumbers); +void pr_idef(FILE *fp,int indent,const char *title,t_idef *idef, gmx_bool bShowNumbers); void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir, - bool bMDPformat); + gmx_bool bMDPformat); void pr_atoms(FILE *fp,int indent,const char *title,t_atoms *atoms, - bool bShownumbers); + gmx_bool bShownumbers); void pr_atomtypes(FILE *fp,int indent,const char *title, - t_atomtypes *atomtypes,bool bShowNumbers); + t_atomtypes *atomtypes,gmx_bool bShowNumbers); void pr_mtop(FILE *fp,int indent,const char *title,gmx_mtop_t *mtop, - bool bShowNumbers); -void pr_top(FILE *fp,int indent,const char *title,t_topology *top, bool bShowNumbers); + gmx_bool bShowNumbers); +void pr_top(FILE *fp,int indent,const char *title,t_topology *top, gmx_bool bShowNumbers); /* * This routine prints out a (human) readable representation of * the topology to the file fp. Ident specifies the number of diff --git a/include/typedefs.h b/include/typedefs.h index 531e64ad61..db73583d51 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -87,7 +87,7 @@ extern "C" { /* This factor leads to 4 realloc calls to double the array size */ #define OVER_ALLOC_FAC 1.19 -void set_over_alloc_dd(bool set); +void set_over_alloc_dd(gmx_bool set); /* Turns over allocation for variable size atoms/cg/top arrays on or off, * default is off. */ @@ -141,7 +141,7 @@ void done_blocka(t_blocka *block); void done_atom (t_atoms *at); void done_moltype(gmx_moltype_t *molt); void done_molblock(gmx_molblock_t *molb); -void done_mtop(gmx_mtop_t *mtop,bool bDoneSymtab); +void done_mtop(gmx_mtop_t *mtop,gmx_bool bDoneSymtab); void done_top(t_topology *top); void done_inputrec(t_inputrec *ir); void done_state(t_state *state); @@ -152,7 +152,7 @@ void set_box_rel(t_inputrec *ir,t_state *state); void preserve_box_shape(t_inputrec *ir,matrix box_rel,matrix b); /* Preserve the box shape, b can be box or boxv */ -void stupid_fill_block(t_block *grp, int natom,bool bOneIndexGroup); +void stupid_fill_block(t_block *grp, int natom,gmx_bool bOneIndexGroup); /* Fill a block structure with numbers identical to the index * (0, 1, 2, .. natom-1) * If bOneIndexGroup, then all atoms are lumped in one index group, @@ -165,7 +165,7 @@ void stupid_fill_blocka(t_blocka *grp, int natom); * There is one atom per index entry */ -void init_t_atoms(t_atoms *atoms, int natoms, bool bPdbinfo); +void init_t_atoms(t_atoms *atoms, int natoms, gmx_bool bPdbinfo); /* allocate memory for the arrays, set nr to natoms and nres to 0 * set pdbinfo to NULL or allocate memory for it */ @@ -182,7 +182,7 @@ void t_atoms_set_resinfo(t_atoms *atoms,int atom_ind,t_symtab *symtab, * of atom index atom_ind. */ -void free_t_atoms(t_atoms *atoms,bool bFreeNames); +void free_t_atoms(t_atoms *atoms,gmx_bool bFreeNames); /* Free all the arrays and set the nr and nres to 0. * bFreeNames tells if to free the atom and residue name strings, * don't free them if they still need to be used in e.g. the topology struct. diff --git a/include/types/atoms.h b/include/types/atoms.h index b300bfd932..8c73a84fec 100644 --- a/include/types/atoms.h +++ b/include/types/atoms.h @@ -74,7 +74,7 @@ typedef struct { char atomnm[6]; /* True atom name including spaces */ real occup; /* Occupancy */ real bfac; /* B-factor */ - bool bAnisotropic; /* (an)isotropic switch */ + gmx_bool bAnisotropic; /* (an)isotropic switch */ int uij[6]; /* Anisotropic B-factor */ } t_pdbinfo; diff --git a/include/types/commrec.h b/include/types/commrec.h index b20eb635b9..6a07aeffa4 100644 --- a/include/types/commrec.h +++ b/include/types/commrec.h @@ -131,7 +131,7 @@ typedef struct { int nnodes; MPI_Comm mpi_comm_all; /* Use MPI_Sendrecv communication instead of non-blocking calls */ - bool bSendRecv2; + gmx_bool bSendRecv2; /* The local DD cell index and rank */ ivec ci; int rank; @@ -139,7 +139,7 @@ typedef struct { int masterrank; /* Communication with the PME only nodes */ int pme_nodeid; - bool pme_receive_vir_ener; + gmx_bool pme_receive_vir_ener; gmx_pme_comm_n_box_p_t cnb; int nreq_pme; MPI_Request req_pme[4]; @@ -149,13 +149,13 @@ typedef struct { ivec nc; int ndim; ivec dim; /* indexed by 0 to ndim */ - bool bGridJump; + gmx_bool bGridJump; /* PBC from dim 0 to npbcdim */ int npbcdim; /* Screw PBC? */ - bool bScrewPBC; + gmx_bool bScrewPBC; /* Forward and backward neighboring cells, indexed by 0 to ndim */ int neighbor[DIM][2]; @@ -164,7 +164,7 @@ typedef struct { gmx_domdec_master_p_t ma; /* Are there inter charge group constraints */ - bool bInterCGcons; + gmx_bool bInterCGcons; /* Global atom number to interaction list */ gmx_reverse_top_p_t reverse_top; diff --git a/include/types/enums.h b/include/types/enums.h index 9b94969089..4df68277eb 100644 --- a/include/types/enums.h +++ b/include/types/enums.h @@ -158,14 +158,14 @@ enum { /* separate_dhdl_file selection */ enum { - /* NOTE: YES is the first one. Do NOT interpret this one as a bool */ + /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */ sepdhdlfileYES, sepdhdlfileNO, sepdhdlfileNR }; /* dhdl_derivatives selection */ enum { - /* NOTE: YES is the first one. Do NOT interpret this one as a bool */ + /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */ dhdlderivativesYES, dhdlderivativesNO, dhdlderivativesNR }; diff --git a/include/types/fcdata.h b/include/types/fcdata.h index b10e5d7fc5..634a477245 100644 --- a/include/types/fcdata.h +++ b/include/types/fcdata.h @@ -44,7 +44,7 @@ typedef real rvec5[5]; /* Distance restraining stuff */ typedef struct { int dr_weighting; /* Weighting of pairs in one restraint */ - bool dr_bMixed; /* Use sqrt of the instantaneous times * + gmx_bool dr_bMixed; /* Use sqrt of the instantaneous times * * the time averaged violation */ real dr_fc; /* Force constant for disres, * * which is multiplied by a (possibly) * diff --git a/include/types/forcerec.h b/include/types/forcerec.h index 51e619a4b4..405b503bd0 100644 --- a/include/types/forcerec.h +++ b/include/types/forcerec.h @@ -129,19 +129,19 @@ typedef struct ewald_tab *ewald_tab_t; typedef struct { /* Domain Decomposition */ - bool bDomDec; + gmx_bool bDomDec; /* PBC stuff */ int ePBC; - bool bMolPBC; + gmx_bool bMolPBC; int rc_scaling; rvec posres_com; rvec posres_comB; - bool UseOptimizedKernels; + gmx_bool UseOptimizedKernels; /* Use special N*N kernels? */ - bool bAllvsAll; + gmx_bool bAllvsAll; /* Private work data */ void *AllvsAll_work; void *AllvsAll_workgb; @@ -184,8 +184,8 @@ typedef struct { real fudgeQQ; /* Table stuff */ - bool bcoultab; - bool bvdwtab; + gmx_bool bcoultab; + gmx_bool bvdwtab; /* The normal tables are in the nblists struct(s) below */ t_forcetable tab14; /* for 1-4 interactions only */ @@ -204,7 +204,7 @@ typedef struct { int sc_power; real sc_sigma6_def; real sc_sigma6_min; - bool bSepDVDL; + gmx_bool bSepDVDL; /* NS Stuff */ int eeltype; @@ -215,8 +215,8 @@ typedef struct { * It can be set to esolNO to disable all water optimization */ int solvent_opt; int nWatMol; - bool bGrid; - bool bExcl_IntraCGAll_InterCGNone; + gmx_bool bGrid; + gmx_bool bExcl_IntraCGAll_InterCGNone; cginfo_mb_t *cginfo_mb; int *cginfo; rvec *cg_cm; @@ -238,7 +238,7 @@ typedef struct { * include shells are done, then after minimsation is converged the remaining * forces are computed. */ - /* bool *bMask; */ + /* gmx_bool *bMask; */ /* The number of charge groups participating in do_force_lowlevel */ int ncg_force; @@ -250,14 +250,14 @@ typedef struct { int nalloc_force; /* Twin Range stuff, f_twin has size natoms_force */ - bool bTwinRange; + gmx_bool bTwinRange; int nlr; rvec *f_twin; /* Forces that should not enter into the virial summation: * PPPM/PME/Ewald/posres */ - bool bF_NoVirSum; + gmx_bool bF_NoVirSum; int f_novirsum_n; int f_novirsum_nalloc; rvec *f_novirsum_alloc; @@ -271,7 +271,7 @@ typedef struct { tensor vir_el_recip; /* PME/Ewald stuff */ - bool bEwald; + gmx_bool bEwald; real ewaldcoeff; ewald_tab_t ewald_table; @@ -282,7 +282,7 @@ typedef struct { /* Non bonded Parameter lists */ int ntype; /* Number of atom types */ - bool bBHAM; + gmx_bool bBHAM; real *nbfp; /* Energy group pair flags */ @@ -292,7 +292,7 @@ typedef struct { real fc_stepsize; /* Generalized born implicit solvent */ - bool bGB; + gmx_bool bGB; /* Generalized born stuff */ real gb_epsilon_solvent; /* Table data for GB */ @@ -336,13 +336,13 @@ typedef struct { * Only the energy difference due to the addition of the last molecule * should be calculated. */ - bool n_tpi; + gmx_bool n_tpi; /* Neighbor searching stuff */ gmx_ns_t ns; /* QMMM stuff */ - bool bQMMM; + gmx_bool bQMMM; t_QMMMrec *qr; /* QM-MM neighborlists */ diff --git a/include/types/graph.h b/include/types/graph.h index 1fcc613871..b9b1935522 100644 --- a/include/types/graph.h +++ b/include/types/graph.h @@ -49,7 +49,7 @@ typedef struct { int end; /* The last atom in this graph */ int *nedge; /* For each node the number of edges */ atom_id **edge; /* For each node, the actual edges (bidirect.) */ - bool bScrewPBC; /* Screw boundary conditions */ + gmx_bool bScrewPBC; /* Screw boundary conditions */ ivec *ishift; /* Shift for each particle */ int negc; egCol *egc; /* color of each node */ diff --git a/include/types/group.h b/include/types/group.h index 3a0adb07cd..0b407bb1fd 100644 --- a/include/types/group.h +++ b/include/types/group.h @@ -68,7 +68,7 @@ typedef struct { } t_cos_acc; typedef struct { - bool bNEMD; + gmx_bool bNEMD; int ngtc; /* The number of T-coupling groups */ t_grp_tcstat *tcstat; /* T-coupling data */ int ngacc; /* The number of acceleration groups */ diff --git a/include/types/inputrec.h b/include/types/inputrec.h index b6990a0a60..7c993638fc 100644 --- a/include/types/inputrec.h +++ b/include/types/inputrec.h @@ -84,14 +84,14 @@ typedef struct { int *QMbasis; /* Basisset in the QM calculation */ int *QMcharge; /* Total charge in the QM region */ int *QMmult; /* Spin multiplicicty in the QM region */ - bool *bSH; /* surface hopping (diabatic hop only) */ + gmx_bool *bSH; /* surface hopping (diabatic hop only) */ int *CASorbitals; /* number of orbiatls in the active space */ int *CASelectrons;/* number of electrons in the active space */ real *SAon; /* at which gap (A.U.) the SA is switched on */ real *SAoff; int *SAsteps; /* in how many steps SA goes from 1-1 to 0.5-0.5*/ - bool *bOPT; - bool *bTS; + gmx_bool *bOPT; + gmx_bool *bTS; } t_grpopts; enum { epgrppbcNONE, epgrppbcREFAT, epgrppbcCOS }; @@ -132,9 +132,9 @@ typedef struct { int nstfout; /* Output frequency for pull f */ int ePBC; /* the boundary conditions */ int npbcdim; /* do pbc in dims 0 <= dim < npbcdim */ - bool bRefAt; /* do we need reference atoms for a group COM ? */ + gmx_bool bRefAt; /* do we need reference atoms for a group COM ? */ int cosdim; /* dimension for cosine weighting, -1 if none */ - bool bVirial; /* do we need to add the pull virial? */ + gmx_bool bVirial; /* do we need to add the pull virial? */ t_pullgrp *grp; /* groups to pull/restrain/etc/ */ t_pullgrp *dyna; /* dynamic groups for use with local constraints */ rvec *rbuf; /* COM calculation buffer */ @@ -174,10 +174,10 @@ typedef struct { /* the real/reciprocal space relative weight */ int ewald_geometry; /* normal/3d ewald, or pseudo-2d LR corrections */ real epsilon_surface; /* Epsilon for PME dipole correction */ - bool bOptFFT; /* optimize the fft plan at start */ + gmx_bool bOptFFT; /* optimize the fft plan at start */ int ePBC; /* Type of periodic boundary conditions */ int bPeriodicMols; /* Periodic molecules */ - bool bContinuation; /* Continuation run: starting state is correct */ + gmx_bool bContinuation; /* Continuation run: starting state is correct */ int etc; /* temperature coupling */ int nsttcouple; /* interval in steps for temperature coupling */ int epc; /* pressure coupling */ @@ -228,15 +228,15 @@ typedef struct { real sc_sigma_min; /* minimum FE sc sigma (default: =sg_sigma) */ int nstdhdl; /* The frequency for writing to dhdl.xvg */ int separate_dhdl_file; /* whether to write a separate dhdl.xvg file - note: NOT a bool, but an enum */ + note: NOT a gmx_bool, but an enum */ int dhdl_derivatives;/* whether to calculate+write dhdl derivatives - note: NOT a bool, but an enum */ + note: NOT a gmx_bool, but an enum */ int dh_hist_size; /* The maximum size for the dH histogram */ double dh_hist_spacing; /* The spacing for the dH histogram */ int eDisre; /* Type of distance restraining */ real dr_fc; /* force constant for ta_disre */ int eDisreWeighting; /* type of weighting of pairs in one restraints */ - bool bDisreMixed; /* Use comb of time averaged and instan. viol's */ + gmx_bool bDisreMixed; /* Use comb of time averaged and instan. viol's */ int nstdisreout; /* frequency of writing pair distances to enx */ real dr_tau; /* time constant for memory function in disres */ real orires_fc; /* force constant for orientational restraints */ @@ -256,7 +256,7 @@ typedef struct { int nProjOrder; /* Order of the LINCS Projection Algorithm */ real LincsWarnAngle; /* If bond rotates more than %g degrees, warn */ int nLincsIter; /* Number of iterations in the final Lincs step */ - bool bShakeSOR; /* Use successive overrelaxation for shake */ + gmx_bool bShakeSOR; /* Use successive overrelaxation for shake */ real bd_fric; /* Friction coefficient for BD (amu/ps) */ int ld_seed; /* Random seed for SD and BD */ int nwall; /* The number of walls */ @@ -280,7 +280,7 @@ typedef struct { t_grpopts opts; /* Group options */ t_cosines ex[DIM]; /* Electric field stuff (spatial part) */ t_cosines et[DIM]; /* Electric field stuff (time part) */ - bool bQMMM; /* QM/MM calculation */ + gmx_bool bQMMM; /* QM/MM calculation */ int QMconstraints; /* constraints on QM bonds */ int QMMMscheme; /* Scheme: ONIOM or normal */ real scalefactor; /* factor for scaling the MM charges in QM calc.*/ diff --git a/include/types/matrix.h b/include/types/matrix.h index c2f7a3c76b..cb69daf2f9 100644 --- a/include/types/matrix.h +++ b/include/types/matrix.h @@ -74,7 +74,7 @@ typedef struct { char legend[256]; char label_x[256]; char label_y[256]; - bool bDiscrete; + gmx_bool bDiscrete; real *axis_x; real *axis_y; t_matelmt **matrix; diff --git a/include/types/mdatom.h b/include/types/mdatom.h index f218597b07..057045bd23 100644 --- a/include/types/mdatom.h +++ b/include/types/mdatom.h @@ -47,20 +47,20 @@ typedef struct { int nr; int nalloc; int nenergrp; - bool bVCMgrps; + gmx_bool bVCMgrps; int nPerturbed; int nMassPerturbed; int nChargePerturbed; - bool bOrires; + gmx_bool bOrires; real *massA,*massB,*massT,*invmass; real *chargeA,*chargeB; - bool *bPerturbed; + gmx_bool *bPerturbed; int *typeA,*typeB; unsigned short *ptype; unsigned short *cTC,*cENER,*cACC,*cFREEZE,*cVCM; unsigned short *cU1,*cU2,*cORF; /* for QMMM, atomnumber contains atomic number of the atoms */ - bool *bQM; + gmx_bool *bQM; /* The range of home atoms */ int start; int homenr; diff --git a/include/types/ns.h b/include/types/ns.h index efea4736b3..b23de7681c 100644 --- a/include/types/ns.h +++ b/include/types/ns.h @@ -54,13 +54,13 @@ typedef struct { } t_ns_buf; typedef struct { - bool bCGlist; + gmx_bool bCGlist; atom_id *simple_aaj; t_grid *grid; t_excl *bexcl; - bool *bHaveVdW; + gmx_bool *bHaveVdW; t_ns_buf **ns_buf; - bool *bExcludeAlleg; + gmx_bool *bExcludeAlleg; int nra_alloc; int cg_alloc; atom_id **nl_sr; @@ -70,7 +70,7 @@ typedef struct { int *nlr_ljc; int *nlr_one; /* the nblists should probably go in here */ - bool nblist_initialized; /* has the nblist been initialized? */ + gmx_bool nblist_initialized; /* has the nblist been initialized? */ int dump_nl; /* neighbour list dump level (from env. var. GMX_DUMP_NL)*/ } gmx_ns_t; diff --git a/include/types/pbc.h b/include/types/pbc.h index 3c3435b5a0..a58e9acf42 100644 --- a/include/types/pbc.h +++ b/include/types/pbc.h @@ -57,7 +57,7 @@ typedef struct { rvec hbox_diag; rvec mhbox_diag; real max_cutoff2; - bool bLimitDistance; + gmx_bool bLimitDistance; real limit_distance2; int ntric_vec; ivec tric_shift[MAX_NTRICVEC]; diff --git a/include/types/qmmmrec.h b/include/types/qmmmrec.h index f601b87cf6..0cd9affa76 100644 --- a/include/types/qmmmrec.h +++ b/include/types/qmmmrec.h @@ -51,14 +51,14 @@ typedef struct { int QMmethod; /* see enums.h for all methods */ int QMbasis; /* see enums.h for all bases */ int nelectrons; /* total number of elecs in QM region*/ - bool bTS; /* Optimize a TS, only steep, no md */ - bool bOPT; /* Optimize QM subsys, only steep, no md */ - bool *frontatoms; /* qm atoms on the QM side of a QM-MM bond */ + gmx_bool bTS; /* Optimize a TS, only steep, no md */ + gmx_bool bOPT; /* Optimize QM subsys, only steep, no md */ + gmx_bool *frontatoms; /* qm atoms on the QM side of a QM-MM bond */ /* Gaussian specific stuff */ int nQMcpus; /* no. of CPUs used for the QM calc. */ int QMmem; /* memory for the gaussian calc. */ int accuracy; /* convergence criterium (E(-x)) */ - bool cpmcscf; /* using cpmcscf(l1003)*/ + gmx_bool cpmcscf; /* using cpmcscf(l1003)*/ char *gauss_dir; char *gauss_exe; char *devel_dir; @@ -66,7 +66,7 @@ typedef struct { real *c6; real *c12; /* Surface hopping stuff */ - bool bSH; /* surface hopping (diabatic only) */ + gmx_bool bSH; /* surface hopping (diabatic only) */ real SAon; /* at which energy gap the SA starts */ real SAoff; /* at which energy gap the SA stops */ int SAsteps; /* stepwise switchinng on the SA */ diff --git a/include/types/simple.h b/include/types/simple.h index 9d858b0cd7..64dcf699a4 100644 --- a/include/types/simple.h +++ b/include/types/simple.h @@ -74,16 +74,16 @@ extern "C" { #define ZZYY 7 #define ZZZZ 8 - /* Attempt to define a boolean type, unless one already is defined, - * and do it without relying completely on config.h. - * First, if we are using c++ bool must be present, so don't touch it. - * Second, if HAVE_BOOL is defined, we trust that. - * Otherwise, define it to an int. + /* There is no standard size for 'bool' in C++, so when + * we previously defined it to int for C code the data types + * (and structs) would have different size depending on your compiler, + * both at gromacs build time and when you use the library. + * The only way around this is to NOT assume anything about the C++ type, + * so we cannot use the name 'bool' in our C code anymore. */ -#if !(defined __cplusplus) && !(defined HAVE_BOOL) -# define bool int -#endif - + +typedef unsigned char gmx_bool; + #ifndef FALSE # define FALSE 0 #endif diff --git a/include/types/state.h b/include/types/state.h index fe2fb61d33..ce85eaa55a 100644 --- a/include/types/state.h +++ b/include/types/state.h @@ -86,7 +86,7 @@ typedef struct */ typedef struct { - bool bUpToDate; + gmx_bool bUpToDate; int ekin_n; tensor *ekinh; tensor *ekinf; diff --git a/include/types/trx.h b/include/types/trx.h index a86854fa97..ed3df20d96 100644 --- a/include/types/trx.h +++ b/include/types/trx.h @@ -33,8 +33,8 @@ * GRoups of Organic Molecules in ACtion for Science */ -/* The bools indicate whether a field was read from the trajectory. - * Do not try to use a pointer when its bool is FALSE, as memory might +/* The gmx_bools indicate whether a field was read from the trajectory. + * Do not try to use a pointer when its gmx_bool is FALSE, as memory might * not be allocated. */ @@ -50,7 +50,7 @@ typedef struct trxframe { int flags; /* flags for read_first/next_frame */ int not_ok; /* integrity flags (see statutil.h */ - bool bDouble; /* Double precision? */ + gmx_bool bDouble; /* Double precision? */ int natoms; /* number of atoms (atoms, x, v, f) */ real t0; /* time of the first frame, needed * * for skipping frames with -dt */ @@ -59,27 +59,27 @@ typedef struct trxframe real tppf; /* time of two frames ago */ /* tpf and tppf are needed to */ /* correct rounding errors for -e */ - bool bTitle; + gmx_bool bTitle; const char *title; /* title of the frame */ - bool bStep; + gmx_bool bStep; int step; /* MD step number */ - bool bTime; + gmx_bool bTime; real time; /* time of the frame */ - bool bLambda; + gmx_bool bLambda; real lambda; /* free energy perturbation lambda */ - bool bAtoms; + gmx_bool bAtoms; t_atoms *atoms; /* atoms struct (natoms) */ - bool bPrec; + gmx_bool bPrec; real prec; /* precision of x, fraction of 1 nm */ - bool bX; + gmx_bool bX; rvec *x; /* coordinates (natoms) */ - bool bV; + gmx_bool bV; rvec *v; /* velocities (natoms) */ - bool bF; + gmx_bool bF; rvec *f; /* forces (natoms) */ - bool bBox; + gmx_bool bBox; matrix box; /* the 3 box vectors */ - bool bPBC; + gmx_bool bPBC; int ePBC; /* the type of pbc */ t_gmxvmdplugin vmdplugin; } t_trxframe; diff --git a/include/update.h b/include/update.h index 163d89b64e..d21c33bab1 100644 --- a/include/update.h +++ b/include/update.h @@ -86,7 +86,7 @@ void update_pcouple(FILE *fplog, matrix M, gmx_wallcycle_t wcycle, gmx_update_t upd, - bool bInitStep); + gmx_bool bInitStep); void update_coords(FILE *fplog, gmx_large_int_t step, @@ -94,14 +94,14 @@ void update_coords(FILE *fplog, t_mdatoms *md, t_state *state, rvec *f, /* forces on home particles */ - bool bDoLR, + gmx_bool bDoLR, rvec *f_lr, t_fcdata *fcd, gmx_ekindata_t *ekind, matrix M, gmx_wallcycle_t wcycle, gmx_update_t upd, - bool bInitStep, + gmx_bool bInitStep, int bUpdatePart, t_commrec *cr, /* these shouldn't be here -- need to think about it */ t_nrnb *nrnb, @@ -127,9 +127,9 @@ void update_constraints(FILE *fplog, gmx_wallcycle_t wcycle, gmx_update_t upd, gmx_constr_t constr, - bool bInitStep, - bool bFirstHalf, - bool bCalcVir, + gmx_bool bInitStep, + gmx_bool bFirstHalf, + gmx_bool bCalcVir, real vetanew); /* Return TRUE if OK, FALSE in case of Shake Error */ @@ -146,12 +146,12 @@ void update_box(FILE *fplog, t_nrnb *nrnb, gmx_wallcycle_t wcycle, gmx_update_t upd, - bool bInitStep, - bool bFirstHalf); + gmx_bool bInitStep, + gmx_bool bFirstHalf); /* Return TRUE if OK, FALSE in case of Shake Error */ void calc_ke_part(t_state *state,t_grpopts *opts,t_mdatoms *md, - gmx_ekindata_t *ekind,t_nrnb *nrnb,bool bEkinAveVel, bool bSaveOld); + gmx_ekindata_t *ekind,t_nrnb *nrnb,gmx_bool bEkinAveVel, gmx_bool bSaveOld); /* * Compute the partial kinetic energy for home particles; * will be accumulated in the calling routine. @@ -191,7 +191,7 @@ void trotter_update(t_inputrec *ir, gmx_large_int_t step, gmx_ekindata_t *ekind, gmx_enerdata_t *enerd, t_state *state, tensor vir, t_mdatoms *md, t_extmass *MassQ, int **trotter_seqlist, int trotter_seqno); -int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *Mass, bool bTrotter); +int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *Mass, gmx_bool bTrotter); real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ); /* computes all the pressure/tempertature control energy terms to get a conserved energy */ @@ -228,7 +228,7 @@ void parrinellorahman_pcoupl(FILE *fplog,gmx_large_int_t step, t_inputrec *ir,real dt,tensor pres, tensor box,tensor box_rel,tensor boxv, tensor M,matrix mu, - bool bFirstStep); + gmx_bool bFirstStep); void berendsen_pcoupl(FILE *fplog,gmx_large_int_t step, t_inputrec *ir,real dt,tensor pres,matrix box, diff --git a/include/vcm.h b/include/vcm.h index 40e38044b9..84c5a6a50e 100644 --- a/include/vcm.h +++ b/include/vcm.h @@ -47,7 +47,7 @@ extern "C" { typedef struct { int nr; /* Number of groups */ int mode; /* One of the enums above */ - bool ndim; /* The number of dimensions for corr. */ + gmx_bool ndim; /* The number of dimensions for corr. */ real *group_ndf; /* Number of degrees of freedom */ rvec *group_p; /* Linear momentum per group */ rvec *group_v; /* Linear velocity per group */ diff --git a/include/vmdio.h b/include/vmdio.h index f9f0df8aa0..60c32d1dc4 100644 --- a/include/vmdio.h +++ b/include/vmdio.h @@ -19,8 +19,8 @@ #ifndef VMDIO_H_ #define VMDIO_H_ -#include "molfile_plugin.h" -#include "types/simple.h" +#include +#include #ifdef __cplusplus extern "C" { @@ -33,11 +33,11 @@ typedef struct molfile_plugin_t *api; const char* filetype; void* handle; - bool bV; + gmx_bool bV; } t_gmxvmdplugin; int read_first_vmd_frame(int *status,const char *fn, struct trxframe *fr,int flags); -bool read_next_vmd_frame(int status,struct trxframe *fr); +gmx_bool read_next_vmd_frame(int status,struct trxframe *fr); int load_vmd_library(const char *fn, t_gmxvmdplugin *vmdplugin); #ifdef __cplusplus diff --git a/include/vsite.h b/include/vsite.h index d32da59a13..bb34b26712 100644 --- a/include/vsite.h +++ b/include/vsite.h @@ -62,7 +62,7 @@ typedef struct { int ***vsite_pbc_molt; /* The pbc atoms for intercg vsites */ int **vsite_pbc_loc; /* The local pbc atoms */ int *vsite_pbc_loc_nalloc; - bool bPDvsitecomm; /* Do we need vsite communication with PD? */ + gmx_bool bPDvsitecomm; /* Do we need vsite communication with PD? */ t_comm_vsites *vsitecomm; /* The PD vsite communication struct */ } gmx_vsite_t; @@ -70,7 +70,7 @@ void construct_vsites(FILE *log,gmx_vsite_t *vsite, rvec x[],t_nrnb *nrnb, real dt,rvec v[], t_iparams ip[],t_ilist ilist[], - int ePBC,bool bMolPBC,t_graph *graph, + int ePBC,gmx_bool bMolPBC,t_graph *graph, t_commrec *cr,matrix box); /* Create positions of vsite atoms based on surrounding atoms * for the local system. @@ -92,7 +92,7 @@ void construct_vsites_mtop(FILE *log,gmx_vsite_t *vsite, void spread_vsite_f(FILE *log,gmx_vsite_t *vsite, rvec x[],rvec f[],rvec *fshift, t_nrnb *nrnb,t_idef *idef, - int ePBC,bool bMolPBC,t_graph *g,matrix box, + int ePBC,gmx_bool bMolPBC,t_graph *g,matrix box, t_commrec *cr); /* Spread the force operating on the vsite atoms on the surrounding atoms. * If fshift!=NULL also update the shift forces. diff --git a/include/warninp.h b/include/warninp.h index ecff74cc2d..fa7b66403e 100644 --- a/include/warninp.h +++ b/include/warninp.h @@ -48,7 +48,7 @@ typedef struct warninp *warninp_t; warninp_t -init_warning(bool bAllowWarnings,int maxwarning); +init_warning(gmx_bool bAllowWarnings,int maxwarning); /* Initialize the warning data structure. * If bAllowWarnings=FALSE, all warnings (calls to warning()) will be * transformed into errors, calls to warning_note still produce notes. diff --git a/include/wman.h b/include/wman.h index 7e1c837b02..03222ab6f1 100644 --- a/include/wman.h +++ b/include/wman.h @@ -54,7 +54,7 @@ void write_man(FILE *out,const char *mantp,const char *program, int nfile,t_filenm *fnm, int npargs,t_pargs *pa, int nbug,const char **bugs, - bool bHidden); + gmx_bool bHidden); char *fileopt(unsigned long flag,char buf[],int maxsize); /* Return a string describing the file type in flag. @@ -73,7 +73,7 @@ struct t_linkdata; void print_tty_formatted(FILE *out, int nldesc, const char **desc, int indent, - struct t_linkdata *links, const char *program, bool bWiki); + struct t_linkdata *links, const char *program, gmx_bool bWiki); #ifdef __cplusplus } diff --git a/include/writeps.h b/include/writeps.h index f914982cb4..38a31193de 100644 --- a/include/writeps.h +++ b/include/writeps.h @@ -105,7 +105,7 @@ void ps_ctext(t_psdata ps,real x1,real y1,const char *str,int expos); void ps_close(t_psdata ps); -void ps_flip(t_psdata ps,bool bPlus); +void ps_flip(t_psdata ps,gmx_bool bPlus); /* Rotate over 90 (bPlus) or -90 (!bPlus) degrees */ void ps_rotate(t_psdata ps,real angle); diff --git a/include/xdrf.h b/include/xdrf.h index 2cf899d99d..a97644dee0 100644 --- a/include/xdrf.h +++ b/include/xdrf.h @@ -100,7 +100,7 @@ int xdr_gmx_large_int(XDR *xdrs,gmx_large_int_t *i,const char *warn); * "WARNING during %s:", where warn is printed in %s. */ -float xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, bool * bOK); +float xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK); int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms); @@ -108,10 +108,10 @@ int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms); int xdr_xtc_seek_frame(int frame, FILE *fp, XDR *xdrs, int natoms); -float xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, bool * bOK); +float xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK); -int xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, bool * bOK); +int xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK); #ifdef __cplusplus } diff --git a/include/xtcio.h b/include/xtcio.h index 7cf26a5ef0..7da45aa8cd 100644 --- a/include/xtcio.h +++ b/include/xtcio.h @@ -56,12 +56,12 @@ void close_xtc(t_fileio *fio); int read_first_xtc(t_fileio *fio, int *natoms,int *step,real *time, - matrix box,rvec **x,real *prec,bool *bOK); + matrix box,rvec **x,real *prec,gmx_bool *bOK); /* Open xtc file, read xtc file first time, allocate memory for x */ int read_next_xtc(t_fileio *fio, int natoms,int *step,real *time, - matrix box,rvec *x,real *prec,bool *bOK); + matrix box,rvec *x,real *prec,gmx_bool *bOK); /* Read subsequent frames */ int write_xtc(t_fileio *fio, @@ -69,10 +69,10 @@ int write_xtc(t_fileio *fio, matrix box,rvec *x,real prec); /* Write a frame to xtc file */ -int xtc_check(const char *str,bool bResult,const char *file,int line); +int xtc_check(const char *str,gmx_bool bResult,const char *file,int line); #define XTC_CHECK(s,b) xtc_check(s,b,__FILE__,__LINE__) -void xtc_check_fat_err(const char *str,bool bResult,const char *file,int line); +void xtc_check_fat_err(const char *str,gmx_bool bResult,const char *file,int line); #define XTC_CHECK_FAT_ERR(s,b) xtc_check_fat_err(s,b,__FILE__,__LINE__) #ifdef __cplusplus diff --git a/include/xvgr.h b/include/xvgr.h index b6f7f633dd..a4372a8364 100644 --- a/include/xvgr.h +++ b/include/xvgr.h @@ -88,7 +88,7 @@ enum { * \4 : (deprecated) end symbol font */ -bool output_env_get_print_xvgr_codes(const output_env_t oenv); +gmx_bool output_env_get_print_xvgr_codes(const output_env_t oenv); /* Returns if we should print xmgrace or xmgr codes */ enum { @@ -174,9 +174,9 @@ void write_xvg(const char *fn,const char *title,int nx,int ny,real **y, * two dimensional array which is returned. */ real **read_xvg_time(const char *fn, - bool bHaveT, - bool bTB,real tb, - bool bTE,real te, + gmx_bool bHaveT, + gmx_bool bTB,real tb, + gmx_bool bTE,real te, int nsets_in,int *nset,int *nval, real *dt,real **t); #ifdef __cplusplus diff --git a/share/template/template.c b/share/template/template.c index de4e101163..5a64502190 100644 --- a/share/template/template.c +++ b/share/template/template.c @@ -126,7 +126,7 @@ gmx_template(int argc, char *argv[]) /* Command-line arguments */ real cutoff = 0; - bool bArg = FALSE; + gmx_bool bArg = FALSE; t_pargs pa[] = { {"-cutoff", FALSE, etREAL, {&cutoff}, "Cutoff for distance calculation (0 = no cutoff)"}, diff --git a/src/config.h.cmakein b/src/config.h.cmakein index dfcee0037f..a8c687baa0 100644 --- a/src/config.h.cmakein +++ b/src/config.h.cmakein @@ -197,7 +197,7 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ALTIVEC_H -/* Define to 1 if the system has the type bool. */ +/* Define to 1 if the system has the type gmx_bool. */ #cmakedefine HAVE_BOOL /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ diff --git a/src/contrib/anaf.c b/src/contrib/anaf.c index 4f076ba499..5e8e3af3b7 100644 --- a/src/contrib/anaf.c +++ b/src/contrib/anaf.c @@ -66,7 +66,7 @@ static void list_trn(char *fn) real mmm,len; matrix box; t_trnheader trn; - bool bOK; + gmx_bool bOK; printf("Going to open %s\n",fn); fpread = open_trn(fn,"r"); diff --git a/src/contrib/compnl.c b/src/contrib/compnl.c index 925d15ab0c..ca2697f01e 100644 --- a/src/contrib/compnl.c +++ b/src/contrib/compnl.c @@ -60,7 +60,7 @@ int main(int argc,char *argv[]) char **fn,title[256]; int ***mat,nnb; real mb; - bool bConf; + gmx_bool bConf; rvec *x = NULL; rvec dx; matrix box; @@ -75,7 +75,7 @@ int main(int argc,char *argv[]) }; #define NFILE asize(fnm) static int natoms=648; - static bool bSymm=TRUE; + static gmx_bool bSymm=TRUE; static t_pargs pa[] = { { "-nat", FALSE, etINT, { &natoms }, "Number of atoms" }, { "-symm", FALSE, etBOOL,{ &bSymm }, "Symmetrize the matrices" }, diff --git a/src/contrib/copyrgt.c b/src/contrib/copyrgt.c index 00bcbf3d06..e3019241f5 100644 --- a/src/contrib/copyrgt.c +++ b/src/contrib/copyrgt.c @@ -79,7 +79,7 @@ static char *head2[]= { #define NH2 asize(head2) #define MAXS 10240 -void head(FILE *out, char *fn_, bool bH, +void head(FILE *out, char *fn_, gmx_bool bH, char *cstart, char *ccont, char *cend) { char buf[STRLEN]; @@ -111,7 +111,7 @@ void cr_c(char *fn) FILE *in,*out; char ofn[1024],line[MAXS+1],cwd[1024]; char *p,*fn_; - bool bH; + gmx_bool bH; sprintf(ofn,"%s.bak",fn); @@ -167,7 +167,7 @@ void cr_other(char *fn) /* FILE *in,*out; char ofn[1024],line[MAXS+1],line2[MAXS+1],cwd[1024]; char *p,*fn_,*ptr; - bool bH; + gmx_bool bH; sprintf(ofn,"%s.bak",fn); diff --git a/src/contrib/ehanal.c b/src/contrib/ehanal.c index 4788816cab..754af7e477 100644 --- a/src/contrib/ehanal.c +++ b/src/contrib/ehanal.c @@ -131,7 +131,7 @@ void dump_histo(t_histo *h,char *fn,char *title,char *xaxis,char *yaxis, * *******************************************************************/ -void add_scatter_event(t_ana_scat *scatter,rvec pos,bool bInel, +void add_scatter_event(t_ana_scat *scatter,rvec pos,gmx_bool bInel, real t,real ekin) { int np = scatter->np; diff --git a/src/contrib/ehdata.c b/src/contrib/ehdata.c index cec61d036f..1eb6f1a670 100644 --- a/src/contrib/ehdata.c +++ b/src/contrib/ehdata.c @@ -186,7 +186,7 @@ static t_pq_inel *read_pq(char *fn) return pq; } -static int my_bsearch(real val,int ndata,real data[],bool bLower) +static int my_bsearch(real val,int ndata,real data[],gmx_bool bLower) { int ilo,ihi,imed; diff --git a/src/contrib/ehdata.h b/src/contrib/ehdata.h index 7c854de1c6..c4c7cf2e06 100644 --- a/src/contrib/ehdata.h +++ b/src/contrib/ehdata.h @@ -86,11 +86,11 @@ typedef struct { int np,maxp; real *time; real *ekin; - bool *bInel; + gmx_bool *bInel; rvec *pos; } t_ana_scat; -extern void add_scatter_event(t_ana_scat *scatter,rvec pos,bool bInel, +extern void add_scatter_event(t_ana_scat *scatter,rvec pos,gmx_bool bInel, real t,real ekin); extern void reset_ana_scat(t_ana_scat *scatter); diff --git a/src/contrib/ehole.c b/src/contrib/ehole.c index 981e610d76..1243e769a1 100644 --- a/src/contrib/ehole.c +++ b/src/contrib/ehole.c @@ -63,9 +63,9 @@ typedef struct { int nana; int seed; int nevent; - bool bForce; - bool bScatter; - bool bHole; + gmx_bool bForce; + gmx_bool bScatter; + gmx_bool bHole; real dt; real deltax; real epsr; @@ -390,8 +390,8 @@ static void print_header(FILE *fp,t_eh_params *ehp) fprintf(fp,"seed = %d maxstep = %d dt = %g\n", ehp->seed,ehp->maxstep,ehp->dt); fprintf(fp,"nsave = %d nana = %d Force = %s Scatter = %s Hole = %s\n", - ehp->nsave,ehp->nana,bool_names[ehp->bForce], - bool_names[ehp->bScatter],bool_names[ehp->bHole]); + ehp->nsave,ehp->nana,gmx_bool_names[ehp->bForce], + gmx_bool_names[ehp->bScatter],gmx_bool_names[ehp->bHole]); if (ehp->bForce) fprintf(fp,"Force constant for repulsion Alj = %g\n",ehp->Alj); } @@ -609,7 +609,7 @@ int main(int argc,char *argv[]) 10000.0,/* Distance between events */ 0.0 /* Size of the system */ }; - static bool bTest = FALSE; + static gmx_bool bTest = FALSE; t_pargs pa[] = { { "-maxparticle", FALSE, etINT, {&ehp.maxparticle}, "Maximum number of particles" }, diff --git a/src/contrib/g_anavel.c b/src/contrib/g_anavel.c index 93c629e746..460fe7ba3c 100644 --- a/src/contrib/g_anavel.c +++ b/src/contrib/g_anavel.c @@ -88,7 +88,7 @@ int main(int argc,char *argv[]) int d,m,n; matrix box; atom_id *sysindex; - bool bHaveV,bReadV; + gmx_bool bHaveV,bReadV; t_rgb rgblo = { 0, 0, 1 },rgbhi = { 1, 0, 0 }; int flags = TRX_READ_X | TRX_READ_V; t_trxframe fr; diff --git a/src/contrib/hexamer.c b/src/contrib/hexamer.c index 145724530e..8cfeb40c14 100644 --- a/src/contrib/hexamer.c +++ b/src/contrib/hexamer.c @@ -70,7 +70,7 @@ void copy_atom(t_symtab *tab,t_atoms *a1,int i1,t_atoms *a2,int i2, } static void rotate_x(int natom,rvec xin[],real angle,rvec xout[], - bool bZ,bool bUpsideDown,real dz) + gmx_bool bZ,gmx_bool bUpsideDown,real dz) { int i; matrix mat; @@ -154,9 +154,9 @@ int main(int argc, char *argv[]) { efPDB, "-o", NULL, ffWRITE } }; #define NFILE asize(fnm) - bool bCenter = FALSE; - bool bTrimer = FALSE; - bool bAlternate = FALSE; + gmx_bool bCenter = FALSE; + gmx_bool bTrimer = FALSE; + gmx_bool bAlternate = FALSE; real rDist = 0,rAngleZ = 0,rAngleX = 0, alterz = 0; t_pargs pa[] = { { "-center", FALSE, etBOOL, {&bCenter}, diff --git a/src/contrib/hrefify.c b/src/contrib/hrefify.c index 82f148c183..5014c97f92 100644 --- a/src/contrib/hrefify.c +++ b/src/contrib/hrefify.c @@ -50,7 +50,7 @@ #include "pdbio.h" #include "strdb.h" -bool isword(char c) +gmx_bool isword(char c) { return (isalnum(c) || (c=='-') || (c=='_')); } @@ -70,10 +70,10 @@ char *strncasestr(char *line,char *str) return dum; } -char *strstr_href(char *line,bool *bInHREF,int *i_dat,int n_dat,char **dat) +char *strstr_href(char *line,gmx_bool *bInHREF,int *i_dat,int n_dat,char **dat) { char *start,*found,*href=NULL; - bool bIn; + gmx_bool bIn; int i; found=NULL; @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) char **text,**str,line[1024],*ptr,*ref, start[STRLEN],word[STRLEN],end[STRLEN]; int n_text,n_str,i_str; - bool bInHREF,bIn; + gmx_bool bInHREF,bIn; FILE *fp; char title[STRLEN]; @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) }; #define NFILE asize(fnm) static char *in=NULL,*out=NULL,*excl=NULL,*link_text=NULL; - static bool peratom=FALSE; + static gmx_bool peratom=FALSE; t_pargs pa[] = { { "-f", FALSE, etSTR, { &in } , "HTML input" }, { "-o", FALSE, etSTR, { &out } , "HTML output" }, diff --git a/src/contrib/mkice.c b/src/contrib/mkice.c index f98249080e..8f5923de90 100644 --- a/src/contrib/mkice.c +++ b/src/contrib/mkice.c @@ -83,7 +83,7 @@ static real yaw_lj[5][10] = { { 0, COS, 0, CHS, 0, CHS, 0, 0, 2.6e-3, 0 } }; -void unitcell(rvec x[],rvec box,bool bYaw,real odist,real hdist) +void unitcell(rvec x[],rvec box,gmx_bool bYaw,real odist,real hdist) { #define cx 0.81649658 #define cy 0.47140452 @@ -152,7 +152,7 @@ void unitcell(rvec x[],rvec box,bool bYaw,real odist,real hdist) } void random_h_coords(int natmol,int nmol,rvec x[],rvec box, - bool bYaw,real odist,real hdist) + gmx_bool bYaw,real odist,real hdist) { #define cx 0.81649658 #define cy 0.47140452 @@ -250,7 +250,7 @@ void unitcell_d(rvec x[],rvec box,real odist) } static t_bbb *mk_bonds(int natoms,rvec x[],real odist, - bool bPBC,matrix box) + gmx_bool bPBC,matrix box) { real od2 = odist*odist+1e-5; t_pbc pbc; @@ -283,12 +283,12 @@ static t_bbb *mk_bonds(int natoms,rvec x[],real odist, } static void mk_diamond(t_atoms *a,rvec x[],real odist,t_symtab *symtab, - bool bPBC,matrix box) + gmx_bool bPBC,matrix box) { int i,ib,j,k,l,m,nrm=0; t_bbb *bbb; - bool *bRemove; + gmx_bool *bRemove; rvec dx; do { @@ -378,8 +378,8 @@ static int read_rel_coords(char *fn,rvec **xx,int natmol) return natmol*nline; } -void virial(FILE *fp,bool bFull,int nmol,rvec x[],matrix box,real rcut, - bool bYaw,real q[],bool bLJ) +void virial(FILE *fp,gmx_bool bFull,int nmol,rvec x[],matrix box,real rcut, + gmx_bool bYaw,real q[],gmx_bool bLJ) { int i,j,im,jm,natmol,ik,jk,m,ninter; rvec dx,f,ftot,dvir,vir,pres,xcmi,xcmj,*force; @@ -498,8 +498,8 @@ int main(int argc,char *argv[]) "build water clusters based on oxygen coordinates only." }; static int nx=1,ny=1,nz=1; - static bool bYaw=FALSE,bLJ=TRUE,bFull=TRUE,bSeries=FALSE; - static bool bOrdered=TRUE,bDiamond=FALSE,bPBC=TRUE; + static gmx_bool bYaw=FALSE,bLJ=TRUE,bFull=TRUE,bSeries=FALSE; + static gmx_bool bOrdered=TRUE,bDiamond=FALSE,bPBC=TRUE; static real rcut=0.3,odist=0.274,hdist=0.09572; t_pargs pa[] = { { "-nx", FALSE, etINT, {&nx}, "nx" }, diff --git a/src/contrib/options.c b/src/contrib/options.c index be5fa44927..6fa2cc804c 100644 --- a/src/contrib/options.c +++ b/src/contrib/options.c @@ -59,7 +59,7 @@ int main(int argc,char *argv[]) static char *bugs[] = { "If the configuration script found Motif or Lesstif on your system, " "you can use the graphical interface (if not, you will get an error):[BR]" - "[TT]-X[tt] bool [TT]no[tt] Use dialog box GUI to edit command line options", + "[TT]-X[tt] gmx_bool [TT]no[tt] Use dialog box GUI to edit command line options", "When compiled on an SGI-IRIX system, all GROMACS programs have an " "additional option:[BR]" diff --git a/src/contrib/optwat.c b/src/contrib/optwat.c index d93ffdae79..91970d9532 100644 --- a/src/contrib/optwat.c +++ b/src/contrib/optwat.c @@ -49,7 +49,7 @@ #include "copyrite.h" #include "random.h" -real ener(matrix P,real e,real e0,int nmol,real kp,real ke,bool bPScal) +real ener(matrix P,real e,real e0,int nmol,real kp,real ke,gmx_bool bPScal) { if (bPScal) return (kp*(sqr(P[XX][XX]+P[YY][YY]+P[ZZ][ZZ]-3))+ @@ -124,7 +124,7 @@ void rand_step(FILE *fp,int nr,t_iparams ip[],int *seed,real frac) } void pr_progress(FILE *fp,int nit,tensor P,real epot,real eFF, - double mc_crit,bool bConv,bool bAccept) + double mc_crit,gmx_bool bConv,gmx_bool bAccept) { fprintf(fp,"Iter %3d, eFF = %g, Converged = %s, Accepted = %s\n", nit,eFF,yesno_names[bConv],yesno_names[bAccept]); @@ -154,7 +154,7 @@ int main(int argc,char *argv[]) static real kp = 1, ke = 100, frac = 0.1; static int maxnit = 100, eindex = 5, pindex = 19; static int seed = 1993; - static bool bPScal = FALSE; + static gmx_bool bPScal = FALSE; static t_pargs pa[] = { { "-epot0", FALSE, etREAL, {&epot0}, "Potential energy in kJ/mol" }, @@ -192,7 +192,7 @@ int main(int argc,char *argv[]) int i,step,natoms,nmol,nit,atnr2; real t,lambda,epot,eFF[2]; double mc_crit=0; - bool bConverged,bAccept; + gmx_bool bConverged,bAccept; tensor P; CopyRight(stdout,argv[0]); @@ -212,7 +212,7 @@ int main(int argc,char *argv[]) fprintf(fp,"epot = %8g ke = %8g kp = %8g\n",epot0,ke,kp); fprintf(fp,"maxnit = %8d tol = %8g seed = %8d\n",maxnit,tol,seed); fprintf(fp,"frac = %8g pindex = %8d eindex = %8d\n",frac,pindex,eindex); - fprintf(fp,"kT = %8g pscal = %8s\n",kT,bool_names[bPScal]); + fprintf(fp,"kT = %8g pscal = %8s\n",kT,gmx_bool_names[bPScal]); /* Unpack some topology numbers */ nmol = top.blocks[ebMOLS].nr; diff --git a/src/contrib/pmetest.c b/src/contrib/pmetest.c index 5228521f39..6b7ea95191 100644 --- a/src/contrib/pmetest.c +++ b/src/contrib/pmetest.c @@ -84,10 +84,10 @@ static int comp_xptr(const void *a,const void *b) return 0; } -static void do_my_pme(FILE *fp,real tm,bool bVerbose,t_inputrec *ir, +static void do_my_pme(FILE *fp,real tm,gmx_bool bVerbose,t_inputrec *ir, rvec x[],rvec xbuf[],rvec f[], real charge[],real qbuf[],real qqbuf[], - matrix box,bool bSort, + matrix box,gmx_bool bSort, t_commrec *cr,t_nsborder *nsb,t_nrnb *nrnb, t_block *excl,real qtot, t_forcerec *fr,int index[],FILE *fp_xvg, @@ -220,9 +220,9 @@ int main(int argc,char *argv[]) #define NFILE asize(fnm) /* Command line options ! */ - static bool bVerbose=FALSE; - static bool bOptFFT=FALSE; - static bool bSort=FALSE; + static gmx_bool bVerbose=FALSE; + static gmx_bool bOptFFT=FALSE; + static gmx_bool bSort=FALSE; static int ewald_geometry=eewg3D; static int nnodes=1; static int nthreads=1; @@ -230,7 +230,7 @@ int main(int argc,char *argv[]) static rvec grid = { -1, -1, -1 }; static real rc = 0.0; static real dtol = 0.0; - static bool bGroups = FALSE; + static gmx_bool bGroups = FALSE; static t_pargs pa[] = { { "-np", FALSE, etINT, {&nnodes}, "Number of nodes, must be the same as used for grompp" }, @@ -264,7 +264,7 @@ int main(int argc,char *argv[]) real t,lambda,ewaldcoeff,qtot; rvec *x,*f,*xbuf; int *index; - bool bCont; + gmx_bool bCont; real *charge,*qbuf,*qqbuf; matrix box; diff --git a/src/contrib/testfft.c b/src/contrib/testfft.c index c1192891cb..4c1c427714 100644 --- a/src/contrib/testfft.c +++ b/src/contrib/testfft.c @@ -42,7 +42,7 @@ #include "fftgrid.h" #include "mdrun.h" -void testfft(FILE *fp,t_complex ***grid,int nx,int ny,int nz,bool bFirst) +void testfft(FILE *fp,t_complex ***grid,int nx,int ny,int nz,gmx_bool bFirst) { #ifdef USE_SGI_FFT #ifdef GMX_DOUBLE @@ -98,7 +98,7 @@ void testfft(FILE *fp,t_complex ***grid,int nx,int ny,int nz,bool bFirst) #endif } -void testrft(FILE *fp,real ***grid,int nx,int ny,int nz,bool bFirst) +void testrft(FILE *fp,real ***grid,int nx,int ny,int nz,gmx_bool bFirst) { #ifdef USE_SGI_FFT #ifdef GMX_DOUBLE diff --git a/src/contrib/testlr.c b/src/contrib/testlr.c index b7fbe37ed7..b99d91101f 100644 --- a/src/contrib/testlr.c +++ b/src/contrib/testlr.c @@ -57,7 +57,7 @@ #include "mdatoms.h" static real phi_sr(FILE *log,int nj,rvec x[],real charge[],real rc,real r1, - rvec box, real phi[],t_block *excl,rvec f_sr[],bool bOld) + rvec box, real phi[],t_block *excl,rvec f_sr[],gmx_bool bOld) { int i,j,k,m,ni,i1,i2; real pp,r2,R,R_1,R_2,rc2; @@ -108,7 +108,7 @@ static real phi_sr(FILE *log,int nj,rvec x[],real charge[],real rc,real r1, return vsr; } -void calc_ener(FILE *fp,char *title,bool bHeader,int nmol, +void calc_ener(FILE *fp,char *title,gmx_bool bHeader,int nmol, int natoms,real phi[],real charge[],t_block *excl) { int i,i1,i2,j,k; @@ -278,14 +278,14 @@ void pr_f(char *fn,int natoms,rvec f[]) gmx_fio_fclose(fp); } -void test_pppm(FILE *log, bool bVerbose, - bool bGenerGhat, char *ghatfn, +void test_pppm(FILE *log, gmx_bool bVerbose, + gmx_bool bGenerGhat, char *ghatfn, t_atoms *atoms, t_inputrec *ir, rvec x[], rvec f[], real charge[], rvec box, real phi[], real phi_s[], int nmol, t_commrec *cr, - bool bOld, t_block *cgs) + gmx_bool bOld, t_block *cgs) { char buf[256]; real ener; @@ -317,14 +317,14 @@ void test_pppm(FILE *log, bool bVerbose, write_pqr(buf,atoms,x,phi,0); } -void test_poisson(FILE *log, bool bVerbose, +void test_poisson(FILE *log, gmx_bool bVerbose, t_atoms *atoms, t_inputrec *ir, rvec x[], rvec f[], real charge[], rvec box, real phi[], real phi_s[], int nmol, t_commrec *cr, - bool bFour, rvec f_four[], - real phi_f[], bool bOld) + gmx_bool bFour, rvec f_four[], + real phi_f[], gmx_bool bOld) { char buf[256]; real ener; @@ -369,7 +369,7 @@ void test_poisson(FILE *log, bool bVerbose, void test_four(FILE *log,int NFILE,t_filenm fnm[],t_atoms *atoms, t_inputrec *ir,rvec x[],rvec f[],rvec box,real charge[], real phi_f[],real phi_s[],int nmol,t_commrec *cr, - bool bOld,bool bOldEwald) + gmx_bool bOld,gmx_bool bOldEwald) { int i; real energy; @@ -399,9 +399,9 @@ void test_four(FILE *log,int NFILE,t_filenm fnm[],t_atoms *atoms, calc_ener(log,"Fourier+SR",FALSE,nmol,atoms->nr,phi_f,charge,&atoms->excl); } -static void print_opts(FILE *fp,t_inputrec *ir,bool bFour) +static void print_opts(FILE *fp,t_inputrec *ir,gmx_bool bFour) { - fprintf(fp,"Ewald solution: %s\n",bool_names[bFour]); + fprintf(fp,"Ewald solution: %s\n",gmx_bool_names[bFour]); fprintf(fp,"r1: %10.3e\n",ir->rcoulomb_switch); fprintf(fp,"rc: %10.3e\n",ir->rcoulomb); if (bFour) @@ -459,7 +459,7 @@ int main(int argc,char *argv[]) real t,lambda,vsr,*charge,*phi_f,*phi_pois,*phi_s,*phi_p3m,*rho; output_env_t oenv; - static bool bFour=FALSE,bVerbose=FALSE,bGGhat=FALSE,bPPPM=TRUE, + static gmx_bool bFour=FALSE,bVerbose=FALSE,bGGhat=FALSE,bPPPM=TRUE, bPoisson=FALSE,bOld=FALSE,bOldEwald=TRUE; static int nprocs = 1; static t_pargs pa[] = { diff --git a/src/contrib/timefft.c b/src/contrib/timefft.c index cea1600643..b2cc660990 100644 --- a/src/contrib/timefft.c +++ b/src/contrib/timefft.c @@ -66,7 +66,7 @@ int main(int argc,char *argv[]) double *rt,*ct; t_fftgrid *g; t_commrec *cr; - static bool bReproducible = FALSE; + static gmx_bool bReproducible = FALSE; static int nnode = 1; static int nitfac = 1; t_pargs pa[] = { diff --git a/src/gmxlib/3dview.c b/src/gmxlib/3dview.c index 68c6dded5b..de8dd068c5 100644 --- a/src/gmxlib/3dview.c +++ b/src/gmxlib/3dview.c @@ -208,7 +208,7 @@ void calculate_view(t_3dview *view) #endif } -bool zoom_3d(t_3dview *view,real fac) +gmx_bool zoom_3d(t_3dview *view,real fac) { real dr; real bm,dr1,dr2; @@ -248,7 +248,7 @@ void init_rotate_3d(t_3dview *view) } -void rotate_3d(t_3dview *view,int axis,bool bPositive) +void rotate_3d(t_3dview *view,int axis,gmx_bool bPositive) { int i,j; mat4 m4; @@ -264,7 +264,7 @@ void rotate_3d(t_3dview *view,int axis,bool bPositive) calculate_view(view); } -void translate_view(t_3dview *view,int axis,bool bPositive) +void translate_view(t_3dview *view,int axis,gmx_bool bPositive) { #ifdef DEBUG printf("Translate called\n"); diff --git a/src/gmxlib/atomprop.c b/src/gmxlib/atomprop.c index f787d08884..a69a7979da 100644 --- a/src/gmxlib/atomprop.c +++ b/src/gmxlib/atomprop.c @@ -51,18 +51,18 @@ #include "copyrite.h" typedef struct { - bool bSet; + gmx_bool bSet; int nprop,maxprop; char *db; double def; char **atomnm; char **resnm; - bool *bAvail; + gmx_bool *bAvail; real *value; } aprop_t; typedef struct gmx_atomprop { - bool bWarned; + gmx_bool bWarned; aprop_t prop[epropNR]; gmx_residuetype_t restype; } gmx_atomprop; @@ -89,12 +89,12 @@ static int dbcmp_len(char *search, char *database) static int get_prop_index(aprop_t *ap,gmx_residuetype_t restype, char *resnm,char *atomnm, - bool *bExact) + gmx_bool *bExact) { int i,j=NOTFOUND; long int alen,rlen; long int malen,mrlen; - bool bProtein,bProtWild; + gmx_bool bProtein,bProtWild; bProtein = gmx_residuetype_is_protein(restype,resnm); bProtWild = (strcmp(resnm,"AAA")==0); @@ -140,7 +140,7 @@ static void add_prop(aprop_t *ap,gmx_residuetype_t restype, real p,int line) { int i,j; - bool bExact; + gmx_bool bExact; j = get_prop_index(ap,restype,resnm,atomnm,&bExact); @@ -290,7 +290,7 @@ void gmx_atomprop_destroy(gmx_atomprop_t aps) sfree(ap); } -bool gmx_atomprop_query(gmx_atomprop_t aps, +gmx_bool gmx_atomprop_query(gmx_atomprop_t aps, int eprop,const char *resnm,const char *atomnm, real *value) { @@ -299,7 +299,7 @@ bool gmx_atomprop_query(gmx_atomprop_t aps, int j; #define MAXQ 32 char atomname[MAXQ],resname[MAXQ]; - bool bExact; + gmx_bool bExact; set_prop(aps,eprop); if ((strlen(atomnm) > MAXQ-1) || (strlen(resnm) > MAXQ-1)) { diff --git a/src/gmxlib/bondfree.c b/src/gmxlib/bondfree.c index 059a308778..caacf3d53a 100644 --- a/src/gmxlib/bondfree.c +++ b/src/gmxlib/bondfree.c @@ -1342,7 +1342,7 @@ static real low_angres(int nbonds, const rvec x[],rvec f[],rvec fshift[], const t_pbc *pbc,const t_graph *g, real lambda,real *dvdlambda, - bool bZAxis) + gmx_bool bZAxis) { int i,m,type,ai,aj,ak,al; int t1,t2; @@ -2552,7 +2552,7 @@ void calc_bonds(FILE *fplog,const gmx_multisim_t *ms, const t_mdatoms *md, t_fcdata *fcd,int *global_atom_index, t_atomtypes *atype, gmx_genborn_t *born, - bool bPrintSepPot,gmx_large_int_t step) + gmx_bool bPrintSepPot,gmx_large_int_t step) { int ftype,nbonds,ind,nat1; real *epot,v,dvdl; diff --git a/src/gmxlib/chargegroup.c b/src/gmxlib/chargegroup.c index a4c983d8d1..de875f3279 100644 --- a/src/gmxlib/chargegroup.c +++ b/src/gmxlib/chargegroup.c @@ -178,7 +178,7 @@ void put_charge_groups_in_box(FILE *fplog,int cg0,int cg1, rvec cg; real nrcg,inv_ncg; atom_id *cgindex; - bool bTric; + gmx_bool bTric; if (ePBC == epbcNONE) gmx_incons("Calling put_charge_groups_in_box for a system without PBC"); diff --git a/src/gmxlib/checkpoint.c b/src/gmxlib/checkpoint.c index ee4bf8f0ea..f1b90cd79b 100644 --- a/src/gmxlib/checkpoint.c +++ b/src/gmxlib/checkpoint.c @@ -163,7 +163,7 @@ static void cp_error() gmx_fatal(FARGS,"Checkpoint file corrupted/truncated, or maybe you are out of quota?"); } -static void do_cpt_string_err(XDR *xd,bool bRead,const char *desc,char **s,FILE *list) +static void do_cpt_string_err(XDR *xd,gmx_bool bRead,const char *desc,char **s,FILE *list) { #define CPTSTRLEN 1024 bool_t res=0; @@ -674,7 +674,7 @@ static int do_cpte_matrices(XDR *xd,int cptp,int ecpt,int sflags, return ret; } -static void do_cpt_header(XDR *xd,bool bRead,int *file_version, +static void do_cpt_header(XDR *xd,gmx_bool bRead,int *file_version, char **version,char **btime,char **buser,char **bmach, char **fprog,char **ftime, int *eIntegrator,int *simulation_part, @@ -800,7 +800,7 @@ static void do_cpt_header(XDR *xd,bool bRead,int *file_version, } } -static int do_cpt_footer(XDR *xd,bool bRead,int file_version) +static int do_cpt_footer(XDR *xd,gmx_bool bRead,int file_version) { bool_t res=0; int magic; @@ -822,9 +822,9 @@ static int do_cpt_footer(XDR *xd,bool bRead,int file_version) return 0; } -static int do_cpt_state(XDR *xd,bool bRead, +static int do_cpt_state(XDR *xd,gmx_bool bRead, int fflags,t_state *state, - bool bReadRNG,FILE *list) + gmx_bool bReadRNG,FILE *list) { int sflags; int **rng_p,**rngi_p; @@ -889,7 +889,7 @@ static int do_cpt_state(XDR *xd,bool bRead, return ret; } -static int do_cpt_ekinstate(XDR *xd,bool bRead, +static int do_cpt_ekinstate(XDR *xd,gmx_bool bRead, int fflags,ekinstate_t *ekins, FILE *list) { @@ -926,7 +926,7 @@ static int do_cpt_ekinstate(XDR *xd,bool bRead, } -static int do_cpt_enerhist(XDR *xd,bool bRead, +static int do_cpt_enerhist(XDR *xd,gmx_bool bRead, int fflags,energyhistory_t *enerhist, FILE *list) { @@ -1022,7 +1022,7 @@ static int do_cpt_enerhist(XDR *xd,bool bRead, return ret; } -static int do_cpt_files(XDR *xd, bool bRead, +static int do_cpt_files(XDR *xd, gmx_bool bRead, gmx_file_position_t **p_outputfiles, int *nfiles, FILE *list, int file_version) { @@ -1122,7 +1122,7 @@ static int do_cpt_files(XDR *xd, bool bRead, } -void write_checkpoint(const char *fn,bool bNumberAndKeep, +void write_checkpoint(const char *fn,gmx_bool bNumberAndKeep, FILE *fplog,t_commrec *cr, int eIntegrator,int simulation_part, gmx_large_int_t step,double t,t_state *state) @@ -1345,7 +1345,7 @@ static void print_flag_mismatch(FILE *fplog,int sflags,int fflags) } } -static void check_int(FILE *fplog,const char *type,int p,int f,bool *mm) +static void check_int(FILE *fplog,const char *type,int p,int f,gmx_bool *mm) { FILE *fp = fplog ? fplog : stderr; @@ -1360,7 +1360,7 @@ static void check_int(FILE *fplog,const char *type,int p,int f,bool *mm) } static void check_string(FILE *fplog,const char *type,const char *p, - const char *f,bool *mm) + const char *f,gmx_bool *mm) { FILE *fp = fplog ? fplog : stderr; @@ -1377,11 +1377,11 @@ static void check_string(FILE *fplog,const char *type,const char *p, static void check_match(FILE *fplog, char *version, char *btime,char *buser,char *bmach,char *fprog, - t_commrec *cr,bool bPartDecomp,int npp_f,int npme_f, + t_commrec *cr,gmx_bool bPartDecomp,int npp_f,int npme_f, ivec dd_nc,ivec dd_nc_f) { int npp; - bool mm; + gmx_bool mm; mm = FALSE; @@ -1427,10 +1427,10 @@ static void check_match(FILE *fplog, } static void read_checkpoint(const char *fn,FILE **pfplog, - t_commrec *cr,bool bPartDecomp,ivec dd_nc, + t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc, int eIntegrator,gmx_large_int_t *step,double *t, - t_state *state,bool *bReadRNG,bool *bReadEkin, - int *simulation_part,bool bAppendOutputFiles) + t_state *state,gmx_bool *bReadRNG,gmx_bool *bReadEkin, + int *simulation_part,gmx_bool bAppendOutputFiles) { t_fileio *fp; int i,j,rc; @@ -1785,9 +1785,9 @@ static void read_checkpoint(const char *fn,FILE **pfplog, void load_checkpoint(const char *fn,FILE **fplog, - t_commrec *cr,bool bPartDecomp,ivec dd_nc, + t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc, t_inputrec *ir,t_state *state, - bool *bReadRNG,bool *bReadEkin,bool bAppend) + gmx_bool *bReadRNG,gmx_bool *bReadEkin,gmx_bool bAppend) { gmx_large_int_t step; double t; @@ -1817,7 +1817,7 @@ void load_checkpoint(const char *fn,FILE **fplog, static void read_checkpoint_data(t_fileio *fp,int *simulation_part, gmx_large_int_t *step,double *t,t_state *state, - bool bReadRNG, + gmx_bool bReadRNG, int *nfiles,gmx_file_position_t **outputfiles) { int file_version; @@ -1922,7 +1922,9 @@ void read_checkpoint_trxframe(t_fileio *fp,t_trxframe *fr) fr->x = state.x; state.x = NULL; } - fr->bV = (state.flags & (1<bV = (state.flags & (1<bV) { fr->v = state.v; @@ -1999,7 +2001,7 @@ void list_checkpoint(const char *fn,FILE *out) } -static bool exist_output_file(const char *fnm_cp,int nfile,const t_filenm fnm[]) +static gmx_bool exist_output_file(const char *fnm_cp,int nfile,const t_filenm fnm[]) { int i; @@ -2017,11 +2019,11 @@ static bool exist_output_file(const char *fnm_cp,int nfile,const t_filenm fnm[]) } /* This routine cannot print tons of data, since it is called before the log file is opened. */ -bool read_checkpoint_simulation_part(const char *filename, int *simulation_part, +gmx_bool read_checkpoint_simulation_part(const char *filename, int *simulation_part, gmx_large_int_t *cpt_step,t_commrec *cr, - bool bAppendReq, + gmx_bool bAppendReq, int nfile,const t_filenm fnm[], - const char *part_suffix,bool *bAddPart) + const char *part_suffix,gmx_bool *bAddPart) { t_fileio *fp; gmx_large_int_t step=0; @@ -2030,7 +2032,7 @@ bool read_checkpoint_simulation_part(const char *filename, int *simulation_part, int nfiles; gmx_file_position_t *outputfiles; int nexist,f; - bool bAppend; + gmx_bool bAppend; char *fn,suf_up[STRLEN]; bAppend = FALSE; diff --git a/src/gmxlib/confio.c b/src/gmxlib/confio.c index d9f5644571..2acf638dbd 100644 --- a/src/gmxlib/confio.c +++ b/src/gmxlib/confio.c @@ -67,7 +67,7 @@ static int read_g96_pos(char line[],t_symtab *symtab, t_trxframe *fr) { t_atoms *atoms; - bool bEnd; + gmx_bool bEnd; int nwanted,natoms,atnr,resnr,oldres,newres,shift; char anm[STRLEN],resnm[STRLEN]; char c1,c2; @@ -147,7 +147,7 @@ static int read_g96_pos(char line[],t_symtab *symtab, static int read_g96_vel(char line[],FILE *fp,const char *infile, t_trxframe *fr) { - bool bEnd; + gmx_bool bEnd; int nwanted,natoms=-1,shift; double db1,db2,db3; @@ -190,7 +190,7 @@ int read_g96_conf(FILE *fp,const char *infile,t_trxframe *fr) { t_symtab *symtab=NULL; char line[STRLEN+1]; - bool bAtStart,bTime,bAtoms,bPos,bVel,bBox,bEnd,bFinished; + gmx_bool bAtStart,bTime,bAtoms,bPos,bVel,bBox,bEnd,bFinished; int natoms,nbp; double db1,db2,db3,db4,db5,db6,db7,db8,db9; @@ -451,7 +451,7 @@ static void read_espresso_conf(const char *infile, int natoms,level,npar,r,nprop,p,i,m,molnr; int prop[32]; double d; - bool bFoundParticles,bFoundProp,bFoundVariable,bMol; + gmx_bool bFoundParticles,bFoundProp,bFoundVariable,bMol; if (!symtab) { snew(symtab,1); @@ -613,7 +613,7 @@ static int get_espresso_coordnum(const char *infile) FILE *fp; char word[STRLEN]; int natoms,level,r; - bool bFoundParticles; + gmx_bool bFoundParticles; natoms = 0; @@ -699,7 +699,7 @@ static void get_coordnum (const char *infile,int *natoms) gmx_fio_fclose (in); } -static bool get_w_conf(FILE *in,const char *infile,char *title, +static gmx_bool get_w_conf(FILE *in,const char *infile,char *title, t_atoms *atoms, int *ndec, rvec x[],rvec *v, matrix box) { t_symtab *symtab=NULL; @@ -709,7 +709,7 @@ static bool get_w_conf(FILE *in,const char *infile,char *title, double x1,y1,z1,x2,y2,z2; rvec xmin,xmax; int natoms,i,m,resnr,newres,oldres,ddist,c; - bool bFirst,bVel; + gmx_bool bFirst,bVel; char *p1,*p2,*p3; newres = -1; @@ -896,7 +896,7 @@ static void get_conf(FILE *in,char *title,int *natoms, sfree(atoms.atomname); } -bool gro_next_x_or_v(FILE *status,t_trxframe *fr) +gmx_bool gro_next_x_or_v(FILE *status,t_trxframe *fr) { t_atoms atoms; char title[STRLEN],*p; @@ -965,7 +965,7 @@ int gro_first_x_or_v(FILE *status,t_trxframe *fr) return fr->natoms; } -static void make_hconf_format(int pr,bool bVel,char format[]) +static void make_hconf_format(int pr,gmx_bool bVel,char format[]) { int l,vpr; diff --git a/src/gmxlib/copyrite.c b/src/gmxlib/copyrite.c index 1fcf3758c7..8e4abfead0 100644 --- a/src/gmxlib/copyrite.c +++ b/src/gmxlib/copyrite.c @@ -66,7 +66,7 @@ static void pr_two(FILE *out,int c,int i) void pr_difftime(FILE *out,double dt) { int ndays,nhours,nmins,nsecs; - bool bPrint,bPrinted; + gmx_bool bPrint,bPrinted; ndays = dt/(24*3600); dt = dt-24*3600*ndays; @@ -103,7 +103,7 @@ void pr_difftime(FILE *out,double dt) } -bool be_cool(void) +gmx_bool be_cool(void) { /* Yes, it is bad to check the environment variable every call, * but we dont call this routine often, and it avoids using diff --git a/src/gmxlib/disre.c b/src/gmxlib/disre.c index 705167ce6f..e39eb1586f 100644 --- a/src/gmxlib/disre.c +++ b/src/gmxlib/disre.c @@ -54,7 +54,7 @@ #include "mtop_util.h" void init_disres(FILE *fplog,const gmx_mtop_t *mtop, - t_inputrec *ir,const t_commrec *cr,bool bPartDecomp, + t_inputrec *ir,const t_commrec *cr,gmx_bool bPartDecomp, t_fcdata *fcd,t_state *state) { int fa,nmol,i,npair,np; @@ -249,7 +249,7 @@ void calc_disres_R_6(const gmx_multisim_t *ms, ivec it,jt,dt; t_disresdata *dd; real ETerm,ETerm1,cf1=0,cf2=0,invn=0; - bool bTav; + gmx_bool bTav; dd = &(fcd->disres); bTav = (dd->dr_tau != 0); @@ -368,11 +368,11 @@ real ta_disres(int nfa,const t_iatom forceatoms[],const t_iparams ip[], real tav_viol,instant_viol,mixed_viol,violtot,vtot; real tav_viol_Rtav7,instant_viol_Rtav7; real up1,up2,low; - bool bConservative,bMixed,bViolation; + gmx_bool bConservative,bMixed,bViolation; ivec it,jt,dt; t_disresdata *dd; int dr_weighting; - bool dr_bMixed; + gmx_bool dr_bMixed; dd = &(fcd->disres); dr_weighting = dd->dr_weighting; diff --git a/src/gmxlib/do_fit.c b/src/gmxlib/do_fit.c index 74ea0f22bc..7b2525c19b 100644 --- a/src/gmxlib/do_fit.c +++ b/src/gmxlib/do_fit.c @@ -48,7 +48,7 @@ #define EPS 1.0e-09 -real calc_similar_ind(bool bRho,int nind,atom_id *index,real mass[], +real calc_similar_ind(gmx_bool bRho,int nind,atom_id *index,real mass[], rvec x[],rvec xp[]) { int i, j, d; diff --git a/src/gmxlib/enxio.c b/src/gmxlib/enxio.c index abccee090e..fef5f69ee5 100644 --- a/src/gmxlib/enxio.c +++ b/src/gmxlib/enxio.c @@ -65,8 +65,8 @@ const char *enx_block_id_name[] = { /* Stuff for reading pre 4.1 energy files */ typedef struct { - bool bOldFileOpen; /* Is this an open old file? */ - bool bReadFirstStep; /* Did we read the first step? */ + gmx_bool bOldFileOpen; /* Is this an open old file? */ + gmx_bool bReadFirstStep; /* Did we read the first step? */ int first_step; /* First step in the energy file */ int step_prev; /* Previous step */ int nsum_prev; /* Previous step sum length */ @@ -315,7 +315,7 @@ void add_subblocks_enxblock(t_enxblock *eb, int n) } -static void edr_strings(XDR *xdr,bool bRead,int file_version, +static void edr_strings(XDR *xdr,gmx_bool bRead,int file_version, int n,gmx_enxnm_t **nms) { int i; @@ -374,7 +374,7 @@ void do_enxnms(ener_file_t ef,int *nre,gmx_enxnm_t **nms) { int magic=-55555; XDR *xdr; - bool bRead = gmx_fio_getread(ef->fio); + gmx_bool bRead = gmx_fio_getread(ef->fio); int file_version; int i; @@ -425,13 +425,13 @@ void do_enxnms(ener_file_t ef,int *nre,gmx_enxnm_t **nms) edr_strings(xdr,bRead,file_version,*nre,nms); } -static bool do_eheader(ener_file_t ef,int *file_version,t_enxframe *fr, - int nre_test,bool *bWrongPrecision,bool *bOK) +static gmx_bool do_eheader(ener_file_t ef,int *file_version,t_enxframe *fr, + int nre_test,gmx_bool *bWrongPrecision,gmx_bool *bOK) { int magic=-7777777; real r; int b,i,zero=0,dum=0; - bool bRead = gmx_fio_getread(ef->fio); + gmx_bool bRead = gmx_fio_getread(ef->fio); int tempfix_nr=0; int ndisre=0; int startb=0; @@ -668,12 +668,12 @@ void close_enx(ener_file_t ef) } } -static bool empty_file(const char *fn) +static gmx_bool empty_file(const char *fn) { FILE *fp; char dum; int ret; - bool bEmpty; + gmx_bool bEmpty; fp = gmx_fio_fopen(fn,"r"); ret = fread(&dum,sizeof(dum),1,fp); @@ -690,7 +690,7 @@ ener_file_t open_enx(const char *fn,const char *mode) gmx_enxnm_t *nms=NULL; int file_version=-1; t_enxframe *fr; - bool bWrongPrecision,bDum=TRUE; + gmx_bool bWrongPrecision,bDum=TRUE; struct ener_file *ef; snew(ef,1); @@ -821,11 +821,11 @@ static void convert_full_sums(ener_old_t *ener_old,t_enxframe *fr) ener_old->step_prev = fr->step; } -bool do_enx(ener_file_t ef,t_enxframe *fr) +gmx_bool do_enx(ener_file_t ef,t_enxframe *fr) { int file_version=-1; int i,b; - bool bRead,bOK,bOK1,bSane; + gmx_bool bRead,bOK,bOK1,bSane; real tmp1,tmp2,rdum; char buf[22]; /*int d_size;*/ diff --git a/src/gmxlib/ewald_util.c b/src/gmxlib/ewald_util.c index 660d39c14f..cd5590347f 100644 --- a/src/gmxlib/ewald_util.c +++ b/src/gmxlib/ewald_util.c @@ -107,8 +107,8 @@ real ewald_LRcorrection(FILE *fplog, double isp=0.564189583547756; #endif int niat; - bool bFreeEnergy = (chargeB != NULL); - bool bMolPBC = fr->bMolPBC; + gmx_bool bFreeEnergy = (chargeB != NULL); + gmx_bool bMolPBC = fr->bMolPBC; one_4pi_eps = ONE_4PI_EPS0/fr->epsilon_r; vr0 = ewc*2/sqrt(M_PI); diff --git a/src/gmxlib/filenm.c b/src/gmxlib/filenm.c index b26b34dcd9..f1bd87b908 100644 --- a/src/gmxlib/filenm.c +++ b/src/gmxlib/filenm.c @@ -571,11 +571,11 @@ static void add_filenm(t_filenm *fnm, const char *filenm) fnm->nfiles++; } -static void set_grpfnm(t_filenm *fnm, const char *name, bool bCanNotOverride) +static void set_grpfnm(t_filenm *fnm, const char *name, gmx_bool bCanNotOverride) { char buf[256], buf2[256]; int i, type; - bool bValidExt; + gmx_bool bValidExt; int nopts; const int *ftps; @@ -632,8 +632,8 @@ static void set_grpfnm(t_filenm *fnm, const char *name, bool bCanNotOverride) add_filenm(fnm, buf); } -static void set_filenm(t_filenm *fnm, const char *name, bool bCanNotOverride, - bool bReadNode) +static void set_filenm(t_filenm *fnm, const char *name, gmx_bool bCanNotOverride, + gmx_bool bReadNode) { /* Set the default filename, extension and option for those fields that * are not already set. An extension is added if not present, if fn = NULL @@ -687,7 +687,7 @@ static void set_filenm(t_filenm *fnm, const char *name, bool bCanNotOverride, } } -static void set_filenms(int nf, t_filenm fnm[], bool bReadNode) +static void set_filenms(int nf, t_filenm fnm[], gmx_bool bReadNode) { int i; @@ -697,10 +697,10 @@ static void set_filenms(int nf, t_filenm fnm[], bool bReadNode) } void parse_file_args(int *argc, char *argv[], int nf, t_filenm fnm[], - bool bKeep, bool bReadNode) + gmx_bool bKeep, gmx_bool bReadNode) { int i, j; - bool *bRemove; + gmx_bool *bRemove; check_opts(nf, fnm); @@ -822,26 +822,26 @@ int ftp2fns(char **fns[], int ftp, int nfile, const t_filenm fnm[]) return 0; } -bool ftp2bSet(int ftp, int nfile, const t_filenm fnm[]) +gmx_bool ftp2bSet(int ftp, int nfile, const t_filenm fnm[]) { int i; for (i = 0; (i < nfile); i++) if (ftp == fnm[i].ftp) - return (bool) IS_SET(fnm[i]); + return (gmx_bool) IS_SET(fnm[i]); fprintf(stderr, "ftp2bSet: No filetype %s\n", deffile[ftp].ext); return FALSE; } -bool opt2bSet(const char *opt, int nfile, const t_filenm fnm[]) +gmx_bool opt2bSet(const char *opt, int nfile, const t_filenm fnm[]) { int i; for (i = 0; (i < nfile); i++) if (strcmp(opt, fnm[i].opt) == 0) - return (bool) IS_SET(fnm[i]); + return (gmx_bool) IS_SET(fnm[i]); fprintf(stderr, "No option %s\n", opt); @@ -930,17 +930,17 @@ char *ftp2filter(int ftp) } #endif -bool is_optional(const t_filenm *fnm) +gmx_bool is_optional(const t_filenm *fnm) { return ((fnm->flag & ffOPT) == ffOPT); } -bool is_output(const t_filenm *fnm) +gmx_bool is_output(const t_filenm *fnm) { return ((fnm->flag & ffWRITE) == ffWRITE); } -bool is_set(const t_filenm *fnm) +gmx_bool is_set(const t_filenm *fnm) { return ((fnm->flag & ffSET) == ffSET); } diff --git a/src/gmxlib/futil.c b/src/gmxlib/futil.c index 7ce203e7a5..da593c9d3a 100644 --- a/src/gmxlib/futil.c +++ b/src/gmxlib/futil.c @@ -83,7 +83,7 @@ typedef struct t_pstack { } t_pstack; static t_pstack *pstack=NULL; -static bool bUnbuffered=FALSE; +static gmx_bool bUnbuffered=FALSE; #ifdef GMX_THREADS /* this linked list is an intrinsically globally shared object, so we have @@ -242,7 +242,7 @@ gmx_off_t gmx_ftell(FILE *stream) } -bool is_pipe(FILE *fp) +gmx_bool is_pipe(FILE *fp) { t_pstack *ps; #ifdef GMX_THREADS @@ -294,7 +294,7 @@ static FILE *gunzip(const char *fn,const char *mode) return fp; } -bool gmx_fexist(const char *fname) +gmx_bool gmx_fexist(const char *fname) { FILE *test; @@ -316,9 +316,9 @@ bool gmx_fexist(const char *fname) } -bool gmx_fexist_master(const char *fname, t_commrec *cr) +gmx_bool gmx_fexist_master(const char *fname, t_commrec *cr) { - bool bExist; + gmx_bool bExist; if (SIMMASTER(cr)) { @@ -331,10 +331,10 @@ bool gmx_fexist_master(const char *fname, t_commrec *cr) return bExist; } -bool gmx_eof(FILE *fp) +gmx_bool gmx_eof(FILE *fp) { char data[4]; - bool beof; + gmx_bool beof; if (is_pipe(fp)) return feof(fp); @@ -395,7 +395,7 @@ static char *backup_fn(const char *file,int count_max) return buf; } -bool make_backup(const char * name) +gmx_bool make_backup(const char * name) { char * env; int count_max; @@ -444,7 +444,7 @@ FILE *ffopen(const char *file,const char *mode) #else FILE *ff=NULL; char buf[256],*bf,*bufsize=0,*ptr; - bool bRead; + gmx_bool bRead; int bs; if (mode[0]=='w') { @@ -679,10 +679,10 @@ gmx_directory_close(gmx_directory_t gmxdir) -bool search_subdirs(const char *parent, char *libdir) +gmx_bool search_subdirs(const char *parent, char *libdir) { char *ptr; - bool found; + gmx_bool found; /* Search a few common subdirectory names for the gromacs library dir */ sprintf(libdir,"%s%cshare%ctop%cgurgle.dat",parent, @@ -720,7 +720,7 @@ bool search_subdirs(const char *parent, char *libdir) * with "\" or "X:\" on windows. If not, the program name * is relative to the current directory. */ -static bool filename_is_absolute(char *name) +static gmx_bool filename_is_absolute(char *name) { #if ((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined __CYGWIN__ && !defined __CYGWIN32__) return ((name[0] == DIR_SEPARATOR) || ((strlen(name)>3) && strncmp(name+1,":\\",2)) == 0); @@ -729,7 +729,7 @@ static bool filename_is_absolute(char *name) #endif } -bool get_libdir(char *libdir) +gmx_bool get_libdir(char *libdir) { #define GMX_BINNAME_MAX 512 char bin_name[GMX_BINNAME_MAX]; @@ -737,7 +737,7 @@ bool get_libdir(char *libdir) char full_path[GMX_PATH_MAX+GMX_BINNAME_MAX]; char system_path[GMX_PATH_MAX]; char *dir,*ptr,*s,*pdum; - bool found=FALSE; + gmx_bool found=FALSE; int i; if (Program() != NULL) @@ -846,13 +846,13 @@ bool get_libdir(char *libdir) } -char *low_gmxlibfn(const char *file, bool bAddCWD, bool bFatal) +char *low_gmxlibfn(const char *file, gmx_bool bAddCWD, gmx_bool bFatal) { char *ret; char *lib,*dir; char buf[1024]; char libpath[GMX_PATH_MAX]; - bool env_is_set=FALSE; + gmx_bool env_is_set=FALSE; char *s,tmppath[GMX_PATH_MAX]; /* GMXLIB can be a path now */ @@ -909,7 +909,7 @@ char *low_gmxlibfn(const char *file, bool bAddCWD, bool bFatal) -FILE *low_libopen(const char *file,bool bFatal) +FILE *low_libopen(const char *file,gmx_bool bFatal) { FILE *ff; char *fn; @@ -1010,7 +1010,7 @@ int gmx_file_rename(const char *oldname, const char *newname) #endif } -int gmx_file_copy(const char *oldname, const char *newname, bool copy_if_empty) +int gmx_file_copy(const char *oldname, const char *newname, gmx_bool copy_if_empty) { /* the full copy buffer size: */ #define FILECOPY_BUFSIZE (1<<16) diff --git a/src/gmxlib/gbutil.c b/src/gmxlib/gbutil.c index d148095bfa..7d516c3491 100644 --- a/src/gmxlib/gbutil.c +++ b/src/gmxlib/gbutil.c @@ -239,7 +239,7 @@ void genconf(t_atoms *atoms,rvec *x,rvec *v,real *r,matrix box,ivec n_box) /*gen_box() generates a box around a configuration*/ void gen_box(int NTB,int natoms,rvec *x, matrix box,rvec box_space, - bool bCenter) + gmx_bool bCenter) { int i,m; rvec xmin, xmax; diff --git a/src/gmxlib/gmx_fatal.c b/src/gmxlib/gmx_fatal.c index f1f403ce8b..62dabd5eb9 100644 --- a/src/gmxlib/gmx_fatal.c +++ b/src/gmxlib/gmx_fatal.c @@ -60,7 +60,7 @@ #include "tmpi.h" #endif -static bool bDebug = FALSE; +static gmx_bool bDebug = FALSE; static char *fatal_tmp_file = NULL; static FILE *log_file = NULL; @@ -71,9 +71,9 @@ static tMPI_Thread_mutex_t fatal_tmp_mutex=TMPI_THREAD_MUTEX_INITIALIZER; #endif -bool bDebugMode(void) +gmx_bool bDebugMode(void) { - bool ret; + gmx_bool ret; /*#ifdef GMX_THREADS*/ #if 0 tMPI_Thread_mutex_lock(&debug_mutex); @@ -93,7 +93,7 @@ void gmx_fatal_set_log_file(FILE *fp) void _where(const char *file,int line) { - static bool bFirst = TRUE; + static gmx_bool bFirst = TRUE; static int nskip = -1; static int nwhere = 0; FILE *fp; @@ -147,7 +147,7 @@ static void bputd(char *msg,int *len,int d) if (d<10) bputc(msg,len,d+'0'); else bputc(msg,len,d-10+'a'); } -static void bputi(char *msg,int *len,int val,int radix,int fld,bool bNeg) +static void bputi(char *msg,int *len,int val,int radix,int fld,gmx_bool bNeg) { int fmax=0; @@ -444,7 +444,7 @@ void gmx_fatal_collective(int f_errno,const char *file,int line, t_commrec *cr,gmx_domdec_t *dd, const char *fmt,...) { - bool bFinalize; + gmx_bool bFinalize; va_list ap; char msg[STRLEN]; #ifdef GMX_MPI @@ -549,7 +549,7 @@ void _unexpected_eof(const char *fn,int line,const char *srcfn,int srcline) * */ FILE *debug=NULL; -bool gmx_debug_at=FALSE; +gmx_bool gmx_debug_at=FALSE; void init_debug (const int dbglevel,const char *dbgfile) { diff --git a/src/gmxlib/gmxcpp.c b/src/gmxlib/gmxcpp.c index 4245e60b90..ab17cbd601 100644 --- a/src/gmxlib/gmxcpp.c +++ b/src/gmxlib/gmxcpp.c @@ -83,7 +83,7 @@ typedef struct gmx_cpp { struct gmx_cpp *child,*parent; } gmx_cpp; -static bool is_word_end(char c) +static gmx_bool is_word_end(char c) { return !(isalnum(c) || c == '_'); } @@ -104,7 +104,7 @@ static const char *strstrw(const char *buf,const char *word) return NULL; } -static bool find_directive(char *buf, char **name, char **val) +static gmx_bool find_directive(char *buf, char **name, char **val) { /* Skip initial whitespace */ while (isspace(*buf)) ++buf; @@ -129,7 +129,7 @@ static bool find_directive(char *buf, char **name, char **val) return TRUE; } -static bool is_ifdeffed_out(gmx_cpp_t handle) +static gmx_bool is_ifdeffed_out(gmx_cpp_t handle) { return ((handle->nifdef > 0) && (handle->ifdefs[handle->nifdef-1] != eifTRUE)); } @@ -448,7 +448,7 @@ int cpp_read_line(gmx_cpp_t *handlep,int n,char buf[]) const char *ptr, *ptr2; char *name; char *dname, *dval; - bool bEOF; + gmx_bool bEOF; if (!handle) return eCPP_INVALID_HANDLE; diff --git a/src/gmxlib/gmxfio.c b/src/gmxlib/gmxfio.c index dd1de26f46..9de2de941e 100644 --- a/src/gmxlib/gmxfio.c +++ b/src/gmxlib/gmxfio.c @@ -149,10 +149,10 @@ static int gmx_fio_int_flush(t_fileio* fio) } /* returns TRUE if the file type ftp is in the set set */ -static bool in_ftpset(int ftp, int nset, const int set[]) +static gmx_bool in_ftpset(int ftp, int nset, const int set[]) { int i; - bool bResult; + gmx_bool bResult; bResult = FALSE; for (i = 0; (i < nset); i++) @@ -338,7 +338,7 @@ static void gmx_fio_insert(t_fileio *fio) /* remove a t_fileio into the list. We assume the fio is locked, and we leave it locked. */ -static void gmx_fio_remove(t_fileio *fio, bool global_lock) +static void gmx_fio_remove(t_fileio *fio, gmx_bool global_lock) { t_fileio *prev; @@ -452,7 +452,7 @@ t_fileio *gmx_fio_open(const char *fn, const char *mode) t_fileio *fio = NULL; int i; char newmode[5]; - bool bRead, bReadWrite; + gmx_bool bRead, bReadWrite; int xdrid; if (fn2ftp(fn) == efTPA) @@ -915,16 +915,16 @@ void gmx_fio_checktype(t_fileio *fio) } -void gmx_fio_setprecision(t_fileio *fio, bool bDouble) +void gmx_fio_setprecision(t_fileio *fio, gmx_bool bDouble) { gmx_fio_lock(fio); fio->bDouble = bDouble; gmx_fio_unlock(fio); } -bool gmx_fio_getdebug(t_fileio *fio) +gmx_bool gmx_fio_getdebug(t_fileio *fio) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret = fio->bDebug; @@ -933,7 +933,7 @@ bool gmx_fio_getdebug(t_fileio *fio) return ret; } -void gmx_fio_setdebug(t_fileio *fio, bool bDebug) +void gmx_fio_setdebug(t_fileio *fio, gmx_bool bDebug) { gmx_fio_lock(fio); fio->bDebug = bDebug; @@ -1116,9 +1116,9 @@ XDR *gmx_fio_getxdr(t_fileio* fio) return ret; } -bool gmx_fio_getread(t_fileio* fio) +gmx_bool gmx_fio_getread(t_fileio* fio) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret = fio->bRead; diff --git a/src/gmxlib/gmxfio_asc.c b/src/gmxlib/gmxfio_asc.c index 01ea6a09b0..4cab9df69d 100644 --- a/src/gmxlib/gmxfio_asc.c +++ b/src/gmxlib/gmxfio_asc.c @@ -68,13 +68,13 @@ /* file type functions */ -static bool do_ascread(t_fileio *fio, void *item, int nitem, int eio, +static gmx_bool do_ascread(t_fileio *fio, void *item, int nitem, int eio, const char *desc, const char *srcfile, int line); -static bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio, +static gmx_bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio, const char *desc, const char *srcfile, int line); -static bool do_dummyread(t_fileio *fio, void *item, int nitem, int eio, +static gmx_bool do_dummyread(t_fileio *fio, void *item, int nitem, int eio, const char *desc, const char *srcfile, int line); -static bool do_dummywrite(t_fileio *fio, const void *item, int nitem, int eio, +static gmx_bool do_dummywrite(t_fileio *fio, const void *item, int nitem, int eio, const char *desc, const char *srcfile, int line); @@ -86,14 +86,14 @@ const t_iotype dummy_iotype={do_dummyread, do_dummywrite}; -static bool do_dummyread(t_fileio *fio, void *item, int nitem, int eio, +static gmx_bool do_dummyread(t_fileio *fio, void *item, int nitem, int eio, const char *desc, const char *srcfile, int line) { gmx_fatal(FARGS, "File type not set!"); return FALSE; } -static bool do_dummywrite(t_fileio *fio, const void *item, int nitem, int eio, +static gmx_bool do_dummywrite(t_fileio *fio, const void *item, int nitem, int eio, const char *desc, const char *srcfile, int line) { gmx_fatal(FARGS, "File type not set!"); @@ -140,7 +140,7 @@ static void decode_string(int maxlen, char dst[], const char src[]) } } -static bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio, +static gmx_bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio, const char *desc, const char *srcfile, int line) { int i; @@ -221,8 +221,8 @@ static bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio, static char *next_item(FILE *fp, char *buf, int buflen) { int rd; - bool in_comment = FALSE; - bool in_token = FALSE; + gmx_bool in_comment = FALSE; + gmx_bool in_token = FALSE; int i = 0; /* This routine reads strings from the file fp, strips comment * and buffers. For thread-safety reasons, It reads through getc() */ @@ -267,7 +267,7 @@ static char *next_item(FILE *fp, char *buf, int buflen) return buf; } -static bool do_ascread(t_fileio *fio, void *item, int nitem, int eio, +static gmx_bool do_ascread(t_fileio *fio, void *item, int nitem, int eio, const char *desc, const char *srcfile, int line) { FILE *fp = fio->fp; diff --git a/src/gmxlib/gmxfio_bin.c b/src/gmxlib/gmxfio_bin.c index c63b680879..a072d4fd60 100644 --- a/src/gmxlib/gmxfio_bin.c +++ b/src/gmxlib/gmxfio_bin.c @@ -62,16 +62,16 @@ /* This is the part that reads dummy and ascii files. */ -static bool do_binread(t_fileio *fio, void *item, int nitem, int eio, +static gmx_bool do_binread(t_fileio *fio, void *item, int nitem, int eio, const char *desc, const char *srcfile, int line); -static bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio, +static gmx_bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio, const char *desc, const char *srcfile, int line); const t_iotype bin_iotype={do_binread, do_binwrite}; -static bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio, +static gmx_bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio, const char *desc, const char *srcfile, int line) { size_t size = 0, wsize; @@ -134,7 +134,7 @@ static bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio, return (wsize == nitem); } -static bool do_binread(t_fileio *fio, void *item, int nitem, int eio, +static gmx_bool do_binread(t_fileio *fio, void *item, int nitem, int eio, const char *desc, const char *srcfile, int line) { size_t size = 0, rsize; diff --git a/src/gmxlib/gmxfio_int.h b/src/gmxlib/gmxfio_int.h index 0b84154140..1ee685125e 100644 --- a/src/gmxlib/gmxfio_int.h +++ b/src/gmxlib/gmxfio_int.h @@ -58,9 +58,9 @@ /* the reader/writer functions for t_iotype */ -typedef bool read_func(t_fileio *fio, void *item, int nitem, int eio, +typedef gmx_bool read_func(t_fileio *fio, void *item, int nitem, int eio, const char *desc,const char *srcfile,int line); -typedef bool write_func(t_fileio *fio, const void *item, int nitem, int eio, +typedef gmx_bool write_func(t_fileio *fio, const void *item, int nitem, int eio, const char *desc,const char *srcfile,int line); @@ -77,7 +77,7 @@ struct t_fileio { FILE *fp; /* the file pointer */ const t_iotype *iotp; /* file type */ - bool bOpen, /* the file is open */ + gmx_bool bOpen, /* the file is open */ bRead, /* the file is open for reading */ bDouble, /* write doubles instead of floats */ bDebug, /* the file ops should come with debug info */ diff --git a/src/gmxlib/gmxfio_rw.c b/src/gmxlib/gmxfio_rw.c index 88ed184a9d..d40ebf5a71 100644 --- a/src/gmxlib/gmxfio_rw.c +++ b/src/gmxlib/gmxfio_rw.c @@ -66,20 +66,20 @@ * *******************************************************************/ -bool gmx_fio_reade_real(t_fileio *fio, real *item, +gmx_bool gmx_fio_reade_real(t_fileio *fio, real *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioREAL, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_float(t_fileio *fio, float *item, +gmx_bool gmx_fio_reade_float(t_fileio *fio, float *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioFLOAT, desc, srcfile, line); gmx_fio_unlock(fio); @@ -87,40 +87,40 @@ bool gmx_fio_reade_float(t_fileio *fio, float *item, } -bool gmx_fio_reade_double(t_fileio *fio, double *item, +gmx_bool gmx_fio_reade_double(t_fileio *fio, double *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioDOUBLE, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_int(t_fileio *fio, int *item, +gmx_bool gmx_fio_reade_int(t_fileio *fio, int *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioINT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, +gmx_bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioGMX_LARGE_INT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_uchar(t_fileio *fio, unsigned char *item, +gmx_bool gmx_fio_reade_uchar(t_fileio *fio, unsigned char *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioUCHAR, desc, srcfile, line); gmx_fio_unlock(fio); @@ -128,40 +128,40 @@ bool gmx_fio_reade_uchar(t_fileio *fio, unsigned char *item, } -bool gmx_fio_reade_ushort(t_fileio *fio, unsigned short *item, +gmx_bool gmx_fio_reade_ushort(t_fileio *fio, unsigned short *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioUSHORT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_rvec(t_fileio *fio, rvec *item, +gmx_bool gmx_fio_reade_rvec(t_fileio *fio, rvec *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioRVEC, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_ivec(t_fileio *fio, ivec *item, +gmx_bool gmx_fio_reade_ivec(t_fileio *fio, ivec *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioIVEC, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_reade_string(t_fileio *fio, char *item, +gmx_bool gmx_fio_reade_string(t_fileio *fio, char *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nread(fio, item, 1, eioSTRING, desc, srcfile, line); gmx_fio_unlock(fio); @@ -171,30 +171,30 @@ bool gmx_fio_reade_string(t_fileio *fio, char *item, /* Write */ -bool gmx_fio_writee_real(t_fileio *fio, real item, +gmx_bool gmx_fio_writee_real(t_fileio *fio, real item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioREAL, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_float(t_fileio *fio, float item, +gmx_bool gmx_fio_writee_float(t_fileio *fio, float item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioFLOAT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_double(t_fileio *fio, double item, +gmx_bool gmx_fio_writee_double(t_fileio *fio, double item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioDOUBLE, desc, srcfile, line); gmx_fio_unlock(fio); @@ -202,70 +202,70 @@ bool gmx_fio_writee_double(t_fileio *fio, double item, } -bool gmx_fio_writee_int(t_fileio *fio, int item, +gmx_bool gmx_fio_writee_int(t_fileio *fio, int item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioINT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_large_int_t item, +gmx_bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_large_int_t item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioGMX_LARGE_INT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_uchar(t_fileio *fio, unsigned char item, +gmx_bool gmx_fio_writee_uchar(t_fileio *fio, unsigned char item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioUCHAR, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_ushort(t_fileio *fio, unsigned short item, +gmx_bool gmx_fio_writee_ushort(t_fileio *fio, unsigned short item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, &item, 1, eioUSHORT, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_rvec(t_fileio *fio, rvec *item, +gmx_bool gmx_fio_writee_rvec(t_fileio *fio, rvec *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, item, 1, eioRVEC, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_ivec(t_fileio *fio, ivec *item, +gmx_bool gmx_fio_writee_ivec(t_fileio *fio, ivec *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, item, 1, eioIVEC, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_writee_string(t_fileio *fio, const char *item, +gmx_bool gmx_fio_writee_string(t_fileio *fio, const char *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); ret=fio->iotp->nwrite(fio, item, 1, eioSTRING, desc, srcfile, line); gmx_fio_unlock(fio); @@ -276,10 +276,10 @@ bool gmx_fio_writee_string(t_fileio *fio, const char *item, /* Read/write functions */ -bool gmx_fio_doe_real(t_fileio *fio, real *item, +gmx_bool gmx_fio_doe_real(t_fileio *fio, real *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioREAL, desc, srcfile, line); @@ -290,10 +290,10 @@ bool gmx_fio_doe_real(t_fileio *fio, real *item, } -bool gmx_fio_doe_float(t_fileio *fio, float *item, +gmx_bool gmx_fio_doe_float(t_fileio *fio, float *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioFLOAT, desc, srcfile, line); @@ -303,10 +303,10 @@ bool gmx_fio_doe_float(t_fileio *fio, float *item, return ret; } -bool gmx_fio_doe_double(t_fileio *fio, double *item, +gmx_bool gmx_fio_doe_double(t_fileio *fio, double *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioDOUBLE, desc, srcfile, line); @@ -317,10 +317,10 @@ bool gmx_fio_doe_double(t_fileio *fio, double *item, } -bool gmx_fio_doe_bool(t_fileio *fio, bool *item, +gmx_bool gmx_fio_doe_gmx_bool(t_fileio *fio, gmx_bool *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; int itmp; gmx_fio_lock(fio); @@ -338,10 +338,10 @@ bool gmx_fio_doe_bool(t_fileio *fio, bool *item, return ret; } -bool gmx_fio_doe_int(t_fileio *fio, int *item, +gmx_bool gmx_fio_doe_int(t_fileio *fio, int *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioINT, desc, srcfile, line); @@ -351,10 +351,10 @@ bool gmx_fio_doe_int(t_fileio *fio, int *item, return ret; } -bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, +gmx_bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioGMX_LARGE_INT, desc, srcfile, line); @@ -364,10 +364,10 @@ bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, return ret; } -bool gmx_fio_doe_uchar(t_fileio *fio, unsigned char *item, +gmx_bool gmx_fio_doe_uchar(t_fileio *fio, unsigned char *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioUCHAR, desc, srcfile, line); @@ -377,10 +377,10 @@ bool gmx_fio_doe_uchar(t_fileio *fio, unsigned char *item, return ret; } -bool gmx_fio_doe_ushort(t_fileio *fio, unsigned short *item, +gmx_bool gmx_fio_doe_ushort(t_fileio *fio, unsigned short *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioUSHORT, desc, srcfile, line); @@ -390,10 +390,10 @@ bool gmx_fio_doe_ushort(t_fileio *fio, unsigned short *item, return ret; } -bool gmx_fio_doe_rvec(t_fileio *fio, rvec *item, +gmx_bool gmx_fio_doe_rvec(t_fileio *fio, rvec *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioRVEC, desc, srcfile, line); @@ -403,10 +403,10 @@ bool gmx_fio_doe_rvec(t_fileio *fio, rvec *item, return ret; } -bool gmx_fio_doe_ivec(t_fileio *fio, ivec *item, +gmx_bool gmx_fio_doe_ivec(t_fileio *fio, ivec *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioIVEC, desc, srcfile, line); @@ -416,10 +416,10 @@ bool gmx_fio_doe_ivec(t_fileio *fio, ivec *item, return ret; } -bool gmx_fio_doe_string(t_fileio *fio, char *item, +gmx_bool gmx_fio_doe_string(t_fileio *fio, char *item, const char *desc, const char *srcfile, int line) { - bool ret; + gmx_bool ret; gmx_fio_lock(fio); if (fio->bRead) ret=fio->iotp->nread(fio, item, 1, eioSTRING, desc, srcfile, line); @@ -437,10 +437,10 @@ bool gmx_fio_doe_string(t_fileio *fio, char *item, /* Array reading & writing */ -bool gmx_fio_nreade_real(t_fileio *fio, real *item, int n, +gmx_bool gmx_fio_nreade_real(t_fileio *fio, real *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;iiotp->nread(fio, item, n, eioNUCHAR, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_nreade_ushort(t_fileio *fio, unsigned short *item, int n, +gmx_bool gmx_fio_nreade_ushort(t_fileio *fio, unsigned short *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;iiotp->nread(fio, item, n, eioNRVEC, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_nreade_ivec(t_fileio *fio, ivec *item, int n, +gmx_bool gmx_fio_nreade_ivec(t_fileio *fio, ivec *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;iiotp->nwrite(fio, item, n, eioNUCHAR, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_nwritee_ushort(t_fileio *fio, const unsigned short *item, int n, +gmx_bool gmx_fio_nwritee_ushort(t_fileio *fio, const unsigned short *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;iiotp->nwrite(fio, item, n, eioNRVEC, desc, srcfile, line); gmx_fio_unlock(fio); return ret; } -bool gmx_fio_nwritee_ivec(t_fileio *fio, const ivec *item, int n, +gmx_bool gmx_fio_nwritee_ivec(t_fileio *fio, const ivec *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;ibRead) { @@ -867,10 +867,10 @@ bool gmx_fio_ndoe_uchar(t_fileio *fio, unsigned char *item, int n, -bool gmx_fio_ndoe_ushort(t_fileio *fio, unsigned short *item, int n, +gmx_bool gmx_fio_ndoe_ushort(t_fileio *fio, unsigned short *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;ibRead) { @@ -912,10 +912,10 @@ bool gmx_fio_ndoe_rvec(t_fileio *fio, rvec *item, int n, -bool gmx_fio_ndoe_ivec(t_fileio *fio, ivec *item, int n, +gmx_bool gmx_fio_ndoe_ivec(t_fileio *fio, ivec *item, int n, const char *desc, const char *srcfile, int line) { - bool ret=TRUE; + gmx_bool ret=TRUE; int i; gmx_fio_lock(fio); for(i=0;istart; inda1 = a1 - g->start; @@ -269,12 +269,12 @@ static void compact_graph(FILE *fplog,t_graph *g) } } -static bool determine_graph_parts(t_graph *g,int *part) +static gmx_bool determine_graph_parts(t_graph *g,int *part) { int i,e; int nchanged; atom_id at_i,*at_i2; - bool bMultiPart; + gmx_bool bMultiPart; /* Initialize the part array with all entries different */ for(at_i=g->start; at_iend; at_i++) { @@ -313,12 +313,12 @@ static bool determine_graph_parts(t_graph *g,int *part) void mk_graph_ilist(FILE *fplog, t_ilist *ilist,int at_start,int at_end, - bool bShakeOnly,bool bSettle, + gmx_bool bShakeOnly,gmx_bool bSettle, t_graph *g) { int *nbond; int i,nbtot; - bool bMultiPart; + gmx_bool bMultiPart; snew(nbond,at_end); nbtot = calc_start_end(fplog,g,ilist,at_start,at_end,nbond); @@ -389,7 +389,7 @@ void mk_graph_ilist(FILE *fplog, t_graph *mk_graph(FILE *fplog, t_idef *idef,int at_start,int at_end, - bool bShakeOnly,bool bSettle) + gmx_bool bShakeOnly,gmx_bool bSettle) { t_graph *g; @@ -514,7 +514,7 @@ static int mk_grey(FILE *log,int nnodes,egCol egc[],t_graph *g,int *AtomI, { int m,j,ng,ai,aj,g0; rvec dx,hbox; - bool bTriclinic; + gmx_bool bTriclinic; ivec is_aj; t_pbc pbc; diff --git a/src/gmxlib/mtop_util.c b/src/gmxlib/mtop_util.c index 5c14520e3a..adc441209e 100644 --- a/src/gmxlib/mtop_util.c +++ b/src/gmxlib/mtop_util.c @@ -252,7 +252,7 @@ static void gmx_mtop_atomloop_all_destroy(gmx_mtop_atomloop_all_t aloop) sfree(aloop); } -bool gmx_mtop_atomloop_all_next(gmx_mtop_atomloop_all_t aloop, +gmx_bool gmx_mtop_atomloop_all_next(gmx_mtop_atomloop_all_t aloop, int *at_global,t_atom **atom) { if (aloop == NULL) @@ -341,7 +341,7 @@ static void gmx_mtop_atomloop_block_destroy(gmx_mtop_atomloop_block_t aloop) sfree(aloop); } -bool gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop, +gmx_bool gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop, t_atom **atom,int *nmol) { if (aloop == NULL) @@ -393,7 +393,7 @@ static void gmx_mtop_ilistloop_destroy(gmx_mtop_ilistloop_t iloop) sfree(iloop); } -bool gmx_mtop_ilistloop_next(gmx_mtop_ilistloop_t iloop, +gmx_bool gmx_mtop_ilistloop_next(gmx_mtop_ilistloop_t iloop, t_ilist **ilist_mol,int *nmol) { if (iloop == NULL) @@ -443,7 +443,7 @@ static void gmx_mtop_ilistloop_all_destroy(gmx_mtop_ilistloop_all_t iloop) sfree(iloop); } -bool gmx_mtop_ilistloop_all_next(gmx_mtop_ilistloop_all_t iloop, +gmx_bool gmx_mtop_ilistloop_all_next(gmx_mtop_ilistloop_all_t iloop, t_ilist **ilist_mol,int *atnr_offset) { gmx_molblock_t *molb; @@ -614,7 +614,7 @@ t_atoms gmx_mtop_global_atoms(const gmx_mtop_t *mtop) } void gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop, - bool bKeepSingleMolCG) + gmx_bool bKeepSingleMolCG) { int mb,cg; t_block *cgs_mol; @@ -767,7 +767,7 @@ static void set_posres_params(t_idef *idef,gmx_molblock_t *molb, } static void gen_local_top(const gmx_mtop_t *mtop,const t_inputrec *ir, - bool bMergeConstr, + gmx_bool bMergeConstr, gmx_localtop_t *top) { int mb,srcnr,destnr,ftype,ftype_dest,mt,natoms,mol,nposre_old; diff --git a/src/gmxlib/mtxio.c b/src/gmxlib/mtxio.c index 9faacbc34b..1b9e8a975d 100644 --- a/src/gmxlib/mtxio.c +++ b/src/gmxlib/mtxio.c @@ -88,8 +88,8 @@ void gmx_mtxio_write(const char * filename, t_fileio *fio; XDR * xd; int i,j,prec; - bool bDum = TRUE; - bool bRead = FALSE; + gmx_bool bDum = TRUE; + gmx_bool bRead = FALSE; size_t sz; if(full_matrix!=NULL && sparse_matrix!=NULL) @@ -132,7 +132,7 @@ void gmx_mtxio_write(const char * filename, i = GMX_MTXIO_SPARSE_MATRIX; gmx_fio_do_int(fio, i); - gmx_fio_do_bool(fio, sparse_matrix->compressed_symmetric); + gmx_fio_do_gmx_bool(fio, sparse_matrix->compressed_symmetric); gmx_fio_do_int(fio, sparse_matrix->nrow); if(sparse_matrix->nrow != nrow) { @@ -162,8 +162,8 @@ gmx_mtxio_read (const char * filename, t_fileio *fio; XDR * xd; int i,j,prec; - bool bDum = TRUE; - bool bRead = TRUE; + gmx_bool bDum = TRUE; + gmx_bool bRead = TRUE; char gmxver[256]; size_t sz; @@ -216,7 +216,7 @@ gmx_mtxio_read (const char * filename, printf("Sparse matrix storage format, nrow=%d, ncols=%d\n",*nrow,*ncol); snew((*sparse_matrix),1); - gmx_fio_do_bool(fio, (*sparse_matrix)->compressed_symmetric); + gmx_fio_do_gmx_bool(fio, (*sparse_matrix)->compressed_symmetric); gmx_fio_do_int(fio, (*sparse_matrix)->nrow); if((*sparse_matrix)->nrow != *nrow) { diff --git a/src/gmxlib/mvdata.c b/src/gmxlib/mvdata.c index f588a2a64b..6720f5b22d 100644 --- a/src/gmxlib/mvdata.c +++ b/src/gmxlib/mvdata.c @@ -217,7 +217,7 @@ void bcast_state_setup(const t_commrec *cr,t_state *state) block_bc(cr,state->flags); } -void bcast_state(const t_commrec *cr,t_state *state,bool bAlloc) +void bcast_state(const t_commrec *cr,t_state *state,gmx_bool bAlloc) { int i,nnht,nnhtp; @@ -460,7 +460,7 @@ static void bc_pull(const t_commrec *cr,t_pull *pull) static void bc_inputrec(const t_commrec *cr,t_inputrec *inputrec) { - bool bAlloc=TRUE; + gmx_bool bAlloc=TRUE; int i; block_bc(cr,*inputrec); @@ -491,7 +491,7 @@ static void bc_moltype(const t_commrec *cr,t_symtab *symtab, static void bc_molblock(const t_commrec *cr,gmx_molblock_t *molb) { - bool bAlloc=TRUE; + gmx_bool bAlloc=TRUE; block_bc(cr,molb->type); block_bc(cr,molb->nmol); diff --git a/src/gmxlib/network.c b/src/gmxlib/network.c index 6fb67e57cc..219d33561b 100644 --- a/src/gmxlib/network.c +++ b/src/gmxlib/network.c @@ -59,7 +59,7 @@ /* The source code in this file should be thread-safe. Please keep it that way. */ -bool gmx_mpi_initialized(void) +gmx_bool gmx_mpi_initialized(void) { int n; #ifndef GMX_MPI diff --git a/src/gmxlib/nonbonded/nb_free_energy.c b/src/gmxlib/nonbonded/nb_free_energy.c index a324230e7b..466c0d4827 100644 --- a/src/gmxlib/nonbonded/nb_free_energy.c +++ b/src/gmxlib/nonbonded/nb_free_energy.c @@ -75,7 +75,7 @@ gmx_nb_free_energy_kernel(int icoul, int lam_power, real sigma6_def, real sigma6_min, - bool bDoForces, + gmx_bool bDoForces, int * outeriter, int * inneriter) { diff --git a/src/gmxlib/nonbonded/nb_free_energy.h b/src/gmxlib/nonbonded/nb_free_energy.h index cbd63c456e..03d96df75c 100644 --- a/src/gmxlib/nonbonded/nb_free_energy.h +++ b/src/gmxlib/nonbonded/nb_free_energy.h @@ -70,7 +70,7 @@ gmx_nb_free_energy_kernel(int icoul, int lam_power, real sigma6_def, real sigma6_min, - bool bDoForces, + gmx_bool bDoForces, int * outeriter, int * inneriter); diff --git a/src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_bluegene.c b/src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_bluegene.c index b4a2d72b42..a5290c7efd 100644 --- a/src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_bluegene.c +++ b/src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_bluegene.c @@ -195,7 +195,7 @@ static jmp_buf nb_kernel_bluegene_testprog; /*! Result of bluegene test */ -static bool +static gmx_bool nb_kernel_bluegene_present; diff --git a/src/gmxlib/nonbonded/nb_kernel_ia32_sse/nb_kernel_ia32_sse.c b/src/gmxlib/nonbonded/nb_kernel_ia32_sse/nb_kernel_ia32_sse.c index bd2a85c330..15bb53ba22 100644 --- a/src/gmxlib/nonbonded/nb_kernel_ia32_sse/nb_kernel_ia32_sse.c +++ b/src/gmxlib/nonbonded/nb_kernel_ia32_sse/nb_kernel_ia32_sse.c @@ -178,7 +178,7 @@ static jmp_buf nb_kernel_ia32_sse_testprog; /*! Result of ia32 SSE test */ -static bool +static gmx_bool nb_kernel_ia32_sse_present; diff --git a/src/gmxlib/nonbonded/nb_kernel_ia32_sse2/nb_kernel_ia32_sse2.c b/src/gmxlib/nonbonded/nb_kernel_ia32_sse2/nb_kernel_ia32_sse2.c index 160ad983a5..5d50986bc4 100644 --- a/src/gmxlib/nonbonded/nb_kernel_ia32_sse2/nb_kernel_ia32_sse2.c +++ b/src/gmxlib/nonbonded/nb_kernel_ia32_sse2/nb_kernel_ia32_sse2.c @@ -176,7 +176,7 @@ static jmp_buf nb_kernel_ia32_sse2_testprog; /*! Result of ia32 SSE2 test */ -static bool +static gmx_bool nb_kernel_ia32_sse2_present; diff --git a/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/nb_kernel_ppc_altivec.c b/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/nb_kernel_ppc_altivec.c index 13eef55245..c3a9ae925b 100644 --- a/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/nb_kernel_ppc_altivec.c +++ b/src/gmxlib/nonbonded/nb_kernel_ppc_altivec/nb_kernel_ppc_altivec.c @@ -161,7 +161,7 @@ nb_kernel_ppc_altivec_testprog; /*! Result of Altivec test */ -static bool +static gmx_bool nb_kernel_ppc_altivec_present; diff --git a/src/gmxlib/nonbonded/nb_kernel_x86_64_sse/nb_kernel_x86_64_sse.c b/src/gmxlib/nonbonded/nb_kernel_x86_64_sse/nb_kernel_x86_64_sse.c index 2bc3f044b6..4af2c05cd1 100644 --- a/src/gmxlib/nonbonded/nb_kernel_x86_64_sse/nb_kernel_x86_64_sse.c +++ b/src/gmxlib/nonbonded/nb_kernel_x86_64_sse/nb_kernel_x86_64_sse.c @@ -180,7 +180,7 @@ static jmp_buf nb_kernel_x86_64_sse_testprog; /*! Result of x86_64 SSE test */ -static bool +static gmx_bool nb_kernel_x86_64_sse_present; diff --git a/src/gmxlib/nonbonded/nb_kernel_x86_64_sse2/nb_kernel_x86_64_sse2.c b/src/gmxlib/nonbonded/nb_kernel_x86_64_sse2/nb_kernel_x86_64_sse2.c index b107fea253..c5eaaeff9f 100644 --- a/src/gmxlib/nonbonded/nb_kernel_x86_64_sse2/nb_kernel_x86_64_sse2.c +++ b/src/gmxlib/nonbonded/nb_kernel_x86_64_sse2/nb_kernel_x86_64_sse2.c @@ -176,7 +176,7 @@ static jmp_buf nb_kernel_x86_64_sse2_testprog; /*! Result of x86_64 SSE2 test */ -static bool +static gmx_bool nb_kernel_x86_64_sse2_present; diff --git a/src/gmxlib/nonbonded/nonbonded.c b/src/gmxlib/nonbonded/nonbonded.c index 08f88f6280..cd4a99bda9 100644 --- a/src/gmxlib/nonbonded/nonbonded.c +++ b/src/gmxlib/nonbonded/nonbonded.c @@ -209,7 +209,7 @@ nb_kernel_list = NULL; void -gmx_setup_kernels(FILE *fplog,bool bGenericKernelOnly) +gmx_setup_kernels(FILE *fplog,gmx_bool bGenericKernelOnly) { int i; @@ -303,12 +303,12 @@ void do_nonbonded(t_commrec *cr,t_forcerec *fr, t_nrnb *nrnb,real lambda,real *dvdlambda, int nls,int eNL,int flags) { - bool bLR,bDoForces,bForeignLambda; + gmx_bool bLR,bDoForces,bForeignLambda; t_nblist * nlist; real * fshift; int n,n0,n1,i,i0,i1,nrnb_ind,sz; t_nblists *nblists; - bool bWater; + gmx_bool bWater; nb_kernel_t * kernelptr; FILE * fp; int fac=0; @@ -644,7 +644,7 @@ do_listed_vdw_q(int ftype,int nbonds, const t_forcerec *fr,gmx_grppairener_t *grppener, int *global_atom_index) { - static bool bWarn=FALSE; + static gmx_bool bWarn=FALSE; real eps,r2,*tab,rtab2=0; rvec dx,x14[2],f14[2]; int i,ai,aj,itype; @@ -663,7 +663,7 @@ do_listed_vdw_q(int ftype,int nbonds, real *egnb=NULL,*egcoul=NULL; t_nblist tmplist; int icoul,ivdw; - bool bMolPBC,bFreeEnergy; + gmx_bool bMolPBC,bFreeEnergy; #if GMX_THREAD_SHM_FDECOMP pthread_mutex_t mtx; diff --git a/src/gmxlib/nrama.c b/src/gmxlib/nrama.c index 8fff5ae594..a34ba51340 100644 --- a/src/gmxlib/nrama.c +++ b/src/gmxlib/nrama.c @@ -88,7 +88,7 @@ static void calc_dihs(t_xrama *xr) } } -bool new_data(t_xrama *xr) +gmx_bool new_data(t_xrama *xr) { if (!read_next_x(xr->oenv,xr->traj,&xr->t,xr->natoms,xr->x,xr->box)) return FALSE; @@ -154,7 +154,7 @@ static void get_dih(t_xrama *xr,t_atoms *atoms) static int search_ff(int thisff[NPP],int ndih,int **ff) { int j,k; - bool bFound=FALSE; + gmx_bool bFound=FALSE; for(j=0; (jview; } diff --git a/src/gmxlib/orires.c b/src/gmxlib/orires.c index 7eba2eefc4..d57d9ac7e8 100644 --- a/src/gmxlib/orires.c +++ b/src/gmxlib/orires.c @@ -338,7 +338,7 @@ real calc_orires_dev(const gmx_multisim_t *ms, double mtot; rvec *xref,*xtmp,com,r_unrot,r; t_oriresdata *od; - bool bTAV; + gmx_bool bTAV; const real two_thr=2.0/3.0; od = &(fcd->orires); @@ -595,7 +595,7 @@ real orires(int nfa,const t_iatom forceatoms[],const t_iparams ip[], rvec r,Sr,fij; real vtot; const t_oriresdata *od; - bool bTAV; + gmx_bool bTAV; vtot = 0; od = &(fcd->orires); diff --git a/src/gmxlib/pargs.c b/src/gmxlib/pargs.c index 8095f52f82..4df3a51494 100644 --- a/src/gmxlib/pargs.c +++ b/src/gmxlib/pargs.c @@ -52,16 +52,16 @@ /* The source code in this file should be thread-safe. Please keep it that way. */ -bool is_hidden(t_pargs *pa) +gmx_bool is_hidden(t_pargs *pa) { return ((strstr(pa->desc,"HIDDEN") != NULL) || (strstr(pa->desc,"[hidden]") != NULL)); } -void get_pargs(int *argc,char *argv[],int nparg,t_pargs pa[],bool bKeepArgs) +void get_pargs(int *argc,char *argv[],int nparg,t_pargs pa[],gmx_bool bKeepArgs) { int i,j,k,match; - bool *bKeep; + gmx_bool *bKeep; char buf[32]; char *ptr; @@ -175,7 +175,7 @@ int opt2parg_int(const char *option,int nparg,t_pargs pa[]) return 0; } -bool opt2parg_bool(const char *option,int nparg,t_pargs pa[]) +gmx_bool opt2parg_gmx_bool(const char *option,int nparg,t_pargs pa[]) { int i; @@ -183,7 +183,7 @@ bool opt2parg_bool(const char *option,int nparg,t_pargs pa[]) if (strcmp(pa[i].option,option) == 0) return *pa[i].u.b; - gmx_fatal(FARGS,"No boolean option %s in pargs",option); + gmx_fatal(FARGS,"No gmx_boolean option %s in pargs",option); return FALSE; } @@ -214,7 +214,7 @@ const char *opt2parg_str(const char *option,int nparg,t_pargs pa[]) return NULL; } -bool opt2parg_bSet(const char *option,int nparg,t_pargs pa[]) +gmx_bool opt2parg_bSet(const char *option,int nparg,t_pargs pa[]) { int i; @@ -289,7 +289,7 @@ char *pa_val(t_pargs *pa, char buf[], int sz) #define OPTLEN 12 #define TYPELEN 6 #define LONGSTR 1024 -char *pargs_print_line(t_pargs *pa,bool bLeadingSpace) +char *pargs_print_line(t_pargs *pa,gmx_bool bLeadingSpace) { char buf[LONGSTR],*buf2,*tmp,*desc; @@ -324,9 +324,9 @@ char *pargs_print_line(t_pargs *pa,bool bLeadingSpace) return tmp; } -void print_pargs(FILE *fp, int npargs,t_pargs pa[],bool bLeadingSpace) +void print_pargs(FILE *fp, int npargs,t_pargs pa[],gmx_bool bLeadingSpace) { - bool bShowHidden; + gmx_bool bShowHidden; char buf[32],buf2[256],tmp[256]; char *wdesc; int i; diff --git a/src/gmxlib/pbc.c b/src/gmxlib/pbc.c index 121bfedc10..af63fc6d04 100644 --- a/src/gmxlib/pbc.c +++ b/src/gmxlib/pbc.c @@ -160,7 +160,7 @@ real max_cutoff2(int ePBC,matrix box) } /* this one is mostly harmless... */ -static bool bWarnedGuess=FALSE; +static gmx_bool bWarnedGuess=FALSE; int guess_ePBC(matrix box) { @@ -229,10 +229,10 @@ static int correct_box_elem(FILE *fplog,int step,tensor box,int v,int d) return shift; } -bool correct_box(FILE *fplog,int step,tensor box,t_graph *graph) +gmx_bool correct_box(FILE *fplog,int step,tensor box,t_graph *graph) { int zy,zx,yx,i; - bool bCorrected; + gmx_bool bCorrected; /* check if the box still obeys the restrictions, if not, correct it */ zy = correct_box_elem(fplog,step,box,ZZ,YY); @@ -282,7 +282,7 @@ static void low_set_pbc(t_pbc *pbc,int ePBC,ivec *dd_nc,matrix box) ivec bPBC; real d2old,d2new,d2new_c; rvec trial,pos; - bool bXY,bUse; + gmx_bool bXY,bUse; const char *ptr; pbc->ndim_ePBC = ePBC2npbcdim(ePBC); @@ -491,7 +491,7 @@ void set_pbc(t_pbc *pbc,int ePBC,matrix box) } t_pbc *set_pbc_dd(t_pbc *pbc,int ePBC, - gmx_domdec_t *dd,bool bSingleDir,matrix box) + gmx_domdec_t *dd,gmx_bool bSingleDir,matrix box) { ivec nc2; int npbcdim,i; @@ -526,7 +526,7 @@ void pbc_dx(const t_pbc *pbc,const rvec x1, const rvec x2, rvec dx) int i,j; rvec dx_start,trial; real d2min,d2trial; - bool bRot; + gmx_bool bRot; rvec_sub(x1,x2,dx); @@ -875,7 +875,7 @@ void pbc_dx_d(const t_pbc *pbc,const dvec x1, const dvec x2, dvec dx) int i,j; dvec dx_start,trial; double d2min,d2trial; - bool bRot; + gmx_bool bRot; dvec_sub(x1,x2,dx); @@ -968,7 +968,7 @@ void pbc_dx_d(const t_pbc *pbc,const dvec x1, const dvec x2, dvec dx) } } -bool image_rect(ivec xi,ivec xj,ivec box_size,real rlong2,int *shift,real *r2) +gmx_bool image_rect(ivec xi,ivec xj,ivec box_size,real rlong2,int *shift,real *r2) { int m,t; int dx,b,b_2; @@ -1000,7 +1000,7 @@ bool image_rect(ivec xi,ivec xj,ivec box_size,real rlong2,int *shift,real *r2) return TRUE; } -bool image_cylindric(ivec xi,ivec xj,ivec box_size,real rlong2, +gmx_bool image_cylindric(ivec xi,ivec xj,ivec box_size,real rlong2, int *shift,real *r2) { int m,t; @@ -1170,7 +1170,7 @@ int *compact_unitcell_edges() 4,17, 5,11, 6,23, 7,13, 8,20, 10,18, 12,16, 14,22 }; int e,i,j; - bool bFirst = TRUE; + gmx_bool bFirst = TRUE; snew(edge,NCUCEDGE*2); diff --git a/src/gmxlib/pdbio.c b/src/gmxlib/pdbio.c index 48f4eccad7..40ce78420c 100644 --- a/src/gmxlib/pdbio.c +++ b/src/gmxlib/pdbio.c @@ -59,7 +59,7 @@ typedef struct { typedef struct gmx_conect_t { int nconect; - bool bSorted; + gmx_bool bSorted; gmx_conection_t *conect; } gmx_conect_t; @@ -72,10 +72,10 @@ static const char *pdbtp[epdbNR]={ /* this is not very good, but these are only used in gmx_trjconv and gmx_editconv */ -static bool bWideFormat=FALSE; +static gmx_bool bWideFormat=FALSE; #define REMARK_SIM_BOX "REMARK THIS IS A SIMULATION BOX" -void set_pdb_wide_format(bool bSet) +void set_pdb_wide_format(gmx_bool bSet) { bWideFormat = bSet; } @@ -220,7 +220,7 @@ void write_pdbfile_indexed(FILE *out,const char *title, t_atoms *atoms,rvec x[], int ePBC,matrix box,char chainid, int model_nr, atom_id nindex, atom_id index[], - gmx_conect conect, bool bTerSepChains) + gmx_conect conect, gmx_bool bTerSepChains) { gmx_conect_t *gc = (gmx_conect_t *)conect; char resnm[6],nm[6],pdbform[128],pukestring[100]; @@ -228,7 +228,7 @@ void write_pdbfile_indexed(FILE *out,const char *title, int resind,resnr,type; unsigned char resic,ch; real occup,bfac; - bool bOccup; + gmx_bool bOccup; int nlongname=0; int chainnum,lastchainnum; int lastresind,lastchainresind; @@ -364,7 +364,7 @@ void write_pdbfile_indexed(FILE *out,const char *title, } void write_pdbfile(FILE *out,const char *title, t_atoms *atoms,rvec x[], - int ePBC,matrix box,char chainid,int model_nr,gmx_conect conect,bool bTerSepChains) + int ePBC,matrix box,char chainid,int model_nr,gmx_conect conect,gmx_bool bTerSepChains) { atom_id i,*index; @@ -477,7 +477,7 @@ void get_pdb_atomnumber(t_atoms *atoms,gmx_atomprop_t aps) static int read_atom(t_symtab *symtab, char line[],int type,int natom, - t_atoms *atoms,rvec x[],int chainnum,bool bChange) + t_atoms *atoms,rvec x[],int chainnum,gmx_bool bChange) { t_atom *atomn; int j,k; @@ -582,7 +582,7 @@ static int read_atom(t_symtab *symtab, return natom; } -bool is_hydrogen(const char *nm) +gmx_bool is_hydrogen(const char *nm) { char buf[30]; @@ -596,7 +596,7 @@ bool is_hydrogen(const char *nm) return FALSE; } -bool is_dummymass(const char *nm) +gmx_bool is_dummymass(const char *nm) { char buf[30]; @@ -656,7 +656,7 @@ void gmx_conect_done(gmx_conect conect) sfree(gc->conect); } -bool gmx_conect_exist(gmx_conect conect,int ai,int aj) +gmx_bool gmx_conect_exist(gmx_conect conect,int ai,int aj) { gmx_conect_t *gc = (gmx_conect_t *)conect; int i; @@ -689,19 +689,19 @@ void gmx_conect_add(gmx_conect conect,int ai,int aj) } int read_pdbfile(FILE *in,char *title,int *model_nr, - t_atoms *atoms,rvec x[],int *ePBC,matrix box,bool bChange, + t_atoms *atoms,rvec x[],int *ePBC,matrix box,gmx_bool bChange, gmx_conect conect) { gmx_conect_t *gc = (gmx_conect_t *)conect; t_symtab symtab; - bool bCOMPND; - bool bConnWarn = FALSE; + gmx_bool bCOMPND; + gmx_bool bConnWarn = FALSE; char line[STRLEN+1]; int line_type; char *c,*d; int natom,chainnum,nres_ter_prev=0; char chidmax=' '; - bool bStop=FALSE; + gmx_bool bStop=FALSE; if (ePBC) { @@ -849,7 +849,7 @@ void get_pdb_coordnum(FILE *in,int *natoms) } void read_pdb_conf(const char *infile,char *title, - t_atoms *atoms,rvec x[],int *ePBC,matrix box,bool bChange, + t_atoms *atoms,rvec x[],int *ePBC,matrix box,gmx_bool bChange, gmx_conect conect) { FILE *in; diff --git a/src/gmxlib/princ.c b/src/gmxlib/princ.c index c0537df32a..19dd592067 100644 --- a/src/gmxlib/princ.c +++ b/src/gmxlib/princ.c @@ -195,7 +195,7 @@ void rotate_atoms(int gnx,atom_id *index,rvec x[],matrix trans) } real calc_xcm(rvec x[],int gnx,atom_id *index,t_atom *atom,rvec xcm, - bool bQ) + gmx_bool bQ) { int i,ii,m; real m0,tm; @@ -223,7 +223,7 @@ real calc_xcm(rvec x[],int gnx,atom_id *index,t_atom *atom,rvec xcm, } real sub_xcm(rvec x[],int gnx,atom_id *index,t_atom atom[],rvec xcm, - bool bQ) + gmx_bool bQ) { int i,ii; real tm; diff --git a/src/gmxlib/readinp.c b/src/gmxlib/readinp.c index 976ce1a6c5..618d56de45 100644 --- a/src/gmxlib/readinp.c +++ b/src/gmxlib/readinp.c @@ -64,7 +64,7 @@ t_inpfile *read_inpfile(const char *fn,int *ninp, t_inpfile *inp=NULL; int nin,lc,i,j,k; /* setting cppopts from command-line options would be cooler */ - bool allow_override=FALSE; + gmx_bool allow_override=FALSE; if (debug) @@ -213,7 +213,7 @@ static void sort_inp(int ninp,t_inpfile inp[]) qsort(inp,ninp,(size_t)sizeof(inp[0]),inp_comp); } -void write_inpfile(const char *fn,int ninp,t_inpfile inp[],bool bHaltOnUnknown, +void write_inpfile(const char *fn,int ninp,t_inpfile inp[],gmx_bool bHaltOnUnknown, warninp_t wi) { FILE *out; diff --git a/src/gmxlib/selection/compiler.c b/src/gmxlib/selection/compiler.c index ae6ce161ac..76f40036d7 100644 --- a/src/gmxlib/selection/compiler.c +++ b/src/gmxlib/selection/compiler.c @@ -75,7 +75,7 @@ * here. * -# A second pass with simple reordering and initialization is done: * -# Boolean expressions are combined such that one element can evaluate, - * e.g., "A and B and C". The subexpressions in boolean expression are + * e.g., "A and B and C". The subexpressions in gmx_boolean expression are * reordered such that static expressions come first without otherwise * altering the relative order of the expressions. * -# The \c t_selelem::evaluate field is set to the correct evaluation @@ -96,7 +96,7 @@ * possible selections, and these are stored in the internal compiler * data structure for each element. * To be able to do this for all possible values of dynamical expressions, - * special care needs to be taken with boolean expressions because they + * special care needs to be taken with gmx_boolean expressions because they * are short-circuiting. This is done through the * \c SEL_CDATA_EVALMAX flag, which makes dynamic child expressions * of \c BOOL_OR expressions evaluate to empty groups, while subexpressions @@ -241,7 +241,7 @@ * information, but do not unnecessarily copy the values. * * - * \subsection selcompiler_tree_bool Boolean elements + * \subsection selcompiler_tree_gmx_bool Boolean elements * * \ref SEL_BOOLEAN elements have been merged such that one element * may carry out evaluation of more than one operation of the same type. @@ -443,8 +443,8 @@ _gmx_selelem_free_compiler_data(t_selelem *sel) * If called more than once, memory is (re)allocated to ensure that the * maximum of the \p isize values can be stored. */ -static bool -alloc_selection_data(t_selelem *sel, int isize, bool bChildEval) +static gmx_bool +alloc_selection_data(t_selelem *sel, int isize, gmx_bool bChildEval) { int nalloc; @@ -767,15 +767,15 @@ extract_subexpressions(t_selelem *sel) ********************************************************************/ /*! \brief - * Removes redundant boolean selection elements. + * Removes redundant gmx_boolean selection elements. * * \param sel Root of the selection subtree to optimize. * - * This function merges similar boolean operations (e.g., (A or B) or C becomes + * This function merges similar gmx_boolean operations (e.g., (A or B) or C becomes * a single OR operation with three operands). */ static void -optimize_boolean_expressions(t_selelem *sel) +optimize_gmx_boolean_expressions(t_selelem *sel) { t_selelem *child, *prev; @@ -786,7 +786,7 @@ optimize_boolean_expressions(t_selelem *sel) child = sel->child; while (child) { - optimize_boolean_expressions(child); + optimize_gmx_boolean_expressions(child); /* Remove double negations */ if (child->type == SEL_BOOLEAN && child->u.boolt == BOOL_NOT && child->child->type == SEL_BOOLEAN && child->child->u.boolt == BOOL_NOT) @@ -851,7 +851,7 @@ optimize_boolean_expressions(t_selelem *sel) } /*! \brief - * Reorders children of boolean expressions such that static selections + * Reorders children of gmx_boolean expressions such that static selections * come first. * * \param sel Root of the selection subtree to reorder. @@ -860,7 +860,7 @@ optimize_boolean_expressions(t_selelem *sel) * The same is true for the dynamic expressions. */ static void -reorder_boolean_static_children(t_selelem *sel) +reorder_gmx_boolean_static_children(t_selelem *sel) { t_selelem *child, *prev, *next; @@ -870,12 +870,12 @@ reorder_boolean_static_children(t_selelem *sel) child = sel->child; while (child) { - reorder_boolean_static_children(child); + reorder_gmx_boolean_static_children(child); child = child->next; } } - /* Reorder boolean expressions such that static selections come first */ + /* Reorder gmx_boolean expressions such that static selections come first */ if (sel->type == SEL_BOOLEAN && (sel->flags & SEL_DYNAMIC)) { t_selelem start; @@ -930,11 +930,11 @@ reorder_boolean_static_children(t_selelem *sel) * Currently, this function only converts integer constants to reals * within arithmetic expressions. */ -static bool +static gmx_bool optimize_arithmetic_expressions(t_selelem *sel) { t_selelem *child; - bool bOk; + gmx_bool bOk; /* Do recursively for children. */ if (sel->type != SEL_SUBEXPRREF) @@ -999,7 +999,7 @@ optimize_arithmetic_expressions(t_selelem *sel) * This function sets the evaluation function (\c t_selelem::evaluate) * for the selection elements. */ -static bool +static gmx_bool init_item_evalfunc(t_selelem *sel) { /* Process children. */ @@ -1253,7 +1253,7 @@ init_item_compilerdata(t_selelem *sel) * for the children of this element. */ if (sel->type == SEL_BOOLEAN) { - bool bEvalMax; + gmx_bool bEvalMax; bEvalMax = (sel->u.boolt == BOOL_AND); child = sel->child; @@ -1291,7 +1291,7 @@ init_item_compilerdata(t_selelem *sel) * for any element for which the evaluation group may depend on the trajectory * frame, the flag is cleared. * - * reorder_boolean_static_children() should have been called. + * reorder_gmx_boolean_static_children() should have been called. */ static void init_item_staticeval(t_selelem *sel) @@ -1326,7 +1326,7 @@ init_item_staticeval(t_selelem *sel) } else /* bStaticEval is set */ { - /* For boolean expressions, any expression after the first dynamic + /* For gmx_boolean expressions, any expression after the first dynamic * expression should not have bStaticEval. */ if (sel->type == SEL_BOOLEAN) { @@ -1499,7 +1499,7 @@ initialize_evalgrps(gmx_ana_selcollection_t *sc) * are evaluated for each atom. */ static void -mark_subexpr_dynamic(t_selelem *sel, bool bDynamic) +mark_subexpr_dynamic(t_selelem *sel, gmx_bool bDynamic) { t_selelem *child; @@ -1699,7 +1699,7 @@ static int init_method(t_selelem *sel, t_topology *top, int isize) { t_selelem *child; - bool bAtomVal; + gmx_bool bAtomVal; int rc; /* Find out whether there are any atom-valued parameters */ @@ -1776,7 +1776,7 @@ init_method(t_selelem *sel, t_topology *top, int isize) } /*! \brief - * Evaluates the static part of a boolean expression. + * Evaluates the static part of a gmx_boolean expression. * * \param[in] data Evaluation data. * \param[in,out] sel Boolean selection element whose children should be @@ -1787,7 +1787,7 @@ init_method(t_selelem *sel, t_topology *top, int isize) * reorder_item_static_children() should have been called. */ static int -evaluate_boolean_static_part(gmx_sel_evaluate_t *data, t_selelem *sel, +evaluate_gmx_boolean_static_part(gmx_sel_evaluate_t *data, t_selelem *sel, gmx_ana_index_t *g) { t_selelem *child, *next; @@ -1876,7 +1876,7 @@ evaluate_boolean_static_part(gmx_sel_evaluate_t *data, t_selelem *sel, } /*! \brief - * Evaluates the minimum and maximum groups for a boolean expression. + * Evaluates the minimum and maximum groups for a gmx_boolean expression. * * \param[in] sel \ref SEL_BOOLEAN element currently being evaluated. * \param[in] g Group for which \p sel has been evaluated. @@ -1896,7 +1896,7 @@ evaluate_boolean_static_part(gmx_sel_evaluate_t *data, t_selelem *sel, * problem. */ static void -evaluate_boolean_minmax_grps(t_selelem *sel, gmx_ana_index_t *g, +evaluate_gmx_boolean_minmax_grps(t_selelem *sel, gmx_ana_index_t *g, gmx_ana_index_t *gmin, gmx_ana_index_t *gmax) { t_selelem *child; @@ -1992,7 +1992,7 @@ static int analyze_static(gmx_sel_evaluate_t *data, t_selelem *sel, gmx_ana_index_t *g) { t_selelem *child, *next; - bool bDoMinMax; + gmx_bool bDoMinMax; int rc; if (sel->type != SEL_ROOT && g) @@ -2063,15 +2063,15 @@ analyze_static(gmx_sel_evaluate_t *data, t_selelem *sel, gmx_ana_index_t *g) else { /* Evalute the static part if there is more than one expression */ - rc = evaluate_boolean_static_part(data, sel, g); + rc = evaluate_gmx_boolean_static_part(data, sel, g); if (rc != 0) { return rc; } /* Evaluate the selection. - * If the type is boolean, we must explicitly handle the - * static part evaluated in evaluate_boolean_static_part() + * If the type is gmx_boolean, we must explicitly handle the + * static part evaluated in evaluate_gmx_boolean_static_part() * here because g may be larger. */ if (sel->u.boolt == BOOL_AND && sel->child->type == SEL_CONST) { @@ -2087,7 +2087,7 @@ analyze_static(gmx_sel_evaluate_t *data, t_selelem *sel, gmx_ana_index_t *g) } /* Evaluate minimal and maximal selections */ - evaluate_boolean_minmax_grps(sel, g, sel->cdata->gmin, + evaluate_gmx_boolean_minmax_grps(sel, g, sel->cdata->gmin, sel->cdata->gmax); } break; @@ -2223,7 +2223,7 @@ analyze_static(gmx_sel_evaluate_t *data, t_selelem *sel, gmx_ana_index_t *g) } /* Replace the result of the evaluation */ - /* This is not necessary for subexpressions or for boolean negations + /* This is not necessary for subexpressions or for gmx_boolean negations * because the evaluation function already has done it properly. */ if (sel->v.type == GROUP_VALUE && (sel->flags & SEL_DYNAMIC) && sel->type != SEL_SUBEXPR @@ -2547,7 +2547,7 @@ free_item_compilerdata(t_selelem *sel) */ static void calculate_mass_charge(t_topology *top, int ngrps, gmx_ana_selection_t *sel[], - bool bMaskOnly) + gmx_bool bMaskOnly) { int g, b, i; @@ -2602,7 +2602,7 @@ calculate_mass_charge(t_topology *top, int ngrps, gmx_ana_selection_t *sel[], * will print out intermediate selection trees. */ void -gmx_ana_selcollection_set_compile_debug(gmx_ana_selcollection_t *sc, bool bDebug) +gmx_ana_selcollection_set_compile_debug(gmx_ana_selcollection_t *sc, gmx_bool bDebug) { sc->bDebugCompile = bDebug; } @@ -2654,9 +2654,9 @@ gmx_ana_selcollection_compile(gmx_ana_selcollection_t *sc) item = sc->root; while (item) { - /* Process boolean and arithmetic expressions. */ - optimize_boolean_expressions(item); - reorder_boolean_static_children(item); + /* Process gmx_boolean and arithmetic expressions. */ + optimize_gmx_boolean_expressions(item); + reorder_gmx_boolean_static_children(item); if (!optimize_arithmetic_expressions(item)) { /* FIXME: Clean up the collection */ @@ -2735,7 +2735,7 @@ gmx_ana_selcollection_compile(gmx_ana_selcollection_t *sc) { if (item->child->cdata->flags & SEL_CDATA_COMMONSUBEXPR) { - bool bMinMax = item->child->cdata->flags & SEL_CDATA_MINMAXALLOC; + gmx_bool bMinMax = item->child->cdata->flags & SEL_CDATA_MINMAXALLOC; mark_subexpr_dynamic(item->child, FALSE); item->child->u.cgrp.isize = 0; diff --git a/src/gmxlib/selection/params.c b/src/gmxlib/selection/params.c index e46863a1b5..21ae7e8191 100644 --- a/src/gmxlib/selection/params.c +++ b/src/gmxlib/selection/params.c @@ -83,7 +83,7 @@ gmx_ana_selparam_find(const char *name, int nparam, gmx_ana_selparam_t *param) { return ¶m[i]; } - /* Check for 'no' prefix on boolean parameters */ + /* Check for 'no' prefix on gmx_boolean parameters */ if (param[i].val.type == NO_VALUE && strlen(name) > 2 && name[0] == 'n' && name[1] == 'o' && !strcmp(param[i].name, name+2)) @@ -281,7 +281,7 @@ cmp_real_range(const void *a, const void *b) * \param param Parameter to parse. * \returns TRUE if the values were parsed successfully, FALSE otherwise. */ -static bool +static gmx_bool parse_values_range(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param) { t_selexpr_value *value; @@ -463,7 +463,7 @@ parse_values_range(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param) * For integer ranges, the sequence of numbers from the first to second value * is stored, each as a separate value. */ -static bool +static gmx_bool parse_values_varnum(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param, t_selelem *root) { @@ -667,7 +667,7 @@ on_error: * \param root Selection element to which child expressions are added. * \returns TRUE if the values were parsed successfully, FALSE otherwise. */ -static bool +static gmx_bool parse_values_varnum_expr(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param, t_selelem *root) { @@ -732,7 +732,7 @@ parse_values_varnum_expr(int nval, t_selexpr_value *values, * as the value \p i of \p param. * This function is used internally by parse_values_std(). */ -static bool +static gmx_bool set_expr_value_store(t_selelem *sel, gmx_ana_selparam_t *param, int i) { if (sel->v.type != GROUP_VALUE && !(sel->flags & SEL_SINGLEVAL)) @@ -769,14 +769,14 @@ set_expr_value_store(t_selelem *sel, gmx_ana_selparam_t *param, int i) * For integer ranges, the sequence of numbers from the first to second value * is stored, each as a separate value. */ -static bool +static gmx_bool parse_values_std(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param, t_selelem *root) { t_selexpr_value *value; t_selelem *child; int i, j; - bool bDynamic; + gmx_bool bDynamic; /* Handle atom-valued parameters */ if (param->flags & SPAR_ATOMVAL) @@ -940,7 +940,7 @@ parse_values_std(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param, } /*! \brief - * Parses the values for a boolean parameter. + * Parses the values for a gmx_boolean parameter. * * \param[in] name Name by which the parameter was given. * \param[in] nval Number of values in \p values. @@ -948,10 +948,10 @@ parse_values_std(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param, * \param param Parameter to parse. * \returns TRUE if the values were parsed successfully, FALSE otherwise. */ -static bool -parse_values_bool(const char *name, int nval, t_selexpr_value *values, gmx_ana_selparam_t *param) +static gmx_bool +parse_values_gmx_bool(const char *name, int nval, t_selexpr_value *values, gmx_ana_selparam_t *param) { - bool bSetNo; + gmx_bool bSetNo; int len; if (param->val.type != NO_VALUE) @@ -961,7 +961,7 @@ parse_values_bool(const char *name, int nval, t_selexpr_value *values, gmx_ana_s } if (nval > 1 || (values && values->type != INT_VALUE)) { - _gmx_selparser_error("boolean parameter '%s' takes only a yes/no/on/off/0/1 value", param->name); + _gmx_selparser_error("gmx_boolean parameter '%s' takes only a yes/no/on/off/0/1 value", param->name); return FALSE; } @@ -975,7 +975,7 @@ parse_values_bool(const char *name, int nval, t_selexpr_value *values, gmx_ana_s } if (bSetNo && nval > 0) { - _gmx_selparser_error("boolean parameter 'no%s' should not have a value", param->name); + _gmx_selparser_error("gmx_boolean parameter 'no%s' should not have a value", param->name); return FALSE; } if (values && values->u.i.i1 == 0) @@ -995,7 +995,7 @@ parse_values_bool(const char *name, int nval, t_selexpr_value *values, gmx_ana_s * \param param Parameter to parse. * \returns TRUE if the values were parsed successfully, FALSE otherwise. */ -static bool +static gmx_bool parse_values_enum(int nval, t_selexpr_value *values, gmx_ana_selparam_t *param) { int i, len, match; @@ -1099,13 +1099,13 @@ convert_const_values(t_selexpr_value *values) * The list \p pparams and any associated values are freed after the parameters * have been processed, no matter is there was an error or not. */ -bool +gmx_bool _gmx_sel_parse_params(t_selexpr_param *pparams, int nparam, gmx_ana_selparam_t *params, t_selelem *root, void *scanner) { t_selexpr_param *pparam; gmx_ana_selparam_t *oparam; - bool bOk, rc; + gmx_bool bOk, rc; int i; /* Check that the value pointers of SPAR_VARNUM parameters are NULL and @@ -1198,7 +1198,7 @@ _gmx_sel_parse_params(t_selexpr_param *pparams, int nparam, gmx_ana_selparam_t * } if (oparam->val.type == NO_VALUE) { - rc = parse_values_bool(pparam->name, pparam->nval, pparam->value, oparam); + rc = parse_values_gmx_bool(pparam->name, pparam->nval, pparam->value, oparam); } else if (oparam->flags & SPAR_RANGES) { diff --git a/src/gmxlib/selection/parsetree.c b/src/gmxlib/selection/parsetree.c index 7cf7f07122..921cad3ccc 100644 --- a/src/gmxlib/selection/parsetree.c +++ b/src/gmxlib/selection/parsetree.c @@ -184,9 +184,9 @@ * from a variable, otherwise the child type is not \ref SEL_SUBEXPR. * * - * \subsection selparser_tree_bool Boolean elements + * \subsection selparser_tree_gmx_bool Boolean elements * - * One \ref SEL_BOOLEAN element is created for each boolean keyword in the + * One \ref SEL_BOOLEAN element is created for each gmx_boolean keyword in the * input, and the tree structure represents the evaluation order. * The \c t_selelem::boolt type gives the type of the operation. * Each element has exactly two children (one for \ref BOOL_NOT elements), @@ -369,8 +369,8 @@ _gmx_selelem_update_flags(t_selelem *sel) { t_selelem *child; int rc; - bool bUseChildType=FALSE; - bool bOnlySingleChildren; + gmx_bool bUseChildType=FALSE; + gmx_bool bOnlySingleChildren; /* Return if the flags have already been set */ if (sel->flags & SEL_FLAGSSET) @@ -1020,7 +1020,7 @@ _gmx_sel_init_variable_ref(t_selelem *sel) * selection. */ static void -init_pos_keyword_defaults(t_selelem *root, gmx_ana_selcollection_t *sc, bool bSelection) +init_pos_keyword_defaults(t_selelem *root, gmx_ana_selcollection_t *sc, gmx_bool bSelection) { t_selelem *child; int flags; @@ -1336,7 +1336,7 @@ _gmx_sel_append_selection(t_selelem *sel, t_selelem *last, yyscan_t scanner) * This is used to terminate interactive parsers when the correct number of * selections has been provided. */ -bool +gmx_bool _gmx_sel_parser_should_finish(yyscan_t scanner) { gmx_ana_selcollection_t *sc = _gmx_sel_lexer_selcollection(scanner); @@ -1406,7 +1406,7 @@ static int run_parser(int maxnr, yyscan_t scanner) { gmx_ana_selcollection_t *sc = _gmx_sel_lexer_selcollection(scanner); - bool bOk; + gmx_bool bOk; int nr; nr = sc->nr; @@ -1434,7 +1434,7 @@ run_parser(int maxnr, yyscan_t scanner) */ int gmx_ana_selcollection_parse_stdin(gmx_ana_selcollection_t *sc, int nr, - gmx_ana_indexgrps_t *grps, bool bInteractive) + gmx_ana_indexgrps_t *grps, gmx_bool bInteractive) { yyscan_t scanner; int rc; diff --git a/src/gmxlib/selection/parsetree.h b/src/gmxlib/selection/parsetree.h index 060fbc3481..8d97d1515d 100644 --- a/src/gmxlib/selection/parsetree.h +++ b/src/gmxlib/selection/parsetree.h @@ -62,7 +62,7 @@ typedef struct t_selexpr_value /** Type of the value. */ e_selvalue_t type; /** TRUE if the value is the result of an expression. */ - bool bExpr; + gmx_bool bExpr; union { /** The integer value/range (\p type INT_VALUE); */ struct { @@ -187,7 +187,7 @@ struct t_selelem * _gmx_sel_append_selection(struct t_selelem *sel, struct t_selelem *last, void *scanner); /** Check whether the parser should finish. */ -bool +gmx_bool _gmx_sel_parser_should_finish(void *scanner); /** Handle empty commands. */ @@ -199,7 +199,7 @@ _gmx_sel_handle_help_cmd(char *topic, void *scanner); /* In params.c */ /** Initializes an array of parameters based on input from the selection parser. */ -bool +gmx_bool _gmx_sel_parse_params(t_selexpr_param *pparams, int nparam, struct gmx_ana_selparam_t *param, struct t_selelem *root, void *scanner); diff --git a/src/gmxlib/selection/scanner.h b/src/gmxlib/selection/scanner.h index 07b79ecba9..44860387bb 100644 --- a/src/gmxlib/selection/scanner.h +++ b/src/gmxlib/selection/scanner.h @@ -51,14 +51,14 @@ typedef void *yyscan_t; /** Initializes the selection scanner. */ int _gmx_sel_init_lexer(yyscan_t *scannerp, struct gmx_ana_selcollection_t *sc, - bool bInteractive, int maxnr, + gmx_bool bInteractive, int maxnr, struct gmx_ana_indexgrps_t *grps); /** Frees memory allocated for the selection scanner. */ void _gmx_sel_free_lexer(yyscan_t scanner); /** Returns TRUE if the scanner is interactive. */ -bool +gmx_bool _gmx_sel_is_lexer_interactive(yyscan_t scanner); /** Returns the selection collection for the scanner. */ struct gmx_ana_selcollection_t * diff --git a/src/gmxlib/selection/scanner_internal.c b/src/gmxlib/selection/scanner_internal.c index ed6ac74b7e..1e7e4f74a5 100644 --- a/src/gmxlib/selection/scanner_internal.c +++ b/src/gmxlib/selection/scanner_internal.c @@ -72,7 +72,7 @@ #undef yytext #undef yyleng -static bool +static gmx_bool read_stdin_line(gmx_sel_lexer_t *state) { char *ptr = state->inputstr; @@ -137,7 +137,7 @@ int _gmx_sel_yyblex(YYSTYPE *yylval, yyscan_t yyscanner) { gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(yyscanner); - bool bCmdStart; + gmx_bool bCmdStart; int token; if (!state->bBuffer && !state->inputstr) @@ -164,7 +164,7 @@ _gmx_sel_yyblex(YYSTYPE *yylval, yyscan_t yyscanner) } static int -init_param_token(YYSTYPE *yylval, gmx_ana_selparam_t *param, bool bBoolNo) +init_param_token(YYSTYPE *yylval, gmx_ana_selparam_t *param, gmx_bool bBoolNo) { if (bBoolNo) { @@ -181,7 +181,7 @@ init_param_token(YYSTYPE *yylval, gmx_ana_selparam_t *param, bool bBoolNo) } static int -init_method_token(YYSTYPE *yylval, gmx_ana_selmethod_t *method, bool bPosMod, +init_method_token(YYSTYPE *yylval, gmx_ana_selmethod_t *method, gmx_bool bPosMod, gmx_sel_lexer_t *state) { /* If the previous token was not KEYWORD_POS, return EMPTY_POSMOD @@ -252,7 +252,7 @@ _gmx_sel_lexer_process_pending(YYSTYPE *yylval, gmx_sel_lexer_t *state) if (state->nextparam) { gmx_ana_selparam_t *param = state->nextparam; - bool bBoolNo = state->bBoolNo; + gmx_bool bBoolNo = state->bBoolNo; if (state->neom > 0) { @@ -289,7 +289,7 @@ _gmx_sel_lexer_process_identifier(YYSTYPE *yylval, char *yytext, size_t yyleng, if (state->msp >= 0) { gmx_ana_selparam_t *param = NULL; - bool bBoolNo = FALSE; + gmx_bool bBoolNo = FALSE; int sp = state->msp; while (!param && sp >= 0) { @@ -307,7 +307,7 @@ _gmx_sel_lexer_process_identifier(YYSTYPE *yylval, char *yytext, size_t yyleng, param = &state->mstack[sp]->param[i]; break; } - /* Check separately for a 'no' prefix on boolean parameters */ + /* Check separately for a 'no' prefix on gmx_boolean parameters */ if (state->mstack[sp]->param[i].val.type == NO_VALUE && yyleng > 2 && yytext[0] == 'n' && yytext[1] == 'o' && !strncmp(state->mstack[sp]->param[i].name, yytext+2, yyleng-2)) @@ -441,7 +441,7 @@ _gmx_sel_lexer_add_token(const char *str, int len, gmx_sel_lexer_t *state) int _gmx_sel_init_lexer(yyscan_t *scannerp, struct gmx_ana_selcollection_t *sc, - bool bInteractive, int maxnr, + gmx_bool bInteractive, int maxnr, struct gmx_ana_indexgrps_t *grps) { gmx_sel_lexer_t *state; @@ -500,7 +500,7 @@ _gmx_sel_free_lexer(yyscan_t scanner) _gmx_sel_yylex_destroy(scanner); } -bool +gmx_bool _gmx_sel_is_lexer_interactive(yyscan_t scanner) { gmx_sel_lexer_t *state = _gmx_sel_yyget_extra(scanner); diff --git a/src/gmxlib/selection/scanner_internal.h b/src/gmxlib/selection/scanner_internal.h index 5b74ec9f2a..802c8f7213 100644 --- a/src/gmxlib/selection/scanner_internal.h +++ b/src/gmxlib/selection/scanner_internal.h @@ -64,7 +64,7 @@ typedef struct gmx_sel_lexer_t struct gmx_ana_indexgrps_t *grps; int nexpsel; - bool bInteractive; + gmx_bool bInteractive; char *inputstr; int nalloc_input; @@ -78,15 +78,15 @@ typedef struct gmx_sel_lexer_t int neom; struct gmx_ana_selparam_t *nextparam; - bool bBoolNo; + gmx_bool bBoolNo; struct gmx_ana_selmethod_t *nextmethod; int prev_pos_kw; - bool bMatchOf; - bool bMatchBool; - bool bCmdStart; + gmx_bool bMatchOf; + gmx_bool bMatchBool; + gmx_bool bCmdStart; - bool bBuffer; + gmx_bool bBuffer; YY_BUFFER_STATE buffer; } gmx_sel_lexer_t; diff --git a/src/gmxlib/selection/selcollection.h b/src/gmxlib/selection/selcollection.h index 00edefef9e..909c878147 100644 --- a/src/gmxlib/selection/selcollection.h +++ b/src/gmxlib/selection/selcollection.h @@ -81,13 +81,13 @@ struct gmx_ana_selcollection_t /** Default output position type for selections. */ const char *spost; /** TRUE if \ref POS_MASKONLY should be used for output position evaluation. */ - bool bMaskOnly; + gmx_bool bMaskOnly; /** TRUE if velocities should be evaluated for output positions. */ - bool bVelocities; + gmx_bool bVelocities; /** TRUE if forces should be evaluated for output positions. */ - bool bForces; + gmx_bool bForces; /** TRUE if debugging output should be printed during compilation. */ - bool bDebugCompile; + gmx_bool bDebugCompile; /** Root of the selection element tree. */ struct t_selelem *root; diff --git a/src/gmxlib/selection/selection.c b/src/gmxlib/selection/selection.c index 100afdfd90..17a9cf7618 100644 --- a/src/gmxlib/selection/selection.c +++ b/src/gmxlib/selection/selection.c @@ -162,7 +162,7 @@ gmx_ana_selcollection_set_refpostype(gmx_ana_selcollection_t *sc, */ void gmx_ana_selcollection_set_outpostype(gmx_ana_selcollection_t *sc, - const char *type, bool bMaskOnly) + const char *type, gmx_bool bMaskOnly) { if (type) { @@ -178,7 +178,7 @@ gmx_ana_selcollection_set_outpostype(gmx_ana_selcollection_t *sc, */ void gmx_ana_selcollection_set_veloutput(gmx_ana_selcollection_t *sc, - bool bVelOut) + gmx_bool bVelOut) { sc->bVelocities = bVelOut; } @@ -190,7 +190,7 @@ gmx_ana_selcollection_set_veloutput(gmx_ana_selcollection_t *sc, */ void gmx_ana_selcollection_set_forceoutput(gmx_ana_selcollection_t *sc, - bool bForceOut) + gmx_bool bForceOut) { sc->bForces = bForceOut; } @@ -277,7 +277,7 @@ gmx_ana_selcollection_get_selection(gmx_ana_selcollection_t *sc, int i) * After gmx_ana_selcollection_parse_*(), the return value also takes into account the * selection keywords used. */ -bool +gmx_bool gmx_ana_selcollection_requires_top(gmx_ana_selcollection_t *sc) { t_selelem *sel; @@ -323,7 +323,7 @@ gmx_ana_selcollection_requires_top(gmx_ana_selcollection_t *sc) * are printed as well. */ void -gmx_ana_selcollection_print_tree(FILE *fp, gmx_ana_selcollection_t *sc, bool bValues) +gmx_ana_selcollection_print_tree(FILE *fp, gmx_ana_selcollection_t *sc, gmx_bool bValues) { t_selelem *sel; @@ -390,7 +390,7 @@ gmx_ana_selection_print_info(gmx_ana_selection_t *sel) * \returns TRUE if the covered fraction can be calculated for the selection, * FALSE otherwise. */ -bool +gmx_bool gmx_ana_selection_init_coverfrac(gmx_ana_selection_t *sel, e_coverfrac_t type) { sel->cfractype = type; diff --git a/src/gmxlib/selection/selelem.c b/src/gmxlib/selection/selelem.c index 8f8e30d88a..09971c0538 100644 --- a/src/gmxlib/selection/selelem.c +++ b/src/gmxlib/selection/selelem.c @@ -96,7 +96,7 @@ _gmx_sel_value_type_str(gmx_ana_selvalue_t *val) /*! \copydoc _gmx_selelem_type_str() */ const char * -_gmx_selelem_boolean_type_str(t_selelem *sel) +_gmx_selelem_gmx_boolean_type_str(t_selelem *sel) { switch (sel->u.boolt) { @@ -113,7 +113,7 @@ _gmx_selelem_boolean_type_str(t_selelem *sel) * \returns Pointer to the newly allocated and initialized element. * * \c t_selelem::type is set to \p type, - * \c t_selelem::v::type is set to \ref GROUP_VALUE for boolean and comparison + * \c t_selelem::v::type is set to \ref GROUP_VALUE for gmx_boolean and comparison * expressions and \ref NO_VALUE for others, * \ref SEL_ALLOCVAL is set for non-root elements (\ref SEL_ALLOCDATA is also * set for \ref SEL_BOOLEAN elements), @@ -474,7 +474,7 @@ _gmx_selelem_free_chain(t_selelem *first) * \param[in] level Indentation level, starting from zero. */ void -_gmx_selelem_print_tree(FILE *fp, t_selelem *sel, bool bValues, int level) +_gmx_selelem_print_tree(FILE *fp, t_selelem *sel, gmx_bool bValues, int level) { t_selelem *child; int i; @@ -534,7 +534,7 @@ _gmx_selelem_print_tree(FILE *fp, t_selelem *sel, bool bValues, int level) } else if (sel->type == SEL_BOOLEAN) { - fprintf(fp, " %s", _gmx_selelem_boolean_type_str(sel)); + fprintf(fp, " %s", _gmx_selelem_gmx_boolean_type_str(sel)); } else if (sel->type == SEL_EXPRESSION && sel->u.expr.method->name == sm_compare.name) @@ -656,7 +656,7 @@ _gmx_selelem_print_tree(FILE *fp, t_selelem *sel, bool bValues, int level) * \returns TRUE if \p root or any any of its elements require topology * information, FALSE otherwise. */ -bool +gmx_bool _gmx_selelem_requires_top(t_selelem *root) { t_selelem *child; diff --git a/src/gmxlib/selection/selelem.h b/src/gmxlib/selection/selelem.h index 71c7ba9b36..571d8a127f 100644 --- a/src/gmxlib/selection/selelem.h +++ b/src/gmxlib/selection/selelem.h @@ -80,7 +80,7 @@ typedef enum SEL_MODIFIER } e_selelem_t; -/** Defines the boolean operation of \c t_selelem objects with type \ref SEL_BOOLEAN. */ +/** Defines the gmx_boolean operation of \c t_selelem objects with type \ref SEL_BOOLEAN. */ typedef enum { BOOL_NOT, /**< Not */ @@ -103,9 +103,9 @@ typedef enum /** Returns a string representation of the type of a \c t_selelem. */ extern const char * _gmx_selelem_type_str(struct t_selelem *sel); -/** Returns a string representation of the boolean type of a \ref SEL_BOOLEAN \c t_selelem. */ +/** Returns a string representation of the gmx_boolean type of a \ref SEL_BOOLEAN \c t_selelem. */ extern const char * -_gmx_selelem_boolean_type_str(struct t_selelem *sel); +_gmx_selelem_gmx_boolean_type_str(struct t_selelem *sel); /** Returns a string representation of the type of a \c gmx_ana_selvalue_t. */ extern const char * _gmx_sel_value_type_str(gmx_ana_selvalue_t *val); @@ -348,19 +348,19 @@ _gmx_selelem_free_compiler_data(t_selelem *sel); /** Prints a human-readable version of a selection element subtree. */ extern void -_gmx_selelem_print_tree(FILE *fp, t_selelem *root, bool bValues, int level); +_gmx_selelem_print_tree(FILE *fp, t_selelem *root, gmx_bool bValues, int level); /* In compile.c */ /** Prints a human-readable version of the internal compiler data structure. */ extern void _gmx_selelem_print_compiler_info(FILE *fp, t_selelem *sel, int level); /** Returns TRUE if the selection element subtree requires topology information for evaluation. */ -extern bool +extern gmx_bool _gmx_selelem_requires_top(t_selelem *root); /* In sm_insolidangle.c */ /** Returns TRUE if the covered fraction of the selection can be calculated. */ -extern bool +extern gmx_bool _gmx_selelem_can_estimate_cover(t_selelem *sel); /** Returns the covered fraction of the selection for the current frame. */ extern real diff --git a/src/gmxlib/selection/selhelp.c b/src/gmxlib/selection/selhelp.c index 343ac96012..7fa44b88c6 100644 --- a/src/gmxlib/selection/selhelp.c +++ b/src/gmxlib/selection/selhelp.c @@ -113,7 +113,7 @@ static const char *help_eval[] = { "remaining expressions are not evaluated at all.", "This can be used to optimize the selections: you should write the", "most restrictive and/or the most inexpensive expressions first in", - "boolean expressions.", + "gmx_boolean expressions.", "The relative ordering between dynamic and static expressions does not", "matter: all static expressions are evaluated only once, before the first", "frame, and the result becomes the leftmost expression.[PAR]", @@ -265,7 +265,7 @@ static const char *help_syntax[] = { "1. An expression like [TT]NUM_EXPR1 < NUM_EXPR2[tt] evaluates to an", "[TT]ATOM_EXPR[tt] that selects all the atoms for which the comparison", "is true.[BR]", - "2. Atom expressions can be combined with boolean operations such as", + "2. Atom expressions can be combined with gmx_boolean operations such as", "[TT]not ATOM_EXPR[tt], [TT]ATOM_EXPR and ATOM_EXPR[tt], or", "[TT]ATOM_EXPR or ATOM_EXPR[tt]. Parentheses can be used to alter the", "evaluation order.[BR]", @@ -316,7 +316,7 @@ static const t_selection_help_item helpitems[] = { */ static void print_keyword_list(struct gmx_ana_selcollection_t *sc, e_selvalue_t type, - bool bMod) + gmx_bool bMod) { gmx_sel_symrec_t *symbol; @@ -324,7 +324,7 @@ print_keyword_list(struct gmx_ana_selcollection_t *sc, e_selvalue_t type, while (symbol) { gmx_ana_selmethod_t *method = _gmx_sel_sym_value_method(symbol); - bool bShow; + gmx_bool bShow; bShow = (method->type == type) && ((bMod && (method->flags & SMETH_MODIFIER)) || (!bMod && !(method->flags & SMETH_MODIFIER))); diff --git a/src/gmxlib/selection/selmethod.c b/src/gmxlib/selection/selmethod.c index fbbe90a42d..982eaed6ef 100644 --- a/src/gmxlib/selection/selmethod.c +++ b/src/gmxlib/selection/selmethod.c @@ -201,7 +201,7 @@ report_param_error(FILE *fp, const char *mname, const char *pname, * \param[in] name Name of the method (used for error messages). * \param[in] nparams Number of parameters in \p param. * \param[in,out] param Parameter array - * (only the \c flags field of boolean parameters may be modified). + * (only the \c flags field of gmx_boolean parameters may be modified). * \param[in] symtab Symbol table (used for checking overlaps). * \returns TRUE if there are no problems with the parameters, * FALSE otherwise. @@ -214,11 +214,11 @@ report_param_error(FILE *fp, const char *mname, const char *pname, * If you remove a check, make sure that the parameter parser can handle the * resulting parameters. */ -static bool +static gmx_bool check_params(FILE *fp, const char *name, int nparams, gmx_ana_selparam_t param[], gmx_sel_symtab_t *symtab) { - bool bOk = TRUE; + gmx_bool bOk = TRUE; gmx_sel_symrec_t *sym; int i, j; @@ -308,21 +308,21 @@ check_params(FILE *fp, const char *name, int nparams, gmx_ana_selparam_t param[] bOk = FALSE; } } - /* Check boolean parameters */ + /* Check gmx_boolean parameters */ if (param[i].val.type == NO_VALUE) { if (param[i].val.nr != 0) { - report_param_error(fp, name, param[i].name, "error: number of values should be zero for boolean parameters"); + report_param_error(fp, name, param[i].name, "error: number of values should be zero for gmx_boolean parameters"); bOk = FALSE; } - /* The boolean parameters should always be optional, so set the + /* The gmx_boolean parameters should always be optional, so set the * flag for convenience. */ param[i].flags |= SPAR_OPTIONAL; /* Any other flags should not be specified */ if (param[i].flags & ~SPAR_OPTIONAL) { - report_param_error(fp, name, param[i].name, "error: boolean parameter should not have any flags set"); + report_param_error(fp, name, param[i].name, "error: gmx_boolean parameter should not have any flags set"); bOk = FALSE; } } @@ -413,11 +413,11 @@ check_params(FILE *fp, const char *name, int nparams, gmx_ana_selparam_t param[] * This function checks that all the required callbacks are defined, i.e., * not NULL, to find programming errors. */ -static bool +static gmx_bool check_callbacks(FILE *fp, gmx_ana_selmethod_t *method) { - bool bOk = TRUE; - bool bNeedInit; + gmx_bool bOk = TRUE; + gmx_bool bNeedInit; int i; /* Make some checks on init_data and free */ @@ -484,10 +484,10 @@ check_callbacks(FILE *fp, gmx_ana_selmethod_t *method) * If you remove a check, please make sure that the selection parser, * compiler, and evaluation functions can deal with the method. */ -static bool +static gmx_bool check_method(FILE *fp, gmx_ana_selmethod_t *method, gmx_sel_symtab_t *symtab) { - bool bOk = TRUE; + gmx_bool bOk = TRUE; /* Check the type */ if (method->type == NO_VALUE) @@ -554,10 +554,10 @@ check_method(FILE *fp, gmx_ana_selmethod_t *method, gmx_sel_symtab_t *symtab) * If you remove a check, please make sure that the selection parser, * compiler, and evaluation functions can deal with the method. */ -static bool +static gmx_bool check_modifier(FILE *fp, gmx_ana_selmethod_t *method, gmx_sel_symtab_t *symtab) { - bool bOk = TRUE; + gmx_bool bOk = TRUE; /* Check the type */ if (method->type != NO_VALUE && method->type != POS_VALUE) @@ -617,7 +617,7 @@ int gmx_ana_selmethod_register(struct gmx_ana_selcollection_t *sc, const char *name, gmx_ana_selmethod_t *method) { - bool bOk; + gmx_bool bOk; /* Check the method */ if (method->flags & SMETH_MODIFIER) @@ -654,7 +654,7 @@ gmx_ana_selmethod_register_defaults(struct gmx_ana_selcollection_t *sc) { size_t i; int rc; - bool bOk; + gmx_bool bOk; bOk = TRUE; for (i = 0; i < asize(smtable_def); ++i) diff --git a/src/gmxlib/selection/sm_compare.c b/src/gmxlib/selection/sm_compare.c index eb98b6d371..103eb9ec01 100644 --- a/src/gmxlib/selection/sm_compare.c +++ b/src/gmxlib/selection/sm_compare.c @@ -345,7 +345,7 @@ convert_int_real(int n, t_compare_value *val) * The values are rounded such that the same comparison operator can be used. */ static int -convert_real_int(int n, t_compare_value *val, e_comparison_t cmpt, bool bRight) +convert_real_int(int n, t_compare_value *val, e_comparison_t cmpt, gmx_bool bRight) { int i; int *iv; @@ -509,7 +509,7 @@ evaluate_compare_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, t_methoddata_compare *d = (t_methoddata_compare *)data; int i, i1, i2, ig; int a, b; - bool bAccept; + gmx_bool bAccept; for (i = i1 = i2 = ig = 0; i < g->isize; ++i) { @@ -559,7 +559,7 @@ evaluate_compare_real(t_topology *top, t_trxframe *fr, t_pbc *pbc, t_methoddata_compare *d = (t_methoddata_compare *)data; int i, i1, i2, ig; real a, b; - bool bAccept; + gmx_bool bAccept; for (i = i1 = i2 = ig = 0; i < g->isize; ++i) { diff --git a/src/gmxlib/selection/sm_insolidangle.c b/src/gmxlib/selection/sm_insolidangle.c index bc5ab8e611..1f72fcf181 100644 --- a/src/gmxlib/selection/sm_insolidangle.c +++ b/src/gmxlib/selection/sm_insolidangle.c @@ -218,7 +218,7 @@ free_data_insolidangle(void *data); static int init_frame_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data); /** Internal helper function for evaluate_insolidangle(). */ -static bool +static gmx_bool accept_insolidangle(rvec x, t_pbc *pbc, void *data); /** Evaluates the \p insolidangle selection method. */ static int @@ -261,7 +261,7 @@ optimize_surface_points(t_methoddata_insolidangle *surf); static real estimate_covered_fraction(t_methoddata_insolidangle *surf); /** Checks whether a point lies within a solid angle. */ -static bool +static gmx_bool is_surface_covered(t_methoddata_insolidangle *surf, rvec x); /** Parameters for the \p insolidangle selection method. */ @@ -443,7 +443,7 @@ init_frame_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data) * \param[in] data Pointer to a \c t_methoddata_insolidangle data structure. * \returns TRUE if \p x is within the solid angle, FALSE otherwise. */ -static bool +static gmx_bool accept_insolidangle(rvec x, t_pbc *pbc, void *data) { t_methoddata_insolidangle *d = (t_methoddata_insolidangle *)data; @@ -492,12 +492,12 @@ evaluate_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc, * \returns TRUE if the covered fraction can be estimated for \p sel with * _gmx_selelem_estimate_coverfrac(), FALSE otherwise. */ -bool +gmx_bool _gmx_selelem_can_estimate_cover(t_selelem *sel) { t_selelem *child; - bool bFound; - bool bDynFound; + gmx_bool bFound; + gmx_bool bDynFound; if (sel->type == SEL_BOOLEAN && sel->u.boolt == BOOL_OR) { @@ -940,7 +940,7 @@ estimate_covered_fraction(t_methoddata_insolidangle *surf) * \param[in] x Unit vector to check. * \returns TRUE if \p x is within the solid angle, FALSE otherwise. */ -static bool +static gmx_bool is_surface_covered(t_methoddata_insolidangle *surf, rvec x) { int bin, i; diff --git a/src/gmxlib/selection/sm_keywords.c b/src/gmxlib/selection/sm_keywords.c index 8674f2c0f7..afcb2e36a6 100644 --- a/src/gmxlib/selection/sm_keywords.c +++ b/src/gmxlib/selection/sm_keywords.c @@ -142,7 +142,7 @@ typedef struct t_methoddata_kwstr */ struct t_methoddata_kwstr_match { /** TRUE if the expression is a regular expression, FALSE otherwise. */ - bool bRegExp; + gmx_bool bRegExp; /** The value to match against. */ union { #ifdef USE_REGEX @@ -471,7 +471,7 @@ init_kwstr(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data) char *s; int i; size_t j; - bool bRegExp; + gmx_bool bRegExp; d->v = param[0].val.u.s; d->n = param[1].val.nr; @@ -560,7 +560,7 @@ evaluate_keyword_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, { t_methoddata_kwstr *d = (t_methoddata_kwstr *)data; int i, j; - bool bFound; + gmx_bool bFound; out->u.g->isize = 0; for (i = 0; i < g->isize; ++i) diff --git a/src/gmxlib/selection/sm_position.c b/src/gmxlib/selection/sm_position.c index a58d1854cf..6a3ae6a3da 100644 --- a/src/gmxlib/selection/sm_position.c +++ b/src/gmxlib/selection/sm_position.c @@ -59,7 +59,7 @@ typedef struct /** Position evaluation data structure. */ gmx_ana_poscalc_t *pc; /** TRUE if periodic boundary conditions should be used. */ - bool bPBC; + gmx_bool bPBC; /** Type of positions to calculate. */ char *type; /** Flags for the position calculation. */ diff --git a/src/gmxlib/selection/sm_same.c b/src/gmxlib/selection/sm_same.c index f7b881394d..d50221e493 100644 --- a/src/gmxlib/selection/sm_same.c +++ b/src/gmxlib/selection/sm_same.c @@ -86,7 +86,7 @@ typedef struct */ char **as_s_sorted; /** Whether simple matching can be used. */ - bool bSorted; + gmx_bool bSorted; } t_methoddata_same; /** Allocates data for the \p same selection method. */ diff --git a/src/gmxlib/selection/sm_simple.c b/src/gmxlib/selection/sm_simple.c index 0e9de7cf5e..1810b12454 100644 --- a/src/gmxlib/selection/sm_simple.c +++ b/src/gmxlib/selection/sm_simple.c @@ -493,7 +493,7 @@ evaluate_resindex(t_topology *top, t_trxframe *fr, t_pbc *pbc, static int check_molecules(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data) { - bool bOk; + gmx_bool bOk; bOk = (top != NULL && top->mols.nr > 0); if (!bOk) @@ -557,7 +557,7 @@ evaluate_atomname(t_topology *top, t_trxframe *fr, t_pbc *pbc, static int check_atomtype(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data) { - bool bOk; + gmx_bool bOk; bOk = (top != NULL && top->atoms.atomtype != NULL); if (!bOk) @@ -707,7 +707,7 @@ evaluate_charge(t_topology *top, t_trxframe *fr, t_pbc *pbc, static int check_pdbinfo(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data) { - bool bOk; + gmx_bool bOk; bOk = (top != NULL && top->atoms.pdbinfo != NULL); if (!bOk) diff --git a/src/gmxlib/selection/symrec.c b/src/gmxlib/selection/symrec.c index bd81e92cff..2e40096a24 100644 --- a/src/gmxlib/selection/symrec.c +++ b/src/gmxlib/selection/symrec.c @@ -267,7 +267,7 @@ _gmx_sel_symtab_free(gmx_sel_symtab_t *tab) * begins with \p name if a unique matching symbol is found. */ gmx_sel_symrec_t * -_gmx_sel_find_symbol(gmx_sel_symtab_t *tab, const char *name, bool bExact) +_gmx_sel_find_symbol(gmx_sel_symtab_t *tab, const char *name, gmx_bool bExact) { return _gmx_sel_find_symbol_len(tab, name, strlen(name), bExact); } @@ -288,12 +288,12 @@ _gmx_sel_find_symbol(gmx_sel_symtab_t *tab, const char *name, bool bExact) */ gmx_sel_symrec_t * _gmx_sel_find_symbol_len(gmx_sel_symtab_t *tab, const char *name, size_t len, - bool bExact) + gmx_bool bExact) { gmx_sel_symrec_t *sym; gmx_sel_symrec_t *match; - bool bUnique; - bool bMatch; + gmx_bool bUnique; + gmx_bool bMatch; match = NULL; bUnique = TRUE; diff --git a/src/gmxlib/selection/symrec.h b/src/gmxlib/selection/symrec.h index 465b9fd441..bbf21b1005 100644 --- a/src/gmxlib/selection/symrec.h +++ b/src/gmxlib/selection/symrec.h @@ -75,11 +75,11 @@ void _gmx_sel_symtab_free(gmx_sel_symtab_t *tab); /** Finds a symbol by name. */ gmx_sel_symrec_t * -_gmx_sel_find_symbol(gmx_sel_symtab_t *tab, const char *name, bool bExact); +_gmx_sel_find_symbol(gmx_sel_symtab_t *tab, const char *name, gmx_bool bExact); /** Finds a symbol by name. */ gmx_sel_symrec_t * _gmx_sel_find_symbol_len(gmx_sel_symtab_t *tab, const char *name, size_t len, - bool bExact); + gmx_bool bExact); /** Returns the first symbol of a given type. */ gmx_sel_symrec_t * _gmx_sel_first_symbol(gmx_sel_symtab_t *tab, e_symbol_t type); diff --git a/src/gmxlib/selection/test_selection.c b/src/gmxlib/selection/test_selection.c index f5c15b5357..bde0ad1531 100644 --- a/src/gmxlib/selection/test_selection.c +++ b/src/gmxlib/selection/test_selection.c @@ -45,7 +45,7 @@ typedef struct { - bool bFrameTree; + gmx_bool bFrameTree; int nmaxind; gmx_ana_selcollection_t *sc; } t_dumpdata; @@ -159,9 +159,9 @@ gmx_test_selection(int argc, char *argv[]) "This is a test program for selections.", }; - bool bMaskOnly = FALSE; - bool bFrameTree = FALSE; - bool bDebugCompile = FALSE; + gmx_bool bMaskOnly = FALSE; + gmx_bool bFrameTree = FALSE; + gmx_bool bDebugCompile = FALSE; int nref = 0; int nmaxind = 20; t_pargs pa[] = { diff --git a/src/gmxlib/sfactor.c b/src/gmxlib/sfactor.c index 5d955d56af..321cabc13e 100644 --- a/src/gmxlib/sfactor.c +++ b/src/gmxlib/sfactor.c @@ -307,7 +307,7 @@ extern gmx_structurefactors_t *gmx_structurefactors_init(const char *datfn) { extern void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, atom_id * index, - int isize, t_topology * top, bool flag,gmx_structurefactors_t *gsf) + int isize, t_topology * top, gmx_bool flag,gmx_structurefactors_t *gsf) /* given the group's index, return the (continuous) array of atoms */ { int i; diff --git a/src/gmxlib/shift_util.c b/src/gmxlib/shift_util.c index da0dd88053..201b432e87 100644 --- a/src/gmxlib/shift_util.c +++ b/src/gmxlib/shift_util.c @@ -256,9 +256,9 @@ real potential(real r1,real rc,real R) real shift_LRcorrection(FILE *fp,int start,int natoms, t_commrec *cr,t_forcerec *fr, real charge[],t_blocka *excl,rvec x[], - bool bOld,matrix box,matrix lr_vir) + gmx_bool bOld,matrix box,matrix lr_vir) { - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; static real Vself; int i,i1,i2,j,k,m,iv,jv; int *AA; @@ -366,7 +366,7 @@ real phi_aver(int natoms,real phi[]) return (phitot/natoms); } -real symmetrize_phi(FILE *log,int natoms,real phi[],bool bVerbose) +real symmetrize_phi(FILE *log,int natoms,real phi[],gmx_bool bVerbose) { real phitot; int i; diff --git a/src/gmxlib/sighandler.c b/src/gmxlib/sighandler.c index b3a628f35b..10e5e2d725 100644 --- a/src/gmxlib/sighandler.c +++ b/src/gmxlib/sighandler.c @@ -150,10 +150,10 @@ const char *gmx_get_signal_name(void) return gmx_signal_name[last_signal_name]; } -bool gmx_got_usr_signal(void) +gmx_bool gmx_got_usr_signal(void) { #ifdef HAVE_SIGUSR1 - bool ret=(bool)usr_condition; + gmx_bool ret=(gmx_bool)usr_condition; usr_condition=0; return ret; #else diff --git a/src/gmxlib/smalloc.c b/src/gmxlib/smalloc.c index de62d329c0..55b7b8e307 100644 --- a/src/gmxlib/smalloc.c +++ b/src/gmxlib/smalloc.c @@ -289,7 +289,7 @@ void *save_calloc_aligned(const char *name,const char *file,int line, { void **aligned=NULL; void *malloced=NULL; - bool allocate_fail; + gmx_bool allocate_fail; if (alignment == 0) { diff --git a/src/gmxlib/sortwater.c b/src/gmxlib/sortwater.c index a6c8df5b9d..a8e1922594 100644 --- a/src/gmxlib/sortwater.c +++ b/src/gmxlib/sortwater.c @@ -124,7 +124,7 @@ static int blockcomp(const void *a,const void *b) } static void lo_sortwater(int astart,int nwater,int nwatom,rvec x[],rvec v[], - bool bBlock) + gmx_bool bBlock) { int i,j,i0,rvi; int *rvindex; diff --git a/src/gmxlib/sparsematrix.c b/src/gmxlib/sparsematrix.c index bb17a5dd85..41c78a528d 100644 --- a/src/gmxlib/sparsematrix.c +++ b/src/gmxlib/sparsematrix.c @@ -129,7 +129,7 @@ gmx_sparsematrix_value(gmx_sparsematrix_t * A, int row, int col) { - bool found = FALSE; + gmx_bool found = FALSE; int i; real value; @@ -159,7 +159,7 @@ gmx_sparsematrix_increment_value(gmx_sparsematrix_t * A, int col, real difference) { - bool found = FALSE; + gmx_bool found = FALSE; int i; assert(rownrow); diff --git a/src/gmxlib/splitter.c b/src/gmxlib/splitter.c index 6871228555..791ec16c68 100644 --- a/src/gmxlib/splitter.c +++ b/src/gmxlib/splitter.c @@ -333,7 +333,7 @@ void set_bor(t_border *b,int atom,int ic,int is) b->is = is; } -static bool is_bor(atom_id ai[],int i) +static gmx_bool is_bor(atom_id ai[],int i) { return ((ai[i] != ai[i-1]) || ((ai[i] == NO_ATID) && (ai[i-1] == NO_ATID))); } @@ -421,7 +421,7 @@ static void split_blocks(FILE *fp,t_inputrec *ir, int nnodes, t_border *border; double tload,tcap; - bool bSHK; + gmx_bool bSHK; atom_id *shknum,*cgsnum; natoms = cgs->index[cgs->nr]; @@ -752,7 +752,7 @@ static int merge_sid(int i0,int at_start,int at_end,int nsid,t_sid sid[], void gen_sblocks(FILE *fp,int at_start,int at_end, t_idef *idef,t_blocka *sblock, - bool bSettle) + gmx_bool bSettle) { t_graph *g; int i,i0,j,k,istart,n; diff --git a/src/gmxlib/statistics/histogram.c b/src/gmxlib/statistics/histogram.c index 0f49d79c21..8618657ef0 100644 --- a/src/gmxlib/statistics/histogram.c +++ b/src/gmxlib/statistics/histogram.c @@ -257,7 +257,7 @@ gmx_histogram_create(gmx_histogram_t **hp, e_histogram_t type, int nbins) */ int gmx_histogram_create_range(gmx_histogram_t **hp, e_histogram_t type, - real start, real end, real binw, bool bIntegerBins) + real start, real end, real binw, gmx_bool bIntegerBins) { gmx_histogram_t *h; int nbins; @@ -413,7 +413,7 @@ gmx_histogram_set_range(gmx_histogram_t *h, real start, real end) * \c start+(n+0.5)*binwidth. */ void -gmx_histogram_set_integerbins(gmx_histogram_t *h, bool bIntegerBins) +gmx_histogram_set_integerbins(gmx_histogram_t *h, gmx_bool bIntegerBins) { /* Adjust the ranges if they have been initialized */ if (h->start < h->end) @@ -463,7 +463,7 @@ gmx_histogram_set_integerbins(gmx_histogram_t *h, bool bIntegerBins) * the exact maximum are still correctly included. */ void -gmx_histogram_set_all(gmx_histogram_t *h, bool bAll) +gmx_histogram_set_all(gmx_histogram_t *h, gmx_bool bAll) { if (bAll) { @@ -901,7 +901,7 @@ gmx_histogram_finish(gmx_histogram_t *h) */ void gmx_histogram_resample_dblbw(gmx_histogram_t **destp, gmx_histogram_t *src, - bool bIntegerBins) + gmx_bool bIntegerBins) { gmx_histogram_t *dest; int i, j; @@ -1066,7 +1066,7 @@ prepare_output(int n, gmx_histogram_t *h[], int *nbins) * \see gmx_histogram_write_array() */ void -gmx_histogram_write(FILE *fp, gmx_histogram_t *h, bool bErrors) +gmx_histogram_write(FILE *fp, gmx_histogram_t *h, gmx_bool bErrors) { gmx_histogram_write_array(fp, 1, &h, TRUE, bErrors); } @@ -1088,7 +1088,7 @@ gmx_histogram_write(FILE *fp, gmx_histogram_t *h, bool bErrors) */ void gmx_histogram_write_array(FILE *fp, int n, gmx_histogram_t *h[], - bool bValue, bool bErrors) + gmx_bool bValue, gmx_bool bErrors) { int i, j, nbins; @@ -1130,7 +1130,7 @@ gmx_histogram_write_array(FILE *fp, int n, gmx_histogram_t *h[], */ void gmx_histogram_write_cum_array(FILE *fp, int n, gmx_histogram_t *h[], - bool bValue, bool bErrors) + gmx_bool bValue, gmx_bool bErrors) { int i, j, nbins; double *sum; diff --git a/src/gmxlib/statutil.c b/src/gmxlib/statutil.c index 4ec67720f6..f2d1a74f42 100644 --- a/src/gmxlib/statutil.c +++ b/src/gmxlib/statutil.c @@ -196,7 +196,7 @@ void set_command_line(int argc, char *argv[]) /* utility functions */ -bool bRmod_fd(double a, double b, double c, bool bDouble) +gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble) { int iq; double tol; @@ -211,7 +211,7 @@ bool bRmod_fd(double a, double b, double c, bool bDouble) return FALSE; } -int check_times2(real t,real t0,real tp, real tpp, bool bDouble) +int check_times2(real t,real t0,real tp, real tpp, gmx_bool bDouble) { int r; real margin; @@ -250,7 +250,7 @@ int check_times(real t) -static void set_default_time_unit(const char *time_list[], bool bCanTime) +static void set_default_time_unit(const char *time_list[], gmx_bool bCanTime) { int i,j; const char *select; @@ -518,7 +518,7 @@ void parse_common_args(int *argc,char *argv[],unsigned long Flags, int nbugs,const char **bugs, output_env_t *oenv) { - bool bHelp=FALSE,bHidden=FALSE,bQuiet=FALSE,bVersion=FALSE; + gmx_bool bHelp=FALSE,bHidden=FALSE,bQuiet=FALSE,bVersion=FALSE; const char *manstr[] = { NULL, "no", "html", "tex", "nroff", "ascii", "completion", "py", "xml", "wiki", NULL }; /* This array should match the order of the enum in oenv.h */ @@ -529,7 +529,7 @@ void parse_common_args(int *argc,char *argv[],unsigned long Flags, int nicelevel=0,mantp=0,npri=0,debug_level=0,verbose_level=0; char *deffnm=NULL; real tbegin=0,tend=0,tdelta=0; - bool bView=FALSE; + gmx_bool bView=FALSE; t_pargs *all_pa=NULL; @@ -572,7 +572,7 @@ void parse_common_args(int *argc,char *argv[],unsigned long Flags, }; #define NPCA_PA asize(pca_pa) FILE *fp; - bool bPrint,bExit,bXvgr; + gmx_bool bPrint,bExit,bXvgr; int i,j,k,npall,max_pa,cmdlength; char *ptr,*newdesc; const char *envstr; @@ -738,7 +738,7 @@ void parse_common_args(int *argc,char *argv[],unsigned long Flags, if (nicelevel != 0 && !bExit) { #ifdef GMX_THREADS - static bool nice_set=FALSE; /* only set it once */ + static gmx_bool nice_set=FALSE; /* only set it once */ tMPI_Thread_mutex_lock(&init_mutex); if (!nice_set) { diff --git a/src/gmxlib/strdb.c b/src/gmxlib/strdb.c index 74afa6fe17..d50fba7f38 100644 --- a/src/gmxlib/strdb.c +++ b/src/gmxlib/strdb.c @@ -44,7 +44,7 @@ #include "gmx_fatal.h" #include "strdb.h" -bool get_a_line(FILE *fp,char line[],int n) +gmx_bool get_a_line(FILE *fp,char line[],int n) { char *line0; char *dum; @@ -77,7 +77,7 @@ bool get_a_line(FILE *fp,char line[],int n) return TRUE; } -bool get_header(char line[],char *header) +gmx_bool get_header(char line[],char *header) { char temp[STRLEN],*dum; diff --git a/src/gmxlib/string2.c b/src/gmxlib/string2.c index 7243cbb037..8f5f20b3d4 100644 --- a/src/gmxlib/string2.c +++ b/src/gmxlib/string2.c @@ -397,11 +397,11 @@ gmx_wcmatch(const char *pattern, const char *str) return (*str == 0) ? 0 : GMX_NO_WCMATCH; } -char *wrap_lines(const char *buf,int line_width, int indent,bool bIndentFirst) +char *wrap_lines(const char *buf,int line_width, int indent,gmx_bool bIndentFirst) { char *b2; int i,i0,i2,j,b2len,lspace=0,l2space=0; - bool bFirst,bFitsOnLine; + gmx_bool bFirst,bFitsOnLine; /* characters are copied from buf to b2 with possible spaces changed * into newlines and extra space added for indentation. diff --git a/src/gmxlib/symtab.c b/src/gmxlib/symtab.c index fb1a955286..76bc2a8222 100644 --- a/src/gmxlib/symtab.c +++ b/src/gmxlib/symtab.c @@ -124,7 +124,7 @@ static char **enter_buf(t_symtab *symtab,char *name) { int i; t_symbuf *symbuf; - bool bCont; + gmx_bool bCont; if (symtab->symbuf == NULL) symtab->symbuf=new_symbuf(); diff --git a/src/gmxlib/tcontrol.c b/src/gmxlib/tcontrol.c index d5df1c1199..3c609b90a7 100644 --- a/src/gmxlib/tcontrol.c +++ b/src/gmxlib/tcontrol.c @@ -50,7 +50,7 @@ /* Globals for trajectory input */ typedef struct { real t; - bool bSet; + gmx_bool bSet; } t_timecontrol; static t_timecontrol timecontrol[TNR] = { @@ -81,9 +81,9 @@ static const t_timeconvert timeconvert[] = { { 0, NULL, NULL } }; -bool bTimeSet(int tcontrol) +gmx_bool bTimeSet(int tcontrol) { - bool ret; + gmx_bool ret; #ifdef GMX_THREADS tMPI_Thread_mutex_lock(&tc_mutex); diff --git a/src/gmxlib/thread_mpi/collective.c b/src/gmxlib/thread_mpi/collective.c index 45c45c202a..1b2bfc016f 100644 --- a/src/gmxlib/thread_mpi/collective.c +++ b/src/gmxlib/thread_mpi/collective.c @@ -183,7 +183,7 @@ static void tMPI_Coll_envt_init(struct coll_env_thread *met, int N) tMPI_Atomic_set(&(met->n_remaining), 0); met->buf=(void**)tMPI_Malloc(sizeof(void*)*N); met->bufsize=(size_t*)tMPI_Malloc(sizeof(size_t)*N); - met->read_data=(bool*)tMPI_Malloc(sizeof(bool)*N); + met->read_data=(gmx_bool*)tMPI_Malloc(sizeof(gmx_bool)*N); #ifdef USE_COLLECTIVE_COPY_BUFFER met->cpbuf=(tMPI_Atomic_ptr_t*)tMPI_Malloc(sizeof(tMPI_Atomic_ptr_t)*N); met->cb=NULL; @@ -322,7 +322,7 @@ static void tMPI_Mult_recv(tMPI_Comm comm, struct coll_env *cev, int rank, { void *srcbuf; #ifdef USE_COLLECTIVE_COPY_BUFFER - bool decrease_ctr=FALSE; + gmx_bool decrease_ctr=FALSE; #endif if ( sendsize > recvsize ) @@ -442,7 +442,7 @@ static void tMPI_Post_multi(struct coll_env *cev, int myrank, int index, int i; #ifdef USE_COLLECTIVE_COPY_BUFFER /* decide based on the number of waiting threads */ - bool using_cb=(bufsize < (size_t)(n_remaining*COPY_BUFFER_SIZE)); + gmx_bool using_cb=(bufsize < (size_t)(n_remaining*COPY_BUFFER_SIZE)); cev->met[myrank].using_cb=using_cb; if (using_cb) diff --git a/src/gmxlib/thread_mpi/comm.c b/src/gmxlib/thread_mpi/comm.c index 17f71de2ec..04106eced8 100644 --- a/src/gmxlib/thread_mpi/comm.c +++ b/src/gmxlib/thread_mpi/comm.c @@ -126,7 +126,7 @@ int tMPI_Comm_compare(tMPI_Comm comm1, tMPI_Comm comm2, int *result) { if (comm1->grp.peers[i] != comm2->grp.peers[i]) { - bool found=FALSE; + gmx_bool found=FALSE; *result=TMPI_SIMILAR; for(j=0;jgrp.N;j++) @@ -397,7 +397,7 @@ static void tMPI_Split_colors(int N, const int *color, const int *key, int *group) { int i,j; - bool found; + gmx_bool found; /* reset groups */ for(i=0;ienvelopes) ); @@ -749,7 +749,7 @@ static void tMPI_Xfer(struct tmpi_thread *cur, struct envelope *sev, #ifdef USE_SEND_RECV_COPY_BUFFER /* we remove the sender's envelope only if we do the transfer, which we always do if the buffer size = 0 */ - bool remove_sender = (sev->bufsize==0); + gmx_bool remove_sender = (sev->bufsize==0); #endif #ifdef TMPI_DEBUG printf("%5d: tMPI_Xfer (%d->%d, tag=%d) started\n", @@ -853,7 +853,7 @@ static struct envelope* tMPI_Post_match_recv(struct tmpi_thread *cur, struct tmpi_thread *src, void *recv_buf, int recv_count, tMPI_Datatype datatype, - int tag, bool nonblock) + int tag, gmx_bool nonblock) { struct tmpi_thread *dest=cur; struct envelope *rev; @@ -922,7 +922,7 @@ static struct envelope *tMPI_Post_send(struct tmpi_thread *cur, struct tmpi_thread *dest, void *send_buf, int send_count, tMPI_Datatype datatype, int tag, - bool nonblock) + gmx_bool nonblock) { struct tmpi_thread *src=cur; struct envelope *sev; @@ -1041,7 +1041,7 @@ static void tMPI_Wait_process_incoming(struct tmpi_thread *cur) tMPI_Event_process( &(cur->p2p_event), n_handled); } -static bool tMPI_Test_single(struct tmpi_thread *cur, struct tmpi_req_ *rq) +static gmx_bool tMPI_Test_single(struct tmpi_thread *cur, struct tmpi_req_ *rq) { struct envelope *ev=rq->ev; @@ -1091,10 +1091,10 @@ static void tMPI_Wait_single(struct tmpi_thread *cur, struct tmpi_req_ *rq) } while(TRUE); } -static bool tMPI_Test_multi(struct tmpi_thread *cur, struct tmpi_req_ *rqs, - bool *any_done) +static gmx_bool tMPI_Test_multi(struct tmpi_thread *cur, struct tmpi_req_ *rqs, + gmx_bool *any_done) { - bool all_done=TRUE; + gmx_bool all_done=TRUE; struct tmpi_req_ *creq=rqs; int i=0; @@ -1103,7 +1103,7 @@ static bool tMPI_Test_multi(struct tmpi_thread *cur, struct tmpi_req_ *rqs, while(creq) { - bool finished=tMPI_Test_single(cur, creq); + gmx_bool finished=tMPI_Test_single(cur, creq); i++; /* now do the check */ diff --git a/src/gmxlib/thread_mpi/p2p_wait.h b/src/gmxlib/thread_mpi/p2p_wait.h index 7be038ed33..b15a32bc6f 100644 --- a/src/gmxlib/thread_mpi/p2p_wait.h +++ b/src/gmxlib/thread_mpi/p2p_wait.h @@ -146,7 +146,7 @@ int tMPI_Test(tMPI_Request *request, int *flag, tMPI_Status *status) blocking = whether to block until all reqs are completed */ static void tMPI_Test_multi_req(struct tmpi_thread *cur, int count, tMPI_Request *array_of_requests, - bool wait, bool blocking) + gmx_bool wait, gmx_bool blocking) { int i; struct tmpi_req_ *first=NULL, *last=NULL; diff --git a/src/gmxlib/thread_mpi/scatter.h b/src/gmxlib/thread_mpi/scatter.h index 4cdbac1c2a..02e5c09219 100644 --- a/src/gmxlib/thread_mpi/scatter.h +++ b/src/gmxlib/thread_mpi/scatter.h @@ -72,7 +72,7 @@ int tMPI_Scatter(void* sendbuf, int sendcount, tMPI_Datatype sendtype, size_t sendsize=sendtype->size*sendcount; size_t total_send_size=0; #ifdef USE_COLLECTIVE_COPY_BUFFER - bool using_cb; + gmx_bool using_cb; #endif if (!sendbuf) /* don't do pointer arithmetic on a NULL ptr */ @@ -207,7 +207,7 @@ int tMPI_Scatterv(void* sendbuf, int *sendcounts, int *displs, int i; size_t total_send_size=0; #ifdef USE_COLLECTIVE_COPY_BUFFER - bool using_cb; + gmx_bool using_cb; #endif if (!sendbuf) /* don't do pointer arithmetic on a NULL ptr */ diff --git a/src/gmxlib/thread_mpi/tmpi_init.c b/src/gmxlib/thread_mpi/tmpi_init.c index 7cfb782f80..a157ec23e8 100644 --- a/src/gmxlib/thread_mpi/tmpi_init.c +++ b/src/gmxlib/thread_mpi/tmpi_init.c @@ -87,7 +87,7 @@ tMPI_Thread_key_t id_key; /* the key to get the thread id */ /* whether MPI has finalized (we need this to distinguish pre-inited from post-finalized states */ -static bool tmpi_finalized=FALSE; +static gmx_bool tmpi_finalized=FALSE; /* misc. global information about MPI */ struct tmpi_global *tmpi_global=NULL; @@ -100,7 +100,7 @@ struct tmpi_global *tmpi_global=NULL; /* start N threads with argc, argv (used by tMPI_Init)*/ -void tMPI_Start_threads(bool main_returns, int N, int *argc, char ***argv, +void tMPI_Start_threads(gmx_bool main_returns, int N, int *argc, char ***argv, void (*start_fn)(void*), void *start_arg, int (*start_fn_main)(int, char**)); @@ -193,7 +193,7 @@ struct tmpi_thread *tMPI_Get_thread(tMPI_Comm comm, int rank) } #endif -bool tMPI_Is_master(void) +gmx_bool tMPI_Is_master(void) { /* if there are no other threads, we're the main thread */ if ( (!TMPI_COMM_WORLD) || TMPI_COMM_WORLD->grp.N==0) @@ -201,7 +201,7 @@ bool tMPI_Is_master(void) /* otherwise we know this through thread specific data: */ /* whether the thread pointer points to the head of the threads array */ - return (bool)(tMPI_Get_current() == threads); + return (gmx_bool)(tMPI_Get_current() == threads); } tMPI_Comm tMPI_Get_comm_self(void) @@ -376,7 +376,7 @@ static void* tMPI_Thread_starter(void *arg) } -void tMPI_Start_threads(bool main_returns, int N, int *argc, char ***argv, +void tMPI_Start_threads(gmx_bool main_returns, int N, int *argc, char ***argv, void (*start_fn)(void*), void *start_arg, int (*start_fn_main)(int, char**)) { diff --git a/src/gmxlib/thread_mpi/type.c b/src/gmxlib/thread_mpi/type.c index 64c260832f..121f6bcb6a 100644 --- a/src/gmxlib/thread_mpi/type.c +++ b/src/gmxlib/thread_mpi/type.c @@ -275,7 +275,7 @@ int tMPI_Type_commit(tMPI_Datatype *datatype) struct tmpi_datatype_ *lt=tmpi_global->usertypes[i]; if (lt->committed && lt->N_comp==dt->N_comp) { - bool found=TRUE; + gmx_bool found=TRUE; for(j=0;jN_comp;j++) { if ( (lt->comps[j].type != dt->comps[j].type) || @@ -293,7 +293,7 @@ int tMPI_Type_commit(tMPI_Datatype *datatype) } if (dt != *datatype) { - bool found=FALSE; + gmx_bool found=FALSE; /* we remove the old one from the list */ for(i=0;iN_usertypes;i++) { diff --git a/src/gmxlib/topsort.c b/src/gmxlib/topsort.c index 8aecd7aaa5..fbf7aa4982 100644 --- a/src/gmxlib/topsort.c +++ b/src/gmxlib/topsort.c @@ -43,9 +43,9 @@ #include "smalloc.h" #include "gmx_fatal.h" -static bool ip_pert(int ftype,const t_iparams *ip) +static gmx_bool ip_pert(int ftype,const t_iparams *ip) { - bool bPert; + gmx_bool bPert; int i; if (NRFPB(ftype) == 0) @@ -116,7 +116,7 @@ static bool ip_pert(int ftype,const t_iparams *ip) return bPert; } -static bool ip_q_pert(int ftype,const t_iatom *ia, +static gmx_bool ip_q_pert(int ftype,const t_iatom *ia, const t_iparams *ip,const real *qA,const real *qB) { /* 1-4 interactions do not have the charges stored in the iparams list, @@ -127,7 +127,7 @@ static bool ip_q_pert(int ftype,const t_iatom *ia, qA[ia[2]] != qB[ia[2]]))); } -bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop) +gmx_bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop) { const gmx_ffparams_t *ffparams; int i,ftype; @@ -135,7 +135,7 @@ bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop) t_atom *atom; t_ilist *il; t_iatom *ia; - bool bPert; + gmx_bool bPert; ffparams = &mtop->ffparams; @@ -178,7 +178,7 @@ void gmx_sort_ilist_fe(t_idef *idef,const real *qA,const real *qB) t_iparams *iparams; t_ilist *ilist; t_iatom *iatoms; - bool bPert; + gmx_bool bPert; t_iatom *iabuf; int iabuf_nalloc; diff --git a/src/gmxlib/tpxio.c b/src/gmxlib/tpxio.c index dea198ffa4..8e4f3766f0 100644 --- a/src/gmxlib/tpxio.c +++ b/src/gmxlib/tpxio.c @@ -167,11 +167,11 @@ static const t_ftupd ftupd[] = { /* Needed for backward compatibility */ #define MAXNODES 256 -static void _do_section(t_fileio *fio,int key,bool bRead,const char *src, +static void _do_section(t_fileio *fio,int key,gmx_bool bRead,const char *src, int line) { char buf[STRLEN]; - bool bDbg; + gmx_bool bDbg; if (gmx_fio_getftp(fio) == efTPA) { if (!bRead) { @@ -205,10 +205,10 @@ static void _do_section(t_fileio *fio,int key,bool bRead,const char *src, * Now the higer level routines that do io of the structures and arrays * **************************************************************/ -static void do_pullgrp(t_fileio *fio, t_pullgrp *pgrp, bool bRead, +static void do_pullgrp(t_fileio *fio, t_pullgrp *pgrp, gmx_bool bRead, int file_version) { - bool bDum=TRUE; + gmx_bool bDum=TRUE; int i; gmx_fio_do_int(fio,pgrp->nat); @@ -231,7 +231,7 @@ static void do_pullgrp(t_fileio *fio, t_pullgrp *pgrp, bool bRead, } } -static void do_pull(t_fileio *fio, t_pull *pull,bool bRead, int file_version) +static void do_pull(t_fileio *fio, t_pull *pull,gmx_bool bRead, int file_version) { int g; @@ -249,14 +249,14 @@ static void do_pull(t_fileio *fio, t_pull *pull,bool bRead, int file_version) do_pullgrp(fio,&pull->grp[g],bRead,file_version); } -static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, +static void do_inputrec(t_fileio *fio, t_inputrec *ir,gmx_bool bRead, int file_version, real *fudgeQQ) { int i,j,k,*tmp,idum=0; - bool bDum=TRUE; + gmx_bool bDum=TRUE; real rdum,bd_temp; rvec vdum; - bool bSimAnn; + gmx_bool bSimAnn; real zerotemptime,finish_t,init_temp,finish_temp; if (file_version != tpx_version) @@ -470,11 +470,11 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, else gmx_fio_do_real(fio,ir->epsilon_surface); - gmx_fio_do_bool(fio,ir->bOptFFT); + gmx_fio_do_gmx_bool(fio,ir->bOptFFT); - gmx_fio_do_bool(fio,ir->bContinuation); + gmx_fio_do_gmx_bool(fio,ir->bContinuation); gmx_fio_do_int(fio,ir->etc); - /* before version 18, ir->etc was a bool (ir->btc), + /* before version 18, ir->etc was a gmx_bool (ir->btc), * but the values 0 and 1 still mean no and * berendsen temperature coupling, respectively. */ @@ -563,7 +563,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, ir->andersen_seed=0; if(file_version < 26) { - gmx_fio_do_bool(fio,bSimAnn); + gmx_fio_do_gmx_bool(fio,bSimAnn); gmx_fio_do_real(fio,zerotemptime); } @@ -655,7 +655,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, else ir->eDisreWeighting = edrwConservative; } - gmx_fio_do_bool(fio,ir->bDisreMixed); + gmx_fio_do_gmx_bool(fio,ir->bDisreMixed); gmx_fio_do_real(fio,ir->dr_fc); gmx_fio_do_real(fio,ir->dr_tau); gmx_fio_do_int(fio,ir->nstdisreout); @@ -681,7 +681,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, gmx_fio_do_real(fio,ir->em_stepsize); gmx_fio_do_real(fio,ir->em_tol); if (file_version >= 22) - gmx_fio_do_bool(fio,ir->bShakeSOR); + gmx_fio_do_gmx_bool(fio,ir->bShakeSOR); else if (bRead) ir->bShakeSOR = TRUE; if (file_version >= 11) @@ -866,7 +866,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, /* QMMM stuff */ if(file_version>=39){ - gmx_fio_do_bool(fio,ir->bQMMM); + gmx_fio_do_gmx_bool(fio,ir->bQMMM); gmx_fio_do_int(fio,ir->QMMMscheme); gmx_fio_do_real(fio,ir->scalefactor); gmx_fio_do_int(fio,ir->opts.ngQM); @@ -889,21 +889,21 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,bool bRead, bDum=gmx_fio_ndo_int(fio,ir->opts.QMbasis,ir->opts.ngQM); bDum=gmx_fio_ndo_int(fio,ir->opts.QMcharge,ir->opts.ngQM); bDum=gmx_fio_ndo_int(fio,ir->opts.QMmult,ir->opts.ngQM); - bDum=gmx_fio_ndo_bool(fio,ir->opts.bSH,ir->opts.ngQM); + bDum=gmx_fio_ndo_gmx_bool(fio,ir->opts.bSH,ir->opts.ngQM); bDum=gmx_fio_ndo_int(fio,ir->opts.CASorbitals,ir->opts.ngQM); bDum=gmx_fio_ndo_int(fio,ir->opts.CASelectrons,ir->opts.ngQM); bDum=gmx_fio_ndo_real(fio,ir->opts.SAon,ir->opts.ngQM); bDum=gmx_fio_ndo_real(fio,ir->opts.SAoff,ir->opts.ngQM); bDum=gmx_fio_ndo_int(fio,ir->opts.SAsteps,ir->opts.ngQM); - bDum=gmx_fio_ndo_bool(fio,ir->opts.bOPT,ir->opts.ngQM); - bDum=gmx_fio_ndo_bool(fio,ir->opts.bTS,ir->opts.ngQM); + bDum=gmx_fio_ndo_gmx_bool(fio,ir->opts.bOPT,ir->opts.ngQM); + bDum=gmx_fio_ndo_gmx_bool(fio,ir->opts.bTS,ir->opts.ngQM); } /* end of QMMM stuff */ } } -static void do_harm(t_fileio *fio, t_iparams *iparams,bool bRead) +static void do_harm(t_fileio *fio, t_iparams *iparams,gmx_bool bRead) { gmx_fio_do_real(fio,iparams->harmonic.rA); gmx_fio_do_real(fio,iparams->harmonic.krA); @@ -912,10 +912,10 @@ static void do_harm(t_fileio *fio, t_iparams *iparams,bool bRead) } void do_iparams(t_fileio *fio, t_functype ftype,t_iparams *iparams, - bool bRead, int file_version) + gmx_bool bRead, int file_version) { int i; - bool bDum; + gmx_bool bDum; real rdum; if (!bRead) @@ -1159,11 +1159,11 @@ void do_iparams(t_fileio *fio, t_functype ftype,t_iparams *iparams, gmx_fio_unset_comment(fio); } -static void do_ilist(t_fileio *fio, t_ilist *ilist,bool bRead,int file_version, +static void do_ilist(t_fileio *fio, t_ilist *ilist,gmx_bool bRead,int file_version, int ftype) { int i,k,idum; - bool bDum=TRUE; + gmx_bool bDum=TRUE; if (!bRead) { gmx_fio_set_comment(fio, interaction_function[ftype].name); @@ -1181,10 +1181,10 @@ static void do_ilist(t_fileio *fio, t_ilist *ilist,bool bRead,int file_version, } static void do_ffparams(t_fileio *fio, gmx_ffparams_t *ffparams, - bool bRead, int file_version) + gmx_bool bRead, int file_version) { int idum,i,j; - bool bDum=TRUE; + gmx_bool bDum=TRUE; unsigned int k; gmx_fio_do_int(fio,ffparams->atnr); @@ -1241,11 +1241,11 @@ static void do_ffparams(t_fileio *fio, gmx_ffparams_t *ffparams, } } -static void do_ilists(t_fileio *fio, t_ilist *ilist,bool bRead, +static void do_ilists(t_fileio *fio, t_ilist *ilist,gmx_bool bRead, int file_version) { int i,j,renum[F_NRE]; - bool bDum=TRUE,bClear; + gmx_bool bDum=TRUE,bClear; unsigned int k; for(j=0; (jilist,bRead,file_version); } -static void do_block(t_fileio *fio, t_block *block,bool bRead,int file_version) +static void do_block(t_fileio *fio, t_block *block,gmx_bool bRead,int file_version) { int i,idum,dum_nra,*dum_a; - bool bDum=TRUE; + gmx_bool bDum=TRUE; if (file_version < 44) for(i=0; ia,block->nra); } -static void do_atom(t_fileio *fio, t_atom *atom,int ngrp,bool bRead, +static void do_atom(t_fileio *fio, t_atom *atom,int ngrp,gmx_bool bRead, int file_version, gmx_groups_t *groups,int atnr) { int i,myngrp; @@ -1362,11 +1362,11 @@ static void do_atom(t_fileio *fio, t_atom *atom,int ngrp,bool bRead, } } -static void do_grps(t_fileio *fio, int ngrp,t_grps grps[],bool bRead, +static void do_grps(t_fileio *fio, int ngrp,t_grps grps[],gmx_bool bRead, int file_version) { int i,j,myngrp; - bool bDum=TRUE; + gmx_bool bDum=TRUE; if (file_version < 23) myngrp = 8; @@ -1389,7 +1389,7 @@ static void do_grps(t_fileio *fio, int ngrp,t_grps grps[],bool bRead, } } -static void do_symstr(t_fileio *fio, char ***nm,bool bRead,t_symtab *symtab) +static void do_symstr(t_fileio *fio, char ***nm,gmx_bool bRead,t_symtab *symtab) { int ls; @@ -1403,7 +1403,7 @@ static void do_symstr(t_fileio *fio, char ***nm,bool bRead,t_symtab *symtab) } } -static void do_strstr(t_fileio *fio, int nstr,char ***nm,bool bRead, +static void do_strstr(t_fileio *fio, int nstr,char ***nm,gmx_bool bRead, t_symtab *symtab) { int j; @@ -1412,7 +1412,7 @@ static void do_strstr(t_fileio *fio, int nstr,char ***nm,bool bRead, do_symstr(fio, &(nm[j]),bRead,symtab); } -static void do_resinfo(t_fileio *fio, int n,t_resinfo *ri,bool bRead, +static void do_resinfo(t_fileio *fio, int n,t_resinfo *ri,gmx_bool bRead, t_symtab *symtab, int file_version) { int j; @@ -1429,7 +1429,7 @@ static void do_resinfo(t_fileio *fio, int n,t_resinfo *ri,bool bRead, } } -static void do_atoms(t_fileio *fio, t_atoms *atoms,bool bRead,t_symtab *symtab, +static void do_atoms(t_fileio *fio, t_atoms *atoms,gmx_bool bRead,t_symtab *symtab, int file_version, gmx_groups_t *groups) { @@ -1478,11 +1478,11 @@ static void do_atoms(t_fileio *fio, t_atoms *atoms,bool bRead,t_symtab *symtab, } static void do_groups(t_fileio *fio, gmx_groups_t *groups, - bool bRead,t_symtab *symtab, + gmx_bool bRead,t_symtab *symtab, int file_version) { int g,n,i; - bool bDum=TRUE; + gmx_bool bDum=TRUE; do_grps(fio, egcNR,groups->grps,bRead,file_version); gmx_fio_do_int(fio,groups->ngrpname); @@ -1505,11 +1505,11 @@ static void do_groups(t_fileio *fio, gmx_groups_t *groups, } } -static void do_atomtypes(t_fileio *fio, t_atomtypes *atomtypes,bool bRead, +static void do_atomtypes(t_fileio *fio, t_atomtypes *atomtypes,gmx_bool bRead, t_symtab *symtab,int file_version) { int i,j; - bool bDum = TRUE; + gmx_bool bDum = TRUE; if (file_version > 25) { gmx_fio_do_int(fio,atomtypes->nr); @@ -1548,7 +1548,7 @@ static void do_atomtypes(t_fileio *fio, t_atomtypes *atomtypes,bool bRead, } } -static void do_symtab(t_fileio *fio, t_symtab *symtab,bool bRead) +static void do_symtab(t_fileio *fio, t_symtab *symtab,gmx_bool bRead) { int i,nr; t_symbuf *symbuf; @@ -1579,7 +1579,7 @@ static void do_symtab(t_fileio *fio, t_symtab *symtab,bool bRead) } } -static void do_cmap(t_fileio *fio, gmx_cmap_t *cmap_grid, bool bRead) +static void do_cmap(t_fileio *fio, gmx_cmap_t *cmap_grid, gmx_bool bRead) { int i,j,ngrid,gs,nelem; @@ -1657,7 +1657,7 @@ void tpx_make_chain_identifiers(t_atoms *atoms,t_block *mols) } } -static void do_moltype(t_fileio *fio, gmx_moltype_t *molt,bool bRead, +static void do_moltype(t_fileio *fio, gmx_moltype_t *molt,gmx_bool bRead, t_symtab *symtab, int file_version, gmx_groups_t *groups) { @@ -1686,7 +1686,7 @@ static void do_moltype(t_fileio *fio, gmx_moltype_t *molt,bool bRead, do_blocka(fio, &molt->excls, bRead, file_version); } -static void do_molblock(t_fileio *fio, gmx_molblock_t *molb,bool bRead, +static void do_molblock(t_fileio *fio, gmx_molblock_t *molb,gmx_bool bRead, int file_version) { int i; @@ -1742,7 +1742,7 @@ static void add_posres_molblock(gmx_mtop_t *mtop) { t_ilist *il; int am,i,mol,a; - bool bFE; + gmx_bool bFE; gmx_molblock_t *molb; t_iparams *ip; @@ -1814,7 +1814,7 @@ static void set_disres_npair(gmx_mtop_t *mtop) } } -static void do_mtop(t_fileio *fio, gmx_mtop_t *mtop,bool bRead, +static void do_mtop(t_fileio *fio, gmx_mtop_t *mtop,gmx_bool bRead, int file_version) { int mt,mb,i; @@ -1934,12 +1934,12 @@ static void do_mtop(t_fileio *fio, gmx_mtop_t *mtop,bool bRead, * * If possible, we will read the inputrec even when TopOnlyOK is TRUE. */ -static void do_tpxheader(t_fileio *fio,bool bRead,t_tpxheader *tpx, - bool TopOnlyOK, int *file_version, +static void do_tpxheader(t_fileio *fio,gmx_bool bRead,t_tpxheader *tpx, + gmx_bool TopOnlyOK, int *file_version, int *file_generation) { char buf[STRLEN]; - bool bDouble; + gmx_bool bDouble; int precision; int fver,fgen; int idum=0; @@ -2020,19 +2020,19 @@ static void do_tpxheader(t_fileio *fio,bool bRead,t_tpxheader *tpx, } } -static int do_tpx(t_fileio *fio, bool bRead, +static int do_tpx(t_fileio *fio, gmx_bool bRead, t_inputrec *ir,t_state *state,rvec *f,gmx_mtop_t *mtop, - bool bXVallocated) + gmx_bool bXVallocated) { t_tpxheader tpx; t_inputrec dum_ir; gmx_mtop_t dum_top; - bool TopOnlyOK,bDum=TRUE; + gmx_bool TopOnlyOK,bDum=TRUE; int file_version,file_generation; int i; rvec *xptr,*vptr; int ePBC; - bool bPeriodicMols; + gmx_bool bPeriodicMols; if (!bRead) { tpx.natoms = state->natoms; @@ -2179,7 +2179,7 @@ static int do_tpx(t_fileio *fio, bool bRead, bPeriodicMols = ir->bPeriodicMols; } gmx_fio_do_int(fio,ePBC); - gmx_fio_do_bool(fio,bPeriodicMols); + gmx_fio_do_gmx_bool(fio,bPeriodicMols); } if (file_generation <= tpx_generation && ir) { do_inputrec(fio, ir,bRead,file_version,mtop ? &mtop->ffparams.fudgeQQ : NULL); @@ -2272,7 +2272,7 @@ void close_tpx(t_fileio *fio) gmx_fio_close(fio); } -void read_tpxheader(const char *fn, t_tpxheader *tpx, bool TopOnlyOK, +void read_tpxheader(const char *fn, t_tpxheader *tpx, gmx_bool TopOnlyOK, int *file_version, int *file_generation) { t_fileio *fio; @@ -2340,7 +2340,7 @@ int read_tpx_top(const char *fn, return ePBC; } -bool fn2bTPX(const char *file) +gmx_bool fn2bTPX(const char *file) { switch (fn2ftp(file)) { case efTPR: @@ -2352,12 +2352,12 @@ bool fn2bTPX(const char *file) } } -bool read_tps_conf(const char *infile,char *title,t_topology *top,int *ePBC, - rvec **x,rvec **v,matrix box,bool bMass) +gmx_bool read_tps_conf(const char *infile,char *title,t_topology *top,int *ePBC, + rvec **x,rvec **v,matrix box,gmx_bool bMass) { t_tpxheader header; int natoms,i,version,generation; - bool bTop,bXNULL; + gmx_bool bTop,bXNULL; gmx_mtop_t *mtop; t_topology *topconv; gmx_atomprop_t aps; diff --git a/src/gmxlib/trajana/centerofmass.c b/src/gmxlib/trajana/centerofmass.c index 75929862e6..bc46cfd408 100644 --- a/src/gmxlib/trajana/centerofmass.c +++ b/src/gmxlib/trajana/centerofmass.c @@ -156,7 +156,7 @@ gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout */ int gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[], - bool bMass, rvec xout) + gmx_bool bMass, rvec xout) { if (bMass) { @@ -184,7 +184,7 @@ gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[], */ int gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, atom_id index[], - bool bMass, rvec fout) + gmx_bool bMass, rvec fout) { if (bMass) { @@ -213,7 +213,7 @@ gmx_calc_cog_pbc(t_topology *top, rvec x[], t_pbc *pbc, int nrefat, atom_id index[], rvec xout) { const real tol = 1e-4; - bool bChanged; + gmx_bool bChanged; int m, j, ai, iter; rvec dx, xtest; @@ -270,7 +270,7 @@ gmx_calc_com_pbc(t_topology *top, rvec x[], t_pbc *pbc, int nrefat, atom_id index[], rvec xout) { const real tol = 1e-4; - bool bChanged; + gmx_bool bChanged; int m, j, ai, iter; real mass, mtot; rvec dx, xtest; @@ -342,7 +342,7 @@ gmx_calc_com_pbc(t_topology *top, rvec x[], t_pbc *pbc, */ int gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc, - int nrefat, atom_id index[], bool bMass, rvec xout) + int nrefat, atom_id index[], gmx_bool bMass, rvec xout) { if (bMass) { @@ -482,7 +482,7 @@ gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[], */ int gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block, atom_id index[], - bool bMass, rvec xout[]) + gmx_bool bMass, rvec xout[]) { if (bMass) { @@ -510,7 +510,7 @@ gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block, atom_id index[], */ int gmx_calc_comg_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[], - bool bMass, rvec fout[]) + gmx_bool bMass, rvec fout[]) { if (bMass) { @@ -543,7 +543,7 @@ gmx_calc_comg_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[] */ int gmx_calc_comg_blocka(t_topology *top, rvec x[], t_blocka *block, - bool bMass, rvec xout[]) + gmx_bool bMass, rvec xout[]) { /* TODO: It would probably be better to do this without the type cast */ return gmx_calc_comg_block(top, x, (t_block *)block, block->a, bMass, xout); @@ -570,7 +570,7 @@ gmx_calc_comg_blocka(t_topology *top, rvec x[], t_blocka *block, */ int gmx_calc_comg_f_blocka(t_topology *top, rvec f[], t_blocka *block, - bool bMass, rvec fout[]) + gmx_bool bMass, rvec fout[]) { /* TODO: It would probably be better to do this without the type cast */ return gmx_calc_comg_f_block(top, f, (t_block *)block, block->a, bMass, fout); diff --git a/src/gmxlib/trajana/displacement.c b/src/gmxlib/trajana/displacement.c index 9214a6fd2a..57c7cd1b70 100644 --- a/src/gmxlib/trajana/displacement.c +++ b/src/gmxlib/trajana/displacement.c @@ -86,7 +86,7 @@ typedef struct gmx_ana_displpos_t /** Stored position vector. */ rvec x; /** TRUE if there is something stored. */ - bool bPres; + gmx_bool bPres; } gmx_ana_displpos_t; /*! \internal \brief @@ -103,7 +103,7 @@ struct gmx_ana_displ_t real tmax; /** TRUE if no frames have been read. */ - bool bFirst; + gmx_bool bFirst; /** Stores the time of the first frame. */ real t0; /** Stores the time interval between frames. */ @@ -262,7 +262,7 @@ gmx_ana_displ_time_to_steps(gmx_ana_displ_t *d, real time, int *steps) * \returns 0 on success. */ int -gmx_ana_displ_store(gmx_ana_displ_t *d, atom_id id, rvec x, bool bPres) +gmx_ana_displ_store(gmx_ana_displ_t *d, atom_id id, rvec x, gmx_bool bPres) { copy_rvec(x, d->p[d->ci][id].x); d->p[d->ci][id].bPres = bPres; @@ -386,7 +386,7 @@ find_store_index(gmx_ana_displ_t *d, int step) */ int gmx_ana_displ_vector(gmx_ana_displ_t *d, int step, t_pbc *pbc, - atom_id id, rvec x, rvec xout, bool *pout) + atom_id id, rvec x, rvec xout, gmx_bool *pout) { int si; @@ -433,7 +433,7 @@ gmx_ana_displ_vector(gmx_ana_displ_t *d, int step, t_pbc *pbc, */ int gmx_ana_displ_vectors(gmx_ana_displ_t *d, int step, t_pbc *pbc, - int n, atom_id id[], rvec x[], rvec xout[], bool *pout) + int n, atom_id id[], rvec x[], rvec xout[], gmx_bool *pout) { int si, i; @@ -484,7 +484,7 @@ gmx_ana_displ_vectors(gmx_ana_displ_t *d, int step, t_pbc *pbc, */ int gmx_ana_displ_vectors_all(gmx_ana_displ_t *d, int step, t_pbc *pbc, - rvec x[], rvec xout[], bool *pout) + rvec x[], rvec xout[], gmx_bool *pout) { int si, i; diff --git a/src/gmxlib/trajana/indexutil.c b/src/gmxlib/trajana/indexutil.c index 55dcacd6ec..ab5c131778 100644 --- a/src/gmxlib/trajana/indexutil.c +++ b/src/gmxlib/trajana/indexutil.c @@ -81,7 +81,7 @@ gmx_ana_indexgrps_alloc(gmx_ana_indexgrps_t **g, int ngrps) */ void gmx_ana_indexgrps_set(gmx_ana_indexgrps_t **g, int ngrps, int *isize, - atom_id **index, char **name, bool bFree) + atom_id **index, char **name, gmx_bool bFree) { int i; @@ -253,7 +253,7 @@ gmx_ana_indexgrps_clone(gmx_ana_indexgrps_t **dest, gmx_ana_indexgrps_t *src) * \param[out] g Index group structure. * \returns TRUE if \p g is empty, i.e., has 0 index groups. */ -bool +gmx_bool gmx_ana_indexgrps_is_empty(gmx_ana_indexgrps_t *g) { return g->nr == 0; @@ -282,7 +282,7 @@ gmx_ana_indexgrps_get_grp(gmx_ana_indexgrps_t *g, int n) * \param[in] n Number of the group to extract. * \returns TRUE if \p n is a valid group in \p src, FALSE otherwise. */ -bool +gmx_bool gmx_ana_indexgrps_extract(gmx_ana_index_t *dest, gmx_ana_indexgrps_t *src, int n) { if (n < 0 || n >= src->nr) @@ -304,7 +304,7 @@ gmx_ana_indexgrps_extract(gmx_ana_index_t *dest, gmx_ana_indexgrps_t *src, int n * Uses the Gromacs routine find_group() to find the actual group; * the comparison is case-insensitive. */ -bool +gmx_bool gmx_ana_indexgrps_find(gmx_ana_index_t *dest, gmx_ana_indexgrps_t *src, char *name) { int i; @@ -453,7 +453,7 @@ gmx_ana_index_deinit(gmx_ana_index_t *g) * A deep copy of the name is only made if \p bAlloc is TRUE. */ void -gmx_ana_index_copy(gmx_ana_index_t *dest, gmx_ana_index_t *src, bool bAlloc) +gmx_ana_index_copy(gmx_ana_index_t *dest, gmx_ana_index_t *src, gmx_bool bAlloc) { dest->isize = src->isize; if (dest->isize > 0) @@ -548,7 +548,7 @@ gmx_ana_index_check(gmx_ana_index_t *g, int natoms) * \returns TRUE if the index group is sorted and has no duplicates, * FALSE otherwise. */ -bool +gmx_bool gmx_ana_index_check_sorted(gmx_ana_index_t *g) { int i; @@ -590,7 +590,7 @@ gmx_ana_index_sort(gmx_ana_index_t *g) * \param[in] b Index group to check. * \returns TRUE if \p a and \p b are equal, FALSE otherwise. */ -bool +gmx_bool gmx_ana_index_equals(gmx_ana_index_t *a, gmx_ana_index_t *b) { int i; @@ -618,7 +618,7 @@ gmx_ana_index_equals(gmx_ana_index_t *a, gmx_ana_index_t *b) * If the elements are not in the same order in both groups, the function * fails. However, the groups do not need to be sorted. */ -bool +gmx_bool gmx_ana_index_contains(gmx_ana_index_t *a, gmx_ana_index_t *b) { int i, j; @@ -847,7 +847,7 @@ gmx_ana_index_merge(gmx_ana_index_t *dest, */ void gmx_ana_index_make_block(t_blocka *t, t_topology *top, gmx_ana_index_t *g, - e_index_t type, bool bComplete) + e_index_t type, gmx_bool bComplete) { int i, j, ai; int id, cur; @@ -993,7 +993,7 @@ gmx_ana_index_make_block(t_blocka *t, t_topology *top, gmx_ana_index_t *g, * * The atoms in \p g are assumed to be sorted. */ -bool +gmx_bool gmx_ana_index_has_full_blocks(gmx_ana_index_t *g, t_block *b) { int i, j, bi; @@ -1034,7 +1034,7 @@ gmx_ana_index_has_full_blocks(gmx_ana_index_t *g, t_block *b) * * The atoms in \p g and \p b->a are assumed to be in the same order. */ -bool +gmx_bool gmx_ana_index_has_full_ablocks(gmx_ana_index_t *g, t_blocka *b) { int i, j, bi; @@ -1078,7 +1078,7 @@ gmx_ana_index_has_full_ablocks(gmx_ana_index_t *g, t_blocka *b) * If \p type is \ref INDEX_UNKNOWN or \ref INDEX_ALL, the return value is * always FALSE. */ -bool +gmx_bool gmx_ana_index_has_complete_elems(gmx_ana_index_t *g, e_index_t type, t_topology *top) { @@ -1280,7 +1280,7 @@ gmx_ana_indexmap_set_static(gmx_ana_indexmap_t *m, t_blocka *b) * \p dest should have been initialized somehow (calloc() is enough). */ void -gmx_ana_indexmap_copy(gmx_ana_indexmap_t *dest, gmx_ana_indexmap_t *src, bool bFirst) +gmx_ana_indexmap_copy(gmx_ana_indexmap_t *dest, gmx_ana_indexmap_t *src, gmx_bool bFirst) { if (bFirst) { @@ -1313,10 +1313,10 @@ gmx_ana_indexmap_copy(gmx_ana_indexmap_t *dest, gmx_ana_indexmap_t *src, bool bF */ void gmx_ana_indexmap_update(gmx_ana_indexmap_t *m, gmx_ana_index_t *g, - bool bMaskOnly) + gmx_bool bMaskOnly) { int i, j, bi, bj; - bool bStatic; + gmx_bool bStatic; /* Process the simple cases first */ if (m->type == INDEX_UNKNOWN && m->b.nra == 0) diff --git a/src/gmxlib/trajana/nbsearch.c b/src/gmxlib/trajana/nbsearch.c index 47f1d25f1c..a737e419ed 100644 --- a/src/gmxlib/trajana/nbsearch.c +++ b/src/gmxlib/trajana/nbsearch.c @@ -103,13 +103,13 @@ struct gmx_ana_nbsearch_t int *excl; /** Whether to try grid searching. */ - bool bTryGrid; + gmx_bool bTryGrid; /** Whether grid searching is actually used for the current positions. */ - bool bGrid; + gmx_bool bGrid; /** Array allocated for storing in-unit-cell reference positions. */ rvec *xref_alloc; /** FALSE if the box is rectangular. */ - bool bTric; + gmx_bool bTric; /** Box vectors of a single grid cell. */ matrix cellbox; /** The reciprocal cell vectors as columns; the inverse of \p cellbox. */ @@ -268,7 +268,7 @@ grid_init_cell_nblist(gmx_ana_nbsearch_t *d, t_pbc *pbc) * \param[in] pbc Information about the box. * \returns FALSE if grid search is not suitable. */ -static bool +static gmx_bool grid_setup_cells(gmx_ana_nbsearch_t *d, t_pbc *pbc) { real targetsize; @@ -317,7 +317,7 @@ grid_setup_cells(gmx_ana_nbsearch_t *d, t_pbc *pbc) * \param[in] pbc Information about the box. * \returns FALSE if grid search is not suitable. */ -static bool +static gmx_bool grid_set_box(gmx_ana_nbsearch_t *d, t_pbc *pbc) { int dd; @@ -531,7 +531,7 @@ gmx_ana_nbsearch_set_excl(gmx_ana_nbsearch_t *d, int nexcl, int excl[]) /*! \brief * Helper function to check whether a reference point should be excluded. */ -static bool +static gmx_bool is_excluded(gmx_ana_nbsearch_t *d, int j) { if (d->exclind < d->nexcl) @@ -588,9 +588,9 @@ grid_search_start(gmx_ana_nbsearch_t *d, rvec x) /*! \brief * Does a grid search. */ -static bool +static gmx_bool grid_search(gmx_ana_nbsearch_t *d, - bool (*action)(gmx_ana_nbsearch_t *d, int i, real r2)) + gmx_bool (*action)(gmx_ana_nbsearch_t *d, int i, real r2)) { int i; rvec dx; @@ -674,7 +674,7 @@ grid_search(gmx_ana_nbsearch_t *d, * * Simply breaks the loop on the first found neighbor. */ -static bool +static gmx_bool within_action(gmx_ana_nbsearch_t *d, int i, real r2) { return TRUE; @@ -683,7 +683,7 @@ within_action(gmx_ana_nbsearch_t *d, int i, real r2) /*! \brief * Helper function to use with grid_search() to find the minimum distance. */ -static bool +static gmx_bool mindist_action(gmx_ana_nbsearch_t *d, int i, real r2) { d->cutoff2 = r2; @@ -696,7 +696,7 @@ mindist_action(gmx_ana_nbsearch_t *d, int i, real r2) * \returns TRUE if \p x is within the cutoff of any reference position, * FALSE otherwise. */ -bool +gmx_bool gmx_ana_nbsearch_is_within(gmx_ana_nbsearch_t *d, rvec x) { grid_search_start(d, x); @@ -710,7 +710,7 @@ gmx_ana_nbsearch_is_within(gmx_ana_nbsearch_t *d, rvec x) * \returns TRUE if the test position is within the cutoff of any reference * position, FALSE otherwise. */ -bool +gmx_bool gmx_ana_nbsearch_pos_is_within(gmx_ana_nbsearch_t *d, gmx_ana_pos_t *p, int i) { return gmx_ana_nbsearch_is_within(d, p->x[i]); @@ -754,7 +754,7 @@ gmx_ana_nbsearch_pos_mindist(gmx_ana_nbsearch_t *d, gmx_ana_pos_t *p, int i) * \param[out] jp Index of the reference position in the first pair. * \returns TRUE if there are positions within the cutoff. */ -bool +gmx_bool gmx_ana_nbsearch_first_within(gmx_ana_nbsearch_t *d, rvec x, int *jp) { grid_search_start(d, x); @@ -768,7 +768,7 @@ gmx_ana_nbsearch_first_within(gmx_ana_nbsearch_t *d, rvec x, int *jp) * \param[out] jp Index of the reference position in the first pair. * \returns TRUE if there are positions within the cutoff. */ -bool +gmx_bool gmx_ana_nbsearch_pos_first_within(gmx_ana_nbsearch_t *d, gmx_ana_pos_t *p, int i, int *jp) { @@ -780,7 +780,7 @@ gmx_ana_nbsearch_pos_first_within(gmx_ana_nbsearch_t *d, gmx_ana_pos_t *p, * \param[out] jp Index of the test position in the next pair. * \returns TRUE if there are positions within the cutoff. */ -bool +gmx_bool gmx_ana_nbsearch_next_within(gmx_ana_nbsearch_t *d, int *jp) { if (grid_search(d, &within_action)) diff --git a/src/gmxlib/trajana/poscalc.c b/src/gmxlib/trajana/poscalc.c index 21e4ea67c5..9a319e6d68 100644 --- a/src/gmxlib/trajana/poscalc.c +++ b/src/gmxlib/trajana/poscalc.c @@ -138,7 +138,7 @@ struct gmx_ana_poscalc_coll_t /** Pointer to the last data structure. */ gmx_ana_poscalc_t *last; /** Whether the collection has been initialized for evaluation. */ - bool bInit; + gmx_bool bInit; }; /*! \internal \brief @@ -190,7 +190,7 @@ struct gmx_ana_poscalc_t gmx_ana_pos_t *p; /** TRUE if the positions have been evaluated for the current frame. */ - bool bEval; + gmx_bool bEval; /*! \brief * Base position data for this calculation. * @@ -330,7 +330,7 @@ gmx_ana_poscalc_type_from_enum(const char *post, e_poscalc_t *type, int *flags) * be used with Gromacs command-line parsing. */ const char ** -gmx_ana_poscalc_create_type_enum(bool bAtom) +gmx_ana_poscalc_create_type_enum(gmx_bool bAtom) { const char **pcenum; size_t i; @@ -626,7 +626,7 @@ remove_poscalc(gmx_ana_poscalc_t *pc) * \p bBase affects on how the \p pc->gmax field is initialized. */ static void -set_poscalc_maxindex(gmx_ana_poscalc_t *pc, gmx_ana_index_t *g, bool bBase) +set_poscalc_maxindex(gmx_ana_poscalc_t *pc, gmx_ana_index_t *g, gmx_bool bBase) { gmx_ana_index_make_block(&pc->b, pc->coll->top, g, pc->itype, pc->flags & POS_COMPLWHOLE); /* Set the type to POS_ATOM if the calculation in fact is such. */ @@ -665,7 +665,7 @@ set_poscalc_maxindex(gmx_ana_poscalc_t *pc, gmx_ana_index_t *g, bool bBase) * \returns TRUE if \p pc can use a base and gets some benefit out of it, * FALSE otherwise. */ -static bool +static gmx_bool can_use_base(gmx_ana_poscalc_t *pc) { /* For atoms, it should be faster to do a simple copy, so don't use a @@ -702,7 +702,7 @@ can_use_base(gmx_ana_poscalc_t *pc) * \returns TRUE if the two calculations should be merged to use a common * base, FALSE otherwise. */ -static bool +static gmx_bool should_merge(gmx_ana_poscalc_t *pc1, gmx_ana_poscalc_t *pc2, gmx_ana_index_t *g1, gmx_ana_index_t *g) { @@ -1160,7 +1160,7 @@ gmx_ana_poscalc_free(gmx_ana_poscalc_t *pc) * \returns TRUE if \p pc requires topology for initialization and/or * evaluation, FALSE otherwise. */ -bool +gmx_bool gmx_ana_poscalc_requires_top(gmx_ana_poscalc_t *pc) { if ((pc->flags & POS_MASS) || pc->type == POS_RES || pc->type == POS_MOL) diff --git a/src/gmxlib/trajana/position.c b/src/gmxlib/trajana/position.c index 9473423b0f..4edcb46cb0 100644 --- a/src/gmxlib/trajana/position.c +++ b/src/gmxlib/trajana/position.c @@ -187,7 +187,7 @@ gmx_ana_pos_free(gmx_ana_pos_t *pos) * \p dest should have been initialized somehow (calloc() is enough). */ void -gmx_ana_pos_copy(gmx_ana_pos_t *dest, gmx_ana_pos_t *src, bool bFirst) +gmx_ana_pos_copy(gmx_ana_pos_t *dest, gmx_ana_pos_t *src, gmx_bool bFirst) { if (bFirst) { diff --git a/src/gmxlib/trajana/trajana.c b/src/gmxlib/trajana/trajana.c index 9d3a7645ee..4dde161ca7 100644 --- a/src/gmxlib/trajana/trajana.c +++ b/src/gmxlib/trajana/trajana.c @@ -166,14 +166,14 @@ struct gmx_ana_traj_t */ int frflags; /** TRUE if molecules should be made whole for each frame. */ - bool bRmPBC; + gmx_bool bRmPBC; /*! \brief * TRUE if periodic boundary conditions should be used. * * If the flag is FALSE, the \p pbc pointer passed to gmx_analysisfunc() * is NULL. */ - bool bPBC; + gmx_bool bPBC; /** Name of the trajectory file (NULL if not provided). */ char *trjfile; @@ -191,7 +191,7 @@ struct gmx_ana_traj_t /** The topology structure, or \p NULL if no topology loaded. */ t_topology *top; /** TRUE if full tpx file was loaded, FALSE otherwise. */ - bool bTop; + gmx_bool bTop; /** Coordinates from the topology (see \p bTopX). */ rvec *xtop; /** The box loaded from the topology file. */ @@ -235,7 +235,7 @@ struct gmx_ana_traj_t }; /** Loads the topology. */ -static int load_topology(gmx_ana_traj_t *d, bool bReq); +static int load_topology(gmx_ana_traj_t *d, gmx_bool bReq); /** Loads the first frame and does some checks. */ static int init_first_frame(gmx_ana_traj_t *d); @@ -382,7 +382,7 @@ gmx_ana_add_flags(gmx_ana_traj_t *d, unsigned long flags) * \see \ref ANA_NOUSER_PBC */ int -gmx_ana_set_pbc(gmx_ana_traj_t *d, bool bPBC) +gmx_ana_set_pbc(gmx_ana_traj_t *d, gmx_bool bPBC) { d->bPBC = bPBC; return 0; @@ -392,7 +392,7 @@ gmx_ana_set_pbc(gmx_ana_traj_t *d, bool bPBC) * \param[in] d Trajectory analysis data structure. * \returns TRUE if periodic boundary conditions are set to be used. */ -bool +gmx_bool gmx_ana_has_pbc(gmx_ana_traj_t *d) { return d->bPBC; @@ -422,7 +422,7 @@ gmx_ana_has_pbc(gmx_ana_traj_t *d) * \see \ref ANA_NOUSER_RMPBC */ int -gmx_ana_set_rmpbc(gmx_ana_traj_t *d, bool bRmPBC) +gmx_ana_set_rmpbc(gmx_ana_traj_t *d, gmx_bool bRmPBC) { d->bRmPBC = bRmPBC; return 0; @@ -696,19 +696,19 @@ parse_trjana_args(gmx_ana_traj_t *d, {efDAT, "-sf", "selection", ffOPTRD}, {efNDX, NULL, NULL, ffOPTRD}, }; - bool bPBC = TRUE; + gmx_bool bPBC = TRUE; t_pargs pbc_pa[] = { {"-pbc", FALSE, etBOOL, {&bPBC}, "Use periodic boundary conditions for distance calculation"}, }; - bool bRmPBC = TRUE; + gmx_bool bRmPBC = TRUE; t_pargs rmpbc_pa[] = { {"-rmpbc", FALSE, etBOOL, {&bRmPBC}, "Make molecules whole for each frame"}, }; char *selection = NULL; const char **rpost = NULL; - bool bSelDump = FALSE; + gmx_bool bSelDump = FALSE; t_pargs sel_pa[] = { {"-select", FALSE, etSTR, {&selection}, "Selection string (use 'help' for help)"}, @@ -964,7 +964,7 @@ parse_trjana_args(gmx_ana_traj_t *d, * The function can be called multiple times safely; extra calls are * ignored. */ -static int load_topology(gmx_ana_traj_t *d, bool bReq) +static int load_topology(gmx_ana_traj_t *d, gmx_bool bReq) { char title[STRLEN]; @@ -1003,7 +1003,7 @@ static int load_topology(gmx_ana_traj_t *d, bool bReq) * The pointer returned in \p *top should not be freed. */ int -gmx_ana_get_topology(gmx_ana_traj_t *d, bool bReq, t_topology **top, bool *bTop) +gmx_ana_get_topology(gmx_ana_traj_t *d, gmx_bool bReq, t_topology **top, gmx_bool *bTop) { int rc; @@ -1195,9 +1195,9 @@ gmx_ana_init_selections(gmx_ana_traj_t *d) int nr; gmx_ana_indexgrps_t *grps; int natoms; - bool bStdIn; - bool bInteractive; - bool bOk; + gmx_bool bStdIn; + gmx_bool bInteractive; + gmx_bool bOk; if (d->sel) { diff --git a/src/gmxlib/trnio.c b/src/gmxlib/trnio.c index fc8042827c..ea72d36f70 100644 --- a/src/gmxlib/trnio.c +++ b/src/gmxlib/trnio.c @@ -70,10 +70,10 @@ static int nFloatSize(t_trnheader *sh) return nflsize; } -static bool do_trnheader(t_fileio *fio,bool bRead,t_trnheader *sh, bool *bOK) +static gmx_bool do_trnheader(t_fileio *fio,gmx_bool bRead,t_trnheader *sh, gmx_bool *bOK) { int magic=GROMACS_MAGIC; - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; char buf[256]; *bOK=TRUE; @@ -145,11 +145,11 @@ void pr_trnheader(FILE *fp,int indent,char *title,t_trnheader *sh) } } -static bool do_htrn(t_fileio *fio,bool bRead,t_trnheader *sh, +static gmx_bool do_htrn(t_fileio *fio,gmx_bool bRead,t_trnheader *sh, rvec *box,rvec *x,rvec *v,rvec *f) { matrix pv; - bool bOK; + gmx_bool bOK; bOK = TRUE; if (sh->box_size != 0) bOK = bOK && gmx_fio_ndo_rvec(fio,box,DIM); @@ -162,11 +162,11 @@ static bool do_htrn(t_fileio *fio,bool bRead,t_trnheader *sh, return bOK; } -static bool do_trn(t_fileio *fio,bool bRead,int *step,real *t,real *lambda, +static gmx_bool do_trn(t_fileio *fio,gmx_bool bRead,int *step,real *t,real *lambda, rvec *box,int *natoms,rvec *x,rvec *v,rvec *f) { t_trnheader *sh; - bool bOK; + gmx_bool bOK; snew(sh,1); if (!bRead) { @@ -212,7 +212,7 @@ static bool do_trn(t_fileio *fio,bool bRead,int *step,real *t,real *lambda, void read_trnheader(const char *fn,t_trnheader *trn) { t_fileio *fio; - bool bOK; + gmx_bool bOK; fio = open_trn(fn,"r"); if (!do_trnheader(fio,TRUE,trn,&bOK)) @@ -220,7 +220,7 @@ void read_trnheader(const char *fn,t_trnheader *trn) close_trn(fio); } -bool fread_trnheader(t_fileio *fio,t_trnheader *trn, bool *bOK) +gmx_bool fread_trnheader(t_fileio *fio,t_trnheader *trn, gmx_bool *bOK) { return do_trnheader(fio,TRUE,trn,bOK); } @@ -255,13 +255,13 @@ void fwrite_trn(t_fileio *fio,int step,real t,real lambda, } -bool fread_trn(t_fileio *fio,int *step,real *t,real *lambda, +gmx_bool fread_trn(t_fileio *fio,int *step,real *t,real *lambda, rvec *box,int *natoms,rvec *x,rvec *v,rvec *f) { return do_trn(fio,TRUE,step,t,lambda,box,natoms,x,v,f); } -bool fread_htrn(t_fileio *fio,t_trnheader *trn,rvec *box,rvec *x,rvec *v, +gmx_bool fread_htrn(t_fileio *fio,t_trnheader *trn,rvec *box,rvec *x,rvec *v, rvec *f) { return do_htrn(fio,TRUE,trn,box,x,v,f); diff --git a/src/gmxlib/trxio.c b/src/gmxlib/trxio.c index 4bd9f29d3a..15673782dc 100644 --- a/src/gmxlib/trxio.c +++ b/src/gmxlib/trxio.c @@ -73,7 +73,7 @@ struct t_trxstatus eFileFormat eFF; int NATOMS; double DT,BOX[3]; - bool bReadBox; + gmx_bool bReadBox; }; static void initcount(t_trxstatus *status) @@ -106,7 +106,7 @@ static void printcount_(t_trxstatus *status, const output_env_t oenv, } static void printcount(t_trxstatus *status, const output_env_t oenv,real t, - bool bSkip) + gmx_bool bSkip) { status->__frame++; printcount_(status, oenv,bSkip ? "Skipping frame" : "Reading frame",t); @@ -144,7 +144,7 @@ t_fileio *trx_get_fileio(t_trxstatus *status) -void clear_trxframe(t_trxframe *fr,bool bFirst) +void clear_trxframe(t_trxframe *fr,gmx_bool bFirst) { fr->not_ok = 0; fr->bTitle = FALSE; @@ -391,10 +391,10 @@ t_trxstatus *open_trx(const char *outfile,const char *filemode) return stat; } -static bool gmx_next_frame(t_trxstatus *status,t_trxframe *fr) +static gmx_bool gmx_next_frame(t_trxstatus *status,t_trxframe *fr) { t_trnheader sh; - bool bOK,bRet; + gmx_bool bOK,bRet; bRet = FALSE; @@ -515,7 +515,7 @@ static void choose_ff(FILE *fp) } } -static bool do_read_xyz(t_trxstatus *status, FILE *fp,int natoms, +static gmx_bool do_read_xyz(t_trxstatus *status, FILE *fp,int natoms, rvec x[],matrix box) { int i,m; @@ -542,7 +542,7 @@ static bool do_read_xyz(t_trxstatus *status, FILE *fp,int natoms, return TRUE; } -static bool xyz_next_x(t_trxstatus *status, FILE *fp, const output_env_t oenv, +static gmx_bool xyz_next_x(t_trxstatus *status, FILE *fp, const output_env_t oenv, real *t, int natoms, rvec x[], matrix box) /* Reads until a new x can be found (return TRUE) * or eof (return FALSE) @@ -597,7 +597,7 @@ static int xyz_first_x(t_trxstatus *status, FILE *fp, const output_env_t oenv, return status->NATOMS; } -static bool pdb_next_x(t_trxstatus *status, FILE *fp,t_trxframe *fr) +static gmx_bool pdb_next_x(t_trxstatus *status, FILE *fp,t_trxframe *fr) { t_atoms atoms; matrix boxpdb; @@ -666,11 +666,11 @@ static int pdb_first_x(t_trxstatus *status, FILE *fp, t_trxframe *fr) return fr->natoms; } -bool read_next_frame(const output_env_t oenv,t_trxstatus *status,t_trxframe *fr) +gmx_bool read_next_frame(const output_env_t oenv,t_trxstatus *status,t_trxframe *fr) { real pt; int ct; - bool bOK,bRet,bMissingData=FALSE,bSkip=FALSE; + gmx_bool bOK,bRet,bMissingData=FALSE,bSkip=FALSE; int dummy=0; bRet = FALSE; @@ -776,7 +776,7 @@ int read_first_frame(const output_env_t oenv,t_trxstatus **status, const char *fn,t_trxframe *fr,int flags) { t_fileio *fio; - bool bFirst,bOK; + gmx_bool bFirst,bOK; int dummy=0; clear_trxframe(fr,TRUE); @@ -903,10 +903,10 @@ int read_first_x(const output_env_t oenv,t_trxstatus **status,const char *fn, return (*status)->xframe->natoms; } -bool read_next_x(const output_env_t oenv, t_trxstatus *status,real *t, +gmx_bool read_next_x(const output_env_t oenv, t_trxstatus *status,real *t, int natoms, rvec x[], matrix box) { - bool bRet; + gmx_bool bRet; status->xframe->x= x; /*xframe[status].x = x;*/ @@ -959,11 +959,11 @@ int read_first_v(const output_env_t oenv, t_trxstatus **status,const char *fn, return fr.natoms; } -bool read_next_v(const output_env_t oenv,t_trxstatus *status,real *t, +gmx_bool read_next_v(const output_env_t oenv,t_trxstatus *status,real *t, int natoms,rvec v[], matrix box) { t_trxframe fr; - bool bRet; + gmx_bool bRet; clear_trxframe(&fr,TRUE); fr.flags = TRX_NEED_V; diff --git a/src/gmxlib/txtdump.c b/src/gmxlib/txtdump.c index 29bcd020c6..1314861cac 100644 --- a/src/gmxlib/txtdump.c +++ b/src/gmxlib/txtdump.c @@ -91,7 +91,7 @@ int pr_title_nxn(FILE *fp,int indent,const char *title,int n1,int n2) return (indent+INDENT); } -void pr_ivec(FILE *fp,int indent,const char *title,int vec[],int n, bool bShowNumbers) +void pr_ivec(FILE *fp,int indent,const char *title,int vec[],int n, gmx_bool bShowNumbers) { int i; @@ -106,7 +106,7 @@ void pr_ivec(FILE *fp,int indent,const char *title,int vec[],int n, bool bShowNu } } -void pr_ivec_block(FILE *fp,int indent,const char *title,int vec[],int n, bool bShowNumbers) +void pr_ivec_block(FILE *fp,int indent,const char *title,int vec[],int n, gmx_bool bShowNumbers) { int i,j; @@ -146,7 +146,7 @@ void pr_ivec_block(FILE *fp,int indent,const char *title,int vec[],int n, bool b } } -void pr_bvec(FILE *fp,int indent,const char *title,bool vec[],int n, bool bShowNumbers) +void pr_bvec(FILE *fp,int indent,const char *title,gmx_bool vec[],int n, gmx_bool bShowNumbers) { int i; @@ -162,7 +162,7 @@ void pr_bvec(FILE *fp,int indent,const char *title,bool vec[],int n, bool bShowN } } -void pr_ivecs(FILE *fp,int indent,const char *title,ivec vec[],int n, bool bShowNumbers) +void pr_ivecs(FILE *fp,int indent,const char *title,ivec vec[],int n, gmx_bool bShowNumbers) { int i,j; @@ -183,7 +183,7 @@ void pr_ivecs(FILE *fp,int indent,const char *title,ivec vec[],int n, bool bShow } } -void pr_rvec(FILE *fp,int indent,const char *title,real vec[],int n, bool bShowNumbers) +void pr_rvec(FILE *fp,int indent,const char *title,real vec[],int n, gmx_bool bShowNumbers) { int i; @@ -198,7 +198,7 @@ void pr_rvec(FILE *fp,int indent,const char *title,real vec[],int n, bool bShowN } } -void pr_dvec(FILE *fp,int indent,const char *title,double vec[],int n, bool bShowNumbers) +void pr_dvec(FILE *fp,int indent,const char *title,double vec[],int n, gmx_bool bShowNumbers) { int i; @@ -359,7 +359,7 @@ void pr_qm_opts(FILE *fp,int indent,const char *title,t_grpopts *opts) } static void pr_grp_opts(FILE *out,int indent,const char *title,t_grpopts *opts, - bool bMDPformat) + gmx_bool bMDPformat) { int i,m,j; @@ -435,7 +435,7 @@ static void pr_grp_opts(FILE *out,int indent,const char *title,t_grpopts *opts, } static void pr_matrix(FILE *fp,int indent,const char *title,rvec *m, - bool bMDPformat) + gmx_bool bMDPformat) { if (bMDPformat) fprintf(fp,"%-10s = %g %g %g %g %g %g\n",title, @@ -445,7 +445,7 @@ static void pr_matrix(FILE *fp,int indent,const char *title,rvec *m, } static void pr_cosine(FILE *fp,int indent,const char *title,t_cosines *cos, - bool bMDPformat) + gmx_bool bMDPformat) { int j; @@ -509,7 +509,7 @@ static void pr_pull(FILE *fp,int indent,t_pull *pull) } void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir, - bool bMDPformat) + gmx_bool bMDPformat) { const char *infbuf="inf"; int i; @@ -909,7 +909,7 @@ void pr_iparams(FILE *fp,t_functype ftype,t_iparams *iparams) } void pr_ilist(FILE *fp,int indent,const char *title, - t_functype *functype,t_ilist *ilist, bool bShowNumbers) + t_functype *functype,t_ilist *ilist, gmx_bool bShowNumbers) { int i,j,k,type,ftype; t_iatom *iatoms; @@ -946,7 +946,7 @@ void pr_ilist(FILE *fp,int indent,const char *title, } static void pr_cmap(FILE *fp, int indent, const char *title, - gmx_cmap_t *cmap_grid, bool bShowNumbers) + gmx_cmap_t *cmap_grid, gmx_bool bShowNumbers) { int i,j,nelem; real dx,idx; @@ -986,7 +986,7 @@ static void pr_cmap(FILE *fp, int indent, const char *title, void pr_ffparams(FILE *fp,int indent,const char *title, gmx_ffparams_t *ffparams, - bool bShowNumbers) + gmx_bool bShowNumbers) { int i,j; @@ -1007,7 +1007,7 @@ void pr_ffparams(FILE *fp,int indent,const char *title, pr_cmap(fp,indent,"cmap",&ffparams->cmap_grid,bShowNumbers); } -void pr_idef(FILE *fp,int indent,const char *title,t_idef *idef, bool bShowNumbers) +void pr_idef(FILE *fp,int indent,const char *title,t_idef *idef, gmx_bool bShowNumbers) { int i,j; @@ -1060,7 +1060,7 @@ static int pr_blocka_title(FILE *fp,int indent,const char *title,t_blocka *block return indent; } -static void low_pr_block(FILE *fp,int indent,const char *title,t_block *block, bool bShowNumbers) +static void low_pr_block(FILE *fp,int indent,const char *title,t_block *block, gmx_bool bShowNumbers) { int i; @@ -1076,7 +1076,7 @@ static void low_pr_block(FILE *fp,int indent,const char *title,t_block *block, b } } -static void low_pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block, bool bShowNumbers) +static void low_pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block, gmx_bool bShowNumbers) { int i; @@ -1098,7 +1098,7 @@ static void low_pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block, } } -void pr_block(FILE *fp,int indent,const char *title,t_block *block,bool bShowNumbers) +void pr_block(FILE *fp,int indent,const char *title,t_block *block,gmx_bool bShowNumbers) { int i,j,ok,size,start,end; @@ -1125,7 +1125,7 @@ void pr_block(FILE *fp,int indent,const char *title,t_block *block,bool bShowNum } } -void pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block,bool bShowNumbers) +void pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block,gmx_bool bShowNumbers) { int i,j,ok,size,start,end; @@ -1169,7 +1169,7 @@ void pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block,bool bShowN } } -static void pr_strings(FILE *fp,int indent,const char *title,char ***nm,int n, bool bShowNumbers) +static void pr_strings(FILE *fp,int indent,const char *title,char ***nm,int n, gmx_bool bShowNumbers) { int i; @@ -1186,7 +1186,7 @@ static void pr_strings(FILE *fp,int indent,const char *title,char ***nm,int n, b } static void pr_strings2(FILE *fp,int indent,const char *title, - char ***nm,char ***nmB,int n, bool bShowNumbers) + char ***nm,char ***nmB,int n, gmx_bool bShowNumbers) { int i; @@ -1202,7 +1202,7 @@ static void pr_strings2(FILE *fp,int indent,const char *title, } } -static void pr_resinfo(FILE *fp,int indent,const char *title,t_resinfo *resinfo,int n, bool bShowNumbers) +static void pr_resinfo(FILE *fp,int indent,const char *title,t_resinfo *resinfo,int n, gmx_bool bShowNumbers) { int i; @@ -1238,7 +1238,7 @@ static void pr_atom(FILE *fp,int indent,const char *title,t_atom *atom,int n) } static void pr_grps(FILE *fp,int indent,const char *title,t_grps grps[], - char **grpname[], bool bShowNumbers) + char **grpname[], gmx_bool bShowNumbers) { int i,j; @@ -1255,7 +1255,7 @@ static void pr_grps(FILE *fp,int indent,const char *title,t_grps grps[], static void pr_groups(FILE *fp,int indent,const char *title, gmx_groups_t *groups, - bool bShowNumbers) + gmx_bool bShowNumbers) { int grpnr[egcNR]; int nat_max,i,g; @@ -1308,7 +1308,7 @@ static void pr_groups(FILE *fp,int indent,const char *title, } void pr_atoms(FILE *fp,int indent,const char *title,t_atoms *atoms, - bool bShownumbers) + gmx_bool bShownumbers) { if (available(fp,atoms,indent,title)) { @@ -1322,7 +1322,7 @@ void pr_atoms(FILE *fp,int indent,const char *title,t_atoms *atoms, void pr_atomtypes(FILE *fp,int indent,const char *title,t_atomtypes *atomtypes, - bool bShowNumbers) + gmx_bool bShowNumbers) { int i; if (available(fp,atomtypes,indent,title)) @@ -1342,7 +1342,7 @@ void pr_atomtypes(FILE *fp,int indent,const char *title,t_atomtypes *atomtypes, static void pr_moltype(FILE *fp,int indent,const char *title, gmx_moltype_t *molt,int n, gmx_ffparams_t *ffparams, - bool bShowNumbers) + gmx_bool bShowNumbers) { int j; @@ -1361,7 +1361,7 @@ static void pr_moltype(FILE *fp,int indent,const char *title, static void pr_molblock(FILE *fp,int indent,const char *title, gmx_molblock_t *molb,int n, gmx_moltype_t *molt, - bool bShowNumbers) + gmx_bool bShowNumbers) { indent = pr_title_n(fp,indent,title,n); (void) pr_indent(fp,indent); @@ -1380,7 +1380,7 @@ static void pr_molblock(FILE *fp,int indent,const char *title, } void pr_mtop(FILE *fp,int indent,const char *title,gmx_mtop_t *mtop, - bool bShowNumbers) + gmx_bool bShowNumbers) { int mt,mb; @@ -1403,7 +1403,7 @@ void pr_mtop(FILE *fp,int indent,const char *title,gmx_mtop_t *mtop, } } -void pr_top(FILE *fp,int indent,const char *title,t_topology *top, bool bShowNumbers) +void pr_top(FILE *fp,int indent,const char *title,t_topology *top, gmx_bool bShowNumbers) { if (available(fp,top,indent,title)) { indent=pr_title(fp,indent,title); diff --git a/src/gmxlib/typedefs.c b/src/gmxlib/typedefs.c index f51a42d693..d1ff5890c4 100644 --- a/src/gmxlib/typedefs.c +++ b/src/gmxlib/typedefs.c @@ -53,13 +53,13 @@ -static bool bOverAllocDD=FALSE; +static gmx_bool bOverAllocDD=FALSE; #ifdef GMX_THREADS static tMPI_Thread_mutex_t over_alloc_mutex=TMPI_THREAD_MUTEX_INITIALIZER; #endif -void set_over_alloc_dd(bool set) +void set_over_alloc_dd(gmx_bool set) { #ifdef GMX_THREADS tMPI_Thread_mutex_lock(&over_alloc_mutex); @@ -196,7 +196,7 @@ void init_inputrec(t_inputrec *ir) memset(ir,0,(size_t)sizeof(*ir)); } -void stupid_fill_block(t_block *grp,int natom,bool bOneIndexGroup) +void stupid_fill_block(t_block *grp,int natom,gmx_bool bOneIndexGroup) { int i; @@ -318,7 +318,7 @@ void done_molblock(gmx_molblock_t *molb) } } -void done_mtop(gmx_mtop_t *mtop,bool bDoneSymtab) +void done_mtop(gmx_mtop_t *mtop,gmx_bool bDoneSymtab) { int i; @@ -543,7 +543,7 @@ void done_state(t_state *state) state->cg_gl_nalloc = 0; } -static void do_box_rel(t_inputrec *ir,matrix box_rel,matrix b,bool bInit) +static void do_box_rel(t_inputrec *ir,matrix box_rel,matrix b,gmx_bool bInit) { int d,d2; @@ -619,7 +619,7 @@ void add_t_atoms(t_atoms *atoms,int natom_extra,int nres_extra) } } -void init_t_atoms(t_atoms *atoms, int natoms, bool bPdbinfo) +void init_t_atoms(t_atoms *atoms, int natoms, gmx_bool bPdbinfo) { atoms->nr=natoms; atoms->nres=0; @@ -681,7 +681,7 @@ void t_atoms_set_resinfo(t_atoms *atoms,int atom_ind,t_symtab *symtab, ri->chainid = chainid; } -void free_t_atoms(t_atoms *atoms,bool bFreeNames) +void free_t_atoms(t_atoms *atoms,gmx_bool bFreeNames) { int i; diff --git a/src/gmxlib/vmdio.c b/src/gmxlib/vmdio.c index d4451a5be7..e0ed319d33 100644 --- a/src/gmxlib/vmdio.c +++ b/src/gmxlib/vmdio.c @@ -147,7 +147,7 @@ static int load_sharedlibrary_plugins(const char *fullpath,t_gmxvmdplugin* vmdpl } /*return: 1: success, 0: last frame, -1: error*/ -bool read_next_vmd_frame(int status,t_trxframe *fr) +gmx_bool read_next_vmd_frame(int status,t_trxframe *fr) { int rc,i; rvec vec, angle; diff --git a/src/gmxlib/warninp.c b/src/gmxlib/warninp.c index 903623fa99..86bf5cb818 100644 --- a/src/gmxlib/warninp.c +++ b/src/gmxlib/warninp.c @@ -46,7 +46,7 @@ #include "warninp.h" typedef struct warninp { - bool bAllowWarnings; + gmx_bool bAllowWarnings; int nwarn_note; int nwarn_warn; int nwarn_error; @@ -55,7 +55,7 @@ typedef struct warninp { char filenm[256]; } t_warninp; -warninp_t init_warning(bool bAllowWarnings,int maxwarning) +warninp_t init_warning(gmx_bool bAllowWarnings,int maxwarning) { warninp_t wi; diff --git a/src/gmxlib/wman.c b/src/gmxlib/wman.c index 0e2fa8f540..117a2b3e2e 100644 --- a/src/gmxlib/wman.c +++ b/src/gmxlib/wman.c @@ -167,7 +167,7 @@ static void mynum(char *buf,int n) sprintf(buf,"0%1d",n); } -static char *mydate(char buf[], int maxsize,bool bWiki) +static char *mydate(char buf[], int maxsize,gmx_bool bWiki) { const char *mon[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; @@ -274,7 +274,7 @@ static char *repallww(const char *s,int nsr,const t_sandr sa[]) return buf1; } -static char *html_xref(char *s,const char *program, t_linkdata *links,bool bWiki) +static char *html_xref(char *s,const char *program, t_linkdata *links,gmx_bool bWiki) { char buf[256],**filestr; int i,j,n; @@ -517,7 +517,7 @@ char *check_tty(const char *s) void print_tty_formatted(FILE *out, int nldesc, const char **desc,int indent, - t_linkdata *links,const char *program,bool bWiki) + t_linkdata *links,const char *program,gmx_bool bWiki) { char *buf; char *temp; @@ -552,7 +552,7 @@ static void write_ttyman(FILE *out, int nldesc,const char **desc, int nfile,t_filenm *fnm, int npargs,t_pargs *pa, - int nbug,const char **bugs,bool bHeader, + int nbug,const char **bugs,gmx_bool bHeader, t_linkdata *links) { int i; @@ -588,7 +588,7 @@ static void write_ttyman(FILE *out, } static void pr_html_files(FILE *out,int nfile,t_filenm fnm[], - const char *program,t_linkdata *links,bool bWiki) + const char *program,t_linkdata *links,gmx_bool bWiki) { int i; char link[10],tmp[255]; @@ -637,7 +637,7 @@ static void write_wikiman(FILE *out, int nldesc,const char **desc, int nfile,t_filenm *fnm, int npargs,t_pargs *pa, - int nbug,const char **bugs,bool bHeader, + int nbug,const char **bugs,gmx_bool bHeader, t_linkdata *links) { int i; @@ -936,7 +936,7 @@ static void write_py(FILE *out,const char *program, int nbug,const char **bugs, t_linkdata *links) { - bool bHidden; + gmx_bool bHidden; const char *cls = program; char *tmp; int i,j; @@ -985,7 +985,7 @@ static void write_py(FILE *out,const char *program, break; case etSTR: case etBOOL: - fprintf(out," flags.append(pca_bool(\"%s\",\"%s\",%d,%d))\n", + fprintf(out," flags.append(pca_gmx_bool(\"%s\",\"%s\",%d,%d))\n", pa[i].option,pa[i].desc,*pa[i].u.b,is_hidden(&(pa[i]))); break; case etRVEC: @@ -1020,7 +1020,7 @@ void write_man(FILE *out,const char *mantp, int nfile,t_filenm *fnm, int npargs,t_pargs *pa, int nbug,const char **bugs, - bool bHidden) + gmx_bool bHidden) { const char *pr; int i,npar; diff --git a/src/gmxlib/writeps.c b/src/gmxlib/writeps.c index ae39f25a98..1854893ab4 100644 --- a/src/gmxlib/writeps.c +++ b/src/gmxlib/writeps.c @@ -286,7 +286,7 @@ void ps_text(t_psdata ps,real x1,real y1,const char *str) fprintf(ps->fp,"(%s) show\n",str); } -void ps_flip(t_psdata ps,bool bPlus) +void ps_flip(t_psdata ps,gmx_bool bPlus) { if (bPlus) fprintf(ps->fp,"612.5 0 translate 90 rotate\n"); diff --git a/src/gmxlib/xtcio.c b/src/gmxlib/xtcio.c index 337123d7c2..3c651ab988 100644 --- a/src/gmxlib/xtcio.c +++ b/src/gmxlib/xtcio.c @@ -49,7 +49,7 @@ #define XTC_MAGIC 1995 -static int xdr_r2f(XDR *xdrs,real *r,bool bRead) +static int xdr_r2f(XDR *xdrs,real *r,gmx_bool bRead) { #ifdef GMX_DOUBLE float f; @@ -85,7 +85,7 @@ static void check_xtc_magic(int magic) magic,XTC_MAGIC); } -int xtc_check(const char *str,bool bResult,const char *file,int line) +int xtc_check(const char *str,gmx_bool bResult,const char *file,int line) { if (!bResult) { if (debug) @@ -96,7 +96,7 @@ int xtc_check(const char *str,bool bResult,const char *file,int line) return 1; } -void xtc_check_fat_err(const char *str,bool bResult,const char *file,int line) +void xtc_check_fat_err(const char *str,gmx_bool bResult,const char *file,int line) { if (!bResult) { gmx_fatal(FARGS,"XTC read/write of %s failed, " @@ -105,7 +105,7 @@ void xtc_check_fat_err(const char *str,bool bResult,const char *file,int line) } static int xtc_header(XDR *xd,int *magic,int *natoms,int *step,real *time, - bool bRead,bool *bOK) + gmx_bool bRead,gmx_bool *bOK) { int result; @@ -121,7 +121,7 @@ static int xtc_header(XDR *xd,int *magic,int *natoms,int *step,real *time, return result; } -static int xtc_coord(XDR *xd,int *natoms,matrix box,rvec *x,real *prec, bool bRead) +static int xtc_coord(XDR *xd,int *natoms,matrix box,rvec *x,real *prec, gmx_bool bRead) { int i,j,result; #ifdef GMX_DOUBLE @@ -182,7 +182,7 @@ int write_xtc(t_fileio *fio, { int magic_number = XTC_MAGIC; XDR *xd; - bool bDum; + gmx_bool bDum; int bOK; xd = gmx_fio_getxdr(fio); @@ -206,7 +206,7 @@ int write_xtc(t_fileio *fio, } int read_first_xtc(t_fileio *fio,int *natoms,int *step,real *time, - matrix box,rvec **x,real *prec,bool *bOK) + matrix box,rvec **x,real *prec,gmx_bool *bOK) { int magic; XDR *xd; @@ -230,7 +230,7 @@ int read_first_xtc(t_fileio *fio,int *natoms,int *step,real *time, int read_next_xtc(t_fileio* fio, int natoms,int *step,real *time, - matrix box,rvec *x,real *prec,bool *bOK) + matrix box,rvec *x,real *prec,gmx_bool *bOK) { int magic; int n; diff --git a/src/gmxlib/xvgr.c b/src/gmxlib/xvgr.c index d565ea154c..7669685bcd 100644 --- a/src/gmxlib/xvgr.c +++ b/src/gmxlib/xvgr.c @@ -61,7 +61,7 @@ char * gmx_ctime_r(const time_t *clock,char *buf, int n); -bool output_env_get_print_xvgr_codes(const output_env_t oenv) +gmx_bool output_env_get_print_xvgr_codes(const output_env_t oenv) { int xvg_format; @@ -77,7 +77,7 @@ static char *xvgrstr(const char *gmx,const output_env_t oenv, const char *sym[]={ "beta", "chi", "delta", "eta", "lambda", "mu", "omega", "phi", "psi", "rho", "theta", NULL }; const char symc[]={ 'b', 'c', 'd', 'h', 'l', 'm', 'w', 'f', 'y', 'r', 'q', '\0' }; int xvgf; - bool bXVGR; + gmx_bool bXVGR; int g,b,i; char c; @@ -643,7 +643,7 @@ void write_xvg(const char *fn,const char *title,int nx,int ny,real **y, } real **read_xvg_time(const char *fn, - bool bHaveT,bool bTB,real tb,bool bTE,real te, + gmx_bool bHaveT,gmx_bool bTB,real tb,gmx_bool bTE,real te, int nsets_in,int *nset,int *nval,real *dt,real **t) { FILE *fp; @@ -652,7 +652,7 @@ real **read_xvg_time(const char *fn, char *line; int t_nalloc,*val_nalloc,a,narg,n,sin,set,nchar; double dbl,tend=0; - bool bEndOfSet,bTimeInRange,bFirstLine=TRUE; + gmx_bool bEndOfSet,bTimeInRange,bFirstLine=TRUE; real **val; t_nalloc = 0; diff --git a/src/kernel/add_par.c b/src/kernel/add_par.c index 02b296e9da..e2811b088a 100644 --- a/src/kernel/add_par.c +++ b/src/kernel/add_par.c @@ -169,7 +169,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, bool bSwapParity) +void add_vsite3_atoms(t_params *ps,int ai,int aj,int ak,int al, gmx_bool bSwapParity) { pr_alloc(1,ps); ps->param[ps->nr].AI=ai; @@ -198,7 +198,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,bool bNterm) +int search_jtype(t_restp *rtp,char *name,gmx_bool bNterm) { int niter,iter,j,k,kmax,jmax,minstrlen; char *rtpname,searchname[12]; diff --git a/src/kernel/add_par.h b/src/kernel/add_par.h index 36605b19c7..5362e7db60 100644 --- a/src/kernel/add_par.h +++ b/src/kernel/add_par.h @@ -53,7 +53,7 @@ extern void add_cmap_param(t_params *ps,int ai,int aj,int ak,int al,int am, extern void add_vsite2_atoms(t_params *ps, int ai, int aj, int ak); extern void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al, - bool bSwapParity); + gmx_bool bSwapParity); extern void add_vsite2_param(t_params *ps, int ai, int aj, int ak, real c0); @@ -63,6 +63,6 @@ extern void add_vsite3_param(t_params *ps, int ai, int aj, int ak, int al, extern void add_vsite4_atoms(t_params *ps, int ai, int aj, int ak, int al, int am); -extern int search_jtype(t_restp *rp,char *name,bool bFirstRes); +extern int search_jtype(t_restp *rp,char *name,gmx_bool bFirstRes); #endif /* _add_par_h */ diff --git a/src/kernel/convparm.c b/src/kernel/convparm.c index 4f720e3cba..e9bd01b815 100644 --- a/src/kernel/convparm.c +++ b/src/kernel/convparm.c @@ -369,7 +369,7 @@ static void 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,bool bAppend) + int start,gmx_bool bAppend) { t_iparams newparam; int type; @@ -413,7 +413,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, - bool bNB,bool bAppend) + gmx_bool bNB,gmx_bool bAppend) { int k,type,nr,nral,delta,start; diff --git a/src/kernel/do_gct.c b/src/kernel/do_gct.c index 1e07820b7b..cf9c4a805a 100644 --- a/src/kernel/do_gct.c +++ b/src/kernel/do_gct.c @@ -407,8 +407,8 @@ static real calc_deviation(real xav,real xt,real x0) static real calc_dist(FILE *log,rvec x[]) { - static bool bFirst=TRUE; - static bool bDist; + static gmx_bool bFirst=TRUE; + static gmx_bool bDist; static int i1,i2; char *buf; rvec dx; @@ -473,24 +473,24 @@ static void dump_fm(FILE *fp,int n,real f[],char *s) void do_coupling(FILE *log,const output_env_t oenv,int nfile, const t_filenm fnm[], t_coupl_rec *tcr,real t, int step,real ener[], t_forcerec *fr,t_inputrec *ir, - bool bMaster, t_mdatoms *md,t_idef *idef,real mu_aver,int nmols, + gmx_bool bMaster, t_mdatoms *md,t_idef *idef,real mu_aver,int nmols, t_commrec *cr,matrix box,tensor virial, tensor pres,rvec mu_tot, - rvec x[],rvec f[],bool bDoIt) + rvec x[],rvec f[],gmx_bool bDoIt) { #define enm2Debye 48.0321 #define d2e(x) (x)/enm2Debye #define enm2kjmol(x) (x)*0.0143952 /* = 2.0*4.0*M_PI*EPSILON0 */ static real *f6,*f12,*fa,*fb,*fc,*fq; - static bool bFirst = TRUE; + static gmx_bool bFirst = TRUE; int i,j,ati,atj,atnr2,type,ftype; real deviation[eoObsNR],prdev[eoObsNR],epot0,dist,rmsf; real ff6,ff12,ffa,ffb,ffc,ffq,factor,dt,mu_ind; real Epol,Eintern,Virial,muabs,xiH=-1,xiS=-1,xi6,xi12; rvec fmol[2]; - bool bTest,bPrint; + gmx_bool bTest,bPrint; t_coupl_LJ *tclj; t_coupl_BU *tcbu; t_coupl_Q *tcq; diff --git a/src/kernel/fflibutil.c b/src/kernel/fflibutil.c index 95fdec116c..2bce836849 100644 --- a/src/kernel/fflibutil.c +++ b/src/kernel/fflibutil.c @@ -142,9 +142,9 @@ static void sort_filenames(int n,char **name,char **name2) } static int low_fflib_search_file_end(const char *ffdir, - bool bAddCWD, + gmx_bool bAddCWD, const char *file_end, - bool bFatalError, + gmx_bool bFatalError, char ***filenames, char ***filenames_short) { @@ -152,7 +152,7 @@ static int low_fflib_search_file_end(const char *ffdir, char *lib,*dir; char buf[1024]; char *libpath; - bool env_is_set; + gmx_bool env_is_set; int len_fe,len_name; char **fns,**fns_short; char dir_print[GMX_PATH_MAX]; @@ -291,7 +291,7 @@ static int low_fflib_search_file_end(const char *ffdir, int fflib_search_file_end(const char *ffdir, const char *file_end, - bool bFatalError, + gmx_bool bFatalError, char ***filenames) { return low_fflib_search_file_end(ffdir,FALSE,file_end,bFatalError, @@ -344,7 +344,7 @@ int fflib_search_file_in_dirend(const char *filename,const char *dirend, return n; } -bool fflib_fexist(const char *file) +gmx_bool fflib_fexist(const char *file) { char *file_fullpath; diff --git a/src/kernel/fflibutil.h b/src/kernel/fflibutil.h index 7190e65ad7..b541695369 100644 --- a/src/kernel/fflibutil.h +++ b/src/kernel/fflibutil.h @@ -64,7 +64,7 @@ extern void fflib_filename_base(const char *filename,char *filebase,int maxlen); extern int fflib_search_file_end(const char *ffdir, const char *file_end, - bool bFatalError, + gmx_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. @@ -77,7 +77,7 @@ extern int fflib_search_file_in_dirend(const char *filename,const char *dirend, * ending on dirend. * Return the number of files and the directory names in dirnames. */ -extern bool fflib_fexist(const char *file); +extern gmx_bool fflib_fexist(const char *file); /* Check if a file exists in the force field library */ extern FILE *fflib_open(const char *file); diff --git a/src/kernel/g_protonate.c b/src/kernel/g_protonate.c index 5ac1b28a44..e8bc2aec21 100644 --- a/src/kernel/g_protonate.c +++ b/src/kernel/g_protonate.c @@ -81,7 +81,7 @@ int main (int argc,char *argv[]) int nidx,natoms,natoms_out; matrix box; int i,frame,resind; - bool bReadMultiple; + gmx_bool bReadMultiple; output_env_t oenv; t_filenm fnm[] = { diff --git a/src/kernel/g_x2top.c b/src/kernel/g_x2top.c index 40232eb44f..d02d5cd54c 100644 --- a/src/kernel/g_x2top.c +++ b/src/kernel/g_x2top.c @@ -96,7 +96,7 @@ static real set_x_blen(real scale) return maxlen*MARGIN_FAC; } -static bool is_bond(int nnm,t_nm2type nmt[],char *ai,char *aj,real blen) +static gmx_bool is_bond(int nnm,t_nm2type nmt[],char *ai,char *aj,real blen) { int i,j; @@ -128,7 +128,7 @@ static int get_atype(char *nm) void mk_bonds(int nnm,t_nm2type nmt[], t_atoms *atoms,rvec x[],t_params *bond,int nbond[],char *ff, - bool bPBC,matrix box,gmx_atomprop_t aps) + gmx_bool bPBC,matrix box,gmx_atomprop_t aps) { t_param b; int i,j; @@ -170,7 +170,7 @@ void mk_bonds(int nnm,t_nm2type nmt[], fprintf(stderr,"\ratom %d\n",i); } -int *set_cgnr(t_atoms *atoms,bool bUsePDBcharge,real *qtot,real *mtot) +int *set_cgnr(t_atoms *atoms,gmx_bool bUsePDBcharge,real *qtot,real *mtot) { int i,n=1; int *cgnr; @@ -212,8 +212,8 @@ gpp_atomtype_t set_atom_type(t_symtab *tab,t_atoms *atoms,t_params *bonds, return atype; } -void lo_set_force_const(t_params *plist,real c[],int nrfp,bool bRound, - bool bDih,bool bParam) +void lo_set_force_const(t_params *plist,real c[],int nrfp,gmx_bool bRound, + gmx_bool bDih,gmx_bool bParam) { int i,j; double cc; @@ -248,8 +248,8 @@ void lo_set_force_const(t_params *plist,real c[],int nrfp,bool bRound, } } -void set_force_const(t_params plist[],real kb,real kt,real kp,bool bRound, - bool bParam) +void set_force_const(t_params plist[],real kb,real kt,real kp,gmx_bool bRound, + gmx_bool bParam) { int i; real c[MAXFORCEPARAM]; @@ -264,7 +264,7 @@ void set_force_const(t_params plist[],real kb,real kt,real kp,bool bRound, lo_set_force_const(&plist[F_PDIHS],c,3,bRound,TRUE,bParam); } -void calc_angles_dihs(t_params *ang,t_params *dih,rvec x[],bool bPBC, +void calc_angles_dihs(t_params *ang,t_params *dih,rvec x[],gmx_bool bPBC, matrix box) { int i,ai,aj,ak,al,t1,t2,t3; @@ -410,7 +410,7 @@ int main(int argc, char *argv[]) int nres; /* number of molecules? */ int i,j,k,l,m,ndih; int epbc; - bool bRTP,bTOP,bOPLS; + gmx_bool bRTP,bTOP,bOPLS; t_symtab symtab; real cutoff,qtot,mtot; char n2t[STRLEN]; @@ -424,10 +424,10 @@ int main(int argc, char *argv[]) #define NFILE asize(fnm) static real scale = 1.1, kb = 4e5,kt = 400,kp = 5; static int nexcl = 3; - static bool bRemoveDih = FALSE; - static bool bParam = TRUE, bH14 = TRUE,bAllDih = FALSE,bRound = TRUE; - static bool bPairs = TRUE, bPBC = TRUE; - static bool bUsePDBcharge = FALSE,bVerbose=FALSE; + static gmx_bool bRemoveDih = FALSE; + static gmx_bool bParam = TRUE, bH14 = TRUE,bAllDih = FALSE,bRound = TRUE; + static gmx_bool bPairs = TRUE, bPBC = TRUE; + static gmx_bool bUsePDBcharge = FALSE,bVerbose=FALSE; static const char *molnm = "ICE"; static const char *ff = "oplsaa"; t_pargs pa[] = { diff --git a/src/kernel/gctio.c b/src/kernel/gctio.c index 364bdc1578..27d46ad660 100644 --- a/src/kernel/gctio.c +++ b/src/kernel/gctio.c @@ -276,7 +276,7 @@ void write_gct(const char *fn,t_coupl_rec *tcr,t_idef *idef) gmx_fio_fclose(fp); } -static bool add_lj(int *nLJ,t_coupl_LJ **tcLJ,char *s,bool bObsUsed[]) +static gmx_bool add_lj(int *nLJ,t_coupl_LJ **tcLJ,char *s,gmx_bool bObsUsed[]) { int j,ati,atj,eo; char buf[256]; @@ -313,7 +313,7 @@ static bool add_lj(int *nLJ,t_coupl_LJ **tcLJ,char *s,bool bObsUsed[]) return FALSE; } -static bool add_bu(int *nBU,t_coupl_BU **tcBU,char *s,bool bObsUsed[]) +static gmx_bool add_bu(int *nBU,t_coupl_BU **tcBU,char *s,gmx_bool bObsUsed[]) { int j,ati,atj,eo; char buf[256]; @@ -351,7 +351,7 @@ static bool add_bu(int *nBU,t_coupl_BU **tcBU,char *s,bool bObsUsed[]) return FALSE; } -static bool add_ip(int *nIP,t_coupl_iparams **tIP,char *s,int ftype,bool bObsUsed[]) +static gmx_bool add_ip(int *nIP,t_coupl_iparams **tIP,char *s,int ftype,gmx_bool bObsUsed[]) { int i,eo,type; char buf[256]; @@ -394,7 +394,7 @@ static bool add_ip(int *nIP,t_coupl_iparams **tIP,char *s,int ftype,bool bObsUse return FALSE; } -static bool add_q(int *nQ,t_coupl_Q **tcQ,char *s,bool bObsUsed[]) +static gmx_bool add_q(int *nQ,t_coupl_Q **tcQ,char *s,gmx_bool bObsUsed[]) { int j,ati,eo; char buf[256]; @@ -431,7 +431,7 @@ void read_gct(const char *fn,t_coupl_rec *tcr) warninp_t wi; t_inpfile *inp; int i,j,ninp,nQ,nLJ,nBU,nIP; - bool bWrong; + gmx_bool bWrong; wi = init_warning(FALSE,0); diff --git a/src/kernel/gen_ad.c b/src/kernel/gen_ad.c index 3bc80d14fa..4b6bdb700c 100644 --- a/src/kernel/gen_ad.c +++ b/src/kernel/gen_ad.c @@ -56,7 +56,7 @@ #include "resall.h" #include "gen_ad.h" -typedef bool (*peq)(t_param *p1, t_param *p2); +typedef gmx_bool (*peq)(t_param *p1, t_param *p2); static int acomp(const void *a1, const void *a2) { @@ -111,7 +111,7 @@ static int dcomp(const void *d1, const void *d2) } -static bool aeq(t_param *p1, t_param *p2) +static gmx_bool aeq(t_param *p1, t_param *p2) { if (p1->AJ!=p2->AJ) return FALSE; @@ -124,7 +124,7 @@ static bool aeq(t_param *p1, t_param *p2) -static bool deq(t_param *p1, t_param *p2) +static gmx_bool deq(t_param *p1, t_param *p2) { if (((p1->AJ==p2->AJ) && (p1->AK==p2->AK)) || ((p1->AJ==p2->AK) && (p1->AK==p2->AJ))) @@ -134,10 +134,10 @@ static bool deq(t_param *p1, t_param *p2) } -static bool remove_dih(t_param *p, int i, int np) +static gmx_bool remove_dih(t_param *p, int i, int np) /* check if dihedral p[i] should be removed */ { - bool bRem; + gmx_bool bRem; int j; if (p[i].c[MAXFORCEPARAM-1]==NOTSET) { @@ -158,7 +158,7 @@ static bool remove_dih(t_param *p, int i, int np) return bRem; } -static bool preq(t_param *p1, t_param *p2) +static gmx_bool preq(t_param *p1, t_param *p2) { if ((p1->AI==p2->AI) && (p1->AJ==p2->AJ)) return TRUE; @@ -286,7 +286,7 @@ static int eq_imp(atom_id a1[],atom_id a2[]) return TRUE; } -static bool ideq(t_param *p1, t_param *p2) +static gmx_bool ideq(t_param *p1, t_param *p2) { return eq_imp(p1->a,p2->a); } @@ -360,11 +360,11 @@ static int n_hydro(atom_id a[],char ***atomname) } static void clean_dih(t_param *dih, int *ndih,t_param idih[],int nidih, - t_atoms *atoms,bool bAlldih, bool bRemoveDih) + t_atoms *atoms,gmx_bool bAlldih, gmx_bool bRemoveDih) { int i,j,k,l; int *index,nind; - bool bIsSet,bKeep; + gmx_bool bIsSet,bKeep; int bestl,nh,minh; snew(index,*ndih+1); @@ -429,14 +429,14 @@ static void clean_dih(t_param *dih, int *ndih,t_param idih[],int nidih, } static int get_impropers(t_atoms *atoms,t_hackblock hb[],t_param **idih, - bool bAllowMissing) + gmx_bool bAllowMissing) { char *a0; t_rbondeds *idihs; t_rbonded *hbidih; int nidih,i,j,k,r,start,ninc,nalloc; atom_id ai[MAXATOMLIST]; - bool bStop; + gmx_bool bStop; ninc = 500; nalloc = ninc; @@ -496,7 +496,7 @@ static int nb_dist(t_nextnb *nnb,int ai,int aj) return NRE; } -bool is_hydro(t_atoms *atoms,int ai) +gmx_bool is_hydro(t_atoms *atoms,int ai) { return ((*(atoms->atomname[ai]))[0] == 'H'); } @@ -519,7 +519,7 @@ static void get_atomnames_min(int n,char **anm, } static void gen_excls(t_atoms *atoms, t_excls *excls, t_hackblock hb[], - bool bAllowMissing) + gmx_bool bAllowMissing) { int r; atom_id a,astart,i1,i2,itmp; @@ -634,9 +634,9 @@ void generate_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]) } } -void gen_pad(t_nextnb *nnb, t_atoms *atoms, int nrexcl, bool bH14, +void gen_pad(t_nextnb *nnb, t_atoms *atoms, int nrexcl, gmx_bool bH14, t_params plist[], t_excls excls[], t_hackblock hb[], - bool bAlldih, bool bRemoveDih, bool bAllowMissing) + gmx_bool bAlldih, gmx_bool bRemoveDih, gmx_bool bAllowMissing) { t_param *ang,*dih,*pai,*idih; t_rbondeds *hbang, *hbdih; @@ -646,7 +646,7 @@ void gen_pad(t_nextnb *nnb, t_atoms *atoms, int nrexcl, bool bH14, int ninc,maxang,maxdih,maxpai; int nang,ndih,npai,nidih,nbd; int nFound; - bool bFound,bExcl; + gmx_bool bFound,bExcl; /* These are the angles, dihedrals and pairs that we generate diff --git a/src/kernel/gen_vsite.c b/src/kernel/gen_vsite.c index ed25cc592c..ad743a6732 100644 --- a/src/kernel/gen_vsite.c +++ b/src/kernel/gen_vsite.c @@ -59,7 +59,7 @@ typedef struct { char atomtype[MAXNAME]; /* Type for the XH3/XH2 atom */ - bool isplanar; /* If true, the atomtype above and the three connected + gmx_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 */ @@ -278,7 +278,7 @@ static int nitrogen_is_planar(t_vsiteconf vsiteconflist[],int nvsiteconf,char at * and -1 if not found. */ int i,res; - bool found=FALSE; + gmx_bool found=FALSE; for(i=0;inhack; j++) { @@ -243,7 +243,7 @@ static void expand_hackblocks(t_atoms *pdba, t_hackblock hb[], int nterpairs, int *rN, int *rC) { int i,j; - bool bN,bC; + gmx_bool bN,bC; for(i=0; i < pdba->nr; i++) { bN = FALSE; @@ -298,13 +298,13 @@ static int check_atoms_present(t_atoms *pdba, int nab[], t_hack *ab[]) } static void calc_all_pos(t_atoms *pdba, rvec x[], int nab[], t_hack *ab[], - bool bCheckMissing) + gmx_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 */ - bool bFoundAll; + gmx_bool bFoundAll; jj = 0; @@ -370,9 +370,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, bool bCheckMissing, + int *rN, int *rC, gmx_bool bCheckMissing, int **nabptr, t_hack ***abptr, - bool bUpdate_pdba, bool bKeep_old_pdba) + gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba) { t_atoms *newpdba=NULL,*pdba=NULL; int nadd; @@ -381,7 +381,7 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[], t_hack **ab=NULL; t_hackblock *hb; rvec *xn; - bool bKeep_ab; + gmx_bool bKeep_ab; /* set flags for adding hydrogens (according to hdb) */ pdba=*pdbaptr; @@ -596,9 +596,9 @@ void deprotonate(t_atoms *atoms,rvec *x) 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, bool bAllowMissing, + int *rN, int *rC, gmx_bool bAllowMissing, int **nabptr, t_hack ***abptr, - bool bUpdate_pdba, bool bKeep_old_pdba) + gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba) { int nold,nnew,niter; @@ -630,7 +630,7 @@ int protonate(t_atoms **atomsptr,rvec **xptr,t_protonate *protdata) { #define NTERPAIRS 1 t_atoms *atoms; - bool bUpdate_pdba,bKeep_old_pdba; + gmx_bool bUpdate_pdba,bKeep_old_pdba; int nntdb,nctdb,nt,ct; int nadd; diff --git a/src/kernel/genhydro.h b/src/kernel/genhydro.h index ff52b3ff18..fb20ab0f82 100644 --- a/src/kernel/genhydro.h +++ b/src/kernel/genhydro.h @@ -43,9 +43,9 @@ extern 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, bool bMissing, + int *rN, int *rC, gmx_bool bMissing, int **nabptr, t_hack ***abptr, - bool bUpdate_pdba, bool bKeep_old_pdba); + gmx_bool bUpdate_pdba, gmx_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/kernel/gmxcheck.c b/src/kernel/gmxcheck.c index 227bb9da5b..04f61a763c 100644 --- a/src/kernel/gmxcheck.c +++ b/src/kernel/gmxcheck.c @@ -246,7 +246,7 @@ void chk_trj(const output_env_t oenv,const char *fn,const char *tpr,real tol) int j=-1,new_natoms,natoms; gmx_off_t fpos; real rdum,tt,old_t1,old_t2,prec; - bool bShowTimestep=TRUE,bOK,newline=FALSE; + gmx_bool bShowTimestep=TRUE,bOK,newline=FALSE; t_trxstatus *status; gmx_mtop_t mtop; gmx_localtop_t *top; @@ -371,7 +371,7 @@ void chk_tps(const char *fn, real vdw_fac, real bon_lo, real bon_hi) rvec dx; matrix box; t_pbc pbc; - bool bV,bX,bB,bFirst,bOut; + gmx_bool bV,bX,bB,bFirst,bOut; real r2,ekin,temp1,temp2,dist2,vdwfac2,bonlo2,bonhi2; real *atom_vdw; gmx_atomprop_t aps; @@ -548,7 +548,7 @@ void chk_enx(const char *fn) ener_file_t in; gmx_enxnm_t *enm=NULL; t_enxframe *fr; - bool bShowTStep; + gmx_bool bShowTStep; real t0,old_t1,old_t2; char buf[22]; @@ -639,10 +639,10 @@ int main(int argc,char *argv[]) static real vdw_fac=0.8; static real bon_lo=0.4; static real bon_hi=0.7; - static bool bRMSD=FALSE; + static gmx_bool bRMSD=FALSE; static real ftol=0.001; static real abstol=0.001; - static bool bCompAB=FALSE; + static gmx_bool bCompAB=FALSE; static char *lastener=NULL; static t_pargs pa[] = { { "-vdwfac", FALSE, etREAL, {&vdw_fac}, diff --git a/src/kernel/gmxdump.c b/src/kernel/gmxdump.c index 93a8a0f9dc..4cfa38438a 100644 --- a/src/kernel/gmxdump.c +++ b/src/kernel/gmxdump.c @@ -92,8 +92,8 @@ static void dump_top(FILE *fp,t_topology *top,char *tpr) sfree(types); } -static void list_tpx(const char *fn, bool bShowNumbers,const char *mdpfn, - bool bSysTop) +static void list_tpx(const char *fn, gmx_bool bShowNumbers,const char *mdpfn, + gmx_bool bSysTop) { FILE *gp; int fp,indent,i,j,**gcount,atot; @@ -213,7 +213,7 @@ static void list_trn(const char *fn) rvec *x,*v,*f; matrix box; t_trnheader trn; - bool bOK; + gmx_bool bOK; fpread = open_trn(fn,"r"); fpwrite = open_tpx(NULL,"w"); @@ -260,7 +260,7 @@ static void list_trn(const char *fn) close_trn(fpread); } -void list_xtc(const char *fn, bool bXVG) +void list_xtc(const char *fn, gmx_bool bXVG) { t_fileio *xd; int indent; @@ -269,7 +269,7 @@ void list_xtc(const char *fn, bool bXVG) matrix box; int nframe,natoms,step; real prec,time; - bool bOK; + gmx_bool bOK; xd = open_xtc(fn,"r"); read_first_xtc(xd,&natoms,&step,&time,box,&x,&prec,&bOK); @@ -301,7 +301,7 @@ void list_xtc(const char *fn, bool bXVG) close_xtc(xd); } -void list_trx(const char *fn,bool bXVG) +void list_trx(const char *fn,gmx_bool bXVG) { int ftp; @@ -319,7 +319,7 @@ void list_ene(const char *fn) { int ndr; ener_file_t in; - bool bCont; + gmx_bool bCont; gmx_enxnm_t *enm=NULL; t_enxframe *fr; int i,j,nre,b; @@ -482,9 +482,9 @@ int main(int argc,char *argv[]) output_env_t oenv; /* Command line options */ - static bool bXVG=FALSE; - static bool bShowNumbers=TRUE; - static bool bSysTop=FALSE; + static gmx_bool bXVG=FALSE; + static gmx_bool bShowNumbers=TRUE; + static gmx_bool bSysTop=FALSE; t_pargs pa[] = { { "-xvg", FALSE, etBOOL, {&bXVG}, "HIDDENXVG layout for xtc" }, { "-nr",FALSE, etBOOL, {&bShowNumbers},"Show index numbers in output (leaving them out makes comparison easier, but creates a useless topology)" }, diff --git a/src/kernel/gpp_atomtype.c b/src/kernel/gpp_atomtype.c index a5541f84f2..8478b0d550 100644 --- a/src/kernel/gpp_atomtype.c +++ b/src/kernel/gpp_atomtype.c @@ -330,7 +330,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; - bool bFound=FALSE; + gmx_bool bFound=FALSE; nn = *n; nrfp = NRFP(ftype); @@ -386,7 +386,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,bool bVerbose) + gpp_atomtype_t ga,gmx_bool bVerbose) { int i,j,k,l,molt,mi,mj,nat,nrfp,ftype,ntype; t_atoms *atoms; diff --git a/src/kernel/grompp.c b/src/kernel/grompp.c index e3d06e539a..2b0e76b257 100644 --- a/src/kernel/grompp.c +++ b/src/kernel/grompp.c @@ -199,7 +199,7 @@ static void check_vel(gmx_mtop_t *mtop,rvec v[]) } } -static bool nint_ftype(gmx_mtop_t *mtop,t_molinfo *mi,int ftype) +static gmx_bool nint_ftype(gmx_mtop_t *mtop,t_molinfo *mi,int ftype) { int nint,mb; @@ -278,12 +278,12 @@ 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,bool bZero, - bool bGenVel,bool bVerbose,t_state *state, + t_gromppopts *opts,t_inputrec *ir,gmx_bool bZero, + gmx_bool bGenVel,gmx_bool bVerbose,t_state *state, gpp_atomtype_t atype,gmx_mtop_t *sys, int *nmi,t_molinfo **mi,t_params plist[], int *comb,double *reppow,real *fudgeQQ, - bool bMorse, + gmx_bool bMorse, warninp_t wi) { t_molinfo *molinfo=NULL; @@ -292,12 +292,12 @@ new_status(const char *topfile,const char *topppfile,const char *confin, t_atoms *confat; int mb,i,nrmols,nmismatch; char buf[STRLEN]; - bool bGB=FALSE; + gmx_bool bGB=FALSE; char warn_buf[STRLEN]; init_mtop(sys); - /* Set boolean for GB */ + /* Set gmx_boolean for GB */ if(ir->implicit_solvent) bGB=TRUE; @@ -429,7 +429,7 @@ new_status(const char *topfile,const char *topppfile,const char *confin, } static void cont_status(const char *slog,const char *ener, - bool bNeedVel,bool bGenVel, real fr_time, + gmx_bool bNeedVel,gmx_bool bGenVel, real fr_time, t_inputrec *ir,t_state *state, gmx_mtop_t *sys, const output_env_t oenv) @@ -486,13 +486,13 @@ static void cont_status(const char *slog,const char *ener, } } -static void read_posres(gmx_mtop_t *mtop,t_molinfo *molinfo,bool bTopB, +static void read_posres(gmx_mtop_t *mtop,t_molinfo *molinfo,gmx_bool bTopB, char *fn, int rc_scaling, int ePBC, rvec com, warninp_t wi) { - bool bFirst = TRUE; + gmx_bool bFirst = TRUE; rvec *x,*v,*xp; dvec sum; double totmass; @@ -981,13 +981,13 @@ int main (int argc, char *argv[]) char fn[STRLEN],fnB[STRLEN]; const char *mdparin; int ntype; - bool bNeedVel,bGenVel; - bool have_atomnumber; + gmx_bool bNeedVel,bGenVel; + gmx_bool have_atomnumber; int n12,n13,n14; t_params *gb_plist = NULL; gmx_genborn_t *born = NULL; output_env_t oenv; - bool bVerbose = FALSE; + gmx_bool bVerbose = FALSE; warninp_t wi; char warn_buf[STRLEN]; @@ -1007,8 +1007,8 @@ int main (int argc, char *argv[]) #define NFILE asize(fnm) /* Command line options */ - static bool bRenum=TRUE; - static bool bRmVSBds=TRUE,bZero=FALSE; + static gmx_bool bRenum=TRUE; + static gmx_bool bRmVSBds=TRUE,bZero=FALSE; static int i,maxwarn=0; static real fr_time=-1; t_pargs pa[] = { diff --git a/src/kernel/hackblock.c b/src/kernel/hackblock.c index e0a1cdf712..c7086b9762 100644 --- a/src/kernel/hackblock.c +++ b/src/kernel/hackblock.c @@ -156,10 +156,10 @@ static void copy_t_rbonded(t_rbonded *s, t_rbonded *d) d->s = safe_strdup(s->s); } -static bool contains_char(t_rbonded *s,char c) +static gmx_bool contains_char(t_rbonded *s,char c) { int i; - bool bRet; + gmx_bool bRet; bRet = FALSE; for(i=0; insim); @@ -306,30 +306,34 @@ static void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_nrnb *nrnb, t_vcm *vcm, gmx_wallcycle_t wcycle, gmx_enerdata_t *enerd,tensor force_vir, tensor shake_vir, tensor total_vir, tensor pres, rvec mu_tot, gmx_constr_t constr, - globsig_t *gs,bool bInterSimGS, + globsig_t *gs,gmx_bool bInterSimGS, matrix box, gmx_mtop_t *top_global, real *pcurr, - int natoms, bool *bSumEkinhOld, int flags) + int natoms, gmx_bool *bSumEkinhOld, int flags) { int i,gsi; real gs_buf[eglsNR]; tensor corr_vir,corr_pres,shakeall_vir; - bool bEner,bPres,bTemp, bVV; - bool bRerunMD, bStopCM, bGStat, bIterate, + gmx_bool bEner,bPres,bTemp, bVV; + gmx_bool bRerunMD, bStopCM, bGStat, bIterate, bFirstIterate,bReadEkin,bEkinAveVel,bScaleEkin, bConstrain; real ekin,temp,prescorr,enercorr,dvdlcorr; - /* translate CGLO flags to booleans */ + /* translate CGLO flags to gmx_booleans */ bRerunMD = flags & CGLO_RERUNMD; bStopCM = flags & CGLO_STOPCM; bGStat = flags & CGLO_GSTAT; - bReadEkin = flags & CGLO_READEKIN; - bScaleEkin = flags & CGLO_SCALEEKIN; + +/* FIX ME after 4.5 */ +/* temporary hack because we are using gmx_bool (unsigned char) */ + + bReadEkin = (flags & CGLO_READEKIN) != 0; + bScaleEkin = (flags & CGLO_SCALEEKIN) != 0; bEner = flags & CGLO_ENERGY; bTemp = flags & CGLO_TEMPERATURE; - bPres = flags & CGLO_PRESSURE; - bConstrain = flags & CGLO_CONSTRAINT; - bIterate = flags & CGLO_ITERATE; - bFirstIterate = flags & CGLO_FIRSTITERATE; + bPres = (flags & CGLO_PRESSURE) != 0; + bConstrain = (flags & CGLO_CONSTRAINT) != 0; + bIterate = (flags & CGLO_ITERATE) != 0; + bFirstIterate = (flags & CGLO_FIRSTITERATE) != 0; /* we calculate a full state kinetic energy either with full-step velocity verlet or half step where we need the pressure */ @@ -532,7 +536,7 @@ typedef struct { real f,fprev,x,xprev; int iter_i; - bool bIterate; + gmx_bool bIterate; real allrelerr[MAXITERCONST+2]; int num_close; /* number of "close" violations, caused by limited precision. */ } gmx_iterate_t; @@ -554,7 +558,7 @@ typedef struct /* maximum length of cyclic traps to check, emerging from limited numerical precision */ #define CYCLEMAX 20 -static void gmx_iterate_init(gmx_iterate_t *iterate,bool bIterate) +static void gmx_iterate_init(gmx_iterate_t *iterate,gmx_bool bIterate) { int i; @@ -567,7 +571,7 @@ static void gmx_iterate_init(gmx_iterate_t *iterate,bool bIterate) } } -static bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iterate_t *iterate, bool bFirstIterate, real fom, real *newf) +static gmx_bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iterate_t *iterate, gmx_bool bFirstIterate, real fom, real *newf) { /* monitor convergence, and use a secant search to propose new values. @@ -594,7 +598,7 @@ static bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iter real relerr,err,xmin; char buf[256]; int i; - bool incycle; + gmx_bool incycle; if (bFirstIterate) { @@ -913,7 +917,7 @@ void check_ir_old_tpx_versions(t_commrec *cr,FILE *fplog, } typedef struct { - bool bGStatEveryStep; + gmx_bool bGStatEveryStep; gmx_large_int_t step_ns; gmx_large_int_t step_nscheck; gmx_large_int_t nns; @@ -934,7 +938,7 @@ static void reset_nlistheuristics(gmx_nlheur_t *nlh,gmx_large_int_t step) } static void init_nlistheuristics(gmx_nlheur_t *nlh, - bool bGStatEveryStep,gmx_large_int_t step) + gmx_bool bGStatEveryStep,gmx_large_int_t step) { nlh->bGStatEveryStep = bGStatEveryStep; nlh->nns = 0; @@ -996,7 +1000,7 @@ static void update_nliststatistics(gmx_nlheur_t *nlh,gmx_large_int_t step) } } -static void set_nlistheuristics(gmx_nlheur_t *nlh,bool bReset,gmx_large_int_t step) +static void set_nlistheuristics(gmx_nlheur_t *nlh,gmx_bool bReset,gmx_large_int_t step) { int d; @@ -1019,9 +1023,9 @@ static void set_nlistheuristics(gmx_nlheur_t *nlh,bool bReset,gmx_large_int_t st } static void rerun_parallel_comm(t_commrec *cr,t_trxframe *fr, - bool *bNotLastFrame) + gmx_bool *bNotLastFrame) { - bool bAlloc; + gmx_bool bAlloc; rvec *xp,*vp; bAlloc = (fr->natoms == 0); @@ -1060,7 +1064,7 @@ static void rerun_parallel_comm(t_commrec *cr,t_trxframe *fr, } double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout,t_inputrec *ir, @@ -1080,15 +1084,15 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], gmx_large_int_t step,step_rel; double run_time; double t,t0,lam0; - bool bGStatEveryStep,bGStat,bNstEner,bCalcEnerPres; - bool bNS,bNStList,bSimAnn,bStopCM,bRerunMD,bNotLastFrame=FALSE, + gmx_bool bGStatEveryStep,bGStat,bNstEner,bCalcEnerPres; + gmx_bool bNS,bNStList,bSimAnn,bStopCM,bRerunMD,bNotLastFrame=FALSE, bFirstStep,bStateFromTPX,bInitStep,bLastStep, bBornRadii,bStartingFromCpt; - bool bDoDHDL=FALSE; - bool do_ene,do_log,do_verbose,bRerunWarnNoV=TRUE, + gmx_bool bDoDHDL=FALSE; + gmx_bool do_ene,do_log,do_verbose,bRerunWarnNoV=TRUE, bForceUpdate=FALSE,bCPT; int mdof_flags; - bool bMasterState; + gmx_bool bMasterState; int force_flags,cglo_flags; tensor force_vir,shake_vir,total_vir,tmp_vir,pres; int i,m; @@ -1115,18 +1119,18 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], t_graph *graph=NULL; globsig_t gs; - bool bFFscan; + gmx_bool bFFscan; gmx_groups_t *groups; gmx_ekindata_t *ekind, *ekind_save; gmx_shellfc_t shellfc; int count,nconverged=0; real timestep=0; double tcount=0; - bool bIonize=FALSE; - bool bTCR=FALSE,bConverged=TRUE,bOK,bSumEkinhOld,bExchanged; - bool bAppend; - bool bResetCountersHalfMaxH=FALSE; - bool bVV,bIterations,bFirstIterate,bTemp,bPres,bTrotter; + gmx_bool bIonize=FALSE; + gmx_bool bTCR=FALSE,bConverged=TRUE,bOK,bSumEkinhOld,bExchanged; + gmx_bool bAppend; + gmx_bool bResetCountersHalfMaxH=FALSE; + gmx_bool bVV,bIterations,bFirstIterate,bTemp,bPres,bTrotter; real temp0,mu_aver=0,dvdl; int a0,a1,gnx=0,ii; atom_id *grpindex=NULL; @@ -2621,7 +2625,7 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], /* Output stuff */ if (MASTER(cr)) { - bool do_dr,do_or; + gmx_bool do_dr,do_or; if (!(bStartingFromCpt && (EI_VV(ir->eI)))) { diff --git a/src/kernel/md_openmm.c b/src/kernel/md_openmm.c index 53ce11e32e..9305dcb460 100644 --- a/src/kernel/md_openmm.c +++ b/src/kernel/md_openmm.c @@ -112,7 +112,7 @@ typedef struct static int multisim_min(const gmx_multisim_t *ms,int nmin,int n) { int *buf; - bool bPos,bEqual; + gmx_bool bPos,bEqual; int s,d; snew(buf,ms->nsim); @@ -198,7 +198,7 @@ static void init_global_signals(globsig_t *gs,const t_commrec *cr, double do_md_openmm(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout,t_inputrec *ir, @@ -218,10 +218,10 @@ double do_md_openmm(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], gmx_large_int_t step,step_rel; double run_time; double t,t0,lam0; - bool bSimAnn, + gmx_bool bSimAnn, bFirstStep,bStateFromTPX,bLastStep,bStartingFromCpt; - bool bInitStep=TRUE; - bool do_ene,do_log, do_verbose, + gmx_bool bInitStep=TRUE; + gmx_bool do_ene,do_log, do_verbose, bX,bV,bF,bCPT; tensor force_vir,shake_vir,total_vir,pres; int i,m; @@ -244,7 +244,7 @@ double do_md_openmm(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], gmx_groups_t *groups; gmx_ekindata_t *ekind, *ekind_save; - bool bAppend; + gmx_bool bAppend; int a0,a1; matrix lastbox; real reset_counters=0,reset_counters_now=0; diff --git a/src/kernel/md_openmm.h b/src/kernel/md_openmm.h index 18c4a2a77e..b697c0f7ac 100644 --- a/src/kernel/md_openmm.h +++ b/src/kernel/md_openmm.h @@ -36,7 +36,7 @@ #define _MD_OPENMM_H double do_md_openmm(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout,t_inputrec *ir, diff --git a/src/kernel/mdrun.c b/src/kernel/mdrun.c index fcb679e974..a610c5c88c 100644 --- a/src/kernel/mdrun.c +++ b/src/kernel/mdrun.c @@ -376,18 +376,18 @@ int main(int argc,char *argv[]) #define NFILE asize(fnm) /* Command line options ! */ - bool bCart = FALSE; - bool bPPPME = FALSE; - bool bPartDec = FALSE; - bool bDDBondCheck = TRUE; - bool bDDBondComm = TRUE; - bool bVerbose = FALSE; - bool bCompact = TRUE; - bool bSepPot = FALSE; - bool bRerunVSite = FALSE; - bool bIonize = FALSE; - bool bConfout = TRUE; - bool bReproducible = FALSE; + gmx_bool bCart = FALSE; + gmx_bool bPPPME = FALSE; + gmx_bool bPartDec = FALSE; + gmx_bool bDDBondCheck = TRUE; + gmx_bool bDDBondComm = TRUE; + gmx_bool bVerbose = FALSE; + gmx_bool bCompact = TRUE; + gmx_bool bSepPot = FALSE; + gmx_bool bRerunVSite = FALSE; + gmx_bool bIonize = FALSE; + gmx_bool bConfout = TRUE; + gmx_bool bReproducible = FALSE; int npme=-1; int nmultisim=0; @@ -406,9 +406,9 @@ int main(int argc,char *argv[]) real rdd=0.0,rconstr=0.0,dlb_scale=0.8,pforce=-1; char *ddcsx=NULL,*ddcsy=NULL,*ddcsz=NULL; real cpt_period=15.0,max_hours=-1; - bool bAppendFiles=TRUE; - bool bKeepAndNumCPT=FALSE; - bool bResetCountersHalfWay=FALSE; + gmx_bool bAppendFiles=TRUE; + gmx_bool bKeepAndNumCPT=FALSE; + gmx_bool bResetCountersHalfWay=FALSE; output_env_t oenv=NULL; const char *deviceOptions = ""; @@ -492,7 +492,7 @@ int main(int argc,char *argv[]) unsigned long Flags, PCA_Flags; ivec ddxyz; int dd_node_order; - bool bAddPart; + gmx_bool bAddPart; FILE *fplog,*fptest; int sim_part,sim_part_fn; const char *part_suffix=".part"; diff --git a/src/kernel/mk_ghat.c b/src/kernel/mk_ghat.c index 1f33de05d0..802d021157 100644 --- a/src/kernel/mk_ghat.c +++ b/src/kernel/mk_ghat.c @@ -350,11 +350,11 @@ real sym(int indx,int maxind) return 2.0; } -void calc(bool bSym,bool bVerbose, +void calc(gmx_bool bSym,gmx_bool bVerbose, const int n1max,const int n2max,const int n3max, const real h1,const real h2,const real h3, int nalias,int porder,real acut,real r1,const real alpha, - const bool bSearch, + const gmx_bool bSearch, real ***ghat,real *ppval,real *zzval,real *eeref,real *qqopt) { real box1,box2,box3; @@ -465,11 +465,11 @@ void calc(bool bSym,bool bVerbose, *qqopt = qopt/(EPSILON0*box1*box2*box3); } -void calc1D(bool bSym,bool bVerbose, +void calc1D(gmx_bool bSym,gmx_bool bVerbose, const int n1max,const int n2max,const int n3max, const real h1,const real h2,const real h3, int nalias,int porder,real acut,real r1,const real alpha, - const bool bSearch, + const gmx_bool bSearch, real ***ghat,real *ppval,real *zzval,real *eeref,real *qqopt) { real box1,box2,box3; @@ -563,8 +563,8 @@ int main(int argc,char *argv[]) int nalias,porder; real acut,alpha,r1; rvec beta; - bool bSearch,bConv; - /* bool bNL=FALSE; */ + gmx_bool bSearch,bConv; + /* gmx_bool bNL=FALSE; */ real ***ghat; real pval,zval,eref,qopt,norm; real alpha0,alpha1,alpha2,alpha3,alptol; @@ -577,7 +577,7 @@ int main(int argc,char *argv[]) { efHAT, "-o", "ghat", ffWRITE } }; #define NFILE asize(fnm) - static bool bVerbose=FALSE,bCubic=TRUE,bSym=TRUE; + static gmx_bool bVerbose=FALSE,bCubic=TRUE,bSym=TRUE; static t_pargs pa[] = { { "-v", FALSE, etBOOL, &bVerbose, "Verbose on"}, { "-cubic", FALSE, etBOOL, &bCubic, "Force beta to be the same in all directions" }, diff --git a/src/kernel/nm2type.c b/src/kernel/nm2type.c index 4caa9a087d..6b1b536ca9 100644 --- a/src/kernel/nm2type.c +++ b/src/kernel/nm2type.c @@ -64,7 +64,7 @@ static void rd_nm2type_file(const char *fn,int *nnm,t_nm2type **nmp) { FILE *fp; - bool bCont; + gmx_bool bCont; char libfilename[128]; char format[128],f1[128]; char buf[1024],elem[16],type[16],nbbuf[16],**newbuf; diff --git a/src/kernel/openmm_wrapper.cpp b/src/kernel/openmm_wrapper.cpp index 6e61dec517..d043f0756f 100644 --- a/src/kernel/openmm_wrapper.cpp +++ b/src/kernel/openmm_wrapper.cpp @@ -39,6 +39,11 @@ * https://simtk.org/project/xml/downloads.xml?group_id=161#package_id600 */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include #include #include @@ -84,7 +89,7 @@ using namespace OpenMM; * \param[out] t Destination variable to convert to. */ template -static bool from_string(T& t, const string& s, ios_base& (*f)(ios_base&)) +static gmx_bool from_string(T& t, const string& s, ios_base& (*f)(ios_base&)) { istringstream iss(s); return !(iss >> f >> t).fail(); @@ -137,7 +142,7 @@ static void splitOptionValue(const string &s, string &opt, string &val) integer less than, equal to, or greater than 0 if \p s1 less than, identical to, or greater than \p s2. */ -static bool isStringEqNCase(const string s1, const string s2) +static gmx_bool isStringEqNCase(const string s1, const string s2) { return (gmx_strncasecmp(s1.c_str(), s2.c_str(), max(s1.length(), s2.length())) == 0); } @@ -378,7 +383,7 @@ public: System* system; /*! The system to simulate. */ Context* context; /*! The OpenMM context in which the simulation is carried out. */ Integrator* integrator; /*! The integrator used in the simulation. */ - bool removeCM; /*! If \true remove venter of motion, false otherwise. */ + gmx_bool removeCM; /*! If \true remove venter of motion, false otherwise. */ GmxOpenMMPlatformOptions *platformOpt; /*! Platform options. */ }; @@ -756,7 +761,7 @@ void* openmm_init(FILE *fplog, const char *platformOptStr, { char warn_buf[STRLEN]; - static bool hasLoadedPlugins = false; + static gmx_bool hasLoadedPlugins = false; string usedPluginDir; int devId; @@ -1416,7 +1421,7 @@ void openmm_cleanup(FILE* fplog, void* data) void openmm_copy_state(void *data, t_state *state, double *time, rvec f[], gmx_enerdata_t *enerd, - bool includePos, bool includeVel, bool includeForce, bool includeEnergy) + gmx_bool includePos, gmx_bool includeVel, gmx_bool includeForce, gmx_bool includeEnergy) { int types = 0; if (includePos) diff --git a/src/kernel/openmm_wrapper.h b/src/kernel/openmm_wrapper.h index 16dd5856b8..10ea011e3f 100644 --- a/src/kernel/openmm_wrapper.h +++ b/src/kernel/openmm_wrapper.h @@ -54,7 +54,7 @@ void openmm_take_steps(void* data, int nsteps); void openmm_copy_state(void *data, t_state *state, double *time, rvec f[], gmx_enerdata_t *enerd, - bool includePos, bool includeVel, bool includeForce, bool includeEnergy); + gmx_bool includePos, gmx_bool includeVel, gmx_bool includeForce, gmx_bool includeEnergy); void openmm_cleanup(FILE *fplog, void* data); #else @@ -72,7 +72,7 @@ void openmm_take_steps(void* data, int nsteps){} void openmm_copy_state(void *data, t_state *state, double *time, rvec f[], gmx_enerdata_t *enerd, - bool includePos, bool includeVel, bool includeForce, bool includeEnergy){} + gmx_bool includePos, gmx_bool includeVel, gmx_bool includeForce, gmx_bool includeEnergy){} void openmm_cleanup(FILE *fplog, void* data){} diff --git a/src/kernel/pdb2gmx.c b/src/kernel/pdb2gmx.c index d86cf6a485..9eb0030a7e 100644 --- a/src/kernel/pdb2gmx.c +++ b/src/kernel/pdb2gmx.c @@ -243,8 +243,8 @@ static void read_rtprename(const char *fname,FILE *fp, static char *search_resrename(int nrr,rtprename_t *rr, const char *name, - bool bStart,bool bEnd, - bool bCompareFFRTPname) + gmx_bool bStart,gmx_bool bEnd, + gmx_bool bCompareFFRTPname) { char *nn; int i; @@ -291,12 +291,12 @@ static char *search_resrename(int nrr,rtprename_t *rr, static void rename_resrtp(t_atoms *pdba,int nterpairs,int *r_start,int *r_end, int nrr,rtprename_t *rr,t_symtab *symtab, - bool bVerbose) + gmx_bool bVerbose) { int r,i,j; - bool bStart,bEnd; + gmx_bool bStart,bEnd; char *nn; - bool bFFRTPTERRNM; + gmx_bool bFFRTPTERRNM; bFFRTPTERRNM = (getenv("GMX_NO_FFRTP_TER_RENAME") == NULL); @@ -358,7 +358,7 @@ static void pdbres_to_gmxrtp(t_atoms *pdba) } static void rename_pdbres(t_atoms *pdba,const char *oldnm,const char *newnm, - bool bFullCompare,t_symtab *symtab) + gmx_bool bFullCompare,t_symtab *symtab) { char *resnm; int i; @@ -376,7 +376,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, - bool bFullCompare,t_symtab *symtab) + gmx_bool bFullCompare,t_symtab *symtab) { char *bbnm; int i; @@ -396,7 +396,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 *), - bool bFullCompare, + gmx_bool bFullCompare, t_symtab *symtab, int nrr,const rtprename_t *rr) { @@ -417,7 +417,7 @@ static void rename_bbint(t_atoms *pdba,const char *oldnm, } } -static void check_occupancy(t_atoms *atoms,const char *filename,bool bVerbose) +static void check_occupancy(t_atoms *atoms,const char *filename,gmx_bool bVerbose) { int i,ftp; int nzero=0; @@ -480,9 +480,9 @@ void write_posres(char *fn,t_atoms *pdba,real fc) static int read_pdball(const char *inf, const char *outf,char *title, t_atoms *atoms, rvec **x, - int *ePBC,matrix box, bool bRemoveH, + int *ePBC,matrix box, gmx_bool bRemoveH, t_symtab *symtab,gmx_residuetype_t rt,const char *watres, - gmx_atomprop_t aps,bool bVerbose) + gmx_atomprop_t aps,gmx_bool bVerbose) /* Read a pdb file. (containing proteins) */ { int natom,new_natom,i; @@ -532,9 +532,9 @@ static int read_pdball(const char *inf, const char *outf,char *title, } void process_chain(t_atoms *pdba, rvec *x, - bool bTrpU,bool bPheU,bool bTyrU, - bool bLysMan,bool bAspMan,bool bGluMan, - bool bHisMan,bool bArgMan,bool bGlnMan, + gmx_bool bTrpU,gmx_bool bPheU,gmx_bool bTyrU, + gmx_bool bLysMan,gmx_bool bAspMan,gmx_bool bGluMan, + gmx_bool bHisMan,gmx_bool bArgMan,gmx_bool bGlnMan, real angle,real distance,t_symtab *symtab, int nrr,const rtprename_t *rr) { @@ -694,7 +694,7 @@ static void sort_pdbatoms(int nrtp,t_restp restp[],t_hackblock hb[], sfree(pdbi); } -static int remove_duplicate_atoms(t_atoms *pdba,rvec x[],bool bVerbose) +static int remove_duplicate_atoms(t_atoms *pdba,rvec x[],gmx_bool bVerbose) { int i,j,oldnatoms,ndel; t_resinfo *ri; @@ -923,7 +923,7 @@ typedef struct { char chainnum; int start; int natom; - bool bAllWat; + gmx_bool bAllWat; int nterpairs; int *chainstart; } t_pdbchain; @@ -931,7 +931,7 @@ typedef struct { typedef struct { char chainid; int chainnum; - bool bAllWat; + gmx_bool bAllWat; int nterpairs; int *chainstart; t_hackblock **ntdb; @@ -1083,7 +1083,7 @@ int main(int argc, char *argv[]) int nssbonds; t_ssbond *ssbonds; rvec *pdbx,*x; - bool bVsites=FALSE,bWat,bPrevWat=FALSE,bITP,bVsiteAromatics=FALSE,bMerge; + gmx_bool bVsites=FALSE,bWat,bPrevWat=FALSE,bITP,bVsiteAromatics=FALSE,bMerge; real mHmult=0; t_hackblock *hb_chain; t_restp *restp_chain; @@ -1120,14 +1120,14 @@ int main(int argc, char *argv[]) /* Command line arguments must be static */ - static bool bNewRTP=FALSE; - static bool bInter=FALSE, bCysMan=FALSE; - static bool bLysMan=FALSE, bAspMan=FALSE, bGluMan=FALSE, bHisMan=FALSE; - static bool bGlnMan=FALSE, bArgMan=FALSE; - static bool bTerMan=FALSE, bUnA=FALSE, bHeavyH; - static bool bSort=TRUE, bAllowMissing=FALSE, bRemoveH=FALSE; - static bool bDeuterate=FALSE,bVerbose=FALSE,bChargeGroups=TRUE,bCmap=TRUE; - static bool bRenumRes=FALSE,bRTPresname=FALSE; + static gmx_bool bNewRTP=FALSE; + static gmx_bool bInter=FALSE, bCysMan=FALSE; + static gmx_bool bLysMan=FALSE, bAspMan=FALSE, bGluMan=FALSE, bHisMan=FALSE; + static gmx_bool bGlnMan=FALSE, bArgMan=FALSE; + static gmx_bool bTerMan=FALSE, bUnA=FALSE, bHeavyH; + static gmx_bool bSort=TRUE, bAllowMissing=FALSE, bRemoveH=FALSE; + static gmx_bool bDeuterate=FALSE,bVerbose=FALSE,bChargeGroups=TRUE,bCmap=TRUE; + static gmx_bool bRenumRes=FALSE,bRTPresname=FALSE; static real angle=135.0, distance=0.3,posre_fc=1000; static real long_bond_dist=0.25, short_bond_dist=0.05; static const char *vsitestr[] = { NULL, "none", "hydrogens", "aromatics", NULL }; diff --git a/src/kernel/pdb2top.c b/src/kernel/pdb2top.c index 52a3e6f94c..4b8d4fac3e 100644 --- a/src/kernel/pdb2top.c +++ b/src/kernel/pdb2top.c @@ -75,7 +75,7 @@ static int missing_atoms(t_restp *rp, int resind,t_atoms *at, int i0, int i) { int j,k,nmiss; char *name; - bool bFound, bRet; + gmx_bool bFound, bRet; nmiss = 0; for (j=0; jnatom; j++) @@ -105,7 +105,7 @@ static int missing_atoms(t_restp *rp, int resind,t_atoms *at, int i0, int i) return nmiss; } -bool is_int(double x) +gmx_bool is_int(double x) { const double tol = 1e-4; int ix; @@ -379,7 +379,7 @@ static int name2type(t_atoms *at, int **cgnr, gpp_atomtype_t atype, { int i,j,prevresind,resind,i0,prevcg,cg,curcg; char *name; - bool bProt, bNterm; + gmx_bool bProt, bNterm; double qt; int nmissat; gmx_residuetype_t rt; @@ -460,7 +460,7 @@ static void print_top_heavy_H(FILE *out, real mHmult) } void print_top_comment(FILE *out,const char *filename, - const char *generator,bool bITP) + const char *generator,gmx_bool bITP) { char tmp[256]; @@ -472,7 +472,7 @@ void print_top_comment(FILE *out,const char *filename, } void print_top_header(FILE *out,const char *filename, - const char *title,bool bITP,const char *ffdir,real mHmult) + const char *title,gmx_bool bITP,const char *ffdir,real mHmult) { print_top_comment(out,filename,title,bITP); @@ -558,7 +558,7 @@ void print_top_mols(FILE *out, } void write_top(FILE *out, char *pr,char *molname, - t_atoms *at,bool bRTPresname, + t_atoms *at,gmx_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! */ @@ -596,7 +596,7 @@ void write_top(FILE *out, char *pr,char *molname, static atom_id search_res_atom(const char *type,int resind, int natom,t_atom at[], char ** const *aname, - const char *bondtype,bool bAllowMissing) + const char *bondtype,gmx_bool bAllowMissing) { int i; @@ -608,7 +608,7 @@ static atom_id search_res_atom(const char *type,int resind, } static void do_ssbonds(t_params *ps,int natoms,t_atom atom[],char **aname[], - int nssbonds,t_ssbond *ssbonds,bool bAllowMissing) + int nssbonds,t_ssbond *ssbonds,gmx_bool bAllowMissing) { int i,ri,rj; atom_id ai,aj; @@ -627,7 +627,7 @@ static void do_ssbonds(t_params *ps,int natoms,t_atom atom[],char **aname[], } } -static bool inter_res_bond(const t_rbonded *b) +static gmx_bool inter_res_bond(const t_rbonded *b) { return (b->AI[0] == '-' || b->AI[0] == '+' || b->AJ[0] == '-' || b->AJ[0] == '+'); @@ -637,7 +637,7 @@ static void at2bonds(t_params *psb, t_hackblock *hb, int natoms, t_atom atom[], char **aname[], int nres, rvec x[], real long_bond_dist, real short_bond_dist, - bool bAllowMissing) + gmx_bool bAllowMissing) { int resind,i,j,k; atom_id ai,aj; @@ -752,7 +752,7 @@ static void clean_bonds(t_params *ps) fprintf(stderr,"No bonds\n"); } -void print_sums(t_atoms *atoms, bool bSystem) +void print_sums(t_atoms *atoms, gmx_bool bSystem) { double m,qtot; int i; @@ -865,7 +865,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, char buf[STRLEN]; const char *Hnum="123456"; int tern,terc; - bool bN,bC,bRM; + gmx_bool bN,bC,bRM; snew(*hb,nres); snew(*restp,nres); @@ -1008,7 +1008,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp, } } -static bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr) +static gmx_bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr) { if (hack->nr == 1) @@ -1039,9 +1039,9 @@ static bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr) } } -static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind, +static gmx_bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind, t_restp *rptr,t_hackblock *hbr, - bool bVerbose) + gmx_bool bVerbose) { int resnr; int i,j,k; @@ -1049,8 +1049,8 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind, int anmnr; char *start_at,buf[STRLEN]; int start_nr; - bool bReplaceReplace,bFoundInAdd; - bool bDeleted; + gmx_bool bReplaceReplace,bFoundInAdd; + gmx_bool bDeleted; oldnm = *pdba->atomname[atind]; resnr = pdba->resinfo[pdba->atom[atind].resind].nr; @@ -1198,7 +1198,7 @@ static 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, - bool bVerbose) + gmx_bool bVerbose) { int i,j,k; char *oldnm,*newnm; @@ -1208,7 +1208,7 @@ void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[], int anmnr; char *start_at,buf[STRLEN]; int start_nr; - bool bFoundInAdd; + gmx_bool bFoundInAdd; for(i=0; inr; i++) { @@ -1303,14 +1303,14 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname, int nrtp, t_restp rtp[], t_restp *restp, t_hackblock *hb, int nterpairs,t_hackblock **ntdb, t_hackblock **ctdb, - int *rn, int *rc, bool bAllowMissing, - bool bVsites, bool bVsiteAromatics, + int *rn, int *rc, gmx_bool bAllowMissing, + gmx_bool bVsites, gmx_bool bVsiteAromatics, const char *ff, const char *ffdir, real mHmult, int nssbonds, t_ssbond *ssbonds, real long_bond_dist, real short_bond_dist, - bool bDeuterate, bool bChargeGroups, bool bCmap, - bool bRenumRes,bool bRTPresname) + gmx_bool bDeuterate, gmx_bool bChargeGroups, gmx_bool bCmap, + gmx_bool bRenumRes,gmx_bool bRTPresname) { /* t_hackblock *hb; diff --git a/src/kernel/pgutil.c b/src/kernel/pgutil.c index 57c10c2a9e..4936bfdc1d 100644 --- a/src/kernel/pgutil.c +++ b/src/kernel/pgutil.c @@ -44,7 +44,7 @@ static void atom_not_found(int fatal_errno,const char *file,int line, const char *atomname,int resind, - const char *bondtype,bool bDontQuit) + const char *bondtype,gmx_bool bDontQuit) { if (strcmp(bondtype,"check") != 0) { if (bDontQuit) { @@ -61,10 +61,10 @@ static void atom_not_found(int fatal_errno,const char *file,int line, atom_id search_atom(const char *type,int start,int natoms,t_atom at[], char ** const * anm, - const char *bondtype,bool bDontQuit) + const char *bondtype,gmx_bool bDontQuit) { int i,resind=-1; - bool bPrevious,bNext; + gmx_bool bPrevious,bNext; bPrevious = (strchr(type,'-') != NULL); bNext = (strchr(type,'+') != NULL); diff --git a/src/kernel/pgutil.h b/src/kernel/pgutil.h index 3a9fd3a468..70fe397c62 100644 --- a/src/kernel/pgutil.h +++ b/src/kernel/pgutil.h @@ -41,7 +41,7 @@ extern atom_id search_atom(const char *type,int start, int natoms,t_atom at[], char ** const * anm, - const char *bondtype,bool bDontQuit); + const char *bondtype,gmx_bool bDontQuit); /* Search an atom in array of pointers to strings, starting from start * if type starts with '-' then searches backwards from start. * bondtype is only used for printing the error/warning string, diff --git a/src/kernel/readir.c b/src/kernel/readir.c index 72b56b6fb2..8c1cf81661 100644 --- a/src/kernel/readir.c +++ b/src/kernel/readir.c @@ -104,7 +104,7 @@ void init_ir(t_inputrec *ir, t_gromppopts *opts) snew(opts->define,STRLEN); } -static void _low_check(bool b,char *s,warninp_t wi) +static void _low_check(gmx_bool b,char *s,warninp_t wi) { if (b) { @@ -128,7 +128,7 @@ static void check_nst(const char *desc_nst,int nst, } } -static bool ir_NVE(const t_inputrec *ir) +static gmx_bool ir_NVE(const t_inputrec *ir) { return ((ir->eI == eiMD || EI_VV(ir->eI)) && ir->etc == etcNO); } @@ -1288,17 +1288,17 @@ int search_string(char *s,int ng,char *gn[]) return -1; } -static bool do_numbering(int natoms,gmx_groups_t *groups,int ng,char *ptrs[], +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,bool bVerbose, + int grptp,gmx_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; - bool bRest; + gmx_bool bRest; char warn_buf[STRLEN]; if (debug) @@ -1646,7 +1646,7 @@ static void calc_nrdf(gmx_mtop_t *mtop,t_inputrec *ir,char **gnames) sfree(na_vcm); } -static void decode_cos(char *s,t_cosines *cosine,bool bTime) +static void decode_cos(char *s,t_cosines *cosine,gmx_bool bTime) { char *t; char format[STRLEN],f1[STRLEN]; @@ -1682,7 +1682,7 @@ static void decode_cos(char *s,t_cosines *cosine,bool bTime) sfree(t); } -static bool do_egp_flag(t_inputrec *ir,gmx_groups_t *groups, +static gmx_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. @@ -1693,7 +1693,7 @@ static bool do_egp_flag(t_inputrec *ir,gmx_groups_t *groups, int nelem,i,j,k,nr; char *names[EGP_MAX]; char ***gnames; - bool bSet; + gmx_bool bSet; gnames = groups->grpname; @@ -1729,7 +1729,7 @@ static bool do_egp_flag(t_inputrec *ir,gmx_groups_t *groups, void do_index(const char* mdparin, const char *ndx, gmx_mtop_t *mtop, - bool bVerbose, + gmx_bool bVerbose, t_inputrec *ir,rvec *v, warninp_t wi) { @@ -1746,7 +1746,7 @@ void do_index(const char* mdparin, const char *ndx, char *ptr1[MAXPTR],*ptr2[MAXPTR],*ptr3[MAXPTR]; int i,j,k,restnm; real SAtime; - bool bExcl,bTable,bSetTCpar,bAnneal,bRest; + gmx_bool bExcl,bTable,bSetTCpar,bAnneal,bRest; int nQMmethod,nQMbasis,nQMcharge,nQMmult,nbSH,nCASorb,nCASelec, nSAon,nSAoff,nSAsteps,nQMg,nbOPT,nbTS; char warn_buf[STRLEN]; @@ -2192,7 +2192,7 @@ static void check_disre(gmx_mtop_t *mtop) } } -static bool absolute_reference(t_inputrec *ir,gmx_mtop_t *sys,ivec AbsRef) +static gmx_bool absolute_reference(t_inputrec *ir,gmx_mtop_t *sys,ivec AbsRef) { int d,g,i; gmx_mtop_ilistloop_t iloop; @@ -2235,7 +2235,7 @@ void triple_check(const char *mdparin,t_inputrec *ir,gmx_mtop_t *sys, { char err_buf[256]; int i,m,g,nmol,npct; - bool bCharge,bAcc; + gmx_bool bCharge,bAcc; real gdt_max,*mgrp,mt; rvec acc; gmx_mtop_atomloop_block_t aloopb; @@ -2374,10 +2374,10 @@ void triple_check(const char *mdparin,t_inputrec *ir,gmx_mtop_t *sys, check_disre(sys); } -void double_check(t_inputrec *ir,matrix box,bool bConstr,warninp_t wi) +void double_check(t_inputrec *ir,matrix box,gmx_bool bConstr,warninp_t wi) { real min_size; - bool bTWIN; + gmx_bool bTWIN; char warn_buf[STRLEN]; const char *ptr; diff --git a/src/kernel/readir.h b/src/kernel/readir.h index 16ade90ff8..d9a18e4f74 100644 --- a/src/kernel/readir.h +++ b/src/kernel/readir.h @@ -59,19 +59,19 @@ typedef struct { real fourierspacing; char *include; char *define; - bool bGenVel; - bool bGenPairs; + gmx_bool bGenVel; + gmx_bool bGenPairs; real tempi; int seed; - bool bOrire; - bool bDihre; - bool bMorse; + gmx_bool bOrire; + gmx_bool bDihre; + gmx_bool bMorse; char *wall_atomtype[2]; - bool pull_start; + gmx_bool pull_start; char *couple_moltype; int couple_lam0; int couple_lam1; - bool bCoupleIntra; + gmx_bool bCoupleIntra; } t_gromppopts; @@ -86,7 +86,7 @@ extern void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts, extern int search_string(char *s,int ng,char *gn[]); /* Returns the index of string s in the index groups */ -extern void double_check(t_inputrec *ir,matrix box,bool bConstr, +extern void double_check(t_inputrec *ir,matrix box,gmx_bool bConstr, warninp_t wi); /* Do more checks */ @@ -110,7 +110,7 @@ extern void get_ir(const char *mdparin,const char *mdparout, extern void do_index(const char* mdparin, const char *ndx, gmx_mtop_t *mtop, - bool bVerbose, + gmx_bool bVerbose, t_inputrec *ir, rvec *v, warninp_t wi); @@ -122,7 +122,7 @@ extern void do_index(const char* mdparin, /* Routines In readpull.c */ extern char **read_pullparams(int *ninp_p,t_inpfile **inp, - t_pull *pull,bool *bStart, + t_pull *pull,gmx_bool *bStart, warninp_t wi); /* Reads the pull parameters, returns a list of the pull group names */ @@ -131,7 +131,7 @@ extern void make_pull_groups(t_pull *pull,char **pgnames, /* Process the pull parameters after reading the index groups */ extern void set_pull_init(t_inputrec *ir,gmx_mtop_t *mtop,rvec *x,matrix box, - const output_env_t oenv, bool bStart); + const output_env_t oenv, gmx_bool bStart); /* Prints the initial pull group distances in x. * If bStart adds the distance to the initial reference location. */ diff --git a/src/kernel/readpull.c b/src/kernel/readpull.c index 807ad48f9c..7e623fbfca 100644 --- a/src/kernel/readpull.c +++ b/src/kernel/readpull.c @@ -67,7 +67,7 @@ static void string2dvec(char buf[], dvec nums) } static void init_pullgrp(t_pullgrp *pg,char *wbuf, - bool bRef,int eGeom,char *s_vec) + gmx_bool bRef,int eGeom,char *s_vec) { double d; int n,m; @@ -97,7 +97,7 @@ static void init_pullgrp(t_pullgrp *pg,char *wbuf, } char **read_pullparams(int *ninp_p,t_inpfile **inp_p, - t_pull *pull,bool *bStart, + t_pull *pull,gmx_bool *bStart, warninp_t wi) { int ninp,nerror=0,i,nchar,ndim,nscan,m; @@ -281,7 +281,7 @@ void make_pull_groups(t_pull *pull,char **pgnames,t_blocka *grps,char **gnames) } void set_pull_init(t_inputrec *ir,gmx_mtop_t *mtop,rvec *x,matrix box, - const output_env_t oenv,bool bStart) + const output_env_t oenv,gmx_bool bStart) { t_mdatoms *md; t_pull *pull; diff --git a/src/kernel/repl_ex.c b/src/kernel/repl_ex.c index c44db332d1..a1cfc99367 100644 --- a/src/kernel/repl_ex.c +++ b/src/kernel/repl_ex.c @@ -57,7 +57,7 @@ typedef struct gmx_repl_ex { real temp; int type; real *q; - bool bNPT; + gmx_bool bNPT; real *pres; int *ind; int nst; @@ -74,7 +74,7 @@ static void repl_quantity(FILE *fplog,const gmx_multisim_t *ms, struct gmx_repl_ex *re,int ere,real q) { real *qall; - bool bDiff; + gmx_bool bDiff; int s; snew(qall,ms->nsim); @@ -468,7 +468,7 @@ shift = cr->nnodes - cr->npmenodes - 1; move_rvecs(cr,FALSE,FALSE,GMX_LEFT,GMX_RIGHT,state->sd_X,NULL,shift,NULL); } -static void print_ind(FILE *fplog,const char *leg,int n,int *ind,bool *bEx) +static void print_ind(FILE *fplog,const char *leg,int n,int *ind,gmx_bool *bEx) { int i; @@ -514,7 +514,7 @@ static int get_replica_exchange(FILE *fplog,const gmx_multisim_t *ms, int m,i,a,b; real *Epot=NULL,*Vol=NULL,*dvdl=NULL,*prob; real ediff=0,delta=0,dpV=0,betaA=0,betaB=0; - bool *bEx,bPrint; + gmx_bool *bEx,bPrint; int exchange; fprintf(fplog,"Replica exchange at step %d time %g\n",step,time); @@ -625,14 +625,14 @@ static void write_debug_x(t_state *state) } } -bool replica_exchange(FILE *fplog,const t_commrec *cr,struct gmx_repl_ex *re, +gmx_bool replica_exchange(FILE *fplog,const t_commrec *cr,struct gmx_repl_ex *re, t_state *state,real *ener, t_state *state_local, int step,real time) { gmx_multisim_t *ms; int exchange=-1,shift; - bool bExchanged=FALSE; + gmx_bool bExchanged=FALSE; ms = cr->ms; @@ -646,7 +646,7 @@ bool replica_exchange(FILE *fplog,const t_commrec *cr,struct gmx_repl_ex *re, if (PAR(cr)) { #ifdef GMX_MPI - MPI_Bcast(&bExchanged,sizeof(bool),MPI_BYTE,MASTERRANK(cr), + MPI_Bcast(&bExchanged,sizeof(gmx_bool),MPI_BYTE,MASTERRANK(cr), cr->mpi_comm_mygroup); #endif } diff --git a/src/kernel/repl_ex.h b/src/kernel/repl_ex.h index 16a5d83e2b..4ddc1746ae 100644 --- a/src/kernel/repl_ex.h +++ b/src/kernel/repl_ex.h @@ -48,7 +48,7 @@ extern gmx_repl_ex_t init_replica_exchange(FILE *fplog, int nst,int init_seed); /* Should only be called on the master nodes */ -extern bool replica_exchange(FILE *fplog, +extern gmx_bool replica_exchange(FILE *fplog, const t_commrec *cr, gmx_repl_ex_t re, t_state *state,real *ener, diff --git a/src/kernel/resall.c b/src/kernel/resall.c index affc2e4e1a..3e75872be8 100644 --- a/src/kernel/resall.c +++ b/src/kernel/resall.c @@ -120,7 +120,7 @@ static void print_resatoms(FILE *out,gpp_atomtype_t atype,t_restp *rtp) } } -static bool read_atoms(FILE *in,char *line, +static gmx_bool read_atoms(FILE *in,char *line, t_restp *r0,t_symtab *tab,gpp_atomtype_t atype) { int i,j,cg,maxentries; @@ -161,7 +161,7 @@ static bool read_atoms(FILE *in,char *line, return TRUE; } -bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp) +gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp) { char str[STRLEN]; int j,n,ni,maxrb; @@ -250,19 +250,19 @@ void clear_t_restp(t_restp *rrtp) void read_resall(char *rrdb, int *nrtpptr, t_restp **rtp, gpp_atomtype_t atype, t_symtab *tab, - bool bAllowOverrideRTP) + gmx_bool bAllowOverrideRTP) { FILE *in; char filebase[STRLEN],*ptr,line[STRLEN],header[STRLEN]; int i,nrtp,maxrtp,bt,nparam; int dum1,dum2,dum3; t_restp *rrtp; - bool bNextResidue,bError; + gmx_bool bNextResidue,bError; int bts[ebtsNR]; - bool bAlldih; + gmx_bool bAlldih; int nrexcl; - bool HH14; - bool bRemoveDih; + gmx_bool HH14; + gmx_bool bRemoveDih; int firstrtp; fflib_filename_base(rrdb,filebase,STRLEN); diff --git a/src/kernel/rtp2xml.c b/src/kernel/rtp2xml.c index 60874c4d5d..86ff101c6f 100644 --- a/src/kernel/rtp2xml.c +++ b/src/kernel/rtp2xml.c @@ -204,14 +204,14 @@ int main(int argc, char *argv[]) char chain; int start; int natom; - bool bAllWat; + gmx_bool bAllWat; int nterpairs; int *chainstart; } t_pdbchain; typedef struct { char chain; - bool bAllWat; + gmx_bool bAllWat; int nterpairs; int *chainstart; t_hackblock **ntdb; @@ -248,10 +248,10 @@ int main(int argc, char *argv[]) int nssbonds; t_ssbond *ssbonds; rvec *pdbx,*x; - bool bUsed,bDummies=FALSE,bWat,bPrevWat=FALSE,bITP,bDummyAromatics=FALSE; + gmx_bool bUsed,bDummies=FALSE,bWat,bPrevWat=FALSE,bITP,bDummyAromatics=FALSE; real mHmult=0; int nrexcl; - bool bAlldih,bH14,bRemoveDih; + gmx_bool bAlldih,bH14,bRemoveDih; CopyRight(stderr,argv[0]); diff --git a/src/kernel/runner.c b/src/kernel/runner.c index 6d76251276..c2cf3b6295 100644 --- a/src/kernel/runner.c +++ b/src/kernel/runner.c @@ -117,8 +117,8 @@ struct mdrunner_arglist int nfile; const t_filenm *fnm; output_env_t oenv; - bool bVerbose; - bool bCompact; + gmx_bool bVerbose; + gmx_bool bCompact; int nstglobalcomm; ivec ddxyz; int dd_node_order; @@ -181,8 +181,8 @@ static void mdrunner_start_fn(void *arg) All options besides nthreads are the same as for mdrunner(). */ static t_commrec *mdrunner_start_threads(int nthreads, FILE *fplog,t_commrec *cr,int nfile, - const t_filenm fnm[], const output_env_t oenv, bool bVerbose, - bool bCompact, int nstglobalcomm, + const t_filenm fnm[], const output_env_t oenv, gmx_bool bVerbose, + gmx_bool bCompact, int nstglobalcomm, ivec ddxyz,int dd_node_order,real rdd,real rconstr, const char *dddlb_opt,real dlb_scale, const char *ddcsx,const char *ddcsy,const char *ddcsz, @@ -316,8 +316,8 @@ static int get_nthreads(int nthreads_requested, t_inputrec *inputrec, int mdrunner(int nthreads_requested, FILE *fplog,t_commrec *cr,int nfile, - const t_filenm fnm[], const output_env_t oenv, bool bVerbose, - bool bCompact, int nstglobalcomm, + const t_filenm fnm[], const output_env_t oenv, gmx_bool bVerbose, + gmx_bool bCompact, int nstglobalcomm, ivec ddxyz,int dd_node_order,real rdd,real rconstr, const char *dddlb_opt,real dlb_scale, const char *ddcsx,const char *ddcsy,const char *ddcsz, @@ -344,7 +344,7 @@ int mdrunner(int nthreads_requested, FILE *fplog,t_commrec *cr,int nfile, int i,m,nChargePerturbed=-1,status,nalloc; char *gro; gmx_wallcycle_t wcycle; - bool bReadRNG,bReadEkin; + gmx_bool bReadRNG,bReadEkin; int list; gmx_runtime_t runtime; int rc; diff --git a/src/kernel/specbond.c b/src/kernel/specbond.c index e8c56351b3..245be52b31 100644 --- a/src/kernel/specbond.c +++ b/src/kernel/specbond.c @@ -47,7 +47,7 @@ #include "pdb2top.h" #include "vec.h" -bool yesno(void) +gmx_bool yesno(void) { char c; @@ -116,7 +116,7 @@ void done_specbonds(int nsb,t_specbond sb[]) } } -static bool is_special(int nsb,t_specbond sb[],char *res,char *atom) +static gmx_bool is_special(int nsb,t_specbond sb[],char *res,char *atom) { int i; @@ -130,8 +130,8 @@ static bool is_special(int nsb,t_specbond sb[],char *res,char *atom) return FALSE; } -static bool is_bond(int nsb,t_specbond sb[],t_atoms *pdba,int a1,int a2, - real d,int *index_sb,bool *bSwap) +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) { int i; char *at1,*at2,*res1,*res2; @@ -173,7 +173,7 @@ static 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,bool bVerbose) +static void rename_1res(t_atoms *pdba,int resind,char *newres,gmx_bool bVerbose) { if (bVerbose) { printf("Using rtp entry %s for %s %d\n", @@ -186,15 +186,15 @@ static void rename_1res(t_atoms *pdba,int resind,char *newres,bool bVerbose) *pdba->resinfo[resind].rtp = strdup(newres); } -int mk_specbonds(t_atoms *pdba,rvec x[],bool bInteractive, - t_ssbond **specbonds,bool bVerbose) +int mk_specbonds(t_atoms *pdba,rvec x[],gmx_bool bInteractive, + t_ssbond **specbonds,gmx_bool bVerbose) { t_specbond *sb=NULL; t_ssbond *bonds=NULL; int nsb; int nspec,nbonds; int *specp,*sgp; - bool bDoit,bSwap; + gmx_bool bDoit,bSwap; int i,j,b,e,e2; int ai,aj,index_sb; real **d; diff --git a/src/kernel/specbond.h b/src/kernel/specbond.h index 8253c8b487..7e0fbbb04e 100644 --- a/src/kernel/specbond.h +++ b/src/kernel/specbond.h @@ -38,9 +38,9 @@ #include "pdb2top.h" -extern int mk_specbonds(t_atoms *pdba,rvec x[],bool bInteractive, - t_ssbond **specbonds,bool bVerbose); +extern int mk_specbonds(t_atoms *pdba,rvec x[],gmx_bool bInteractive, + t_ssbond **specbonds,gmx_bool bVerbose); -extern bool yesno(void); +extern gmx_bool yesno(void); #endif diff --git a/src/kernel/ter_db.c b/src/kernel/ter_db.c index 1e9474b1b6..b30d3b4d78 100644 --- a/src/kernel/ter_db.c +++ b/src/kernel/ter_db.c @@ -77,7 +77,7 @@ 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, bool bAdd, +static void read_atom(char *line, gmx_bool bAdd, char **nname, t_atom *a, gpp_atomtype_t atype, int *cgnr) { int nr, i; @@ -371,7 +371,7 @@ t_hackblock **filter_ter(int nrtp,t_restp rtp[], t_restp * restp; int i,j,n,len,none_idx; - bool found; + gmx_bool found; char *rtpname_match,*s,*s2,*c; t_hackblock **list; diff --git a/src/kernel/tomorse.c b/src/kernel/tomorse.c index 45b89f784e..de7fbf9b6a 100644 --- a/src/kernel/tomorse.c +++ b/src/kernel/tomorse.c @@ -179,7 +179,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; - bool *bRemoveHarm; + gmx_bool *bRemoveHarm; /* First get the data */ t2m = read_dissociation_energies(&n2m); diff --git a/src/kernel/topio.c b/src/kernel/topio.c index abb6379db0..24c982c726 100644 --- a/src/kernel/topio.c +++ b/src/kernel/topio.c @@ -108,7 +108,7 @@ static int copy_nbparams(t_nbparam **param,int ftype,t_params *plist,int nr) return ncopy; } -static void gen_pairs(t_params *nbs,t_params *pairs,real fudge, int comb, bool bVerbose) +static void gen_pairs(t_params *nbs,t_params *pairs,real fudge, int comb, gmx_bool bVerbose) { int i,j,ntp,nrfp,nrfpA,nrfpB,nnn; real scaling; @@ -506,10 +506,10 @@ static char **read_topol(const char *infile,const char *outfile, real *fudgeQQ, int *nmolblock, gmx_molblock_t **molblock, - bool bFEP, - bool bGenborn, - bool bZero, - bool bVerbose, + gmx_bool bFEP, + gmx_bool bGenborn, + gmx_bool bZero, + gmx_bool bVerbose, warninp_t wi) { FILE *out; @@ -528,7 +528,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 */ - bool bReadDefaults,bReadMolType,bGenPairs,bWarn_copy_A_B; + gmx_bool bReadDefaults,bReadMolType,bGenPairs,bWarn_copy_A_B; double qt=0,qBt=0; /* total charge */ t_bond_atomtype batype; int lastcg=-1; @@ -834,7 +834,7 @@ static char **read_topol(const char *infile,const char *outfile, break; case d_molecules: { int whichmol; - bool bCouple; + gmx_bool bCouple; push_mol(nmol,*molinfo,pline,&whichmol,&nrcopies,wi); mi0=&((*molinfo)[whichmol]); @@ -945,11 +945,11 @@ static char **read_topol(const char *infile,const char *outfile, return title; } -char **do_top(bool bVerbose, +char **do_top(gmx_bool bVerbose, const char *topfile, const char *topppfile, t_gromppopts *opts, - bool bZero, + gmx_bool bZero, t_symtab *symtab, t_params plist[], int *combination_rule, @@ -961,7 +961,7 @@ char **do_top(bool bVerbose, t_inputrec *ir, int *nmolblock, gmx_molblock_t **molblock, - bool bGenborn, + gmx_bool bGenborn, warninp_t wi) { /* Tmpfile might contain a long path */ @@ -1016,7 +1016,7 @@ static void generate_qmexcl_moltype(gmx_moltype_t *molt,unsigned char *grpnr, qmexcl; t_block2 qmexcl2; - bool + gmx_bool *bQMMM,*blink,bexcl; /* First we search and select the QM atoms in an qm_arr array that @@ -1242,7 +1242,7 @@ void generate_qmexcl(gmx_mtop_t *sys,t_inputrec *ir) unsigned char *grpnr; int mb,mol,nat_mol,i; gmx_molblock_t *molb; - bool bQMMM; + gmx_bool bQMMM; grpnr = sys->groups.grpnr[egcQMMM]; diff --git a/src/kernel/topio.h b/src/kernel/topio.h index 5a2980ab2e..69f247ff52 100644 --- a/src/kernel/topio.h +++ b/src/kernel/topio.h @@ -44,11 +44,11 @@ extern double check_mol(gmx_mtop_t *mtop,warninp_t wi); /* Check mass and charge */ -extern char **do_top(bool bVerbose, +extern char **do_top(gmx_bool bVerbose, const char *topfile, const char *topppfile, t_gromppopts *opts, - bool bZero, + gmx_bool bZero, t_symtab *symtab, t_params plist[], int *combination_rule, @@ -60,7 +60,7 @@ extern char **do_top(bool bVerbose, t_inputrec *ir, int *nmolblock, gmx_molblock_t **molblock, - bool bGB, + gmx_bool bGB, warninp_t wi); diff --git a/src/kernel/toppush.c b/src/kernel/toppush.c index badda797b0..d0cbd9c033 100644 --- a/src/kernel/toppush.c +++ b/src/kernel/toppush.c @@ -200,8 +200,8 @@ void push_at (t_symtab *symtab, gpp_atomtype_t at, t_bond_atomtype bat, t_atom *atom; t_param *param; int atomnr; - bool have_atomic_number; - bool have_bonded_type; + gmx_bool have_atomic_number; + gmx_bool have_bonded_type; snew(atom,1); snew(param,1); @@ -470,12 +470,12 @@ static void push_bondtype(t_params * bt, t_param * b, int nral, int ftype, - bool bAllowRepeat, + gmx_bool bAllowRepeat, char * line, warninp_t wi) { int i,j; - bool bTest,bFound,bCont,bId; + gmx_bool bTest,bFound,bCont,bId; int nr = bt->nr; int nrfp = NRFP(ftype); char errbuf[256]; @@ -677,7 +677,7 @@ void push_dihedraltype(directive d,t_params bt[], char alc[MAXATOMLIST+1][20]; double c[MAXFORCEPARAM]; t_param p; - bool bAllowRepeat; + gmx_bool bAllowRepeat; char errbuf[256]; /* This routine accepts dihedraltypes defined from either 2 or 4 atoms. @@ -794,7 +794,7 @@ void push_nbt(directive d,t_nbparam **nbt,gpp_atomtype_t atype, real cr[4],sig6; atom_id ai,aj; t_nbparam *nbp; - bool bId; + gmx_bool bId; char errbuf[256]; if (sscanf (pline,"%s%s%d",a0,a1,&f) != 3) { @@ -917,7 +917,7 @@ push_cmaptype(directive d, t_params bt[], int nral, gpp_atomtype_t at, int nxcmap,nycmap,ncmap,read_cmap,sl,nct; char s[20],alc[MAXATOMLIST+1][20]; t_param p; - bool bAllowRepeat; + gmx_bool bAllowRepeat; char errbuf[256]; /* Keep the compiler happy */ @@ -1240,11 +1240,11 @@ void push_molt(t_symtab *symtab,int *nmol,t_molinfo **mol,char *line, newmol->excl_set = FALSE; } -static bool default_nb_params(int ftype,t_params bt[],t_atoms *at, - t_param *p,int c_start,bool bB,bool bGenPairs) +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) { int i,j,ti,tj,ntype; - bool bFound; + gmx_bool bFound; t_param *pi=NULL; int nr = bt[ftype].nr; int nral = NRAL(ftype); @@ -1304,14 +1304,14 @@ static bool default_nb_params(int ftype,t_params bt[],t_atoms *at, return bFound; } -static bool default_cmap_params(int ftype, t_params bondtype[], +static gmx_bool default_cmap_params(int ftype, t_params bondtype[], t_atoms *at, gpp_atomtype_t atype, - t_param *p, bool bB, + t_param *p, gmx_bool bB, int *cmap_type, int *nparam_def) { int i,j,nparam_found; int ct; - bool bFound=FALSE; + gmx_bool bFound=FALSE; nparam_found = 0; ct = 0; @@ -1353,14 +1353,14 @@ static bool default_cmap_params(int ftype, t_params bondtype[], return bFound; } -static bool default_params(int ftype,t_params bt[], +static gmx_bool default_params(int ftype,t_params bt[], t_atoms *at,gpp_atomtype_t atype, - t_param *p,bool bB, + t_param *p,gmx_bool bB, t_param **param_def, int *nparam_def) { int i,j,nparam_found; - bool bFound,bSame; + gmx_bool bFound,bSame; t_param *pi=NULL; t_param *pj=NULL; int nr = bt[ftype].nr; @@ -1456,8 +1456,8 @@ static 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, - bool bBonded,bool bGenPairs,real fudgeQQ, - bool bZero,bool *bWarn_copy_A_B, + gmx_bool bBonded,gmx_bool bGenPairs,real fudgeQQ, + gmx_bool bZero,gmx_bool *bWarn_copy_A_B, warninp_t wi) { const char *aaformat[MAXATOMLIST]= { @@ -1483,7 +1483,7 @@ void push_bond(directive d,t_params bondtype[],t_params bond[], double cc[MAXFORCEPARAM+1]; int aa[MAXATOMLIST+1]; t_param param,paramB,*param_defA,*param_defB; - bool bFoundA=FALSE,bFoundB=FALSE,bDef,bPert,bSwapParity=FALSE; + gmx_bool bFoundA=FALSE,bFoundB=FALSE,bDef,bPert,bSwapParity=FALSE; int nparam_defA,nparam_defB; char errbuf[256]; @@ -1777,7 +1777,7 @@ void push_bond(directive d,t_params bondtype[],t_params bond[], void push_cmap(directive d, t_params bondtype[], t_params bond[], t_atoms *at, gpp_atomtype_t atype, char *line, - bool *bWarn_copy_A_B, + gmx_bool *bWarn_copy_A_B, warninp_t wi) { const char *aaformat[MAXATOMLIST+1]= @@ -1795,7 +1795,7 @@ void push_cmap(directive d, t_params bondtype[], t_params bond[], int cmap_type; int aa[MAXATOMLIST+1]; char errbuf[256]; - bool bFound; + gmx_bool bFound; t_param param,paramB,*param_defA,*param_defB; ftype = ifunc_index(d,1); @@ -2176,7 +2176,7 @@ static void generate_LJCpairsNB(t_molinfo *mol,int nb_funct,t_params *nbp) int n,ntype,i,j,k; t_atom *atom; t_blocka *excl; - bool bExcl; + gmx_bool bExcl; t_param param; n = mol->atoms.nr; @@ -2253,7 +2253,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, - bool bCoupleIntra,int nb_funct,t_params *nbp) + gmx_bool bCoupleIntra,int nb_funct,t_params *nbp) { convert_pairs_to_pairsQ(mol->plist,fudgeQQ,&mol->atoms); if (!bCoupleIntra) { diff --git a/src/kernel/toppush.h b/src/kernel/toppush.h index 5d57e9d9aa..38eb4e1f5f 100644 --- a/src/kernel/toppush.h +++ b/src/kernel/toppush.h @@ -90,13 +90,13 @@ extern void push_atom(t_symtab *symtab, extern void push_bond(directive d,t_params bondtype[],t_params bond[], t_atoms *at,gpp_atomtype_t atype,char *line, - bool bBonded,bool bGenPairs,real fudgeQQ, - bool bZero,bool *bWarn_copy_A_B, + gmx_bool bBonded,gmx_bool bGenPairs,real fudgeQQ, + gmx_bool bZero,gmx_bool *bWarn_copy_A_B, warninp_t wi); extern void push_cmap(directive d, t_params bondtype[], t_params bond[], t_atoms *at, gpp_atomtype_t atype, char *line, - bool *bWarn_copy_A_B, + gmx_bool *bWarn_copy_A_B, warninp_t wi); extern void push_vsitesn(directive d,t_params bondtype[],t_params bond[], @@ -131,7 +131,7 @@ extern int add_atomtype_decoupled(t_symtab *symtab,gpp_atomtype_t at, extern void convert_moltype_couple(t_molinfo *mol,int atomtype_decouple, real fudgeQQ, int couple_lam0,int couple_lam1, - bool bCoupleIntra, + gmx_bool bCoupleIntra, int nb_funct,t_params *nbp); /* Setup mol such that the B-state has no interaction with the rest * of the system, but full interaction with itself. diff --git a/src/kernel/topshake.c b/src/kernel/topshake.c index 3a7460e35e..4094559d9c 100644 --- a/src/kernel/topshake.c +++ b/src/kernel/topshake.c @@ -96,7 +96,7 @@ void make_shake (t_params plist[],t_atoms *atoms,gpp_atomtype_t at,int nshake) t_param p,*bond,*ang; real b_ij,b_jk; int nb,b,i,j,ftype,ftype_a; - bool bFound; + gmx_bool bFound; if (nshake != eshNONE) { switch (nshake) { diff --git a/src/kernel/toputil.c b/src/kernel/toputil.c index d110c66685..26ba237039 100644 --- a/src/kernel/toputil.c +++ b/src/kernel/toputil.c @@ -209,7 +209,7 @@ static void print_nbt (FILE *out,char *title,gpp_atomtype_t at, void print_bt(FILE *out, directive d, gpp_atomtype_t at, int ftype,int fsubtype,t_params plist[], - bool bFullDih) + gmx_bool bFullDih) { /* This dihp is a DIRTY patch because the dih-types do not use * all four atoms to determine the type. @@ -217,7 +217,7 @@ 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; - bool bDih=FALSE,bSwapParity; + gmx_bool bDih=FALSE,bSwapParity; bt=&(plist[ftype]); @@ -354,7 +354,7 @@ void print_blocka(FILE *out, const char *szName, void print_excl(FILE *out, int natoms, t_excls excls[]) { atom_id i; - bool have_excl; + gmx_bool have_excl; int j; have_excl=FALSE; @@ -392,7 +392,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, - bool bRTPresname) + gmx_bool bRTPresname) { int i,ri; int tpA,tpB; diff --git a/src/kernel/tpbcmp.c b/src/kernel/tpbcmp.c index 5b319747de..4e3054e0b8 100644 --- a/src/kernel/tpbcmp.c +++ b/src/kernel/tpbcmp.c @@ -95,7 +95,7 @@ static void cmp_uc(FILE *fp,const char *s,int index,unsigned char i1,unsigned ch } } -static bool cmp_bool(FILE *fp, const char *s, int index, bool b1, bool b2) +static gmx_bool cmp_bool(FILE *fp, const char *s, int index, gmx_bool b1, gmx_bool b2) { if (b1) { b1 = 1; @@ -129,17 +129,17 @@ static void cmp_str(FILE *fp, const char *s, int index, } } -static bool equal_real(real i1,real i2,real ftol,real abstol) +static gmx_bool equal_real(real i1,real i2,real ftol,real abstol) { return ( ( 2*fabs(i1 - i2) <= (fabs(i1) + fabs(i2))*ftol ) || fabs(i1-i2)<=abstol ); } -static bool equal_float(float i1,float i2,float ftol,float abstol) +static gmx_bool equal_float(float i1,float i2,float ftol,float abstol) { return ( ( 2*fabs(i1 - i2) <= (fabs(i1) + fabs(i2))*ftol ) || fabs(i1-i2)<=abstol ); } -static bool equal_double(double i1,double i2,real ftol,real abstol) +static gmx_bool equal_double(double i1,double i2,real ftol,real abstol) { return ( ( 2*fabs(i1 - i2) <= (fabs(i1) + fabs(i2))*ftol ) || fabs(i1-i2)<=abstol ); } @@ -229,7 +229,7 @@ void cmp_iparm(FILE *fp,const char *s,t_functype ft, t_iparams ip1,t_iparams ip2,real ftol,real abstol) { int i; - bool bDiff; + gmx_bool bDiff; bDiff=FALSE; for(i=0; iflags,fr2->flags); @@ -785,13 +785,13 @@ void comp_frame(FILE *fp, t_trxframe *fr1, t_trxframe *fr2, } void comp_trx(const output_env_t oenv,const char *fn1, const char *fn2, - bool bRMSD,real ftol,real abstol) + gmx_bool bRMSD,real ftol,real abstol) { int i; const char *fn[2]; t_trxframe fr[2]; t_trxstatus *status[2]; - bool b[2]; + gmx_bool b[2]; fn[0]=fn1; fn[1]=fn2; @@ -854,7 +854,7 @@ static real ener_tensor_diag(int n,int *ind1,int *ind2, } } -static bool enernm_equal(const char *nm1,const char *nm2) +static gmx_bool enernm_equal(const char *nm1,const char *nm2) { int len1,len2; @@ -1048,7 +1048,7 @@ void comp_enx(const char *fn1,const char *fn2,real ftol,real abstol,const char * char buf[256]; gmx_enxnm_t *enm1=NULL,*enm2=NULL; t_enxframe *fr1,*fr2; - bool b1,b2; + gmx_bool b1,b2; fprintf(stdout,"comparing energy file %s and %s\n\n",fn1,fn2); diff --git a/src/kernel/tpbcmp.h b/src/kernel/tpbcmp.h index 7645da0cf8..c906413e10 100644 --- a/src/kernel/tpbcmp.h +++ b/src/kernel/tpbcmp.h @@ -37,12 +37,12 @@ #define _tpbcmp_h void -comp_tpx(const char *fn1,const char *fn2,bool bRMSD,real ftol,real abstol); +comp_tpx(const char *fn1,const char *fn2,gmx_bool bRMSD,real ftol,real abstol); /* Compare two binary topology files */ void comp_trx(const output_env_t oenv,const char *fn1,const char *fn2, - bool bRMSD,real ftol,real abstol); + gmx_bool bRMSD,real ftol,real abstol); /* Compare two binary trajectory files */ void diff --git a/src/kernel/tpbconv.c b/src/kernel/tpbconv.c index b6c3ae0160..5961cca88e 100644 --- a/src/kernel/tpbconv.c +++ b/src/kernel/tpbconv.c @@ -58,9 +58,9 @@ #define RANGECHK(i,n) if ((i)>=(n)) gmx_fatal(FARGS,"Your index file contains atomnumbers (e.g. %d)\nthat are larger than the number of atoms in the tpr file (%d)",(i),(n)) -static bool *bKeepIt(int gnx,int natoms,atom_id index[]) +static gmx_bool *bKeepIt(int gnx,int natoms,atom_id index[]) { - bool *b; + gmx_bool *b; int i; snew(b,natoms); @@ -86,7 +86,7 @@ static atom_id *invind(int gnx,int natoms,atom_id index[]) return inv; } -static void reduce_block(bool bKeep[],t_block *block, +static void reduce_block(gmx_bool bKeep[],t_block *block, const char *name) { atom_id *index; @@ -113,7 +113,7 @@ static void reduce_block(bool bKeep[],t_block *block, block->nr = newi; } -static void reduce_blocka(atom_id invindex[],bool bKeep[],t_blocka *block, +static void reduce_blocka(atom_id invindex[],gmx_bool bKeep[],t_blocka *block, const char *name) { atom_id *index,*a; @@ -194,12 +194,12 @@ static void reduce_atom(int gnx,atom_id index[],t_atom atom[],char ***atomname, sfree(rinfo); } -static void reduce_ilist(atom_id invindex[],bool bKeep[], +static void reduce_ilist(atom_id invindex[],gmx_bool bKeep[], t_ilist *il,int nratoms,const char *name) { t_iatom *ia; int i,j,newnr; - bool bB; + gmx_bool bB; if (il->nr) { snew(ia,il->nr); @@ -231,7 +231,7 @@ static void reduce_topology_x(int gnx,atom_id index[], gmx_mtop_t *mtop,rvec x[],rvec v[]) { t_topology top; - bool *bKeep; + gmx_bool *bKeep; atom_id *invindex; int i; @@ -321,8 +321,8 @@ int main (int argc, char *argv[]) int i; gmx_large_int_t nsteps_req,run_step,frame; double run_t,state_t; - bool bOK,bNsteps,bExtend,bUntil,bTime,bTraj; - bool bFrame,bUse,bSel,bNeedEner,bReadEner,bScanEner; + gmx_bool bOK,bNsteps,bExtend,bUntil,bTime,bTraj; + gmx_bool bFrame,bUse,bSel,bNeedEner,bReadEner,bScanEner; gmx_mtop_t mtop; t_atoms atoms; t_inputrec *ir,*irnew=NULL; @@ -350,7 +350,7 @@ int main (int argc, char *argv[]) /* Command line options */ static int nsteps_req_int = 0; static real start_t = -1.0, extend_t = 0.0, until_t = 0.0; - static bool bContinuation = TRUE,bZeroQ = FALSE,bVel=TRUE; + static gmx_bool bContinuation = TRUE,bZeroQ = FALSE,bVel=TRUE; static t_pargs pa[] = { { "-extend", FALSE, etREAL, {&extend_t}, "Extend runtime by this amount (ps)" }, diff --git a/src/kernel/vsite_parm.c b/src/kernel/vsite_parm.c index 1738d72f68..d2caced0a6 100644 --- a/src/kernel/vsite_parm.c +++ b/src/kernel/vsite_parm.c @@ -127,7 +127,7 @@ static void get_bondeds(int nrat, t_iatom atoms[], static at2vsitebond_t *make_at2vsitebond(int natoms,t_params plist[]) { - bool *bVSI; + gmx_bool *bVSI; int ftype,i,j,nrcheck,nr; t_iatom *aa; at2vsitebond_t *at2vb; @@ -179,7 +179,7 @@ static void done_at2vsitebond(int natoms,at2vsitebond_t *at2vb) static at2vsitecon_t *make_at2vsitecon(int natoms,t_params plist[]) { - bool *bVSI; + gmx_bool *bVSI; int ftype,i,j,ai,aj,nr; at2vsitecon_t *at2vc; @@ -317,7 +317,7 @@ static real get_angle(int nrang, t_mybonded angles[], return angle; } -static bool calc_vsite3_param(gpp_atomtype_t atype, +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 ) @@ -327,7 +327,7 @@ static bool calc_vsite3_param(gpp_atomtype_t atype, * k,l = 2nd bonded atoms | `l */ - bool bXH3,bError; + gmx_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*) */ @@ -402,7 +402,7 @@ static bool calc_vsite3_param(gpp_atomtype_t atype, return bError; } -static bool calc_vsite3fd_param(t_param *param, +static gmx_bool calc_vsite3fd_param(t_param *param, int nrbond, t_mybonded *bonds, int nrang, t_mybonded *angles) { @@ -411,7 +411,7 @@ static bool calc_vsite3fd_param(t_param *param, * k,l = 2nd bonded atoms | `l */ - bool bError; + gmx_bool bError; real bij,bjk,bjl,aijk,aijl,rk,rl; bij = get_bond_length(nrbond, bonds, param->AI, param->AJ); @@ -433,7 +433,7 @@ static bool calc_vsite3fd_param(t_param *param, return bError; } -static bool calc_vsite3fad_param(t_param *param, +static gmx_bool calc_vsite3fad_param(t_param *param, int nrbond, t_mybonded *bonds, int nrang, t_mybonded *angles) { @@ -443,7 +443,7 @@ static bool calc_vsite3fad_param(t_param *param, * l = 3d bonded heavy atom | */ - bool bSwapParity,bError; + gmx_bool bSwapParity,bError; real bij,aijk; bSwapParity = ( param->C1 == -1 ); @@ -464,7 +464,7 @@ static bool calc_vsite3fad_param(t_param *param, return bError; } -static bool calc_vsite3out_param(gpp_atomtype_t atype, +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) @@ -475,7 +475,7 @@ static bool calc_vsite3out_param(gpp_atomtype_t atype, * NOTE: i is out of the j-k-l plane! */ - bool bXH3,bError,bSwapParity; + gmx_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, @@ -564,7 +564,7 @@ static bool calc_vsite3out_param(gpp_atomtype_t atype, return bError; } -static bool calc_vsite4fd_param(t_param *param, +static gmx_bool calc_vsite4fd_param(t_param *param, int nrbond, t_mybonded *bonds, int nrang, t_mybonded *angles) { @@ -573,7 +573,7 @@ static bool calc_vsite4fd_param(t_param *param, * k,l,m = 2nd bonded atoms | `l */ - bool bError; + gmx_bool bError; real bij,bjk,bjl,bjm,aijk,aijl,aijm,akjm,akjl; real pk,pl,pm,cosakl,cosakm,sinakl,sinakm,cl,cm; @@ -621,7 +621,7 @@ static bool calc_vsite4fd_param(t_param *param, } -static bool +static gmx_bool calc_vsite4fdn_param(t_param *param, int nrbond, t_mybonded *bonds, int nrang, t_mybonded *angles) @@ -631,7 +631,7 @@ calc_vsite4fdn_param(t_param *param, * k,l,m = 2nd bonded atoms | `l */ - bool bError; + gmx_bool bError; real bij,bjk,bjl,bjm,aijk,aijl,aijm; real pk,pl,pm,a,b; @@ -682,12 +682,12 @@ calc_vsite4fdn_param(t_param *param, -int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, +int set_vsites(gmx_bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, t_params plist[]) { int i,j,ftype; int nvsite,nrbond,nrang,nridih,nrset; - bool bFirst,bSet,bERROR; + gmx_bool bFirst,bSet,bERROR; at2vsitebond_t *at2vb; t_mybonded *bonds; t_mybonded *angles; @@ -794,7 +794,7 @@ int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, return nvsite; } -void set_vsites_ptype(bool bVerbose, gmx_moltype_t *molt) +void set_vsites_ptype(gmx_bool bVerbose, gmx_moltype_t *molt) { int ftype,i; int nra,nrd; @@ -862,7 +862,7 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[], int nconverted,nremoved; atom_id atom,oatom,constr,at1,at2; atom_id vsiteatoms[MAXATOMLIST]; - bool bKeep,bRemove,bUsed,bPresent,bThisFD,bThisOUT,bAllFD,bFirstTwo; + gmx_bool bKeep,bRemove,bUsed,bPresent,bThisFD,bThisOUT,bAllFD,bFirstTwo; t_params *ps; if (cftype == F_CONNBONDS) @@ -1034,7 +1034,7 @@ static void clean_vsite_angles(t_params *plist, t_pindex pindex[], int i,j,parnr,k,l,m,n,nvsite,kept_i,vsnral,vsitetype; atom_id atom,constr,at1,at2; atom_id vsiteatoms[MAXATOMLIST]; - bool bKeep,bUsed,bPresent,bAll3FAD,bFirstTwo; + gmx_bool bKeep,bUsed,bPresent,bAll3FAD,bFirstTwo; t_params *ps; ps = &(plist[cftype]); @@ -1129,7 +1129,7 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[], int ftype,i,parnr,k,l,m,n,nvsite,kept_i,vsnral; atom_id atom,constr; atom_id vsiteatoms[3]; - bool bKeep,bUsed,bPresent; + gmx_bool bKeep,bUsed,bPresent; t_params *ps; ps = &(plist[cftype]); @@ -1206,7 +1206,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, bool bRmVSiteBds) +void clean_vsite_bondeds(t_params *plist, int natoms, gmx_bool bRmVSiteBds) { int i,k,nvsite,ftype,vsite,parnr; int *vsite_type; diff --git a/src/kernel/vsite_parm.h b/src/kernel/vsite_parm.h index 5ae6e45a90..da246cd40b 100644 --- a/src/kernel/vsite_parm.h +++ b/src/kernel/vsite_parm.h @@ -40,14 +40,14 @@ #include "grompp.h" #include "gpp_atomtype.h" -extern int set_vsites(bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, +extern int set_vsites(gmx_bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype, t_params plist[]); /* set parameters for vritual sites, return number of virtual sites */ -extern void set_vsites_ptype(bool bVerbose, gmx_moltype_t *molt); +extern void set_vsites_ptype(gmx_bool bVerbose, gmx_moltype_t *molt); /* set ptype to VSite for virtual sites */ -extern void clean_vsite_bondeds(t_params *ps, int natoms, bool bRmVSiteBds); +extern void clean_vsite_bondeds(t_params *ps, int natoms, gmx_bool bRmVSiteBds); /* remove all bonded interaction (bonds, angles and diherals) that have become obsolete due to virtual site constructions */ diff --git a/src/kernel/xlate.c b/src/kernel/xlate.c index d9a0c7d16c..88306726cd 100644 --- a/src/kernel/xlate.c +++ b/src/kernel/xlate.c @@ -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, - bool bResname,gmx_residuetype_t rt,bool bReorderNum, - bool bVerbose) + gmx_bool bResname,gmx_residuetype_t rt,gmx_bool bReorderNum, + gmx_bool bVerbose) { FILE *fp; int nxlate,a,i,resind; @@ -144,7 +144,7 @@ void rename_atoms(const char *xlfile,const char *ffdir, int nf; char **f; char c,*rnm,atombuf[32],*ptr0,*ptr1; - bool bReorderedNum,bRenamed,bMatch; + gmx_bool bReorderedNum,bRenamed,bMatch; nxlate = 0; xlatom = NULL; diff --git a/src/kernel/xlate.h b/src/kernel/xlate.h index 701cc27a37..e3dc25fe3d 100644 --- a/src/kernel/xlate.h +++ b/src/kernel/xlate.h @@ -43,7 +43,7 @@ */ extern void rename_atoms(const char *xlfile,const char *ffdir, t_atoms *atoms,t_symtab *symtab,const t_restp *restp, - bool bResname,gmx_residuetype_t rt,bool bReorderNum, - bool bVerbose); + gmx_bool bResname,gmx_residuetype_t rt,gmx_bool bReorderNum, + gmx_bool bVerbose); #endif diff --git a/src/kernel/xmdrun.h b/src/kernel/xmdrun.h index 927f2fdf61..c8ce25b44f 100644 --- a/src/kernel/xmdrun.h +++ b/src/kernel/xmdrun.h @@ -68,7 +68,7 @@ extern const char *eoNames[eoNR]; typedef struct { int at_i,at_j; /* Atom type # for i and j */ int eObs; /* Observable to couple to */ - bool bPrint; /* Does this struct have to be printed */ + gmx_bool bPrint; /* Does this struct have to be printed */ real c6,c12; /* Actual value of params */ real xi_6,xi_12; /* Constants for coupling C6 and C12 */ } t_coupl_LJ; @@ -76,7 +76,7 @@ typedef struct { typedef struct { int at_i,at_j; /* Atom type # for i and j */ int eObs; /* Observable to couple to */ - bool bPrint; /* Does this struct have to be printed */ + gmx_bool bPrint; /* Does this struct have to be printed */ real a,b,c; /* Actual value of params */ real xi_a,xi_b,xi_c; /* Constants for coupling A, B and C */ } t_coupl_BU; @@ -84,7 +84,7 @@ typedef struct { typedef struct { int at_i; /* Atom type */ int eObs; /* Observable to couple to */ - bool bPrint; /* Does this struct have to be printed */ + gmx_bool bPrint; /* Does this struct have to be printed */ real Q; /* Actual value of charge */ real xi_Q; /* Constant for coupling Q */ } t_coupl_Q; @@ -100,15 +100,15 @@ typedef struct { real act_value[eoObsNR]; real av_value [eoObsNR]; real ref_value[eoObsNR]; - bool bObsUsed[eoObsNR]; + gmx_bool bObsUsed[eoObsNR]; int nLJ,nBU,nQ,nIP; t_coupl_LJ *tcLJ; t_coupl_BU *tcBU; t_coupl_Q *tcQ; t_coupl_iparams *tIP; int nmemory; - bool bInter; - bool bVirial; + gmx_bool bInter; + gmx_bool bVirial; int combrule; } t_coupl_rec; @@ -133,11 +133,11 @@ extern void calc_f_dev(int natoms,real charge[],rvec x[],rvec f[], extern void do_coupling(FILE *log,const output_env_t oenv,int nfile, const t_filenm fnm[], t_coupl_rec *tcr,real t,int step,real ener[], - t_forcerec *fr,t_inputrec *ir,bool bMaster, + t_forcerec *fr,t_inputrec *ir,gmx_bool bMaster, t_mdatoms *md,t_idef *idef,real mu_aver,int nmols, t_commrec *cr,matrix box,tensor virial, tensor pres,rvec mu_tot, - rvec x[],rvec f[],bool bDoIt); + rvec x[],rvec f[],gmx_bool bDoIt); /* CODE TO ADD SPECIAL 2-DIMENSIONAL LENNARD-JONES CORRECTION TO FORCES AND ENERGY */ extern void do_glas(FILE *log,int start,int homenr,rvec x[],rvec f[], @@ -156,16 +156,16 @@ extern real calc_mu_aver(t_commrec *cr,rvec x[],real q[],rvec mu, typedef struct { real tol,f_max,npow,epot,fac_epot,fac_pres,fac_msf,pres; int molsize,nmol; - bool bComb,bVerbose,bLogEps; + gmx_bool bComb,bVerbose,bLogEps; } t_ffscan; -extern bool update_forcefield(FILE *fplog, +extern gmx_bool update_forcefield(FILE *fplog, int nfile,const t_filenm fnm[],t_forcerec *fr, int natoms,rvec x[],matrix box); /* Modify the parameters. Return TRUE when the scan is finished. */ -extern bool print_forcefield(FILE *fp,real ener[],int natoms,rvec f[], +extern gmx_bool print_forcefield(FILE *fp,real ener[],int natoms,rvec f[], rvec fshake[],rvec x[],t_block *mols,real mass[], tensor pres); /* Print results. Return TRUE when the scan is finished. */ diff --git a/src/kernel/xutils.c b/src/kernel/xutils.c index 2e3df5c883..e374c5d263 100644 --- a/src/kernel/xutils.c +++ b/src/kernel/xutils.c @@ -325,13 +325,13 @@ static void scale_box(int natoms,rvec x[],matrix box) } } -bool update_forcefield(FILE *fplog, +gmx_bool update_forcefield(FILE *fplog, int nfile,const t_filenm fnm[],t_forcerec *fr, int natoms,rvec x[],matrix box) { static int ntry,ntried; int i,j; - bool bDone; + gmx_bool bDone; /* First time around we have to read the parameters */ if (nparm == 0) { @@ -420,7 +420,7 @@ static real msf(int n,rvec f1[],rvec f2[]) static void print_grid(FILE *fp,real ener[],int natoms,rvec f[],rvec fshake[], rvec x[],t_block *mols,real mass[],tensor pres) { - static bool bFirst = TRUE; + static gmx_bool bFirst = TRUE; static const char *desc[] = { "------------------------------------------------------------------------", "In the output from the forcefield scan we have the potential energy,", @@ -444,7 +444,7 @@ static void print_grid(FILE *fp,real ener[],int natoms,rvec f[],rvec fshake[], } } -bool print_forcefield(FILE *fp,real ener[],int natoms,rvec f[],rvec fshake[], +gmx_bool print_forcefield(FILE *fp,real ener[],int natoms,rvec f[],rvec fshake[], rvec x[],t_block *mols,real mass[],tensor pres) { real msf1; diff --git a/src/mdlib/calcmu.c b/src/mdlib/calcmu.c index 994388bbe4..bab3ad8ad9 100644 --- a/src/mdlib/calcmu.c +++ b/src/mdlib/calcmu.c @@ -76,7 +76,7 @@ void calc_mu(int start,int homenr,rvec x[],real q[],real qB[], } } -bool read_mu(FILE *fp,rvec mu,real *vol) +gmx_bool read_mu(FILE *fp,rvec mu,real *vol) { /* For backward compatibility */ real mmm[4]; diff --git a/src/mdlib/calcvir.c b/src/mdlib/calcvir.c index 2be46da3fa..81c09c62c9 100644 --- a/src/mdlib/calcvir.c +++ b/src/mdlib/calcvir.c @@ -58,7 +58,7 @@ static void upd_vir(rvec vir,real dvx,real dvy,real dvz) } void calc_vir(FILE *log,int nxf,rvec x[],rvec f[],tensor vir, - bool bScrewPBC,matrix box) + gmx_bool bScrewPBC,matrix box) { int i,isx; double dvxx=0,dvxy=0,dvxz=0,dvyx=0,dvyy=0,dvyz=0,dvzx=0,dvzy=0,dvzz=0; @@ -97,7 +97,7 @@ void calc_vir(FILE *log,int nxf,rvec x[],rvec f[],tensor vir, static void lo_fcv(int i0,int i1,int g0, real x[],real f[],tensor vir, - int is[],real box[], bool bTriclinic) + int is[],real box[], gmx_bool bTriclinic) { int i,i3,gg,g3,tx,ty,tz; real xx,yy,zz; @@ -158,7 +158,7 @@ static void lo_fcv(int i0,int i1,int g0, static void lo_fcv2(int i0,int i1, rvec x[],rvec f[],tensor vir, - ivec is[],matrix box, bool bTriclinic) + ivec is[],matrix box, gmx_bool bTriclinic) { int i,gg,tx,ty,tz; real xx,yy,zz; diff --git a/src/mdlib/clincs.c b/src/mdlib/clincs.c index 966dbac0ad..67afee52d5 100644 --- a/src/mdlib/clincs.c +++ b/src/mdlib/clincs.c @@ -94,7 +94,7 @@ real *lincs_rmsd_data(struct gmx_lincsdata *lincsd) return lincsd->rmsd_data; } -real lincs_rmsd(struct gmx_lincsdata *lincsd,bool bSD2) +real lincs_rmsd(struct gmx_lincsdata *lincsd,gmx_bool bSD2) { if (lincsd->rmsd_data[0] > 0) { @@ -185,7 +185,7 @@ static void lincs_matrix_expand(const struct gmx_lincsdata *lincsd, static void do_lincsp(rvec *x,rvec *f,rvec *fp,t_pbc *pbc, struct gmx_lincsdata *lincsd,real *invmass, int econq,real *dvdlambda, - bool bCalcVir,tensor rmdf) + gmx_bool bCalcVir,tensor rmdf) { int b,i,j,k,n; real tmp0,tmp1,tmp2,im1,im2,mvb,rlen,len,wfac,lam; @@ -344,7 +344,7 @@ static void do_lincs(rvec *x,rvec *xp,matrix box,t_pbc *pbc, t_commrec *cr, real wangle,int *warn, real invdt,rvec *v, - bool bCalcVir,tensor rmdr) + gmx_bool bCalcVir,tensor rmdr) { int b,i,j,k,n,iter; real tmp0,tmp1,tmp2,im1,im2,mvb,rlen,len,len2,dlen2,wfac,lam; @@ -686,7 +686,7 @@ static int count_triangle_constraints(t_ilist *ilist,t_blocka *at2con) int ncon1,ncon_tot; int c0,a00,a01,n1,c1,a10,a11,ac1,n2,c2,a20,a21; int ncon_triangle; - bool bTriangle; + gmx_bool bTriangle; t_iatom *ia1,*ia2,*iap; ncon1 = ilist[F_CONSTR].nr/3; @@ -750,7 +750,7 @@ static int int_comp(const void *a,const void *b) gmx_lincsdata_t init_lincs(FILE *fplog,gmx_mtop_t *mtop, int nflexcon_global,t_blocka *at2con, - bool bPLINCS,int nIter,int nProjOrder) + gmx_bool bPLINCS,int nIter,int nProjOrder) { struct gmx_lincsdata *li; int mb; @@ -813,7 +813,7 @@ gmx_lincsdata_t init_lincs(FILE *fplog,gmx_mtop_t *mtop, } void set_lincs(t_idef *idef,t_mdatoms *md, - bool bDynamics,t_commrec *cr, + gmx_bool bDynamics,t_commrec *cr, struct gmx_lincsdata *li) { int start,natoms,nflexcon; @@ -822,7 +822,7 @@ void set_lincs(t_idef *idef,t_mdatoms *md, int i,k,ncc_alloc,ni,con,nconnect,concon; int type,a1,a2; real lenA=0,lenB; - bool bLocal; + gmx_bool bLocal; li->nc = 0; li->ncc = 0; @@ -1113,7 +1113,7 @@ static void cconerr(gmx_domdec_t *dd, static void dump_conf(gmx_domdec_t *dd,struct gmx_lincsdata *li, t_blocka *at2con, - char *name,bool bAll,rvec *x,matrix box) + char *name,gmx_bool bAll,rvec *x,matrix box) { char str[STRLEN]; FILE *fp; @@ -1148,7 +1148,7 @@ static void dump_conf(gmx_domdec_t *dd,struct gmx_lincsdata *li, gmx_fio_fclose(fp); } -bool constrain_lincs(FILE *fplog,bool bLog,bool bEner, +gmx_bool constrain_lincs(FILE *fplog,gmx_bool bLog,gmx_bool bEner, t_inputrec *ir, gmx_large_int_t step, struct gmx_lincsdata *lincsd,t_mdatoms *md, @@ -1156,7 +1156,7 @@ bool constrain_lincs(FILE *fplog,bool bLog,bool bEner, rvec *x,rvec *xprime,rvec *min_proj,matrix box, real lambda,real *dvdlambda, real invdt,rvec *v, - bool bCalcVir,tensor rmdr, + gmx_bool bCalcVir,tensor rmdr, int econq, t_nrnb *nrnb, int maxwarn,int *warncount) @@ -1166,7 +1166,7 @@ bool constrain_lincs(FILE *fplog,bool bLog,bool bEner, real ncons_loc,p_ssd,p_max; t_pbc pbc,*pbc_null; rvec dx; - bool bOK; + gmx_bool bOK; bOK = TRUE; diff --git a/src/mdlib/constr.c b/src/mdlib/constr.c index 264a6c3aa6..18e4f1d69b 100644 --- a/src/mdlib/constr.c +++ b/src/mdlib/constr.c @@ -82,7 +82,7 @@ typedef struct { atom_id blocknr; } t_sortblock; -static t_vetavars *init_vetavars(real veta,real vetanew, t_inputrec *ir, gmx_ekindata_t *ekind, bool bPscal) +static t_vetavars *init_vetavars(real veta,real vetanew, t_inputrec *ir, gmx_ekindata_t *ekind, gmx_bool bPscal) { t_vetavars *vars; double g; @@ -274,7 +274,7 @@ static void pr_sortblock(FILE *fp,const char *title,int nsb,t_sortblock sb[]) sb[i].blocknr); } -bool constrain(FILE *fplog,bool bLog,bool bEner, +gmx_bool constrain(FILE *fplog,gmx_bool bLog,gmx_bool bEner, struct gmx_constr *constr, t_idef *idef,t_inputrec *ir,gmx_ekindata_t *ekind, t_commrec *cr, @@ -283,9 +283,9 @@ bool constrain(FILE *fplog,bool bLog,bool bEner, rvec *x,rvec *xprime,rvec *min_proj,matrix box, real lambda,real *dvdlambda, rvec *v,tensor *vir, - t_nrnb *nrnb,int econq,bool bPscal,real veta, real vetanew) + t_nrnb *nrnb,int econq,gmx_bool bPscal,real veta, real vetanew) { - bool bOK,bDump; + gmx_bool bOK,bDump; int start,homenr,nrend; int i,j,d; int ncons,error; @@ -519,7 +519,7 @@ real *constr_rmsd_data(struct gmx_constr *constr) return NULL; } -real constr_rmsd(struct gmx_constr *constr,bool bSD2) +real constr_rmsd(struct gmx_constr *constr,gmx_bool bSD2) { if (constr->lincsd) return lincs_rmsd(constr->lincsd,bSD2); @@ -651,12 +651,12 @@ static void make_shake_sblock_dd(struct gmx_constr *constr, t_blocka make_at2con(int start,int natoms, t_ilist *ilist,t_iparams *iparams, - bool bDynamics,int *nflexiblecons) + gmx_bool bDynamics,int *nflexiblecons) { int *count,ncon,con,con_tot,nflexcon,ftype,i,a; t_iatom *ia; t_blocka at2con; - bool bFlexCon; + gmx_bool bFlexCon; snew(count,natoms); nflexcon = 0; @@ -782,7 +782,7 @@ void set_constraints(struct gmx_constr *constr, } static void constr_recur(t_blocka *at2con, - t_ilist *ilist,t_iparams *iparams,bool bTopB, + t_ilist *ilist,t_iparams *iparams,gmx_bool bTopB, int at,int depth,int nc,int *path, real r0,real r1,real *r2max, int *count) @@ -790,7 +790,7 @@ static void constr_recur(t_blocka *at2con, int ncon1; t_iatom *ia1,*ia2; int c,con,a1; - bool bUse; + gmx_bool bUse; t_iatom *ia; real len,rn0,rn1; @@ -1090,14 +1090,14 @@ t_blocka *atom2constraints_moltype(gmx_constr_t constr) } -bool inter_charge_group_constraints(gmx_mtop_t *mtop) +gmx_bool inter_charge_group_constraints(gmx_mtop_t *mtop) { const gmx_moltype_t *molt; const t_block *cgs; const t_ilist *il; int mb; int nat,*at2cg,cg,a,ftype,i; - bool bInterCG; + gmx_bool bInterCG; bInterCG = FALSE; for(mb=0; mbnmolblock && !bInterCG; mb++) { diff --git a/src/mdlib/coupling.c b/src/mdlib/coupling.c index b9ec60a751..37ca7fc4d0 100644 --- a/src/mdlib/coupling.c +++ b/src/mdlib/coupling.c @@ -54,7 +54,7 @@ /* these integration routines are only referenced inside this file */ static void NHC_trotter(t_grpopts *opts,int nvar, gmx_ekindata_t *ekind,real dtfull, - double xi[],double vxi[], double scalefac[], real *veta, t_extmass *MassQ, bool bEkinAveVel) + double xi[],double vxi[], double scalefac[], real *veta, t_extmass *MassQ, gmx_bool bEkinAveVel) { /* general routine for both barostat and thermostat nose hoover chains */ @@ -66,7 +66,7 @@ static void NHC_trotter(t_grpopts *opts,int nvar, gmx_ekindata_t *ekind,real dtf double *ivxi,*ixi; double *iQinv; double *GQ; - bool bBarostat; + gmx_bool bBarostat; int mstepsi, mstepsj; int ns = SUZUKI_YOSHIDA_NUM; /* set the degree of integration in the types/state.h file */ int nh = opts->nhchainlength; @@ -282,7 +282,7 @@ real calc_temp(real ekin,real nrdf) void parrinellorahman_pcoupl(FILE *fplog,gmx_large_int_t step, t_inputrec *ir,real dt,tensor pres, tensor box,tensor box_rel,tensor boxv, - tensor M,matrix mu,bool bFirstStep) + tensor M,matrix mu,gmx_bool bFirstStep) { /* This doesn't do any coordinate updating. It just * integrates the box vector equations from the calculated @@ -658,7 +658,7 @@ void trotter_update(t_inputrec *ir,gmx_large_int_t step, gmx_ekindata_t *ekind, double *scalefac,dtc; int *trotter_seq; rvec sumv,consk; - bool bCouple; + gmx_bool bCouple; if (trotter_seqno <= ettTSEQ2) { @@ -774,7 +774,7 @@ void trotter_update(t_inputrec *ir,gmx_large_int_t step, gmx_ekindata_t *ekind, sfree(scalefac); } -int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, bool bTrotter) +int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool bTrotter) { int n,i,j,d,ntgrp,ngtc,nnhpres,nh,gc=0; t_grp_tcstat *tcstat; diff --git a/src/mdlib/csettle.c b/src/mdlib/csettle.c index 4b1922b62e..dbab4f2da1 100644 --- a/src/mdlib/csettle.c +++ b/src/mdlib/csettle.c @@ -172,7 +172,7 @@ void settle_proj(FILE *fp, gmx_settledata_t settled,int econq, int nsettle, t_iatom iatoms[],rvec x[], rvec *der,rvec *derp, - bool bCalcVir,tensor rmdder,t_vetavars *vetavar) + gmx_bool bCalcVir,tensor rmdder,t_vetavars *vetavar) { /* Settle for projection out constraint components * of derivatives of the coordinates. @@ -376,7 +376,7 @@ static int xshake(real b4[], real after[], real dOH, real dHH, real mO, real mH) void csettle(gmx_settledata_t settled, int nsettle, t_iatom iatoms[],real b4[], real after[], - real invdt,real *v,bool bCalcVir,tensor rmdr,int *error,t_vetavars *vetavar) + real invdt,real *v,gmx_bool bCalcVir,tensor rmdr,int *error,t_vetavars *vetavar) { /* ***************************************************************** */ /* ** */ diff --git a/src/mdlib/domdec.c b/src/mdlib/domdec.c index f2e52ec94e..8a7a1785fe 100644 --- a/src/mdlib/domdec.c +++ b/src/mdlib/domdec.c @@ -95,19 +95,19 @@ typedef struct int np_dlb; /* For dlb, for use with edlbAUTO */ gmx_domdec_ind_t *ind; /* The indices to communicate, size np */ int np_nalloc; - bool bInPlace; /* Can we communicate in place? */ + gmx_bool bInPlace; /* Can we communicate in place? */ } gmx_domdec_comm_dim_t; typedef struct { - bool *bCellMin; /* Temp. var.: is this cell size at the limit */ + gmx_bool *bCellMin; /* Temp. var.: is this cell size at the limit */ real *cell_f; /* State var.: cell boundaries, box relative */ real *old_cell_f; /* Temp. var.: old cell size */ real *cell_f_max0; /* State var.: max lower boundary, incl neighbors */ real *cell_f_min1; /* State var.: min upper boundary, incl neighbors */ real *bound_min; /* Temp. var.: lower limit for cell boundary */ real *bound_max; /* Temp. var.: upper limit for cell boundary */ - bool bLimited; /* State var.: is DLB limited in this dim and row */ + gmx_bool bLimited; /* State var.: is DLB limited in this dim and row */ real *buf_ncd; /* Temp. var. */ } gmx_domdec_root_t; @@ -164,7 +164,7 @@ const char *edlb_names[edlbNR] = { "auto", "no", "yes" }; typedef struct { int dim; /* The dimension */ - bool dim_match;/* Tells if DD and PME dims match */ + gmx_bool dim_match;/* Tells if DD and PME dims match */ int nslab; /* The number of PME slabs in this dimension */ real *slb_dim_f; /* Cell sizes for determining the PME comm. with SLB */ int *pp_min; /* The minimum pp node location, size nslab */ @@ -195,7 +195,7 @@ typedef struct gmx_domdec_comm int npmenodes_x; int npmenodes_y; /* The communication setup including the PME only nodes */ - bool bCartesianPP_PME; + gmx_bool bCartesianPP_PME; ivec ntot; int cartpmedim; int *pmenodes; /* size npmenodes */ @@ -204,7 +204,7 @@ typedef struct gmx_domdec_comm gmx_ddpme_t ddpme[2]; /* The DD particle-particle nodes only */ - bool bCartesianPP; + gmx_bool bCartesianPP; int *ddindex2ddnodeid; /* size npmenode, only with bCartesianPP_PME */ /* The global charge groups */ @@ -215,18 +215,18 @@ typedef struct gmx_domdec_comm gmx_domdec_sort_t *sort; /* Are there bonded and multi-body interactions between charge groups? */ - bool bInterCGBondeds; - bool bInterCGMultiBody; + gmx_bool bInterCGBondeds; + gmx_bool bInterCGMultiBody; /* Data for the optional bonded interaction atom communication range */ - bool bBondComm; + gmx_bool bBondComm; t_blocka *cglink; char *bLocalCG; /* The DLB option */ int eDLB; /* Are we actually using DLB? */ - bool bDynLoadBal; + gmx_bool bDynLoadBal; /* Cell sizes for static load balancing, first index cartesian */ real **slb_frac; @@ -241,7 +241,7 @@ typedef struct gmx_domdec_comm /* The lower limit for the DD cell size with DLB */ real cellsize_limit; /* Effectively no NB cut-off limit with DLB for systems without PBC? */ - bool bVacDLBNoLimit; + gmx_bool bVacDLBNoLimit; /* tric_dir is only stored here because dd_get_ns_ranges needs it */ ivec tric_dir; @@ -307,7 +307,7 @@ typedef struct gmx_domdec_comm real cell_f_min1[DIM]; /* Stuff for load communication */ - bool bRecordLoad; + gmx_bool bRecordLoad; gmx_domdec_load_t *load; #ifdef GMX_MPI MPI_Comm *mpi_comm_load; @@ -447,7 +447,7 @@ static int ddcoord2ddnodeid(gmx_domdec_t *dd,ivec c) return ddnodeid; } -static bool dynamic_dd_box(gmx_ddbox_t *ddbox,t_inputrec *ir) +static gmx_bool dynamic_dd_box(gmx_ddbox_t *ddbox,t_inputrec *ir) { return (ddbox->nboundeddim < DIM || DYNAMIC_BOX(*ir)); } @@ -583,7 +583,7 @@ void dd_move_x(gmx_domdec_t *dd,matrix box,rvec x[]) gmx_domdec_comm_dim_t *cd; gmx_domdec_ind_t *ind; rvec shift={0,0,0},*buf,*rbuf; - bool bPBC,bScrew; + gmx_bool bPBC,bScrew; comm = dd->comm; @@ -695,7 +695,7 @@ void dd_move_f(gmx_domdec_t *dd,rvec f[],rvec *fshift) rvec *buf,*sbuf; ivec vis; int is; - bool bPBC,bScrew; + gmx_bool bPBC,bScrew; comm = dd->comm; @@ -981,7 +981,7 @@ static void dd_move_cellx(gmx_domdec_t *dd,gmx_ddbox_t *ddbox, rvec dh; real dist_d,c=0,det; gmx_domdec_comm_t *comm; - bool bPBC,bUse; + gmx_bool bPBC,bUse; comm = dd->comm; @@ -2194,9 +2194,9 @@ static int dd_simnode2pmenode(t_commrec *cr,int sim_nodeid) return pmenode; } -bool gmx_pmeonlynode(t_commrec *cr,int sim_nodeid) +gmx_bool gmx_pmeonlynode(t_commrec *cr,int sim_nodeid) { - bool bPMEOnlyNode; + gmx_bool bPMEOnlyNode; if (DOMAINDECOMP(cr)) { @@ -2265,11 +2265,11 @@ void get_pme_ddnodes(t_commrec *cr,int pmenodeid, } } -static bool receive_vir_ener(t_commrec *cr) +static gmx_bool receive_vir_ener(t_commrec *cr) { gmx_domdec_comm_t *comm; int pmenode,coords[DIM],rank; - bool bReceive; + gmx_bool bReceive; bReceive = TRUE; if (cr->npmenodes < cr->dd->nnodes) @@ -2771,7 +2771,7 @@ int dd_pme_maxshift_y(gmx_domdec_t *dd) } static void set_pme_maxshift(gmx_domdec_t *dd,gmx_ddpme_t *ddpme, - bool bUniform,gmx_ddbox_t *ddbox,real *cell_f) + gmx_bool bUniform,gmx_ddbox_t *ddbox,real *cell_f) { gmx_domdec_comm_t *comm; int nc,ns,s; @@ -2862,7 +2862,7 @@ static void check_box_size(gmx_domdec_t *dd,gmx_ddbox_t *ddbox) } static void set_dd_cell_sizes_slb(gmx_domdec_t *dd,gmx_ddbox_t *ddbox, - bool bMaster,ivec npulse) + gmx_bool bMaster,ivec npulse) { gmx_domdec_comm_t *comm; int d,j; @@ -2966,14 +2966,14 @@ static void set_dd_cell_sizes_slb(gmx_domdec_t *dd,gmx_ddbox_t *ddbox, static void dd_cell_sizes_dlb_root_enforce_limits(gmx_domdec_t *dd, int d,int dim,gmx_domdec_root_t *root, gmx_ddbox_t *ddbox, - bool bUniform,gmx_large_int_t step, real cellsize_limit_f, int range[]) + gmx_bool bUniform,gmx_large_int_t step, real cellsize_limit_f, int range[]) { gmx_domdec_comm_t *comm; int ncd,i,j,nmin,nmin_old; - bool bLimLo,bLimHi; + gmx_bool bLimLo,bLimHi; real *cell_size; real fac,halfway,cellsize_limit_f_i,region_size; - bool bPBC,bLastHi=FALSE; + gmx_bool bPBC,bLastHi=FALSE; int nrange[]={range[0],range[1]}; region_size= root->cell_f[range[1]]-root->cell_f[range[0]]; @@ -3172,8 +3172,8 @@ static void dd_cell_sizes_dlb_root_enforce_limits(gmx_domdec_t *dd, static void set_dd_cell_sizes_dlb_root(gmx_domdec_t *dd, int d,int dim,gmx_domdec_root_t *root, - gmx_ddbox_t *ddbox,bool bDynamicBox, - bool bUniform,gmx_large_int_t step) + gmx_ddbox_t *ddbox,gmx_bool bDynamicBox, + gmx_bool bUniform,gmx_large_int_t step) { gmx_domdec_comm_t *comm; int ncd,d1,i,j,pos; @@ -3182,7 +3182,7 @@ static void set_dd_cell_sizes_dlb_root(gmx_domdec_t *dd, real cellsize_limit_f,dist_min_f,dist_min_f_hard,space; real change_limit = 0.1; real relax = 0.5; - bool bPBC; + gmx_bool bPBC; int range[] = { 0, 0 }; comm = dd->comm; @@ -3390,12 +3390,12 @@ static void distribute_dd_cell_sizes_dlb(gmx_domdec_t *dd, } static void set_dd_cell_sizes_dlb_change(gmx_domdec_t *dd, - gmx_ddbox_t *ddbox,bool bDynamicBox, - bool bUniform,gmx_large_int_t step) + gmx_ddbox_t *ddbox,gmx_bool bDynamicBox, + gmx_bool bUniform,gmx_large_int_t step) { gmx_domdec_comm_t *comm; int d,dim,d1; - bool bRowMember,bRowRoot; + gmx_bool bRowMember,bRowRoot; real *cell_f_row; comm = dd->comm; @@ -3450,8 +3450,8 @@ static void set_dd_cell_sizes_dlb_nochange(gmx_domdec_t *dd,gmx_ddbox_t *ddbox) static void set_dd_cell_sizes_dlb(gmx_domdec_t *dd, - gmx_ddbox_t *ddbox,bool bDynamicBox, - bool bUniform,bool bDoDLB,gmx_large_int_t step, + gmx_ddbox_t *ddbox,gmx_bool bDynamicBox, + gmx_bool bUniform,gmx_bool bDoDLB,gmx_large_int_t step, gmx_wallcycle_t wcycle) { gmx_domdec_comm_t *comm; @@ -3518,8 +3518,8 @@ static void realloc_comm_ind(gmx_domdec_t *dd,ivec npulse) static void set_dd_cell_sizes(gmx_domdec_t *dd, - gmx_ddbox_t *ddbox,bool bDynamicBox, - bool bUniform,bool bDoDLB,gmx_large_int_t step, + gmx_ddbox_t *ddbox,gmx_bool bDynamicBox, + gmx_bool bUniform,gmx_bool bDoDLB,gmx_large_int_t step, gmx_wallcycle_t wcycle) { gmx_domdec_comm_t *comm; @@ -3647,7 +3647,7 @@ static void distribute_cg(FILE *fplog,gmx_large_int_t step, ivec ind; real nrcg,inv_ncg,pos_d; atom_id *cgindex; - bool bUnbounded,bScrew; + gmx_bool bUnbounded,bScrew; ma = dd->ma; @@ -3883,7 +3883,7 @@ static int compact_and_copy_vec_at(int ncg,int *move, int *cgindex, int nvec,int vec, rvec *src,gmx_domdec_comm_t *comm, - bool bCompact) + gmx_bool bCompact) { int m,icg,i,i0,i1,nrcg; int home_pos; @@ -3936,7 +3936,7 @@ static int compact_and_copy_vec_at(int ncg,int *move, static int compact_and_copy_vec_cg(int ncg,int *move, int *cgindex, int nvec,rvec *src,gmx_domdec_comm_t *comm, - bool bCompact) + gmx_bool bCompact) { int m,icg,i0,i1,nrcg; int home_pos; @@ -4065,7 +4065,7 @@ static void clear_and_mark_ind(int ncg,int *move, static void print_cg_move(FILE *fplog, gmx_domdec_t *dd, gmx_large_int_t step,int cg,int dim,int dir, - bool bHaveLimitdAndCMOld,real limitd, + gmx_bool bHaveLimitdAndCMOld,real limitd, rvec cm_old,rvec cm_new,real pos_d) { gmx_domdec_comm_t *comm; @@ -4104,7 +4104,7 @@ static void print_cg_move(FILE *fplog, static void cg_move_error(FILE *fplog, gmx_domdec_t *dd, gmx_large_int_t step,int cg,int dim,int dir, - bool bHaveLimitdAndCMOld,real limitd, + gmx_bool bHaveLimitdAndCMOld,real limitd, rvec cm_old,rvec cm_new,real pos_d) { if (fplog) @@ -4161,7 +4161,7 @@ static int dd_redistribute_cg(FILE *fplog,gmx_large_int_t step, gmx_domdec_t *dd,ivec tric_dir, t_state *state,rvec **f, t_forcerec *fr,t_mdatoms *md, - bool bCompact, + gmx_bool bCompact, t_nrnb *nrnb) { int *move; @@ -4172,8 +4172,8 @@ static int dd_redistribute_cg(FILE *fplog,gmx_large_int_t step, int sbuf[2],rbuf[2]; int home_pos_cg,home_pos_at,ncg_stay_home,buf_pos; int flag; - bool bV=FALSE,bSDX=FALSE,bCGP=FALSE; - bool bScrew; + gmx_bool bV=FALSE,bSDX=FALSE,bCGP=FALSE; + gmx_bool bScrew; ivec dev; real inv_ncg,pos_d; matrix tcm; @@ -4841,7 +4841,7 @@ static void get_load_distribution(gmx_domdec_t *dd,gmx_wallcycle_t wcycle) gmx_domdec_root_t *root=NULL; int d,dim,cid,i,pos; float cell_frac=0,sbuf[DD_NLOAD_MAX]; - bool bSepPME; + gmx_bool bSepPME; if (debug) { @@ -5033,7 +5033,7 @@ static void print_dd_load_av(FILE *fplog,gmx_domdec_t *dd) char buf[STRLEN]; int npp,npme,nnodes,d,limp; float imbal,pme_f_ratio,lossf,lossp=0; - bool bLim; + gmx_bool bLim; gmx_domdec_comm_t *comm; comm = dd->comm; @@ -5128,7 +5128,7 @@ static float dd_vol_min(gmx_domdec_t *dd) return dd->comm->load[0].cvol_min*dd->nnodes; } -static bool dd_load_flags(gmx_domdec_t *dd) +static gmx_bool dd_load_flags(gmx_domdec_t *dd) { return dd->comm->load[0].flags; } @@ -5299,7 +5299,7 @@ static void make_load_communicators(gmx_domdec_t *dd) void setup_dd_grid(FILE *fplog,gmx_domdec_t *dd) { - bool bZYX; + gmx_bool bZYX; int d,dim,i,j,m; ivec tmp,s; int nzone,nzonep; @@ -5651,7 +5651,7 @@ static void split_communicator(FILE *fplog,t_commrec *cr,int dd_node_order, gmx_domdec_t *dd; gmx_domdec_comm_t *comm; int i,rank; - bool bDiv[DIM]; + gmx_bool bDiv[DIM]; ivec periods; #ifdef GMX_MPI MPI_Comm comm_cart; @@ -6026,7 +6026,7 @@ static real average_cellsize_min(gmx_domdec_t *dd,gmx_ddbox_t *ddbox) } static int check_dlb_support(FILE *fplog,t_commrec *cr, - const char *dlb_opt,bool bRecordLoad, + const char *dlb_opt,gmx_bool bRecordLoad, unsigned long Flags,t_inputrec *ir) { gmx_domdec_t *dd; @@ -6173,7 +6173,7 @@ gmx_domdec_t *init_domain_decomposition(FILE *fplog,t_commrec *cr, int recload; int d,i,j; real r_2b,r_mb,r_bonded=-1,r_bonded_limit=-1,limit,acs; - bool bC; + gmx_bool bC; char buf[STRLEN]; if (fplog) @@ -6679,10 +6679,10 @@ static char *init_bLocalCG(gmx_mtop_t *mtop) void dd_init_bondeds(FILE *fplog, gmx_domdec_t *dd,gmx_mtop_t *mtop, gmx_vsite_t *vsite,gmx_constr_t constr, - t_inputrec *ir,bool bBCheck,cginfo_mb_t *cginfo_mb) + t_inputrec *ir,gmx_bool bBCheck,cginfo_mb_t *cginfo_mb) { gmx_domdec_comm_t *comm; - bool bBondComm; + gmx_bool bBondComm; int d; dd_make_reverse_top(fplog,dd,mtop,vsite,constr,ir,bBCheck); @@ -6708,7 +6708,7 @@ void dd_init_bondeds(FILE *fplog, static void print_dd_settings(FILE *fplog,gmx_domdec_t *dd, t_inputrec *ir, - bool bDynLoadBal,real dlb_scale, + gmx_bool bDynLoadBal,real dlb_scale, gmx_ddbox_t *ddbox) { gmx_domdec_comm_t *comm; @@ -6830,7 +6830,7 @@ void set_dd_parameters(FILE *fplog,gmx_domdec_t *dd,real dlb_scale, { gmx_domdec_comm_t *comm; int d,dim,npulse,npulse_d_max,npulse_d; - bool bNoCutOff; + gmx_bool bNoCutOff; int natoms_tot; real vol_frac; @@ -7098,10 +7098,10 @@ static void make_cell2at_index(gmx_domdec_comm_dim_t *cd, } } -static bool missing_link(t_blocka *link,int cg_gl,char *bLocalCG) +static gmx_bool missing_link(t_blocka *link,int cg_gl,char *bLocalCG) { int i; - bool bMiss; + gmx_bool bMiss; bMiss = FALSE; for(i=link->index[cg_gl]; iindex[cg_gl+1]; i++) @@ -7127,7 +7127,7 @@ static void setup_dd_communication(gmx_domdec_t *dd, gmx_domdec_comm_dim_t *cd; gmx_domdec_ind_t *ind; cginfo_mb_t *cginfo_mb; - bool bBondComm,bDist2B,bDistMB,bDistMB_pulse,bDistBonded,bScrew; + gmx_bool bBondComm,bDist2B,bDistMB,bDistMB_pulse,bDistBonded,bScrew; real r_mb,r_comm2,r_scomm2,r_bcomm2,r,r_0,r_1,r2,rb2,r2inc,inv_ncg,tric_sh; rvec rb,rn; real corner[DIM][4],corner_round_0=0,corner_round_1[4]; @@ -8144,7 +8144,7 @@ void print_dd_statistics(t_commrec *cr,t_inputrec *ir,FILE *fplog) void dd_partition_system(FILE *fplog, gmx_large_int_t step, t_commrec *cr, - bool bMasterState, + gmx_bool bMasterState, int nstglobalcomm, t_state *state_global, gmx_mtop_t *top_global, @@ -8159,7 +8159,7 @@ void dd_partition_system(FILE *fplog, gmx_constr_t constr, t_nrnb *nrnb, gmx_wallcycle_t wcycle, - bool bVerbose) + gmx_bool bVerbose) { gmx_domdec_t *dd; gmx_domdec_comm_t *comm; @@ -8168,8 +8168,8 @@ void dd_partition_system(FILE *fplog, gmx_large_int_t step_pcoupl; rvec cell_ns_x0,cell_ns_x1; int i,j,n,cg0=0,ncg_home_old=-1,nat_f_novirsum; - bool bBoxChanged,bNStGlobalComm,bDoDLB,bCheckDLB,bTurnOnDLB,bLogLoad; - bool bRedist,bSortCG,bResortAll; + gmx_bool bBoxChanged,bNStGlobalComm,bDoDLB,bCheckDLB,bTurnOnDLB,bLogLoad; + gmx_bool bRedist,bSortCG,bResortAll; ivec ncells_old,np; real grid_density; char sbuf[22]; diff --git a/src/mdlib/domdec_box.c b/src/mdlib/domdec_box.c index 99f9071626..a13f6022ec 100644 --- a/src/mdlib/domdec_box.c +++ b/src/mdlib/domdec_box.c @@ -209,7 +209,7 @@ static void set_tric_dir(ivec *dd_nc,gmx_ddbox_t *ddbox,matrix box) } static void low_set_ddbox(t_inputrec *ir,ivec *dd_nc,matrix box, - bool bCalcUnboundedSize,int ncg,t_block *cgs,rvec *x, + gmx_bool bCalcUnboundedSize,int ncg,t_block *cgs,rvec *x, t_commrec *cr_sum, gmx_ddbox_t *ddbox) { @@ -251,9 +251,9 @@ static void low_set_ddbox(t_inputrec *ir,ivec *dd_nc,matrix box, set_tric_dir(dd_nc,ddbox,box); } -void set_ddbox(gmx_domdec_t *dd,bool bMasterState,t_commrec *cr_sum, +void set_ddbox(gmx_domdec_t *dd,gmx_bool bMasterState,t_commrec *cr_sum, t_inputrec *ir,matrix box, - bool bCalcUnboundedSize,t_block *cgs,rvec *x, + gmx_bool bCalcUnboundedSize,t_block *cgs,rvec *x, gmx_ddbox_t *ddbox) { if (!bMasterState || DDMASTER(dd)) diff --git a/src/mdlib/domdec_con.c b/src/mdlib/domdec_con.c index 749b472473..9152317c7c 100644 --- a/src/mdlib/domdec_con.c +++ b/src/mdlib/domdec_con.c @@ -44,7 +44,7 @@ typedef struct gmx_domdec_specat_comm { int nreq[DIM][2][2]; /* The atoms to send */ gmx_specatsend_t spas[DIM][2]; - bool *bSendAtom; + gmx_bool *bSendAtom; int bSendAtom_nalloc; /* Send buffers */ int *ibuf; @@ -82,7 +82,7 @@ static void dd_move_f_specat(gmx_domdec_t *dd,gmx_domdec_specat_comm_t *spac, int n,n0,n1,d,dim,dir,i; ivec vis; int is; - bool bPBC,bScrew; + gmx_bool bPBC,bScrew; n = spac->at_end; for(d=dd->ndim-1; d>=0; d--) @@ -208,7 +208,7 @@ static void dd_move_x_specat(gmx_domdec_t *dd,gmx_domdec_specat_comm_t *spac, gmx_specatsend_t *spas; rvec *x,*vbuf,*rbuf; int nvec,v,n,nn,ns0,ns1,nr0,nr1,nr,d,dim,dir,i; - bool bPBC,bScrew=FALSE; + gmx_bool bPBC,bScrew=FALSE; rvec shift={0,0,0}; nvec = 1; @@ -454,7 +454,7 @@ static int setup_specat_communication(gmx_domdec_t *dd, int nsend[2],nlast,nsend_zero[2]={0,0},*nsend_ptr; int d,dim,ndir,dir,nr,ns,i,nrecv_local,n0,start,ireq,ind,buf[2]; int nat_tot_specat,nat_tot_prev,nalloc_old; - bool bPBC,bFirst; + gmx_bool bPBC,bFirst; gmx_specatsend_t *spas; if (debug) @@ -711,7 +711,7 @@ static int setup_specat_communication(gmx_domdec_t *dd, static void walk_out(int con,int con_offset,int a,int offset,int nrec, int ncon1,const t_iatom *ia1,const t_iatom *ia2, const t_blocka *at2con, - const gmx_ga2la_t ga2la,bool bHomeConnect, + const gmx_ga2la_t ga2la,gmx_bool bHomeConnect, gmx_domdec_constraints_t *dc, gmx_domdec_specat_comm_t *dcc, t_ilist *il_local) diff --git a/src/mdlib/domdec_setup.c b/src/mdlib/domdec_setup.c index 78356d8646..ecc3207d2f 100644 --- a/src/mdlib/domdec_setup.c +++ b/src/mdlib/domdec_setup.c @@ -60,12 +60,12 @@ static int factorize(int n,int **fac,int **mfac) return ndiv; } -static bool fits_pme_ratio(int nnodes,int npme,float ratio) +static gmx_bool fits_pme_ratio(int nnodes,int npme,float ratio) { return ((double)npme/(double)nnodes > 0.95*ratio); } -static bool fits_pp_pme_perf(FILE *fplog, +static gmx_bool fits_pp_pme_perf(FILE *fplog, t_inputrec *ir,matrix box,gmx_mtop_t *mtop, int nnodes,int npme,float ratio) { @@ -236,7 +236,7 @@ real comm_box_frac(ivec dd_nc,real cutoff,gmx_ddbox_t *ddbox) return comm_vol; } -static bool inhomogeneous_z(const t_inputrec *ir) +static gmx_bool inhomogeneous_z(const t_inputrec *ir) { return ((EEL_PME(ir->coulombtype) || ir->coulombtype==eelEWALD) && ir->ePBC==epbcXYZ && ir->ewald_geometry==eewg3DC); @@ -486,16 +486,16 @@ static void assign_factors(gmx_domdec_t *dd, static real optimize_ncells(FILE *fplog, int nnodes_tot,int npme_only, - bool bDynLoadBal,real dlb_scale, + gmx_bool bDynLoadBal,real dlb_scale, gmx_mtop_t *mtop,matrix box,gmx_ddbox_t *ddbox, t_inputrec *ir, gmx_domdec_t *dd, real cellsize_limit,real cutoff, - bool bInterCGBondeds,bool bInterCGMultiBody, + gmx_bool bInterCGBondeds,gmx_bool bInterCGMultiBody, ivec nc) { int npp,npme,ndiv,*div,*mdiv,d,nmax; - bool bExcl_pbcdx; + gmx_bool bExcl_pbcdx; float pbcdxr; real limit; ivec itry; @@ -603,9 +603,9 @@ static real optimize_ncells(FILE *fplog, real dd_choose_grid(FILE *fplog, t_commrec *cr,gmx_domdec_t *dd,t_inputrec *ir, gmx_mtop_t *mtop,matrix box,gmx_ddbox_t *ddbox, - bool bDynLoadBal,real dlb_scale, + gmx_bool bDynLoadBal,real dlb_scale, real cellsize_limit,real cutoff_dd, - bool bInterCGBondeds,bool bInterCGMultiBody) + gmx_bool bInterCGBondeds,gmx_bool bInterCGMultiBody) { int npme,nkx,nky; real limit; diff --git a/src/mdlib/domdec_top.c b/src/mdlib/domdec_top.c index d3f974d067..1a0fc94c02 100644 --- a/src/mdlib/domdec_top.c +++ b/src/mdlib/domdec_top.c @@ -50,10 +50,10 @@ typedef struct { } gmx_molblock_ind_t; typedef struct gmx_reverse_top { - bool bExclRequired; /* Do we require all exclusions to be assigned? */ - bool bConstr; /* Are there constraints in this revserse top? */ - bool bBCheck; /* All bonded interactions have to be assigned? */ - bool bMultiCGmols; /* Are the multi charge-group molecules? */ + gmx_bool bExclRequired; /* Do we require all exclusions to be assigned? */ + gmx_bool bConstr; /* Are there constraints in this revserse top? */ + gmx_bool bBCheck; /* All bonded interactions have to be assigned? */ + gmx_bool bMultiCGmols; /* Are the multi charge-group molecules? */ gmx_reverse_ilist_t *ril_mt; /* Reverse ilist for all moltypes */ int ril_mt_tot_size; int ilsort; /* The sorting state of bondeds for free energy */ @@ -81,7 +81,7 @@ static int nral_rt(int ftype) return nral; } -static bool dd_check_ftype(int ftype,bool bBCheck,bool bConstr) +static gmx_bool dd_check_ftype(int ftype,gmx_bool bBCheck,gmx_bool bConstr) { return (((interaction_function[ftype].flags & IF_BOND) && !(interaction_function[ftype].flags & IF_VSITE) && @@ -115,7 +115,7 @@ static void print_missing_interactions_mb(FILE *fplog,t_commrec *cr, int nprint; t_ilist *il; t_iatom *ia; - bool bFound; + gmx_bool bFound; nril_mol = ril->index[nat_mol]; snew(assigned,nmol*nril_mol); @@ -407,17 +407,17 @@ static int count_excls(t_block *cgs,t_blocka *excls,int *n_intercg_excl) static int low_make_reverse_ilist(t_ilist *il_mt,t_atom *atom, int **vsite_pbc, int *count, - bool bConstr,bool bBCheck, + gmx_bool bConstr,gmx_bool bBCheck, int *r_index,int *r_il, - bool bLinkToAllAtoms, - bool bAssign) + gmx_bool bLinkToAllAtoms, + gmx_bool bAssign) { int ftype,nral,i,j,nlink,link; t_ilist *il; t_iatom *ia; atom_id a; int nint; - bool bVSite; + gmx_bool bVSite; nint = 0; for(ftype=0; ftypeil); } -static gmx_reverse_top_t *make_reverse_top(gmx_mtop_t *mtop,bool bFE, +static gmx_reverse_top_t *make_reverse_top(gmx_mtop_t *mtop,gmx_bool bFE, int ***vsite_pbc_molt, - bool bConstr, - bool bBCheck,int *nint) + gmx_bool bConstr, + gmx_bool bBCheck,int *nint) { int mt,i,mb; gmx_reverse_top_t *rt; @@ -623,7 +623,7 @@ static gmx_reverse_top_t *make_reverse_top(gmx_mtop_t *mtop,bool bFE, void dd_make_reverse_top(FILE *fplog, gmx_domdec_t *dd,gmx_mtop_t *mtop, gmx_vsite_t *vsite,gmx_constr_t constr, - t_inputrec *ir,bool bBCheck) + t_inputrec *ir,gmx_bool bBCheck) { int mb,natoms,n_recursive_vsite,nexcl,nexcl_icg,a; gmx_molblock_t *molb; @@ -764,7 +764,7 @@ static void add_posres(int mol,int a_mol,gmx_molblock_t *molb, static void add_vsite(gmx_ga2la_t ga2la,int *index,int *rtil, int ftype,int nral, - bool bHomeA,int a,int a_gl,int a_mol, + gmx_bool bHomeA,int a,int a_gl,int a_mol, t_iatom *iatoms, t_idef *idef,int **vsite_pbc,int *vsite_pbc_nalloc) { @@ -917,7 +917,7 @@ static real dd_dist2(t_pbc *pbc_null,rvec *cg_cm,const int *la2lc,int i,int j) static int make_local_bondeds(gmx_domdec_t *dd,gmx_domdec_zones_t *zones, gmx_molblock_t *molb, - bool bRCheckMB,ivec rcheck,bool bRCheck2B, + gmx_bool bRCheckMB,ivec rcheck,gmx_bool bRCheck2B, real rc, int *la2lc,t_pbc *pbc_null,rvec *cg_cm, t_idef *idef,gmx_vsite_t *vsite) @@ -925,7 +925,7 @@ static int make_local_bondeds(gmx_domdec_t *dd,gmx_domdec_zones_t *zones, int nzone,nizone,ic,la0,la1,i,i_gl,mb,mt,mol,i_mol,j,ftype,nral,d,k; int *index,*rtil,**vsite_pbc,*vsite_pbc_nalloc; t_iatom *iatoms,tiatoms[1+MAXATOMLIST]; - bool bBCheck,bUse,bLocal; + gmx_bool bBCheck,bUse,bLocal; real rc2; ivec k_zero,k_plus; gmx_ga2la_t ga2la; @@ -1222,7 +1222,7 @@ static int make_local_bondeds_intracg(gmx_domdec_t *dd,gmx_molblock_t *molb, static int make_local_exclusions(gmx_domdec_t *dd,gmx_domdec_zones_t *zones, gmx_mtop_t *mtop, - bool bRCheck,real rc, + gmx_bool bRCheck,real rc, int *la2lc,t_pbc *pbc_null,rvec *cg_cm, t_forcerec *fr, t_blocka *lexcls) @@ -1419,7 +1419,7 @@ void dd_make_local_top(FILE *fplog, t_forcerec *fr,gmx_vsite_t *vsite, gmx_mtop_t *mtop,gmx_localtop_t *ltop) { - bool bUniqueExcl,bRCheckMB,bRCheck2B,bRCheckExcl; + gmx_bool bUniqueExcl,bRCheckMB,bRCheck2B,bRCheckExcl; real rc=-1; ivec rcheck; int d,nexcl; @@ -1614,7 +1614,7 @@ void dd_init_local_state(gmx_domdec_t *dd, static void check_link(t_blocka *link,int cg_gl,int cg_gl_j) { int k,aj; - bool bFound; + gmx_bool bFound; bFound = FALSE; for(k=link->index[cg_gl]; kindex[cg_gl+1]; k++) @@ -1792,7 +1792,7 @@ t_blocka *make_charge_group_links(gmx_mtop_t *mtop,gmx_domdec_t *dd, } static void bonded_cg_distance_mol(gmx_moltype_t *molt,int *at2cg, - bool bBCheck,bool bExcl,rvec *cg_cm, + gmx_bool bBCheck,gmx_bool bExcl,rvec *cg_cm, real *r_2b,int *ft2b,int *a2_1,int *a2_2, real *r_mb,int *ftmb,int *am_1,int *am_2) { @@ -1911,7 +1911,7 @@ static void get_cgcm_mol(gmx_moltype_t *molt,gmx_ffparams_t *ffparams, static int have_vsite_molt(gmx_moltype_t *molt) { int i; - bool bVSite; + gmx_bool bVSite; bVSite = FALSE; for(i=0; insteps++; eb->nsteps_sim++; @@ -194,7 +194,7 @@ void reset_ebin_sums(t_ebin *eb) } void pr_ebin(FILE *fp,t_ebin *eb,int index,int nener,int nperline, - int prmode,bool bPrHead) + int prmode,gmx_bool bPrHead) { int i,j,i0; real ee=0; diff --git a/src/mdlib/edsam.c b/src/mdlib/edsam.c index 03e1a67eae..a91fb8a81f 100644 --- a/src/mdlib/edsam.c +++ b/src/mdlib/edsam.c @@ -103,7 +103,7 @@ typedef struct typedef struct { real deltaF0; - bool bHarmonic; /* Use flooding for harmonic restraint on eigenvector */ + gmx_bool bHarmonic; /* Use flooding for harmonic restraint on eigenvector */ real tau; real deltaF; real Efl; @@ -145,8 +145,8 @@ typedef struct gmx_edx typedef struct edpar { int nini; /* total Nr of atoms */ - bool fitmas; /* true if trans fit with cm */ - bool pcamas; /* true if mass-weighted PCA */ + gmx_bool fitmas; /* true if trans fit with cm */ + gmx_bool pcamas; /* true if mass-weighted PCA */ int presteps; /* number of steps to run without any * perturbations ... just monitoring */ int outfrq; /* freq (in steps) of writing to edo */ @@ -155,7 +155,7 @@ typedef struct edpar /* all gmx_edx datasets are copied to all nodes in the parallel case */ struct gmx_edx sref; /* reference positions, to these fitting * will be done */ - bool bRefEqAv; /* If true, reference & average indices + gmx_bool bRefEqAv; /* If true, reference & average indices * are the same. Used for optimization */ struct gmx_edx sav; /* average positions */ struct gmx_edx star; /* target positions */ @@ -164,7 +164,7 @@ typedef struct edpar t_edvecs vecs; /* eigenvectors */ real slope; /* minimal slope in acceptance radexp */ - bool bNeedDoEdsam; /* if any of the options mon, linfix, ... + gmx_bool bNeedDoEdsam; /* if any of the options mon, linfix, ... * is used (i.e. apart from flooding) */ t_edflood flood; /* parameters especially for flooding */ struct t_ed_buffer *buf; /* handle to local buffers */ @@ -179,8 +179,8 @@ typedef struct gmx_edsam const char *edonam; /* output */ FILE *edo; /* output file pointer */ t_edpar *edpar; - bool bFirst; - bool bStartFromCpt; + gmx_bool bFirst; + gmx_bool bStartFromCpt; } t_gmx_edsam; @@ -198,7 +198,7 @@ struct t_do_edsam ivec *extra_shifts_xcoll; /* xcoll shift changes since last NS step */ ivec *shifts_xc_ref; /* Shifts for xc_ref */ ivec *extra_shifts_xc_ref; /* xc_ref shift changes since last NS step */ - bool bUpdateShifts; /* TRUE in NS steps to indicate that the + gmx_bool bUpdateShifts; /* TRUE in NS steps to indicate that the ED shifts for this ED dataset need to be updated */ }; @@ -487,7 +487,7 @@ static void do_edfit(int natoms,rvec *xp,rvec *x,matrix R,t_edpar *edi) real max_d; struct t_do_edfit *loc; - bool bFirst; + gmx_bool bFirst; if(edi->buf->do_edfit != NULL) bFirst = FALSE; @@ -674,7 +674,7 @@ static void write_edo_flood(t_edpar *edi, FILE *fp, gmx_large_int_t step) { int i; char buf[22]; - bool bOutputRef=FALSE; + gmx_bool bOutputRef=FALSE; fprintf(fp,"%d.th FL: %s %12.5e %12.5e %12.5e\n", @@ -1075,7 +1075,7 @@ static void bc_ed_positions(t_commrec *cr, struct gmx_edx *s, int stype) /* Broadcasts the eigenvector data */ -static void bc_ed_vecs(t_commrec *cr, t_eigvec *ev, int length, bool bHarmonic) +static void bc_ed_vecs(t_commrec *cr, t_eigvec *ev, int length, gmx_bool bHarmonic) { int i; @@ -1242,7 +1242,7 @@ static int read_checked_edint(FILE *file,const char *label) } -static int read_edint(FILE *file,bool *bEOF) +static int read_edint(FILE *file,gmx_bool *bEOF) { char line[STRLEN+1]; int idum; @@ -1317,7 +1317,7 @@ static void scan_edvec(FILE *in,int nr,rvec *vec) } -static void read_edvec(FILE *in,int nr,t_eigvec *tvec,bool bReadRefproj) +static void read_edvec(FILE *in,int nr,t_eigvec *tvec,gmx_bool bReadRefproj) { int i,idum,nscan; double rdum,refproj_dum=0.0,refprojslope_dum=0.0; @@ -1397,7 +1397,7 @@ static void read_edvecs(FILE *in,int nr,t_edvecs *vecs) /* Check if the same atom indices are used for reference and average positions */ -static bool check_if_same(struct gmx_edx sref, struct gmx_edx sav) +static gmx_bool check_if_same(struct gmx_edx sref, struct gmx_edx sav) { int i; @@ -1424,7 +1424,7 @@ static int read_edi(FILE* in, gmx_edsam_t ed,t_edpar *edi,int nr_mdatoms, int ed { int readmagic; const int magic=669; - bool bEOF; + gmx_bool bEOF; /* the edi file is not free format, so expect problems if the input is corrupt. */ @@ -1872,7 +1872,7 @@ static void do_radcon(rvec *xcoll, t_edpar *edi, t_commrec *cr) int i,j; real rad=0.0, ratio=0.0; struct t_do_radcon *loc; - bool bFirst; + gmx_bool bFirst; rvec vec_dum; @@ -2039,7 +2039,7 @@ static void write_edo(int nr_edi, t_edpar *edi, gmx_edsam_t ed, gmx_large_int_t } /* Returns if any constraints are switched on */ -static int ed_constraints(bool edtype, t_edpar *edi) +static int ed_constraints(gmx_bool edtype, t_edpar *edi) { if (edtype == eEDedsam || edtype == eEDflood) { @@ -2330,7 +2330,7 @@ void do_edsam(t_inputrec *ir, struct t_do_edsam *buf; t_edpar *edi; real rmsdev=-1; /* RMSD from reference structure prior to applying the constraints */ - bool bSuppress=FALSE; /* Write .edo file on master? */ + gmx_bool bSuppress=FALSE; /* Write .edo file on master? */ /* Check if ED sampling has to be performed */ diff --git a/src/mdlib/ewald.c b/src/mdlib/ewald.c index 3f237da281..4390ed6637 100644 --- a/src/mdlib/ewald.c +++ b/src/mdlib/ewald.c @@ -119,7 +119,7 @@ void init_ewald_tab(ewald_tab_t *et, const t_commrec *cr, const t_inputrec *ir, -real do_ewald(FILE *log, bool bVerbose, +real do_ewald(FILE *log, gmx_bool bVerbose, t_inputrec *ir, rvec x[], rvec f[], real chargeA[], real chargeB[], @@ -135,7 +135,7 @@ real do_ewald(FILE *log, bool bVerbose, rvec lll; int lowiy,lowiz,ix,iy,iz,n,q; real tmp,cs,ss,ak,akv,mx,my,mz,m2,scale; - bool bFreeEnergy; + gmx_bool bFreeEnergy; if (cr != NULL) { diff --git a/src/mdlib/force.c b/src/mdlib/force.c index aa7319389a..27888517e5 100644 --- a/src/mdlib/force.c +++ b/src/mdlib/force.c @@ -78,9 +78,9 @@ void ns(FILE *fp, real lambda, real *dvdlambda, gmx_grppairener_t *grppener, - bool bFillGrid, - bool bDoLongRange, - bool bDoForces, + gmx_bool bFillGrid, + gmx_bool bDoLongRange, + gmx_bool bDoForces, rvec *f) { char *ptr; @@ -127,7 +127,7 @@ void do_force_lowlevel(FILE *fplog, gmx_large_int_t step, gmx_localtop_t *top, gmx_genborn_t *born, t_atomtypes *atype, - bool bBornRadii, + gmx_bool bBornRadii, matrix box, real lambda, t_graph *graph, @@ -138,7 +138,7 @@ void do_force_lowlevel(FILE *fplog, gmx_large_int_t step, { int i,status; int donb_flags; - bool bDoEpot,bSepDVDL,bSB; + gmx_bool bDoEpot,bSepDVDL,bSB; int pme_flags; matrix boxs; rvec box_size; @@ -705,11 +705,11 @@ void sum_dhdl(gmx_enerdata_t *enerd,double lambda,t_inputrec *ir) } void reset_enerdata(t_grpopts *opts, - t_forcerec *fr,bool bNS, + t_forcerec *fr,gmx_bool bNS, gmx_enerdata_t *enerd, - bool bMaster) + gmx_bool bMaster) { - bool bKeepLR; + gmx_bool bKeepLR; int i,j; /* First reset all energy components, except for the long range terms diff --git a/src/mdlib/forcerec.c b/src/mdlib/forcerec.c index 622d076f55..309c0f7196 100644 --- a/src/mdlib/forcerec.c +++ b/src/mdlib/forcerec.c @@ -72,7 +72,7 @@ t_forcerec *mk_forcerec(void) } #ifdef DEBUG -static void pr_nbfp(FILE *fp,real *nbfp,bool bBHAM,int atnr) +static void pr_nbfp(FILE *fp,real *nbfp,gmx_bool bBHAM,int atnr) { int i,j; @@ -90,7 +90,7 @@ static void pr_nbfp(FILE *fp,real *nbfp,bool bBHAM,int atnr) } #endif -static real *mk_nbfp(const gmx_ffparams_t *idef,bool bBHAM) +static real *mk_nbfp(const gmx_ffparams_t *idef,gmx_bool bBHAM) { real *nbfp; int i,j,k,atnr; @@ -157,13 +157,13 @@ check_solvent_cg(const gmx_moltype_t *molt, t_atom *atom; int j,k; int j0,j1,nj; - bool perturbed; - bool has_vdw[4]; - bool match; + gmx_bool perturbed; + gmx_bool has_vdw[4]; + gmx_bool match; real tmp_charge[4]; int tmp_vdwtype[4]; int tjA; - bool qm; + gmx_bool qm; solvent_parameters_t *solvent_parameters; /* We use a list with parameters for each solvent type. @@ -510,8 +510,8 @@ check_solvent(FILE * fp, } static cginfo_mb_t *init_cginfo_mb(FILE *fplog,const gmx_mtop_t *mtop, - t_forcerec *fr,bool bNoSolvOpt, - bool *bExcl_IntraCGAll_InterCGNone) + t_forcerec *fr,gmx_bool bNoSolvOpt, + gmx_bool *bExcl_IntraCGAll_InterCGNone) { const t_block *cgs; const t_blocka *excl; @@ -521,7 +521,7 @@ static cginfo_mb_t *init_cginfo_mb(FILE *fplog,const gmx_mtop_t *mtop, int *cginfo; int cg_offset,a_offset,cgm,am; int mb,m,ncg_tot,cg,a0,a1,gid,ai,j,aj,excl_nalloc; - bool bId,*bExcl,bExclIntraAll,bExclInter; + gmx_bool bId,*bExcl,bExclIntraAll,bExclInter; ncg_tot = ncg_mtop(mtop); snew(cginfo_mb,mtop->nmolblock); @@ -774,7 +774,7 @@ void set_avcsixtwelve(FILE *fplog,t_forcerec *fr,const gmx_mtop_t *mtop) #endif double csix,ctwelve; int ntp,*typecount; - bool bBHAM; + gmx_bool bBHAM; real *nbfp; ntp = fr->ntype; @@ -1172,10 +1172,10 @@ static real cutoff_inf(real cutoff) return cutoff; } -bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop, - bool bPrintNote,t_commrec *cr,FILE *fp) +gmx_bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop, + gmx_bool bPrintNote,t_commrec *cr,FILE *fp) { - bool bAllvsAll; + gmx_bool bAllvsAll; bAllvsAll = ( @@ -1228,11 +1228,11 @@ void init_forcerec(FILE *fp, const gmx_mtop_t *mtop, const t_commrec *cr, matrix box, - bool bMolEpot, + gmx_bool bMolEpot, const char *tabfn, const char *tabpfn, const char *tabbfn, - bool bNoSolvOpt, + gmx_bool bNoSolvOpt, real print_force) { int i,j,m,natoms,ngrp,negp_pp,negptable,egi,egj; @@ -1241,8 +1241,8 @@ void init_forcerec(FILE *fp, double dbl; rvec box_size; const t_block *cgs; - bool bGenericKernelOnly; - bool bTab,bSep14tab,bNormalnblists; + gmx_bool bGenericKernelOnly; + gmx_bool bTab,bSep14tab,bNormalnblists; t_nblists *nbl; int *nm_ind,egp_flags; diff --git a/src/mdlib/genborn.c b/src/mdlib/genborn.c index 58cdb0e7e2..d4a860b1b9 100644 --- a/src/mdlib/genborn.c +++ b/src/mdlib/genborn.c @@ -1704,7 +1704,7 @@ real calc_gb_chainrule(int natoms, t_nblist *nl, real *dadx, real *dvda, rvec x[ void calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top, const t_atomtypes *atype, - rvec x[], rvec f[], t_forcerec *fr, t_idef *idef, int gb_algorithm, t_nrnb *nrnb, bool bRad, + rvec x[], rvec f[], t_forcerec *fr, t_idef *idef, int gb_algorithm, t_nrnb *nrnb, gmx_bool bRad, const t_pbc *pbc, const t_graph *graph, gmx_enerdata_t *enerd) { real v=0; @@ -1863,7 +1863,7 @@ static gbtmpnbl_t *find_gbtmplist(struct gbtmpnbls *lists,int shift) } static void add_bondeds_to_gblist(t_ilist *il, - bool bMolPBC,t_pbc *pbc,t_graph *g,rvec *x, + gmx_bool bMolPBC,t_pbc *pbc,t_graph *g,rvec *x, struct gbtmpnbls *nls) { int ind,j,ai,aj,shift,found; diff --git a/src/mdlib/genborn_allvsall.c b/src/mdlib/genborn_allvsall.c index 11d841d0f5..43ce789971 100644 --- a/src/mdlib/genborn_allvsall.c +++ b/src/mdlib/genborn_allvsall.c @@ -107,9 +107,9 @@ static void setup_gb_exclusions_and_indices(gmx_allvsallgb2_data_t * aadata, t_ilist * ilist, int natoms, - bool bInclude12, - bool bInclude13, - bool bInclude14) + gmx_bool bInclude12, + gmx_bool bInclude13, + gmx_bool bInclude14) { int i,j,k,tp; int a1,a2; @@ -321,9 +321,9 @@ static void genborn_allvsall_setup(gmx_allvsallgb2_data_t ** p_aadata, t_ilist * ilist, int natoms, - bool bInclude12, - bool bInclude13, - bool bInclude14) + gmx_bool bInclude12, + gmx_bool bInclude13, + gmx_bool bInclude14) { int i,j,idx; gmx_allvsallgb2_data_t *aadata; diff --git a/src/mdlib/genborn_allvsall_sse2_double.c b/src/mdlib/genborn_allvsall_sse2_double.c index 7202c81374..c91d05a06b 100644 --- a/src/mdlib/genborn_allvsall_sse2_double.c +++ b/src/mdlib/genborn_allvsall_sse2_double.c @@ -138,9 +138,9 @@ setup_gb_exclusions_and_indices(gmx_allvsallgb2_data_t * aadata, int start, int end, int natoms, - bool bInclude12, - bool bInclude13, - bool bInclude14) + gmx_bool bInclude12, + gmx_bool bInclude13, + gmx_bool bInclude14) { int i,j,k,tp; int a1,a2; @@ -652,9 +652,9 @@ genborn_allvsall_setup(gmx_allvsallgb2_data_t ** p_aadata, t_mdatoms * mdatoms, double radius_offset, int gb_algorithm, - bool bInclude12, - bool bInclude13, - bool bInclude14) + gmx_bool bInclude12, + gmx_bool bInclude13, + gmx_bool bInclude14) { int i,j,idx; int natoms; diff --git a/src/mdlib/genborn_allvsall_sse2_single.c b/src/mdlib/genborn_allvsall_sse2_single.c index 809bd8e895..ff8f4a18f4 100644 --- a/src/mdlib/genborn_allvsall_sse2_single.c +++ b/src/mdlib/genborn_allvsall_sse2_single.c @@ -137,9 +137,9 @@ setup_gb_exclusions_and_indices(gmx_allvsallgb2_data_t * aadata, int start, int end, int natoms, - bool bInclude12, - bool bInclude13, - bool bInclude14) + gmx_bool bInclude12, + gmx_bool bInclude13, + gmx_bool bInclude14) { int i,j,k,tp; int a1,a2; @@ -644,9 +644,9 @@ genborn_allvsall_setup(gmx_allvsallgb2_data_t ** p_aadata, t_mdatoms * mdatoms, real radius_offset, int gb_algorithm, - bool bInclude12, - bool bInclude13, - bool bInclude14) + gmx_bool bInclude12, + gmx_bool bInclude13, + gmx_bool bInclude14) { int i,j,idx; int natoms; diff --git a/src/mdlib/ghat.c b/src/mdlib/ghat.c index 6ebca5eae4..e28d44e7c6 100644 --- a/src/mdlib/ghat.c +++ b/src/mdlib/ghat.c @@ -95,7 +95,7 @@ void symmetrize_ghat(int nx,int ny,int nz,real ***ghat) } void mk_ghat(FILE *fp,int nx,int ny,int nz,real ***ghat, - rvec box,real r1,real rc,bool bSym,bool bOld) + rvec box,real r1,real rc,gmx_bool bSym,gmx_bool bOld) { int ix,iy,iz; int ixmax,iymax,izmax; @@ -138,12 +138,12 @@ void mk_ghat(FILE *fp,int nx,int ny,int nz,real ***ghat, void wr_ghat(const char *fn,const output_env_t oenv, int n1max,int n2max,int n3max,real h1,real h2,real h3, - real ***ghat,int nalias,int porder,int niter,bool bSym,rvec beta, + real ***ghat,int nalias,int porder,int niter,gmx_bool bSym,rvec beta, real r1,real rc,real pval,real zval,real eref,real qopt) { FILE *fp; int N1MAX,N2MAX,N3MAX; - bool bNL=FALSE; + gmx_bool bNL=FALSE; real rx,ry,rz; int ii,jj,kk,nn; diff --git a/src/mdlib/gmx_fft_fftw3.c b/src/mdlib/gmx_fft_fftw3.c index 8fd8b6afab..467f16c9fa 100644 --- a/src/mdlib/gmx_fft_fftw3.c +++ b/src/mdlib/gmx_fft_fftw3.c @@ -41,7 +41,7 @@ /* none of the fftw3 calls, except execute(), are thread-safe, so we need to serialize them with this mutex. */ static tMPI_Thread_mutex_t big_fftw_mutex=TMPI_THREAD_MUTEX_INITIALIZER; -static bool gmx_fft_threads_initialized=FALSE; +static gmx_bool gmx_fft_threads_initialized=FALSE; #define FFTW_LOCK tMPI_Thread_mutex_lock(&big_fftw_mutex); #define FFTW_UNLOCK tMPI_Thread_mutex_unlock(&big_fftw_mutex); #else /* GMX_THREADS */ diff --git a/src/mdlib/gmx_parallel_3dfft.c b/src/mdlib/gmx_parallel_3dfft.c index e94bb24acd..2696f939d6 100644 --- a/src/mdlib/gmx_parallel_3dfft.c +++ b/src/mdlib/gmx_parallel_3dfft.c @@ -75,7 +75,7 @@ gmx_parallel_3dfft_init (gmx_parallel_3dfft_t * pfft_setup, MPI_Comm comm[2], int * slab2index_major, int * slab2index_minor, - bool bReproducible) + gmx_bool bReproducible) { int rN=ndata[2],M=ndata[1],K=ndata[0]; int flags = FFT5D_REALCOMPLEX | FFT5D_ORDER_YZ; /* FFT5D_DEBUG */ diff --git a/src/mdlib/gmx_qhop_xml.c b/src/mdlib/gmx_qhop_xml.c index c641503065..1f91eac698 100644 --- a/src/mdlib/gmx_qhop_xml.c +++ b/src/mdlib/gmx_qhop_xml.c @@ -280,7 +280,7 @@ gmx_qhops_read(char *fn,int *nqhop) int i,npd; t_xmlrec *xml; const char *db="qhops.dat"; - bool fna=FALSE; + gmx_bool fna=FALSE; xmlDoValidityCheckingDefaultValue = 0; if (NULL == fn) diff --git a/src/mdlib/gmx_wallcycle.c b/src/mdlib/gmx_wallcycle.c index ab77fe5757..5dbbc23bc6 100644 --- a/src/mdlib/gmx_wallcycle.c +++ b/src/mdlib/gmx_wallcycle.c @@ -63,7 +63,7 @@ typedef struct gmx_wallcycle { wallcc_t *wcc; /* variables for testing/debugging */ - bool wc_barrier; + gmx_bool wc_barrier; wallcc_t *wcc_all; int wc_depth; int ewc_prev; @@ -78,7 +78,7 @@ typedef struct gmx_wallcycle static const char *wcn[ewcNR] = { "Run", "Step", "PP during PME", "Domain decomp.", "DD comm. load", "DD comm. bounds", "Vsite constr.", "Send X to PME", "Comm. coord.", "Neighbor search", "Born radii", "Force", "Wait + Comm. F", "PME mesh", "PME redist. X/F", "PME spread/gather", "PME 3D-FFT", "PME solve", "Wait + Comm. X/F", "Wait + Recv. PME F", "Vsite spread", "Write traj.", "Update", "Constraints", "Comm. energies", "Test" }; -bool wallcycle_have_counter(void) +gmx_bool wallcycle_have_counter(void) { return gmx_cycles_have_counter(); } @@ -344,7 +344,7 @@ static void print_cycles(FILE *fplog, double c2t, const char *name, int nnodes, } } -static bool subdivision(int ewc) +static gmx_bool subdivision(int ewc) { return (ewc >= ewcPME_REDISTXF && ewc <= ewcPME_SOLVE); } diff --git a/src/mdlib/groupcoord.c b/src/mdlib/groupcoord.c index 2c8358e559..eb6ecafaaa 100644 --- a/src/mdlib/groupcoord.c +++ b/src/mdlib/groupcoord.c @@ -196,7 +196,7 @@ extern void communicate_group_positions( rvec *xcoll, /* OUT: Collective array of positions */ ivec *shifts, /* IN+OUT: Collective array of shifts for xcoll */ ivec *extra_shifts, /* BUF: Extra shifts since last time step */ - const bool bNS, /* IN: NS step, the shifts have changed */ + const gmx_bool bNS, /* IN: NS step, the shifts have changed */ rvec *x_loc, /* IN: Local positions on this node */ const int nr, /* IN: Total number of atoms in the group */ const int nr_loc, /* IN: Local number of atoms in the group */ diff --git a/src/mdlib/groupcoord.h b/src/mdlib/groupcoord.h index f01928464a..79d107dcc3 100644 --- a/src/mdlib/groupcoord.h +++ b/src/mdlib/groupcoord.h @@ -112,7 +112,7 @@ extern void dd_make_local_group_indices(gmx_ga2la_t ga2la, * the group becomes whole. */ extern void communicate_group_positions(t_commrec *cr, rvec *xcoll, ivec *shifts, - ivec *extra_shifts, const bool bNS, + ivec *extra_shifts, const gmx_bool bNS, rvec *x_loc, const int nr, const int nr_loc, int *anrs_loc, int *coll_ind, rvec *xcoll_old, matrix box); diff --git a/src/mdlib/mdatom.c b/src/mdlib/mdatom.c index 2098b00dca..c63ac13ad9 100644 --- a/src/mdlib/mdatom.c +++ b/src/mdlib/mdatom.c @@ -45,7 +45,7 @@ #define ALMOST_ZERO 1e-30 -t_mdatoms *init_mdatoms(FILE *fp,gmx_mtop_t *mtop,bool bFreeEnergy) +t_mdatoms *init_mdatoms(FILE *fp,gmx_mtop_t *mtop,gmx_bool bFreeEnergy) { int mb,a,g,nmol; double tmA,tmB; diff --git a/src/mdlib/mdebin.c b/src/mdlib/mdebin.c index cc41b02daf..6e0a0ff6da 100644 --- a/src/mdlib/mdebin.c +++ b/src/mdlib/mdebin.c @@ -82,7 +82,7 @@ static const char *boxvel_nm[] = { #define NBOXS asize(boxs_nm) #define NTRICLBOXS asize(tricl_boxs_nm) -static bool bTricl,bDynBox; +static gmx_bool bTricl,bDynBox; static int f_nre=0,epc,etc,nCrmsd; @@ -138,7 +138,7 @@ t_mdebin *init_mdebin(ener_file_t fp_ene, const char *bufi; t_mdebin *md; int i,j,ni,nj,n,nh,k,kk,ncon,nset; - bool bBHAM,bNoseHoover,b14; + gmx_bool bBHAM,bNoseHoover,b14; snew(md,1); @@ -621,8 +621,8 @@ static void copy_energy(t_mdebin *md, real e[],real ecpy[]) gmx_incons("Number of energy terms wrong"); } -void upd_mdebin(t_mdebin *md, bool write_dhdl, - bool bSum, +void upd_mdebin(t_mdebin *md, gmx_bool write_dhdl, + gmx_bool bSum, double time, real tmass, gmx_enerdata_t *enerd, @@ -642,7 +642,7 @@ void upd_mdebin(t_mdebin *md, bool write_dhdl, real eee[egNR]; real ecopy[F_NRE]; real tmp; - bool bNoseHoover; + gmx_bool bNoseHoover; /* Do NOT use the box in the state variable, but the separate box provided * as an argument. This is because we sometimes need to write the box from @@ -893,10 +893,10 @@ void print_ebin_header(FILE *log,gmx_large_int_t steps,double time,real lamb) "Step","Time","Lambda",gmx_step_str(steps,buf),time,lamb); } -void print_ebin(ener_file_t fp_ene,bool bEne,bool bDR,bool bOR, +void print_ebin(ener_file_t fp_ene,gmx_bool bEne,gmx_bool bDR,gmx_bool bOR, FILE *log, gmx_large_int_t step,double time, - int mode,bool bCompact, + int mode,gmx_bool bCompact, t_mdebin *md,t_fcdata *fcd, gmx_groups_t *groups,t_grpopts *opts) { diff --git a/src/mdlib/mdebin_bar.h b/src/mdlib/mdebin_bar.h index 384563c074..2234d989fc 100644 --- a/src/mdlib/mdebin_bar.h +++ b/src/mdlib/mdebin_bar.h @@ -57,8 +57,8 @@ typedef struct unsigned int maxbin; /* highest bin with data */ double lambda; /* the 'foreign' lambda value associated with this delta H */ - bool write_hist; /* whether to write histograms or raw data */ - bool written; /* whether this data has already been written out */ + gmx_bool write_hist; /* whether to write histograms or raw data */ + gmx_bool written; /* whether this data has already been written out */ double subblock_d[4]; /* data for an mdebin subblock for I/O. */ gmx_large_int_t subblock_l[2]; /* data for an mdebin subblock for I/O. */ @@ -77,7 +77,7 @@ struct t_mde_delta_h_coll double starttime; /* start time of the current dh collection */ double endtime; /* end time of the current dh collection */ - bool starttime_set; /* whether the start time has been set */ + gmx_bool starttime_set; /* whether the start time has been set */ double subblock_d[4]; /* data for writing an mdebin subblock for I/O */ }; diff --git a/src/mdlib/minimize.c b/src/mdlib/minimize.c index f6282eb9c8..147641a8b8 100644 --- a/src/mdlib/minimize.c +++ b/src/mdlib/minimize.c @@ -123,7 +123,7 @@ static void sp_header(FILE *out,const char *minimizer,real ftol,int nsteps) fprintf(out," Number of steps = %12d\n",nsteps); } -static void warn_step(FILE *fp,real ftol,bool bLastStep,bool bConstrain) +static void warn_step(FILE *fp,real ftol,gmx_bool bLastStep,gmx_bool bConstrain) { if (bLastStep) { @@ -150,7 +150,7 @@ static void warn_step(FILE *fp,real ftol,bool bLastStep,bool bConstrain) static void print_converged(FILE *fp,const char *alg,real ftol, - gmx_large_int_t count,bool bDone,gmx_large_int_t nsteps, + gmx_large_int_t count,gmx_bool bDone,gmx_large_int_t nsteps, real epot,real fmax, int nfmax, real fnorm) { char buf[STEPSTRSIZE]; @@ -447,7 +447,7 @@ static void copy_em_coords_back(em_state_t *ems,t_state *state,rvec *f) static void write_em_traj(FILE *fplog,t_commrec *cr, gmx_mdoutf_t *outf, - bool bX,bool bF,const char *confout, + gmx_bool bX,gmx_bool bF,const char *confout, gmx_mtop_t *top_global, t_inputrec *ir,gmx_large_int_t step, em_state_t *state, @@ -625,7 +625,7 @@ static void em_dd_partition_system(FILE *fplog,int step,t_commrec *cr, wallcycle_stop(wcycle,ewcDOMDEC); } -static void evaluate_energy(FILE *fplog,bool bVerbose,t_commrec *cr, +static void evaluate_energy(FILE *fplog,gmx_bool bVerbose,t_commrec *cr, t_state *state_global,gmx_mtop_t *top_global, em_state_t *ems,gmx_localtop_t *top, t_inputrec *inputrec, @@ -636,10 +636,10 @@ static void evaluate_energy(FILE *fplog,bool bVerbose,t_commrec *cr, t_graph *graph,t_mdatoms *mdatoms, t_forcerec *fr,rvec mu_tot, gmx_enerdata_t *enerd,tensor vir,tensor pres, - gmx_large_int_t count,bool bFirst) + gmx_large_int_t count,gmx_bool bFirst) { real t; - bool bNS; + gmx_bool bNS; int nabnsb; tensor force_vir,shake_vir,ekin; real dvdl,prescorr,enercorr,dvdlcorr; @@ -863,7 +863,7 @@ static real pr_beta(t_commrec *cr,t_grpopts *opts,t_mdatoms *mdatoms, double do_cg(FILE *fplog,t_commrec *cr, int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout, @@ -896,9 +896,9 @@ double do_cg(FILE *fplog,t_commrec *cr, real epot_repl=0; real pnorm; t_mdebin *mdebin; - bool converged,foundlower; + gmx_bool converged,foundlower; rvec mu_tot; - bool do_log=FALSE,do_ene=FALSE,do_x,do_f; + gmx_bool do_log=FALSE,do_ene=FALSE,do_x,do_f; tensor vir,pres; int number_steps,neval=0,nstcg=inputrec->nstcgsteep; gmx_mdoutf_t *outf; @@ -1383,7 +1383,7 @@ double do_cg(FILE *fplog,t_commrec *cr, double do_lbfgs(FILE *fplog,t_commrec *cr, int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout, @@ -1416,10 +1416,10 @@ double do_lbfgs(FILE *fplog,t_commrec *cr, real diag,Epot0,Epot,EpotA,EpotB,EpotC; real dgdx,dgdg,sq,yr,beta; t_mdebin *mdebin; - bool converged,first; + gmx_bool converged,first; rvec mu_tot; real fnorm,fmax; - bool do_log,do_ene,do_x,do_f,foundlower,*frozen; + gmx_bool do_log,do_ene,do_x,do_f,foundlower,*frozen; tensor vir,pres; int start,end,number_steps; gmx_mdoutf_t *outf; @@ -2017,7 +2017,7 @@ double do_lbfgs(FILE *fplog,t_commrec *cr, double do_steep(FILE *fplog,t_commrec *cr, int nfile, const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout, @@ -2046,7 +2046,7 @@ double do_steep(FILE *fplog,t_commrec *cr, real ustep,dvdlambda,fnormn; gmx_mdoutf_t *outf; t_mdebin *mdebin; - bool bDone,bAbort,do_x,do_f; + gmx_bool bDone,bAbort,do_x,do_f; tensor vir,pres; rvec mu_tot; int nsteps; @@ -2221,7 +2221,7 @@ double do_steep(FILE *fplog,t_commrec *cr, double do_nm(FILE *fplog,t_commrec *cr, int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout, @@ -2250,11 +2250,11 @@ double do_nm(FILE *fplog,t_commrec *cr, gmx_global_stat_t gstat; t_graph *graph; real t,lambda; - bool bNS; + gmx_bool bNS; tensor vir,pres; rvec mu_tot; rvec *fneg,*dfdx; - bool bSparse; /* use sparse matrix storage format */ + gmx_bool bSparse; /* use sparse matrix storage format */ size_t sz; gmx_sparsematrix_t * sparse_matrix = NULL; real * full_matrix = NULL; diff --git a/src/mdlib/mvxvf.c b/src/mdlib/mvxvf.c index 765f4de2cd..9f91cc217e 100644 --- a/src/mdlib/mvxvf.c +++ b/src/mdlib/mvxvf.c @@ -53,7 +53,7 @@ #include "nrnb.h" #include "partdec.h" -void move_rvecs(const t_commrec *cr,bool bForward,bool bSum, +void move_rvecs(const t_commrec *cr,gmx_bool bForward,gmx_bool bSum, int left,int right,rvec vecs[],rvec buf[], int shift,t_nrnb *nrnb) { @@ -134,7 +134,7 @@ void move_rvecs(const t_commrec *cr,bool bForward,bool bSum, } -void move_reals(const t_commrec *cr,bool bForward,bool bSum, +void move_reals(const t_commrec *cr,gmx_bool bForward,gmx_bool bSum, int left,int right,real reals[],real buf[], int shift,t_nrnb *nrnb) { diff --git a/src/mdlib/ns.c b/src/mdlib/ns.c index d48216206f..81e35ac181 100644 --- a/src/mdlib/ns.c +++ b/src/mdlib/ns.c @@ -72,14 +72,14 @@ static void SETEXCL_(t_excl e[],atom_id i,atom_id j) { e[j] = e[j] | (1<nrj; @@ -534,7 +534,7 @@ static inline void add_j_to_nblist(t_nblist *nlist,atom_id j_atom,bool bLR) static inline void add_j_to_nblist_cg(t_nblist *nlist, atom_id j_start,int j_end, - t_excl *bexcl,bool bLR) + t_excl *bexcl,gmx_bool bLR) { int nrj=nlist->nrj; int j; @@ -569,7 +569,7 @@ static inline void add_j_to_nblist_cg(t_nblist *nlist, } typedef void -put_in_list_t(bool bHaveVdW[], +put_in_list_t(gmx_bool bHaveVdW[], int ngid, t_mdatoms * md, int icg, @@ -580,12 +580,12 @@ put_in_list_t(bool bHaveVdW[], t_excl bExcl[], int shift, t_forcerec * fr, - bool bLR, - bool bDoVdW, - bool bDoCoul); + gmx_bool bLR, + gmx_bool bDoVdW, + gmx_bool bDoCoul); static void -put_in_list_at(bool bHaveVdW[], +put_in_list_at(gmx_bool bHaveVdW[], int ngid, t_mdatoms * md, int icg, @@ -596,9 +596,9 @@ put_in_list_at(bool bHaveVdW[], t_excl bExcl[], int shift, t_forcerec * fr, - bool bLR, - bool bDoVdW, - bool bDoCoul) + gmx_bool bLR, + gmx_bool bDoVdW, + gmx_bool bDoCoul) { /* The a[] index has been removed, * to put it back in i_atom should be a[i0] and jj should be a[jj]. @@ -620,8 +620,8 @@ put_in_list_at(bool bHaveVdW[], int *type,*typeB; real *charge,*chargeB; real qi,qiB,qq,rlj; - bool bFreeEnergy,bFree,bFreeJ,bNotEx,*bPert; - bool bDoVdW_i,bDoCoul_i,bDoCoul_i_sol; + gmx_bool bFreeEnergy,bFree,bFreeJ,bNotEx,*bPert; + gmx_bool bDoVdW_i,bDoCoul_i,bDoCoul_i_sol; int iwater,jwater; t_nblist *nlist; @@ -1122,7 +1122,7 @@ put_in_list_at(bool bHaveVdW[], } static void -put_in_list_qmmm(bool bHaveVdW[], +put_in_list_qmmm(gmx_bool bHaveVdW[], int ngid, t_mdatoms * md, int icg, @@ -1133,15 +1133,15 @@ put_in_list_qmmm(bool bHaveVdW[], t_excl bExcl[], int shift, t_forcerec * fr, - bool bLR, - bool bDoVdW, - bool bDoCoul) + gmx_bool bLR, + gmx_bool bDoVdW, + gmx_bool bDoCoul) { t_nblist * coul; int i,j,jcg,igid,gid; atom_id jj,jj0,jj1,i_atom; int i0,nicg; - bool bNotEx; + gmx_bool bNotEx; /* Get atom range */ i0 = index[icg]; @@ -1184,7 +1184,7 @@ put_in_list_qmmm(bool bHaveVdW[], } static void -put_in_list_cg(bool bHaveVdW[], +put_in_list_cg(gmx_bool bHaveVdW[], int ngid, t_mdatoms * md, int icg, @@ -1195,9 +1195,9 @@ put_in_list_cg(bool bHaveVdW[], t_excl bExcl[], int shift, t_forcerec * fr, - bool bLR, - bool bDoVdW, - bool bDoCoul) + gmx_bool bLR, + gmx_bool bDoVdW, + gmx_bool bDoCoul) { int cginfo; int igid,gid,nbl_ind; @@ -1251,7 +1251,7 @@ put_in_list_cg(bool bHaveVdW[], close_i_nblist(vdwc); } -static void setexcl(atom_id start,atom_id end,t_blocka *excl,bool b, +static void setexcl(atom_id start,atom_id end,t_blocka *excl,gmx_bool b, t_excl bexcl[]) { atom_id i,k; @@ -1418,7 +1418,7 @@ static real calc_image_rect(rvec xi,rvec xj,rvec box_size, } static void add_simple(t_ns_buf *nsbuf,int nrj,atom_id cg_j, - bool bHaveVdW[],int ngid,t_mdatoms *md, + gmx_bool bHaveVdW[],int ngid,t_mdatoms *md, int icg,int jgid,t_block *cgs,t_excl bexcl[], int shift,t_forcerec *fr,put_in_list_t *put_in_list) { @@ -1437,7 +1437,7 @@ static void ns_inner_tric(rvec x[],int icg,int *i_egp_flags, int njcg,atom_id jcg[], matrix box,rvec b_inv,real rcut2, t_block *cgs,t_ns_buf **ns_buf, - bool bHaveVdW[],int ngid,t_mdatoms *md, + gmx_bool bHaveVdW[],int ngid,t_mdatoms *md, t_excl bexcl[],t_forcerec *fr, put_in_list_t *put_in_list) { @@ -1468,9 +1468,9 @@ static void ns_inner_tric(rvec x[],int icg,int *i_egp_flags, static void ns_inner_rect(rvec x[],int icg,int *i_egp_flags, int njcg,atom_id jcg[], - bool bBox,rvec box_size,rvec b_inv,real rcut2, + gmx_bool bBox,rvec box_size,rvec b_inv,real rcut2, t_block *cgs,t_ns_buf **ns_buf, - bool bHaveVdW[],int ngid,t_mdatoms *md, + gmx_bool bHaveVdW[],int ngid,t_mdatoms *md, t_excl bexcl[],t_forcerec *fr, put_in_list_t *put_in_list) { @@ -1527,7 +1527,7 @@ static int ns_simple_core(t_forcerec *fr, matrix box,rvec box_size, t_excl bexcl[],atom_id *aaj, int ngid,t_ns_buf **ns_buf, - put_in_list_t *put_in_list,bool bHaveVdW[]) + put_in_list_t *put_in_list,gmx_bool bHaveVdW[]) { int naaj,k; real rlist2; @@ -1539,7 +1539,7 @@ static int ns_simple_core(t_forcerec *fr, t_blocka *excl=&(top->excls); rvec b_inv; int m; - bool bBox,bTriclinic; + gmx_bool bBox,bTriclinic; int *i_egp_flags; rlist2 = sqr(fr->rlist); @@ -1773,10 +1773,10 @@ static void do_longrange(t_commrec *cr,gmx_localtop_t *top,t_forcerec *fr, rvec x[],rvec box_size,t_nrnb *nrnb, real lambda,real *dvdlambda, gmx_grppairener_t *grppener, - bool bDoVdW,bool bDoCoul, - bool bEvaluateNow,put_in_list_t *put_in_list, - bool bHaveVdW[], - bool bDoForces,rvec *f) + gmx_bool bDoVdW,gmx_bool bDoCoul, + gmx_bool bEvaluateNow,put_in_list_t *put_in_list, + gmx_bool bHaveVdW[], + gmx_bool bDoForces,rvec *f) { int n,i; t_nblist *nl; @@ -1811,7 +1811,7 @@ static void do_longrange(t_commrec *cr,gmx_localtop_t *top,t_forcerec *fr, } } -static void get_cutoff2(t_forcerec *fr,bool bDoLongRange, +static void get_cutoff2(t_forcerec *fr,gmx_bool bDoLongRange, real *rvdw2,real *rcoul2, real *rs2,real *rm2,real *rl2) { @@ -1897,14 +1897,14 @@ static int nsgrid_core(FILE *log,t_commrec *cr,t_forcerec *fr, matrix box,rvec box_size,int ngid, gmx_localtop_t *top, t_grid *grid,rvec x[], - t_excl bexcl[],bool *bExcludeAlleg, + t_excl bexcl[],gmx_bool *bExcludeAlleg, t_nrnb *nrnb,t_mdatoms *md, real lambda,real *dvdlambda, gmx_grppairener_t *grppener, put_in_list_t *put_in_list, - bool bHaveVdW[], - bool bDoLongRange,bool bDoForces,rvec *f, - bool bMakeQMMMnblist) + gmx_bool bHaveVdW[], + gmx_bool bDoLongRange,gmx_bool bDoForces,rvec *f, + gmx_bool bMakeQMMMnblist) { gmx_ns_t *ns; atom_id **nl_lr_ljc,**nl_lr_one,**nl_sr; @@ -1927,11 +1927,11 @@ static int nsgrid_core(FILE *log,t_commrec *cr,t_forcerec *fr, int cg0,cg1,icg=-1,cgsnr,i0,igid,nri,naaj,max_jcg; int jcg0,jcg1,jjcg,cgj0,jgid; int *grida,*gridnra,*gridind; - bool rvdw_lt_rcoul,rcoul_lt_rvdw; + gmx_bool rvdw_lt_rcoul,rcoul_lt_rvdw; rvec xi,*cgcm,grid_offset; real r2,rs2,rvdw2,rcoul2,rm2,rl2,XI,YI,ZI,dcx,dcy,dcz,tmp1,tmp2; int *i_egp_flags; - bool bDomDec,bTriclinicX,bTriclinicY; + gmx_bool bDomDec,bTriclinicX,bTriclinicY; ivec ncpddc; ns = &fr->ns; @@ -2495,18 +2495,18 @@ int search_neighbours(FILE *log,t_forcerec *fr, t_nrnb *nrnb,t_mdatoms *md, real lambda,real *dvdlambda, gmx_grppairener_t *grppener, - bool bFillGrid, - bool bDoLongRange, - bool bDoForces,rvec *f) + gmx_bool bFillGrid, + gmx_bool bDoLongRange, + gmx_bool bDoForces,rvec *f) { t_block *cgs=&(top->cgs); rvec box_size,grid_x0,grid_x1; int i,j,m,ngid; real min_size,grid_dens; int nsearch; - bool bGrid; + gmx_bool bGrid; char *ptr; - bool *i_egp_flags; + gmx_bool *i_egp_flags; int cg_start,cg_end,start,end; gmx_ns_t *ns; t_grid *grid; @@ -2677,7 +2677,7 @@ int natoms_beyond_ns_buffer(t_inputrec *ir,t_forcerec *fr,t_block *cgs, int cg0,cg1,cg,a0,a1,a,i,j; real rint,hbuf2,scale; rvec *cg_cm,cgsc; - bool bIsotropic; + gmx_bool bIsotropic; int nBeyond; nBeyond = 0; diff --git a/src/mdlib/nsgrid.c b/src/mdlib/nsgrid.c index c1b1291b3c..ee9a6dca82 100644 --- a/src/mdlib/nsgrid.c +++ b/src/mdlib/nsgrid.c @@ -202,7 +202,7 @@ static void set_grid_sizes(matrix box,rvec izones_x0,rvec izones_x1,real rlist, real grid_density) { int i,j; - bool bDD,bDDRect; + gmx_bool bDD,bDDRect; rvec av,stddev; rvec izones_size; real inv_r_ideal,size,add_tric,radd; @@ -614,7 +614,7 @@ void fill_grid(FILE *log, rvec n_box,offset; int zone,ccg0,ccg1,cg,d,not_used; ivec shift0,useall,b0,b1,ind; - bool bUse; + gmx_bool bUse; if (cg0 == -1) { diff --git a/src/mdlib/partdec.c b/src/mdlib/partdec.c index dc1cbcc325..6509bd529d 100644 --- a/src/mdlib/partdec.c +++ b/src/mdlib/partdec.c @@ -801,7 +801,7 @@ static void add_to_vsitelist(int **list, int *nitem, int *nalloc,int newitem) { int i,idx; - bool found; + gmx_bool found; found = FALSE; idx = *nitem; @@ -818,12 +818,12 @@ add_to_vsitelist(int **list, int *nitem, int *nalloc,int newitem) } } -bool setup_parallel_vsites(t_idef *idef,t_commrec *cr, +gmx_bool setup_parallel_vsites(t_idef *idef,t_commrec *cr, t_comm_vsites *vsitecomm) { int i,j,ftype; int nra; - bool do_comm; + gmx_bool do_comm; t_iatom *ia; gmx_partdec_t *pd; int iconstruct; diff --git a/src/mdlib/perf_est.c b/src/mdlib/perf_est.c index 5f4cdb6b5e..868ff84ee6 100644 --- a/src/mdlib/perf_est.c +++ b/src/mdlib/perf_est.c @@ -42,7 +42,7 @@ #include "vec.h" #include "mtop_util.h" -int n_bonded_dx(gmx_mtop_t *mtop,bool bExcl) +int n_bonded_dx(gmx_mtop_t *mtop,gmx_bool bExcl) { int mb,nmol,ftype,ndxb,ndx_excl; int ndx; @@ -85,7 +85,7 @@ float pme_load_estimate(gmx_mtop_t *mtop,t_inputrec *ir,matrix box) { t_atom *atom; int mb,nmol,atnr,cg,a,a0,ncqlj,ncq,nclj; - bool bBHAM,bLJcut,bChargePerturbed,bWater,bQ,bLJ; + gmx_bool bBHAM,bLJcut,bChargePerturbed,bWater,bQ,bLJ; double nw,nqlj,nq,nlj; double cost_bond,cost_pp,cost_spread,cost_fft,cost_solve,cost_pme; float fq,fqlj,flj,fljtab,fqljw,fqw,fqspread,ffft,fsolve,fbond; diff --git a/src/mdlib/pme.c b/src/mdlib/pme.c index 73687e911a..b519986b57 100644 --- a/src/mdlib/pme.c +++ b/src/mdlib/pme.c @@ -151,7 +151,7 @@ typedef struct { rvec *x; real *q; rvec *f; - bool bSpread; /* These coordinates are used for spreading */ + gmx_bool bSpread; /* These coordinates are used for spreading */ int pme_order; splinevec theta,dtheta; ivec *idx; @@ -175,8 +175,8 @@ typedef struct gmx_pme { MPI_Datatype rvec_mpi; /* the pme vector's MPI type */ #endif - bool bPPnode; /* Node also does particle-particle forces */ - bool bFEP; /* Compute Free energy contribution */ + gmx_bool bPPnode; /* Node also does particle-particle forces */ + gmx_bool bFEP; /* Compute Free energy contribution */ int nkx,nky,nkz; /* Grid dimensions */ int pme_order; real epsilon_r; @@ -228,7 +228,7 @@ typedef struct gmx_pme { real * work_m2inv; /* Work data for PME_redist */ - bool redist_init; + gmx_bool redist_init; int * scounts; int * rcounts; int * sdispls; @@ -386,8 +386,8 @@ static void pme_realloc_atomcomm_things(pme_atomcomm_t *atc) } } -static void pmeredist_pd(gmx_pme_t pme, bool forw, - int n, bool bXF, rvec *x_f, real *charge, +static void pmeredist_pd(gmx_pme_t pme, gmx_bool forw, + int n, gmx_bool bXF, rvec *x_f, real *charge, pme_atomcomm_t *atc) /* Redistribute particle data for PME calculation */ /* domain decomposition by x coordinate */ @@ -478,7 +478,7 @@ static void pmeredist_pd(gmx_pme_t pme, bool forw, } static void pme_dd_sendrecv(pme_atomcomm_t *atc, - bool bBackward,int shift, + gmx_bool bBackward,int shift, void *buf_s,int nbyte_s, void *buf_r,int nbyte_r) { @@ -513,7 +513,7 @@ static void pme_dd_sendrecv(pme_atomcomm_t *atc, } static void dd_pmeredist_x_q(gmx_pme_t pme, - int n, bool bX, rvec *x, real *charge, + int n, gmx_bool bX, rvec *x, real *charge, pme_atomcomm_t *atc) { int *commnode,*buf_index; @@ -601,7 +601,7 @@ static void dd_pmeredist_x_q(gmx_pme_t pme, static void dd_pmeredist_f(gmx_pme_t pme, pme_atomcomm_t *atc, int n, rvec *f, - bool bAddF) + gmx_bool bAddF) { int *commnode,*buf_index; int nnodes_comm,local_pos,buf_pos,i,scount,rcount,node; @@ -1164,7 +1164,7 @@ static void spread_q_bsplines(gmx_pme_t pme, pme_atomcomm_t *atc, static int solve_pme_yzx(gmx_pme_t pme,t_complex *grid, real ewaldcoeff,real vol, - bool bEnerVir,real *mesh_energy,matrix vir) + gmx_bool bEnerVir,real *mesh_energy,matrix vir) { /* do recip sum over local cells in grid */ /* y major, z middle, x minor or continuous */ @@ -1447,7 +1447,7 @@ for(ithx=0; (ithxpull; diff --git a/src/mdlib/qm_gaussian.c b/src/mdlib/qm_gaussian.c index e66bb635e9..1052e44e2a 100644 --- a/src/mdlib/qm_gaussian.c +++ b/src/mdlib/qm_gaussian.c @@ -223,12 +223,12 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) -void write_gaussian_SH_input(int step,bool swap, +void write_gaussian_SH_input(int step,gmx_bool swap, t_forcerec *fr, t_QMrec *qm, t_MMrec *mm) { int i; - bool + gmx_bool bSA; FILE *out; @@ -710,7 +710,7 @@ real read_gaussian_output(rvec QMgrad[],rvec MMgrad[],int step, } real read_gaussian_SH_output(rvec QMgrad[],rvec MMgrad[],int step, - bool swapped,t_QMrec *qm, t_MMrec *mm) + gmx_bool swapped,t_QMrec *qm, t_MMrec *mm) { int i; @@ -971,9 +971,9 @@ real call_gaussian_SH(t_commrec *cr, t_forcerec *fr, t_QMrec *qm, t_MMrec *mm, state,i,j; real QMener=0.0; - static bool + static gmx_bool swapped=FALSE; /* handle for identifying the current PES */ - bool + gmx_bool swap=FALSE; /* the actual swap */ rvec *QMgrad,*MMgrad; diff --git a/src/mdlib/rf_util.c b/src/mdlib/rf_util.c index cc41941294..5da21be973 100644 --- a/src/mdlib/rf_util.c +++ b/src/mdlib/rf_util.c @@ -65,7 +65,7 @@ real RF_excl_correction(FILE *log, int start = mdatoms->start; int end = mdatoms->homenr+start; int niat; - bool bMolPBC = fr->bMolPBC; + gmx_bool bMolPBC = fr->bMolPBC; if (fr->n_tpi) /* For test particle insertion we only correct for the test molecule */ diff --git a/src/mdlib/shakef.c b/src/mdlib/shakef.c index 2be305ffea..f6fd555c4e 100644 --- a/src/mdlib/shakef.c +++ b/src/mdlib/shakef.c @@ -177,9 +177,9 @@ int vec_shakef(FILE *fplog,gmx_shakedata_t shaked, int natoms,real invmass[],int ncon, t_iparams ip[],t_iatom *iatom, real tol,rvec x[],rvec prime[],real omega, - bool bFEP,real lambda,real lagr[], + gmx_bool bFEP,real lambda,real lagr[], real invdt,rvec *v, - bool bCalcVir,tensor rmdr,int econq, + gmx_bool bCalcVir,tensor rmdr,int econq, t_vetavars *vetavar) { rvec *rij; @@ -357,11 +357,11 @@ static void check_cons(FILE *log,int nc,rvec x[],rvec prime[], rvec v[], } } -bool bshakef(FILE *log,gmx_shakedata_t shaked, +gmx_bool bshakef(FILE *log,gmx_shakedata_t shaked, int natoms,real invmass[],int nblocks,int sblock[], t_idef *idef,t_inputrec *ir,matrix box,rvec x_s[],rvec prime[], t_nrnb *nrnb,real *lagr,real lambda,real *dvdlambda, - real invdt,rvec *v,bool bCalcVir,tensor rmdr,bool bDumpOnError,int econq,t_vetavars *vetavar) + real invdt,rvec *v,gmx_bool bCalcVir,tensor rmdr,gmx_bool bDumpOnError,int econq,t_vetavars *vetavar) { t_iatom *iatoms; real *lam,dt_2,dvdl; diff --git a/src/mdlib/shellfc.c b/src/mdlib/shellfc.c index 96b9461683..879c02550a 100644 --- a/src/mdlib/shellfc.c +++ b/src/mdlib/shellfc.c @@ -61,7 +61,7 @@ typedef struct { int nnucl; atom_id shell; /* The shell id */ atom_id nucl1,nucl2,nucl3; /* The nuclei connected to the shell */ - /* bool bInterCG; */ /* Coupled to nuclei outside cg? */ + /* gmx_bool bInterCG; */ /* Coupled to nuclei outside cg? */ real k; /* force constant */ real k_1; /* 1 over force constant */ rvec xold; @@ -73,12 +73,12 @@ typedef struct gmx_shellfc { int nshell_gl; /* The number of shells in the system */ t_shell *shell_gl; /* All the shells (for DD only) */ int *shell_index_gl; /* Global shell index (for DD only) */ - bool bInterCG; /* Are there inter charge-group shells? */ + gmx_bool bInterCG; /* Are there inter charge-group shells? */ int nshell; /* The number of local shells */ t_shell *shell; /* The local shells */ int shell_nalloc; /* The allocation size of shell */ - bool bPredict; /* Predict shell positions */ - bool bForceInit; /* Force initialization of shell positions */ + gmx_bool bPredict; /* Predict shell positions */ + gmx_bool bForceInit; /* Force initialization of shell positions */ int nflexcon; /* The number of flexible constraints */ rvec *x[2]; /* Array for iterative minimization */ rvec *f[2]; /* Array for iterative minimization */ @@ -112,7 +112,7 @@ static void pr_shell(FILE *fplog,int ns,t_shell s[]) static void predict_shells(FILE *fplog,rvec x[],rvec v[],real dt, int ns,t_shell s[], - real mass[],gmx_mtop_t *mtop,bool bInit) + real mass[],gmx_mtop_t *mtop,gmx_bool bInit) { int i,m,s1,n1,n2,n3; real dt_1,dt_2,dt_3,fudge,tm,m1,m2,m3; @@ -749,10 +749,10 @@ static void init_adir(FILE *log,gmx_shellfc_t shfc, lambda,dvdlambda,NULL,NULL,nrnb,econqDeriv_FlexCon,FALSE,0,0); } -int relax_shell_flexcon(FILE *fplog,t_commrec *cr,bool bVerbose, +int relax_shell_flexcon(FILE *fplog,t_commrec *cr,gmx_bool bVerbose, gmx_large_int_t mdstep,t_inputrec *inputrec, - bool bDoNS,int force_flags, - bool bStopCM, + gmx_bool bDoNS,int force_flags, + gmx_bool bStopCM, gmx_localtop_t *top, gmx_mtop_t* mtop, gmx_constr_t constr, @@ -765,9 +765,9 @@ int relax_shell_flexcon(FILE *fplog,t_commrec *cr,bool bVerbose, gmx_groups_t *groups, struct gmx_shellfc *shfc, t_forcerec *fr, - bool bBornRadii, + gmx_bool bBornRadii, double t,rvec mu_tot, - int natoms,bool *bConverged, + int natoms,gmx_bool *bConverged, gmx_vsite_t *vsite, FILE *fp_field) { @@ -780,7 +780,7 @@ int relax_shell_flexcon(FILE *fplog,t_commrec *cr,bool bVerbose, real sf_dir,invdt; real ftol,xiH,xiS,dum=0; char sbuf[22]; - bool bCont,bInit; + gmx_bool bCont,bInit; int nat,dd_ac0,dd_ac1=0,i; int start=md->start,homenr=md->homenr,end=start+homenr,cg0,cg1; int nflexcon,g,number_steps,d,Min=0,count=0; diff --git a/src/mdlib/sim_util.c b/src/mdlib/sim_util.c index 3658412110..61b7f87fde 100644 --- a/src/mdlib/sim_util.c +++ b/src/mdlib/sim_util.c @@ -420,14 +420,14 @@ void do_force(FILE *fplog,t_commrec *cr, real lambda,t_graph *graph, t_forcerec *fr,gmx_vsite_t *vsite,rvec mu_tot, double t,FILE *field,gmx_edsam_t ed, - bool bBornRadii, + gmx_bool bBornRadii, int flags) { int cg0,cg1,i,j; int start,homenr; double mu[2*DIM]; - bool bSepDVDL,bStateChanged,bNS,bFillGrid,bCalcCGCM,bBS; - bool bDoLongRange,bDoForces,bSepLRF; + gmx_bool bSepDVDL,bStateChanged,bNS,bFillGrid,bCalcCGCM,bBS; + gmx_bool bDoLongRange,bDoForces,bSepLRF; matrix boxs; real e,v,dvdl; t_pbc pbc; @@ -530,7 +530,9 @@ void do_force(FILE *fplog,t_commrec *cr, gmx_pme_send_x(cr,bBS ? boxs : box,x, mdatoms->nChargePerturbed,lambda, - ( flags & GMX_FORCE_VIRIAL),step); +/* FIX ME after 4.5 */ +/* we are using gmx_bool of type char */ + ( flags & GMX_FORCE_VIRIAL) != 0,step); GMX_MPE_LOG(ev_send_coordinates_finish); wallcycle_stop(wcycle,ewcPP_PMESENDX); @@ -1167,7 +1169,7 @@ void calc_dispcorr(FILE *fplog,t_inputrec *ir,t_forcerec *fr, matrix box,real lambda,tensor pres,tensor virial, real *prescorr, real *enercorr, real *dvdlcorr) { - bool bCorrAll,bCorrPres; + gmx_bool bCorrAll,bCorrPres; real dvdlambda,invvol,dens,ninter,avcsix,avctwelve,enerdiff,svir=0,spres=0; int m; @@ -1299,7 +1301,7 @@ void do_pbc_first(FILE *fplog,matrix box,t_forcerec *fr, static void low_do_pbc_mtop(FILE *fplog,int ePBC,matrix box, gmx_mtop_t *mtop,rvec x[], - bool bFirst) + gmx_bool bFirst) { t_graph *graph; int mb,as,mol; @@ -1354,7 +1356,7 @@ void finish_run(FILE *fplog,t_commrec *cr,const char *confout, t_inputrec *inputrec, t_nrnb nrnb[],gmx_wallcycle_t wcycle, gmx_runtime_t *runtime, - bool bWriteStat) + gmx_bool bWriteStat) { int i,j; t_nrnb *nrnb_tot=NULL; @@ -1462,7 +1464,7 @@ void init_md(FILE *fplog, int nfile,const t_filenm fnm[], gmx_mdoutf_t **outf,t_mdebin **mdebin, tensor force_vir,tensor shake_vir,rvec mu_tot, - bool *bSimAnn,t_vcm **vcm, t_state *state, unsigned long Flags) + gmx_bool *bSimAnn,t_vcm **vcm, t_state *state, unsigned long Flags) { int i,j,n; real tmpt,mod; diff --git a/src/mdlib/stat.c b/src/mdlib/stat.c index 5e4a7c22bf..94ec31384b 100644 --- a/src/mdlib/stat.c +++ b/src/mdlib/stat.c @@ -96,8 +96,8 @@ void global_stat_destroy(gmx_global_stat_t gs) sfree(gs); } -static int filter_enerdterm(real *afrom, bool bToBuffer, real *ato, - bool bTemp, bool bPres, bool bEner) { +static int filter_enerdterm(real *afrom, gmx_bool bToBuffer, real *ato, + gmx_bool bTemp, gmx_bool bPres, gmx_bool bEner) { int i,to,from; from = 0; @@ -149,8 +149,8 @@ void global_stat(FILE *fplog,gmx_global_stat_t gs, t_vcm *vcm, int nsig,real *sig, gmx_mtop_t *top_global, t_state *state_local, - bool bSumEkinhOld, int flags) -/* instead of current system, booleans for summing virial, kinetic energy, and other terms */ + gmx_bool bSumEkinhOld, int flags) +/* instead of current system, gmx_booleans for summing virial, kinetic energy, and other terms */ { t_bin *rb; int *itc0,*itc1; @@ -163,16 +163,18 @@ void global_stat(FILE *fplog,gmx_global_stat_t gs, int nener,j; real *rmsd_data=NULL; double nb; - bool bVV,bTemp,bEner,bPres,bConstrVir,bEkinAveVel,bFirstIterate,bReadEkin; + gmx_bool bVV,bTemp,bEner,bPres,bConstrVir,bEkinAveVel,bFirstIterate,bReadEkin; bVV = EI_VV(inputrec->eI); bTemp = flags & CGLO_TEMPERATURE; bEner = flags & CGLO_ENERGY; - bPres = flags & CGLO_PRESSURE; - bConstrVir = flags & CGLO_CONSTRAINT; - bFirstIterate = flags & CGLO_FIRSTITERATE; +/* FIX ME after 4.5 */ +/* temporary hack because we are using gmx_bool (unsigned char) */ + bPres = (flags & CGLO_PRESSURE) != 0; + bConstrVir = (flags & CGLO_CONSTRAINT) != 0; + bFirstIterate = (flags & CGLO_FIRSTITERATE) != 0; bEkinAveVel = (inputrec->eI==eiVV || (inputrec->eI==eiVVAK && bPres)); - bReadEkin = flags & CGLO_READEKIN; + bReadEkin = (flags & CGLO_READEKIN) != 0; rb = gs->rb; itc0 = gs->itc0; @@ -437,7 +439,7 @@ gmx_mdoutf_t *init_mdoutf(int nfile,const t_filenm fnm[],int mdrun_flags, { gmx_mdoutf_t *of; char filemode[3]; - bool bAppendFiles; + gmx_bool bAppendFiles; snew(of,1); @@ -452,9 +454,9 @@ gmx_mdoutf_t *init_mdoutf(int nfile,const t_filenm fnm[],int mdrun_flags, if (MASTER(cr)) { - bAppendFiles = (mdrun_flags & MD_APPENDFILES); + bAppendFiles = (mdrun_flags & MD_APPENDFILES) != 0; - of->bKeepAndNumCPT = (mdrun_flags & MD_KEEPANDNUMCPT); + of->bKeepAndNumCPT = (mdrun_flags & MD_KEEPANDNUMCPT) != 0; sprintf(filemode, bAppendFiles ? "a+" : "w+"); diff --git a/src/mdlib/tables.c b/src/mdlib/tables.c index 77ae6d71d5..2901868e27 100644 --- a/src/mdlib/tables.c +++ b/src/mdlib/tables.c @@ -82,7 +82,7 @@ enum { typedef struct { const char *name; - bool bCoulomb; + gmx_bool bCoulomb; } t_tab_props; /* This structure holds name and a flag that tells whether @@ -225,7 +225,7 @@ static void copy2table(int n,int offset,int stride, } static void init_table(FILE *fp,int n,int nx0, - double tabscale,t_tabledata *td,bool bAlloc) + double tabscale,t_tabledata *td,gmx_bool bAlloc) { int i; @@ -241,7 +241,7 @@ static void init_table(FILE *fp,int n,int nx0, td->x[i] = i/tabscale; } -static void spline_forces(int nx,double h,double v[],bool bS3,bool bE3, +static void spline_forces(int nx,double h,double v[],gmx_bool bS3,gmx_bool bE3, double f[]) { int start,end,i; @@ -356,7 +356,7 @@ static void read_tables(FILE *fp,const char *fn, char buf[STRLEN]; double **yy=NULL,start,end,dx0,dx1,ssd,vm,vp,f,numf; int k,i,nx,nx0=0,ny,nny,ns; - bool bAllZero,bZeroV,bZeroF; + gmx_bool bAllZero,bZeroV,bZeroF; double tabscale; nny = 2*ntab+1; @@ -515,7 +515,7 @@ static void fill_table(t_tabledata *td,int tp,const t_forcerec *fr) /* Parameters for the switching function */ double ksw,swi,swi1; /* Temporary parameters */ - bool bSwitch,bShift; + gmx_bool bSwitch,bShift; double ewc=fr->ewaldcoeff; double isp= 0.564189583547756; @@ -730,7 +730,7 @@ static void fill_table(t_tabledata *td,int tp,const t_forcerec *fr) #endif } -static void set_table_type(int tabsel[],const t_forcerec *fr,bool b14only) +static void set_table_type(int tabsel[],const t_forcerec *fr,gmx_bool b14only) { int eltype,vdwtype; @@ -844,14 +844,14 @@ static void set_table_type(int tabsel[],const t_forcerec *fr,bool b14only) t_forcetable make_tables(FILE *out,const output_env_t oenv, const t_forcerec *fr, - bool bVerbose,const char *fn, + gmx_bool bVerbose,const char *fn, real rtab,int flags) { const char *fns[3] = { "ctab.xvg", "dtab.xvg", "rtab.xvg" }; const char *fns14[3] = { "ctab14.xvg", "dtab14.xvg", "rtab14.xvg" }; FILE *fp; t_tabledata *td; - bool b14only,bReadTab,bGenTab; + gmx_bool b14only,bReadTab,bGenTab; real x0,y0,yp; int i,j,k,nx,nx0,tabsel[etiNR]; @@ -965,7 +965,7 @@ t_forcetable make_gb_table(FILE *out,const output_env_t oenv, const char *fns14[3] = { "gbctab14.xvg", "gbdtab14.xvg", "gbrtab14.xvg" }; FILE *fp; t_tabledata *td; - bool bReadTab,bGenTab; + gmx_bool bReadTab,bGenTab; real x0,y0,yp; int i,j,k,nx,nx0,tabsel[etiNR]; void * p_tmp; diff --git a/src/mdlib/tgroup.c b/src/mdlib/tgroup.c index 9125fa3856..06262ef1bc 100644 --- a/src/mdlib/tgroup.c +++ b/src/mdlib/tgroup.c @@ -198,7 +198,7 @@ void update_ekindata(int start,int homenr,gmx_ekindata_t *ekind, } real sum_ekin(t_grpopts *opts,gmx_ekindata_t *ekind,real *dekindlambda, - bool bEkinAveVel, bool bSaveEkinOld, bool bScaleEkin) + gmx_bool bEkinAveVel, gmx_bool bSaveEkinOld, gmx_bool bScaleEkin) { int i,j,m,ngtc; real T,ek; diff --git a/src/mdlib/tpi.c b/src/mdlib/tpi.c index 6be238a14b..ad105c01b8 100644 --- a/src/mdlib/tpi.c +++ b/src/mdlib/tpi.c @@ -107,7 +107,7 @@ static void realloc_bins(double **bin,int *nbin,int nbin_new) double do_tpi(FILE *fplog,t_commrec *cr, int nfile, const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout, @@ -133,7 +133,7 @@ double do_tpi(FILE *fplog,t_commrec *cr, double embU,sum_embU,*sum_UgembU,V,V_all,VembU_all; t_trxstatus *status; t_trxframe rerun_fr; - bool bDispCorr,bCharge,bRFExcl,bNotLastFrame,bStateChanged,bNS,bOurStep; + gmx_bool bDispCorr,bCharge,bRFExcl,bNotLastFrame,bStateChanged,bNS,bOurStep; tensor force_vir,shake_vir,vir,pres; int cg_tp,a_tp0,a_tp1,ngid,gid_tp,nener,e; rvec *x_mol; @@ -144,7 +144,7 @@ double do_tpi(FILE *fplog,t_commrec *cr, FILE *fp_tpi=NULL; char *ptr,*dump_pdb,**leg,str[STRLEN],str2[STRLEN]; double dbl,dump_ener; - bool bCavity; + gmx_bool bCavity; int nat_cavity=0,d; real *mass_cavity=NULL,mass_tot; int nbin; diff --git a/src/mdlib/update.c b/src/mdlib/update.c index 28da66ae93..dd8f475b81 100644 --- a/src/mdlib/update.c +++ b/src/mdlib/update.c @@ -124,7 +124,7 @@ static void do_update_md(int start,int nrend,double dt, unsigned short cACC[],unsigned short cTC[], rvec x[],rvec xprime[],rvec v[], rvec f[],matrix M, - bool bNH,bool bPR) + gmx_bool bNH,gmx_bool bPR) { double imass,w_dt; int gf=0,ga=0,gt=0; @@ -230,7 +230,7 @@ static void do_update_vv_vel(int start,int nrend,double dt, unsigned short ptype[], unsigned short cFREEZE[],unsigned short cACC[], rvec v[],rvec f[], - bool bExtended, real veta, real alpha) + gmx_bool bExtended, real veta, real alpha) { double imass,w_dt; int gf=0,ga=0,gt=0; @@ -282,7 +282,7 @@ static void do_update_vv_pos(int start,int nrend,double dt, unsigned short ptype[], unsigned short cFREEZE[], rvec x[],rvec xprime[],rvec v[], - rvec f[],bool bExtended, real veta, real alpha) + rvec f[],gmx_bool bExtended, real veta, real alpha) { double imass,w_dt; int gf=0; @@ -326,7 +326,7 @@ static void do_update_visc(int start,int nrend,double dt, rvec x[],rvec xprime[],rvec v[], rvec f[],matrix M,matrix box,real cos_accel,real vcos, - bool bNH,bool bPR) + gmx_bool bNH,gmx_bool bPR) { double imass,w_dt; int gt=0; @@ -572,7 +572,7 @@ static void do_update_sd1(gmx_stochd_t *sd, } } -static void do_update_sd2(gmx_stochd_t *sd,bool bInitStep, +static void do_update_sd2(gmx_stochd_t *sd,gmx_bool bInitStep, int start,int homenr, rvec accel[],ivec nFreeze[], real invmass[],unsigned short ptype[], @@ -581,7 +581,7 @@ static void do_update_sd2(gmx_stochd_t *sd,bool bInitStep, rvec x[],rvec xprime[],rvec v[],rvec f[], rvec sd_X[], int ngtc,real tau_t[],real ref_t[], - bool bFirstHalf) + gmx_bool bFirstHalf) { gmx_sd_const_t *sdc; gmx_sd_sigma_t *sig; @@ -771,8 +771,8 @@ static void dump_it_all(FILE *fp,const char *title, } static void calc_ke_part_normal(rvec v[], t_grpopts *opts,t_mdatoms *md, - gmx_ekindata_t *ekind,t_nrnb *nrnb,bool bEkinAveVel, - bool bSaveEkinOld) + gmx_ekindata_t *ekind,t_nrnb *nrnb,gmx_bool bEkinAveVel, + gmx_bool bSaveEkinOld) { int start=md->start,homenr=md->homenr; int g,d,n,m,ga=0,gt=0; @@ -854,7 +854,7 @@ static void calc_ke_part_normal(rvec v[], t_grpopts *opts,t_mdatoms *md, static void calc_ke_part_visc(matrix box,rvec x[],rvec v[], t_grpopts *opts,t_mdatoms *md, gmx_ekindata_t *ekind, - t_nrnb *nrnb, bool bEkinAveVel, bool bSaveEkinOld) + t_nrnb *nrnb, gmx_bool bEkinAveVel, gmx_bool bSaveEkinOld) { int start=md->start,homenr=md->homenr; int g,d,n,m,gt=0; @@ -920,7 +920,7 @@ static void calc_ke_part_visc(matrix box,rvec x[],rvec v[], } void calc_ke_part(t_state *state,t_grpopts *opts,t_mdatoms *md, - gmx_ekindata_t *ekind,t_nrnb *nrnb, bool bEkinAveVel, bool bSaveEkinOld) + gmx_ekindata_t *ekind,t_nrnb *nrnb, gmx_bool bEkinAveVel, gmx_bool bSaveEkinOld) { if (ekind->cosacc.cos_accel == 0) { @@ -1132,7 +1132,7 @@ void update_tcouple(FILE *fplog, t_mdatoms *md) { - bool bTCouple=FALSE; + gmx_bool bTCouple=FALSE; real dttc; int i,start,end,homenr; @@ -1190,9 +1190,9 @@ void update_pcouple(FILE *fplog, matrix M, gmx_wallcycle_t wcycle, gmx_update_t upd, - bool bInitStep) + gmx_bool bInitStep) { - bool bPCouple=FALSE; + gmx_bool bPCouple=FALSE; real dtpc=0; int i; @@ -1272,12 +1272,12 @@ void update_constraints(FILE *fplog, gmx_wallcycle_t wcycle, gmx_update_t upd, gmx_constr_t constr, - bool bInitStep, - bool bFirstHalf, - bool bCalcVir, + gmx_bool bInitStep, + gmx_bool bFirstHalf, + gmx_bool bCalcVir, real vetanew) { - bool bExtended,bTrotter,bLastStep,bLog=FALSE,bEner=FALSE,bDoConstr=FALSE; + gmx_bool bExtended,bTrotter,bLastStep,bLog=FALSE,bEner=FALSE,bDoConstr=FALSE; double dt; real dt_1; int start,homenr,nrend,i,n,m,g,d; @@ -1442,10 +1442,10 @@ void update_box(FILE *fplog, t_nrnb *nrnb, gmx_wallcycle_t wcycle, gmx_update_t upd, - bool bInitStep, - bool bFirstHalf) + gmx_bool bInitStep, + gmx_bool bFirstHalf) { - bool bExtended,bTrotter,bLastStep,bLog=FALSE,bEner=FALSE; + gmx_bool bExtended,bTrotter,bLastStep,bLog=FALSE,bEner=FALSE; double dt; real dt_1; int start,homenr,nrend,i,n,m,g; @@ -1544,21 +1544,21 @@ void update_coords(FILE *fplog, t_mdatoms *md, t_state *state, rvec *f, /* forces on home particles */ - bool bDoLR, + gmx_bool bDoLR, rvec *f_lr, t_fcdata *fcd, gmx_ekindata_t *ekind, matrix M, gmx_wallcycle_t wcycle, gmx_update_t upd, - bool bInitStep, + gmx_bool bInitStep, int UpdatePart, t_commrec *cr, /* these shouldn't be here -- need to think about it */ t_nrnb *nrnb, gmx_constr_t constr, t_idef *idef) { - bool bExtended,bNH,bPR,bTrotter,bLastStep,bLog=FALSE,bEner=FALSE; + gmx_bool bExtended,bNH,bPR,bTrotter,bLastStep,bLog=FALSE,bEner=FALSE; double dt,alpha; real *imass,*imassin; rvec *force; diff --git a/src/mdlib/vsite.c b/src/mdlib/vsite.c index 7a2b695366..b2ce30d94d 100644 --- a/src/mdlib/vsite.c +++ b/src/mdlib/vsite.c @@ -409,7 +409,7 @@ void construct_vsites(FILE *log,gmx_vsite_t *vsite, rvec x[],t_nrnb *nrnb, real dt,rvec *v, t_iparams ip[],t_ilist ilist[], - int ePBC,bool bMolPBC,t_graph *graph, + int ePBC,gmx_bool bMolPBC,t_graph *graph, t_commrec *cr,matrix box) { rvec xpbc,xv,vv,dx; @@ -418,7 +418,7 @@ void construct_vsites(FILE *log,gmx_vsite_t *vsite, t_iatom avsite,ai,aj,ak,al,pbc_atom; t_iatom *ia; t_pbc pbc,*pbc_null,*pbc_null2; - bool bDomDec; + gmx_bool bDomDec; int *vsite_pbc,ishift; rvec reftmp,vtmp,rtmp; @@ -1181,7 +1181,7 @@ static int spread_vsiten(t_iatom ia[],t_iparams ip[], void spread_vsite_f(FILE *log,gmx_vsite_t *vsite, rvec x[],rvec f[],rvec *fshift, t_nrnb *nrnb,t_idef *idef, - int ePBC,bool bMolPBC,t_graph *g,matrix box, + int ePBC,gmx_bool bMolPBC,t_graph *g,matrix box, t_commrec *cr) { real a1,b1,c1; @@ -1385,7 +1385,7 @@ static int **get_vsite_pbc(t_iparams *iparams,t_ilist *ilist, t_iatom *ia; int **vsite_pbc,*vsite_pbc_f; char *pbc_set; - bool bViteOnlyCG_and_FirstAtom; + gmx_bool bViteOnlyCG_and_FirstAtom; /* Make an array that tells if the pbc of an atom is set */ snew(pbc_set,cgs->index[cgs->nr]); diff --git a/src/mdlib/wnblist.c b/src/mdlib/wnblist.c index d96dc16cc8..937d3283a8 100644 --- a/src/mdlib/wnblist.c +++ b/src/mdlib/wnblist.c @@ -114,7 +114,7 @@ static void write_nblist(FILE *out,gmx_domdec_t *dd,t_nblist *nblist,int nDNL) } static void set_mat(FILE *fp,int **mat,int i0,int ni,int j0,int nj, - bool bSymm,int shift) + gmx_bool bSymm,int shift) { int i,j; @@ -130,9 +130,9 @@ static void set_mat(FILE *fp,int **mat,int i0,int ni,int j0,int nj, } } -int read_nblist(FILE *in,FILE *fp,int **mat,int natoms,bool bSymm) +int read_nblist(FILE *in,FILE *fp,int **mat,int natoms,gmx_bool bSymm) { - bool bNL; + gmx_bool bNL; char buf[256],b1[32],b2[32],solv[256],il_code[256]; int i,ii,j,nnbl,full,icmp,nri,isolv; int iatom,nrj,nj,shift,gid,nargs,njtot=0; diff --git a/src/ngmx/buttons.c b/src/ngmx/buttons.c index 3d017cd7ea..6c6fd918e2 100644 --- a/src/ngmx/buttons.c +++ b/src/ngmx/buttons.c @@ -74,7 +74,7 @@ static void move_bbox(t_x11 *x11,t_butbox *bbox) } } -static bool BBCallBack(t_x11 *x11,XEvent *event, Window w,void *data) +static gmx_bool BBCallBack(t_x11 *x11,XEvent *event, Window w,void *data) { t_butbox *bbox; @@ -87,7 +87,7 @@ static bool BBCallBack(t_x11 *x11,XEvent *event, Window w,void *data) return FALSE; } -static bool VBCallBack(t_x11 *x11,XEvent *event, Window w,void *data) +static gmx_bool VBCallBack(t_x11 *x11,XEvent *event, Window w,void *data) { t_butbox *vbox; int y0; @@ -112,7 +112,7 @@ void set_vbtime(t_x11 *x11,t_butbox *vbox,char *text) ExposeWin(x11->disp,vbox->wd.self); } -static bool ButtonCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool ButtonCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { XEvent letter; t_mwbut *but; diff --git a/src/ngmx/dialogs.c b/src/ngmx/dialogs.c index 344b180829..72e94e4aca 100644 --- a/src/ngmx/dialogs.c +++ b/src/ngmx/dialogs.c @@ -202,7 +202,7 @@ enum { eExE, eExGrom, eExPdb, eExConf, eExNR }; static void ExportCB(t_x11 *x11,int dlg_mess,int item_id, char *set,void *data) { - bool bOk; + gmx_bool bOk; t_gmx *gmx; t_dlg *dlg; @@ -252,7 +252,7 @@ static void BondsCB(t_x11 *x11,int dlg_mess,int item_id, { static int ebond=-1; static int ebox=-1; - bool bOk,bBond=FALSE; + gmx_bool bOk,bBond=FALSE; int nskip,nwait; t_gmx *gmx; @@ -282,7 +282,7 @@ static void BondsCB(t_x11 *x11,int dlg_mess,int item_id, case ebDPlus: DO_NOT(gmx->man->bPlus); #ifdef DEBUG - fprintf(stderr,"gmx->man->bPlus=%s\n",bool_names[gmx->man->bPlus]); + fprintf(stderr,"gmx->man->bPlus=%s\n",gmx_bool_names[gmx->man->bPlus]); #endif break; /*case ebSBox: @@ -294,7 +294,7 @@ static void BondsCB(t_x11 *x11,int dlg_mess,int item_id, case ebCue: DO_NOT(gmx->man->bSort); #ifdef DEBUG - fprintf(stderr,"gmx->man->bSort=%s\n",bool_names[gmx->man->bSort]); + fprintf(stderr,"gmx->man->bSort=%s\n",gmx_bool_names[gmx->man->bSort]); #endif break; case ebSkip: @@ -369,7 +369,7 @@ static void BondsCB(t_x11 *x11,int dlg_mess,int item_id, enum { esFUNCT=1, esBSHOW, esINFIL, esINDEXFIL, esLSQ, esSHOW, esPLOTFIL }; -static bool in_set(int i,int n,int set[]) +static gmx_bool in_set(int i,int n,int set[]) { int j; for(j=0; (jlabel,x0+6,y0-th,30,2*th,eXLeft,eYCenter); } -static bool label_pp(t_x11 *x11,Window w,int npp,t_phipsi pp[], +static gmx_bool label_pp(t_x11 *x11,Window w,int npp,t_phipsi pp[], t_dih dih[],int mx,int my) { int d,md,x0,y0; @@ -107,7 +107,7 @@ static bool label_pp(t_x11 *x11,Window w,int npp,t_phipsi pp[], return FALSE; } -static bool xrCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool xrCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) { t_app *app; t_xrama *xr; @@ -156,7 +156,7 @@ static bool xrCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) return FALSE; } -static bool appCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool appCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) { t_app *app; int win; @@ -214,7 +214,7 @@ static void size_app(t_x11 *x11,t_app *app) app->wd.width-6,app->wd.height-th-10-4); } -static bool mainCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool mainCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data) { t_app *app; int wt,ht; diff --git a/src/ngmx/logo.c b/src/ngmx/logo.c index 2f56c72512..8525257131 100644 --- a/src/ngmx/logo.c +++ b/src/ngmx/logo.c @@ -66,10 +66,10 @@ void hide_logo(t_x11 *x11,t_logo *logo) XUnmapWindow(x11->disp,logo->wd.self); } -static bool LogoCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool LogoCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { /* Assume window is 100x110 */ - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; #define CSIZE 9 #define NSIZE 8 #define OSIZE 9 @@ -163,7 +163,7 @@ static bool LogoCallBack(t_x11 *x11,XEvent *event, Window w, void *data) return FALSE; } -t_logo *init_logo(t_x11 *x11,Window parent,bool bQuitOnClick) +t_logo *init_logo(t_x11 *x11,Window parent,gmx_bool bQuitOnClick) { static const char *bfname[]= { "-b&h-lucida-bold-i-normal-sans-34-240-100-100-p-215-iso8859-1", diff --git a/src/ngmx/logo.h b/src/ngmx/logo.h index 3fe7f429bf..21f825df2e 100644 --- a/src/ngmx/logo.h +++ b/src/ngmx/logo.h @@ -43,14 +43,14 @@ typedef struct { XFontStruct *bigfont; XFontStruct *smallfont; t_windata wd; - bool bQuitOnClick; + gmx_bool bQuitOnClick; } t_logo; extern void show_logo(t_x11 *x11,t_logo *logo); extern void hide_logo(t_x11 *x11,t_logo *logo); -extern t_logo *init_logo(t_x11 *x11,Window parent,bool bQuitOnClick); +extern t_logo *init_logo(t_x11 *x11,Window parent,gmx_bool bQuitOnClick); extern void done_logo(t_x11 *x11,t_logo *logo); diff --git a/src/ngmx/manager.c b/src/ngmx/manager.c index 200ce7a57d..b18ece2402 100644 --- a/src/ngmx/manager.c +++ b/src/ngmx/manager.c @@ -69,9 +69,9 @@ static void add_object(t_manager *man,eObject eO,atom_id ai,atom_id aj) } static void add_bonds(t_manager *man,t_functype func[], - t_ilist *b,bool bB[]) + t_ilist *b,gmx_bool bB[]) { - bool *bH=man->bHydro; + gmx_bool *bH=man->bHydro; t_iatom *ia; t_iatom type,ai,aj,ak; int i,delta,ftype; @@ -112,7 +112,7 @@ static void add_bonds(t_manager *man,t_functype func[], } } -static void add_bpl(t_manager *man,t_idef *idef,bool bB[]) +static void add_bpl(t_manager *man,t_idef *idef,gmx_bool bB[]) { int ftype; @@ -136,7 +136,7 @@ static atom_id which_atom(t_manager *man,int x, int y) return NO_ATID; } -static void do_label(t_x11 *x11,t_manager *man,int x,int y,bool bSet) +static void do_label(t_x11 *x11,t_manager *man,int x,int y,gmx_bool bSet) { atom_id ai; unsigned long col; @@ -178,7 +178,7 @@ void set_file(t_x11 *x11,t_manager *man,const char *trajectory, char buf[256],quote[256]; t_tpxheader sh; t_atoms *at; - bool *bB; + gmx_bool *bB; int i,idum; read_tpxheader(status,&sh,TRUE,NULL,NULL); @@ -256,7 +256,7 @@ void step_message(t_x11 *x11,t_manager *man) XSendEvent(x11->disp,letter.xclient.window,True,0,&letter); } -bool ReadMonfile(char *fn,int *nbars, int *bars) +gmx_bool ReadMonfile(char *fn,int *nbars, int *bars) { FILE *fp; if ((fp = fopen(fn,"r"))==NULL) @@ -305,11 +305,11 @@ static void reset_mols(t_block *mols,matrix box,rvec x[]) } } -static bool step_man(t_manager *man,int *nat) +static gmx_bool step_man(t_manager *man,int *nat) { static int ncount=0; - static bool bWarn = FALSE; - bool bEof; + static gmx_bool bWarn = FALSE; + gmx_bool bEof; int dum; const char *warn; @@ -356,7 +356,7 @@ static bool step_man(t_manager *man,int *nat) static void HandleClient(t_x11 *x11,t_manager *man,long data[]) { int ID,button,x,y; - bool bPos; + gmx_bool bPos; real fac; ID=data[0]; @@ -442,7 +442,7 @@ static void HandleClient(t_x11 *x11,t_manager *man,long data[]) step_message(x11,man); } -static bool TitleCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool TitleCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_windata *wd; @@ -464,7 +464,7 @@ static bool TitleCallBack(t_x11 *x11,XEvent *event, Window w, void *data) return FALSE; } -static bool ManCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool ManCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_manager *man; int width,height; @@ -545,7 +545,7 @@ void map_man(t_x11 *x11,t_manager *man) show_but(x11,man->bbox); } -bool toggle_animate (t_x11 *x11,t_manager *man) +gmx_bool toggle_animate (t_x11 *x11,t_manager *man) { if (man->status) { man->bAnimate=!man->bAnimate; @@ -559,7 +559,7 @@ bool toggle_animate (t_x11 *x11,t_manager *man) return man->bAnimate; } -bool toggle_pbc (t_manager *man) +gmx_bool toggle_pbc (t_manager *man) { man->bPbc=!man->bPbc; diff --git a/src/ngmx/manager.h b/src/ngmx/manager.h index 0fc964c4b1..7b2aa4e469 100644 --- a/src/ngmx/manager.h +++ b/src/ngmx/manager.h @@ -62,7 +62,7 @@ enum { esbNone, esbRect, esbTri, esbTrunc, esbNR }; typedef struct { t_windata wd; /* Mol window structure */ - bool bShowHydrogen; /* Show Hydrogens? */ + gmx_bool bShowHydrogen; /* Show Hydrogens? */ int bond_type; /* Show one of the above bondtypes */ int ePBC; /* PBC type */ int boxtype; /* Rectangular, Tric, TruncOct (display)*/ @@ -80,8 +80,8 @@ typedef struct { typedef struct { t_blocka *grps; /* Blocks with atom numbers */ char **grpnames; /* The names of the groups */ - bool *bDisable; /* Group indexes out of natoms in TRX */ - bool *bShow; /* Show a group ? */ + gmx_bool *bDisable; /* Group indexes out of natoms in TRX */ + gmx_bool *bShow; /* Show a group ? */ } t_filter; /* @@ -105,19 +105,19 @@ typedef struct { matrix box; /* The box */ int nobj; /* The number of objects */ t_object *obj; /* The objects on screen */ - bool *bHydro; /* TRUE for hydrogen atoms */ - bool *bLabel; /* Show a label on atom i? */ + gmx_bool *bHydro; /* TRUE for hydrogen atoms */ + gmx_bool *bLabel; /* Show a label on atom i? */ char **szLab; /* Array of pointers to labels */ unsigned long *col; /* The colour of the atoms */ int *size; /* The size of the atoms */ real *vdw; /* The VDWaals radius of the atoms */ - bool *bVis; /* visibility of atoms */ - bool bPbc; /* Remove Periodic boundary */ - bool bAnimate; /* Animation going on? */ - bool bEof; /* End of file reached? */ - bool bStop; /* Stopped by user? */ - bool bSort; /* Sort the coordinates */ - bool bPlus; /* Draw plus for single atom */ + gmx_bool *bVis; /* visibility of atoms */ + gmx_bool bPbc; /* Remove Periodic boundary */ + gmx_bool bAnimate; /* Animation going on? */ + gmx_bool bEof; /* End of file reached? */ + gmx_bool bStop; /* Stopped by user? */ + gmx_bool bSort; /* Sort the coordinates */ + gmx_bool bPlus; /* Draw plus for single atom */ int nSkip; /* Skip n steps after each frame */ int nWait; /* Wait n ms after each frame */ gmx_rmpbc_t gpbc; /* For removing peridiocity */ @@ -153,9 +153,9 @@ extern void map_man(t_x11 *x11,t_manager *man); extern void move_man(t_x11 *x11,t_manager *man,int width,int height); -extern bool toggle_animate (t_x11 *x11,t_manager *man); +extern gmx_bool toggle_animate (t_x11 *x11,t_manager *man); -extern bool toggle_pbc (t_manager *man); +extern gmx_bool toggle_pbc (t_manager *man); extern void no_labels(t_x11 *x11,t_manager *man); /* Turn off all labels */ diff --git a/src/ngmx/molps.c b/src/ngmx/molps.c index afcf0ee0cf..6798134960 100644 --- a/src/ngmx/molps.c +++ b/src/ngmx/molps.c @@ -77,7 +77,7 @@ static void init_pbc(matrix box) } } -static bool local_pbc_dx(rvec x1, rvec x2) +static gmx_bool local_pbc_dx(rvec x1, rvec x2) { int i; real dx; @@ -94,7 +94,7 @@ static bool local_pbc_dx(rvec x1, rvec x2) static void ps_draw_bond(t_psdata ps, atom_id ai,atom_id aj,iv2 vec2[], - rvec x[],char **atomnm[],int size[],bool bBalls) + rvec x[],char **atomnm[],int size[],gmx_bool bBalls) { char *ic,*jc; int xi,yi,xj,yj; @@ -131,10 +131,10 @@ static void ps_draw_bond(t_psdata ps, } void ps_draw_objects(t_psdata ps,int nobj,t_object objs[],iv2 vec2[],rvec x[], - char **atomnm[],int size[],bool bShowHydro,int bond_type, - bool bPlus) + char **atomnm[],int size[],gmx_bool bShowHydro,int bond_type, + gmx_bool bPlus) { - bool bBalls; + gmx_bool bBalls; int i; t_object *obj; diff --git a/src/ngmx/nener.c b/src/ngmx/nener.c index 366947dbf9..42b7d0d306 100644 --- a/src/ngmx/nener.c +++ b/src/ngmx/nener.c @@ -90,7 +90,7 @@ static void DrawEGraph(t_x11 *x11,t_enerwin *ew) } } -static bool EWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool EWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_enerwin *ew; int i,x,y,width; diff --git a/src/ngmx/ngmx.c b/src/ngmx/ngmx.c index a2234f82d3..7e3719a077 100644 --- a/src/ngmx/ngmx.c +++ b/src/ngmx/ngmx.c @@ -96,7 +96,7 @@ static void done_gmx(t_x11 *x11,t_gmx *gmx) } static void move_gmx(t_x11 *x11,t_gmx *gmx,int width,int height, - bool bSizePD) + gmx_bool bSizePD) { int y0,wl,hl; #ifdef DEBUG @@ -115,7 +115,7 @@ static void move_gmx(t_x11 *x11,t_gmx *gmx,int width,int height, XMoveWindow(x11->disp,gmx->logo->wd.self,(width-wl)/2,(height-y0-hl)/2); } -static bool HandleClient(t_x11 *x11,int ID,t_gmx *gmx) +static gmx_bool HandleClient(t_x11 *x11,int ID,t_gmx *gmx) { t_pulldown *pd; @@ -235,11 +235,11 @@ static bool HandleClient(t_x11 *x11,int ID,t_gmx *gmx) return FALSE; } -static bool MainCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool MainCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_gmx *gmx; int nsel,width,height; - bool result; + gmx_bool result; result = FALSE; gmx=(t_gmx *)data; diff --git a/src/ngmx/nleg.c b/src/ngmx/nleg.c index e0c0251074..dbb4d17f22 100644 --- a/src/ngmx/nleg.c +++ b/src/ngmx/nleg.c @@ -133,7 +133,7 @@ void DrawLegend(t_x11 *x11,t_windata *Win) XSetForeground(x11->disp,x11->gc,x11->fg); } -static bool LegWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool LegWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_legendwin *lw; diff --git a/src/ngmx/nload.c b/src/ngmx/nload.c index ec1b21df7d..cc34951c13 100644 --- a/src/ngmx/nload.c +++ b/src/ngmx/nload.c @@ -114,7 +114,7 @@ void DrawLoad(t_x11 *x11,t_windata *Win,int nloads,int *loadinfo) XSetForeground(x11->disp,x11->gc,x11->fg); } -static bool LWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +static gmx_bool LWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_loadwin *lw; @@ -154,7 +154,7 @@ void map_lw(t_x11 *x11,t_loadwin *lw) void set_load(t_x11 *x11,t_loadwin *lw,int nnodes,int load[]) { int i; - bool bChange=FALSE; + gmx_bool bChange=FALSE; lw->nnodes=nnodes; for(i=0; (idisp,mw->wd.self); } -bool toggle_hydrogen(t_x11 *x11,t_molwin *mw) +gmx_bool toggle_hydrogen(t_x11 *x11,t_molwin *mw) { mw->bShowHydrogen=!mw->bShowHydrogen; ExposeWin(x11->disp,mw->wd.self); @@ -168,7 +168,7 @@ void done_mw(t_x11 *x11,t_molwin *mw) static void draw_atom(Display *disp,Window w,GC gc, atom_id ai,iv2 vec2[],unsigned long col[],int size[], - bool bBall,bool bPlus) + gmx_bool bBall,gmx_bool bPlus) { int xi,yi; @@ -205,7 +205,7 @@ static void my_init_pbc(matrix box) } } -static bool local_pbc_dx(rvec x1, rvec x2) +static gmx_bool local_pbc_dx(rvec x1, rvec x2) { int i; real dx; @@ -222,7 +222,7 @@ static bool local_pbc_dx(rvec x1, rvec x2) static void draw_bond(Display *disp,Window w,GC gc, atom_id ai,atom_id aj,iv2 vec2[], - rvec x[],unsigned long col[],int size[],bool bBalls) + rvec x[],unsigned long col[],int size[],gmx_bool bBalls) { unsigned long ic,jc; int xi,yi,xj,yj; @@ -318,7 +318,7 @@ int filter_vis(t_manager *man) { int i,nobj,nvis,nhide; atom_id ai; - bool bAdd,*bVis; + gmx_bool bAdd,*bVis; t_object *obj; t_object *newobj; @@ -347,10 +347,10 @@ int filter_vis(t_manager *man) void draw_objects(Display *disp,Window w,GC gc,int nobj, t_object objs[],iv2 vec2[],rvec x[], - unsigned long col[],int size[],bool bShowHydro,int bond_type, - bool bPlus) + unsigned long col[],int size[],gmx_bool bShowHydro,int bond_type, + gmx_bool bPlus) { - bool bBalls; + gmx_bool bBalls; int i; t_object *obj; diff --git a/src/ngmx/nmol.h b/src/ngmx/nmol.h index 2ede21d2d2..f39fec742c 100644 --- a/src/ngmx/nmol.h +++ b/src/ngmx/nmol.h @@ -53,7 +53,7 @@ extern int compare_obj(const void *a,const void *b); extern int filter_vis(t_manager *man); extern void set_sizes(t_manager *man,real sx,real sy); -extern bool toggle_hydrogen(t_x11 *x11,t_molwin *mw); +extern gmx_bool toggle_hydrogen(t_x11 *x11,t_molwin *mw); /* Toggle the state of the hydrogen drawing, * return the current state */ diff --git a/src/ngmx/popup.c b/src/ngmx/popup.c index 19c2d362c5..9df9fe9440 100644 --- a/src/ngmx/popup.c +++ b/src/ngmx/popup.c @@ -44,7 +44,7 @@ #include #include "popup.h" -bool ChildCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +gmx_bool ChildCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_child *child; t_mentry *m; @@ -87,7 +87,7 @@ bool ChildCallBack(t_x11 *x11,XEvent *event, Window w, void *data) return FALSE; } -bool MenuCallBack(t_x11 *x11,XEvent *event, Window w, void *data) +gmx_bool MenuCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_menu *m; @@ -184,7 +184,7 @@ t_menu *init_menu(t_x11 *x11,Window Parent,unsigned long fg,unsigned long bg, return m; } -void show_menu(t_x11 *x11,t_menu *m,int x,int y,bool bGrab) +void show_menu(t_x11 *x11,t_menu *m,int x,int y,gmx_bool bGrab) { XMoveWindow(x11->disp,m->wd.self,x,y); m->bGrabbed=bGrab; @@ -199,7 +199,7 @@ void hide_menu(t_x11 *x11,t_menu *m) XUnmapWindow(x11->disp,m->wd.self); } -void check_menu_item(t_menu *m,int nreturn,bool bStatus) +void check_menu_item(t_menu *m,int nreturn,gmx_bool bStatus) { int i; diff --git a/src/ngmx/popup.h b/src/ngmx/popup.h index a0b8281101..ef39f7d8a1 100644 --- a/src/ngmx/popup.h +++ b/src/ngmx/popup.h @@ -42,7 +42,7 @@ typedef struct { Window send_to; /* Window to send messages to */ int nreturn; /* Value returned when entry is selected */ - bool bChecked; /* Indicate whether menu item is check-marked */ + gmx_bool bChecked; /* Indicate whether menu item is check-marked */ const char *str; /* Text for menu entry */ } t_mentry; @@ -57,7 +57,7 @@ typedef struct { Window Parent; /* The parent of the menu */ int nitem; /* The number of menu items */ t_child *item; /* Array of child windows */ - bool bGrabbed; /* Did this menu grab the pointer? */ + gmx_bool bGrabbed; /* Did this menu grab the pointer? */ } t_menu; extern t_menu *init_menu(t_x11 *x11,Window Parent,unsigned long fg,unsigned long bg, @@ -76,7 +76,7 @@ extern t_menu *init_menu(t_x11 *x11,Window Parent,unsigned long fg,unsigned long * has to be shown, call show_menu. */ -extern void show_menu(t_x11 *x11,t_menu *m,int x, int y,bool bGrab); +extern void show_menu(t_x11 *x11,t_menu *m,int x, int y,gmx_bool bGrab); /* Show the menu in m at (x,y) * This will popup the menu, and when a button is released in the * menu send a ClientMessage to the Parent window of the menu @@ -87,7 +87,7 @@ extern void show_menu(t_x11 *x11,t_menu *m,int x, int y,bool bGrab); extern void hide_menu(t_x11 *x11,t_menu *m); /* Unmaps the window for m, hides the window */ -extern void check_menu_item(t_menu *m,int nreturn,bool bStatus); +extern void check_menu_item(t_menu *m,int nreturn,gmx_bool bStatus); /* Set the bChecked field in the menu item with return code * nreturn to bStatus. This function must always be called when * the bChecked flag has to changed. diff --git a/src/ngmx/pulldown.c b/src/ngmx/pulldown.c index c6d571f902..a6d98e1edf 100644 --- a/src/ngmx/pulldown.c +++ b/src/ngmx/pulldown.c @@ -43,7 +43,7 @@ #include "popup.h" #include "pulldown.h" -static bool PDCallBack(t_x11 *x11,XEvent *event,Window w,void *data) +static gmx_bool PDCallBack(t_x11 *x11,XEvent *event,Window w,void *data) { t_pulldown *pd; int i,x,x1,y,nsel; @@ -119,7 +119,7 @@ void hide_pd(t_x11 *x11,t_pulldown *pd) pd->nsel=-1; } -void check_pd_item(t_pulldown *pd,int nreturn,bool bStatus) +void check_pd_item(t_pulldown *pd,int nreturn,gmx_bool bStatus) { int i; diff --git a/src/ngmx/pulldown.h b/src/ngmx/pulldown.h index e36fe27d1f..c7c6b85fdd 100644 --- a/src/ngmx/pulldown.h +++ b/src/ngmx/pulldown.h @@ -69,7 +69,7 @@ extern t_pulldown *init_pd(t_x11 *x11,Window Parent,int width,int height, extern void hide_pd(t_x11 *x11,t_pulldown *pd); /* Hides any menu that is still on the screen when it shouldn't */ -extern void check_pd_item(t_pulldown *pd,int nreturn,bool bStatus); +extern void check_pd_item(t_pulldown *pd,int nreturn,gmx_bool bStatus); /* Set the bChecked field in the pd item with return code * nreturn to bStatus. This function must always be called when * the bChecked flag has to changed. diff --git a/src/ngmx/x11.c b/src/ngmx/x11.c index 8e7fef039a..f45efa7d42 100644 --- a/src/ngmx/x11.c +++ b/src/ngmx/x11.c @@ -71,20 +71,20 @@ static XFontStruct *GetFont(FILE *err, Display *disp, char *name) XFontStruct *font; int count; char **fontlist; - bool bFont = FALSE; + gmx_bool bFont = FALSE; if (name) - bFont=(bool) ((font=XLQF(err,disp,name))!=NULL); + bFont=(gmx_bool) ((font=XLQF(err,disp,name))!=NULL); else font=NULL; for (i=0; (!bFont && (idef,"TRUE")==0; AddListItem(list,CreateCheckBox(x11,fitem->name[0],bCheck, @@ -306,7 +306,7 @@ static void AddListFItem(t_x11 *x11, t_dlgitemlist *list, } static void AddListFGroup(t_x11 *x11, t_dlgitemlist **grid, - t_fgroup *fgroup, t_id *ID,bool bUseMon) + t_fgroup *fgroup, t_id *ID,gmx_bool bUseMon) { int i; t_id GroupID,*ids; @@ -338,7 +338,7 @@ static void AddListFGroup(t_x11 *x11, t_dlgitemlist **grid, } static void AddListFSimple(t_x11 *x11, t_dlgitemlist **grid, - t_fsimple *fsimple, t_id *ID,bool bUseMon) + t_fsimple *fsimple, t_id *ID,gmx_bool bUseMon) { t_dlgitemlist *item; int x,y,w; @@ -354,7 +354,7 @@ static void AddListFSimple(t_x11 *x11, t_dlgitemlist **grid, t_dlg *ReadDlg(t_x11 *x11,Window Parent, const char *title, unsigned long fg, unsigned long bg, const char *infile, - int x0, int y0, bool bAutoPosition,bool bUseMon, + int x0, int y0, gmx_bool bAutoPosition,gmx_bool bUseMon, DlgCallback *cb,void *data) { t_fgrid *fgrid; diff --git a/src/ngmx/xdlghi.h b/src/ngmx/xdlghi.h index e8d353df19..7e9ed807ab 100644 --- a/src/ngmx/xdlghi.h +++ b/src/ngmx/xdlghi.h @@ -69,7 +69,7 @@ extern t_dlgitem **CreateDlgitemGroup(t_x11 *x11, const char *szTitle, extern t_dlg *ReadDlg(t_x11 *x11,Window Parent, const char *title, unsigned long fg, unsigned long bg, const char *infile, - int x0, int y0, bool bAutoPosition,bool bUseMon, + int x0, int y0, gmx_bool bAutoPosition,gmx_bool bUseMon, DlgCallback *cb,void *data); /* Read a dialog box from a template file */ diff --git a/src/ngmx/xdlgitem.c b/src/ngmx/xdlgitem.c index c30accc35d..9fe689a6e4 100644 --- a/src/ngmx/xdlgitem.c +++ b/src/ngmx/xdlgitem.c @@ -290,7 +290,7 @@ static int WndProcST(t_x11 *x11, t_dlgitem *dlgitem, XEvent *event) return ITEMOK; } -static bool insert(char *s, char c, int *pos) +static gmx_bool insert(char *s, char c, int *pos) { int i,sl; @@ -306,7 +306,7 @@ static bool insert(char *s, char c, int *pos) return FALSE; } -static bool my_backspace(char *s, int *pos) +static gmx_bool my_backspace(char *s, int *pos) { int i,sl; @@ -320,7 +320,7 @@ static bool my_backspace(char *s, int *pos) return FALSE; } -static bool my_delete(char *s, int *pos) +static gmx_bool my_delete(char *s, int *pos) { int i,sl; @@ -475,7 +475,7 @@ static int WndProcET(t_x11 *x11, t_dlgitem *dlgitem, XEvent *event) * ****************************/ t_dlgitem *CreateButton(t_x11 *x11, - const char *szLab,bool bDef,t_id id,t_id groupid, + const char *szLab,gmx_bool bDef,t_id id,t_id groupid, int x0,int y0,int w,int h,int bw) { t_dlgitem *dlgitem; @@ -502,7 +502,7 @@ t_dlgitem *CreateButton(t_x11 *x11, } t_dlgitem *CreateRadioButton(t_x11 *x11, - const char *szLab,bool bSet,t_id id, + const char *szLab,gmx_bool bSet,t_id id, t_id groupid, int x0,int y0,int w,int h,int bw) { @@ -545,7 +545,7 @@ t_dlgitem *CreateGroupBox(t_x11 *x11, } t_dlgitem *CreateCheckBox(t_x11 *x11, - const char *szLab,bool bCheckedInitial,t_id id, + const char *szLab,gmx_bool bCheckedInitial,t_id id, t_id groupid, int x0,int y0,int w,int h,int bw) { @@ -645,7 +645,7 @@ t_dlgitem *CreateEditText(t_x11 *x11, #define SC(src) (strlen(src)?strdup(src):NULL) -void SetDlgitemOpts(t_dlgitem *dlgitem,bool bUseMon, +void SetDlgitemOpts(t_dlgitem *dlgitem,gmx_bool bUseMon, char *set,char *get,char *help) { dlgitem->bUseMon=bUseMon; diff --git a/src/ngmx/xdlgitem.h b/src/ngmx/xdlgitem.h index 5de7b8a390..012f8ca81a 100644 --- a/src/ngmx/xdlgitem.h +++ b/src/ngmx/xdlgitem.h @@ -50,15 +50,15 @@ enum { typedef int t_id; typedef struct { - bool bDefault; /* This is the default button */ + gmx_bool bDefault; /* This is the default button */ } t_button; typedef struct { - bool bSelect; /* Is this rb selected ? */ + gmx_bool bSelect; /* Is this rb selected ? */ } t_radiobutton; typedef struct { - bool bChecked; /* Is this cb checked ? */ + gmx_bool bChecked; /* Is this cb checked ? */ } t_checkbox; typedef struct { @@ -75,7 +75,7 @@ typedef struct { int pos/*,len*/; /* Current length of the string and pos of caret */ /* Pos is relative to strbegin, and is the pos */ /* in the window. */ - bool bChanged; + gmx_bool bChanged; char *buf; } t_edittext; @@ -91,7 +91,7 @@ typedef enum { typedef struct t_dlgitem { t_windata win; t_id ID,GroupID; - bool bUseMon; + gmx_bool bUseMon; char *set,*get,*help; edlgitem type; int (*WndProc)(t_x11 *x11,struct t_dlgitem *dlgitem,XEvent *event); @@ -120,12 +120,12 @@ typedef struct t_dlgitem { * on the dlg box, and if wished resize them. * ****************************/ -extern t_dlgitem *CreateButton(t_x11 *x11, const char *szLab,bool bDef, +extern t_dlgitem *CreateButton(t_x11 *x11, const char *szLab,gmx_bool bDef, t_id id,t_id groupid, int x0,int y0,int w,int h,int bw); extern t_dlgitem *CreateRadioButton(t_x11 *x11, - const char *szLab,bool bSet,t_id id, + const char *szLab,gmx_bool bSet,t_id id, t_id groupid, int x0,int y0,int w,int h,int bw); @@ -134,7 +134,7 @@ extern t_dlgitem *CreateGroupBox(t_x11 *x11,const char *szLab,t_id id, int x0,int y0,int w,int h,int bw); extern t_dlgitem *CreateCheckBox(t_x11 *x11,const char *szLab, - bool bCheckedInitial, + gmx_bool bCheckedInitial, t_id id,t_id groupid, int x0,int y0,int w,int h,int bw); @@ -150,7 +150,7 @@ extern t_dlgitem *CreateEditText(t_x11 *x11,const char *title, int screenbuf,char *buf, t_id id,t_id groupid, int x0,int y0,int w,int h,int bw); -extern void SetDlgitemOpts(t_dlgitem *dlgitem,bool bUseMon, +extern void SetDlgitemOpts(t_dlgitem *dlgitem,gmx_bool bUseMon, char *set, char *get, char *help); #endif /* _xdlgitem_h */ diff --git a/src/ngmx/xutil.c b/src/ngmx/xutil.c index 06a8deff42..c5a9f7ea33 100644 --- a/src/ngmx/xutil.c +++ b/src/ngmx/xutil.c @@ -268,7 +268,7 @@ void PopMouse(Display *disp) sfree(old); } -bool HelpPressed(XEvent *event) +gmx_bool HelpPressed(XEvent *event) { #define BUFSIZE 24 char buf[BUFSIZE+1]; @@ -280,7 +280,7 @@ bool HelpPressed(XEvent *event) return (keysym == XK_F1); } -bool GrabOK(FILE *out, int err) +gmx_bool GrabOK(FILE *out, int err) { switch (err) { case GrabSuccess: diff --git a/src/ngmx/xutil.h b/src/ngmx/xutil.h index c22f7e80e0..0d34c52313 100644 --- a/src/ngmx/xutil.h +++ b/src/ngmx/xutil.h @@ -48,7 +48,7 @@ typedef struct { Window self,Parent; unsigned long color; char *text; - bool bFocus; + gmx_bool bFocus; int x,y,width,height,bwidth; Cursor cursor; } t_windata; @@ -87,9 +87,9 @@ extern void PushMouse(Display *disp, Window dest, int x, int y); extern void PopMouse(Display *disp); -extern bool HelpPressed(XEvent *event); +extern gmx_bool HelpPressed(XEvent *event); -extern bool GrabOK(FILE *out, int err); +extern gmx_bool GrabOK(FILE *out, int err); /* Return TRUE if grab succeeded, prints a message to out * and returns FALSE otherwise. */ diff --git a/src/tools/addconf.c b/src/tools/addconf.c index 0ac2ff9836..c74fc22eef 100644 --- a/src/tools/addconf.c +++ b/src/tools/addconf.c @@ -88,21 +88,21 @@ static void set_margin(t_atoms *atoms, rvec *x, real *r) fprintf(stderr,"box_margin = %g\n",box_margin); } -static bool outside_box_minus_margin2(rvec x,matrix box) +static gmx_bool outside_box_minus_margin2(rvec x,matrix box) { return ( (x[XX]<2*box_margin) || (x[XX]>box[XX][XX]-2*box_margin) || (x[YY]<2*box_margin) || (x[YY]>box[YY][YY]-2*box_margin) || (x[ZZ]<2*box_margin) || (x[ZZ]>box[ZZ][ZZ]-2*box_margin) ); } -static bool outside_box_plus_margin(rvec x,matrix box) +static gmx_bool outside_box_plus_margin(rvec x,matrix box) { return ( (x[XX]<-box_margin) || (x[XX]>box[XX][XX]+box_margin) || (x[YY]<-box_margin) || (x[YY]>box[YY][YY]+box_margin) || (x[ZZ]<-box_margin) || (x[ZZ]>box[ZZ][ZZ]+box_margin) ); } -static int mark_res(int at, bool *mark, int natoms, t_atom *atom,int *nmark) +static int mark_res(int at, gmx_bool *mark, int natoms, t_atom *atom,int *nmark) { int resind; @@ -187,7 +187,7 @@ static void combine_atoms(t_atoms *ap,t_atoms *as, static t_forcerec *fr=NULL; -void do_nsgrid(FILE *fp,bool bVerbose, +void do_nsgrid(FILE *fp,gmx_bool bVerbose, matrix box,rvec x[],t_atoms *atoms,real rlong, const output_env_t oenv) { @@ -310,15 +310,15 @@ void do_nsgrid(FILE *fp,bool bVerbose, fprintf(stderr,"Successfully made neighbourlist\n"); } -bool bXor(bool b1,bool b2) +gmx_bool bXor(gmx_bool b1,gmx_bool b2) { return (b1 && !b2) || (b2 && !b1); } -void add_conf(t_atoms *atoms, rvec **x, rvec **v, real **r, bool bSrenew, - int ePBC, matrix box, bool bInsert, +void add_conf(t_atoms *atoms, rvec **x, rvec **v, real **r, gmx_bool bSrenew, + int ePBC, matrix box, gmx_bool bInsert, t_atoms *atoms_solvt,rvec *x_solvt,rvec *v_solvt,real *r_solvt, - bool bVerbose,real rshell,int max_sol, const output_env_t oenv) + gmx_bool bVerbose,real rshell,int max_sol, const output_env_t oenv) { t_nblist *nlist; t_atoms *atoms_all; @@ -329,7 +329,7 @@ void add_conf(t_atoms *atoms, rvec **x, rvec **v, real **r, bool bSrenew, int dx0,dx1,dy0,dy1,dz0,dz1; int ntest,nremove,nkeep; rvec dx,xi,xj,xpp,*x_all,*v_all; - bool *remove,*keep; + gmx_bool *remove,*keep; int bSolSol; natoms_prot = atoms->nr; diff --git a/src/tools/addconf.h b/src/tools/addconf.h index 655028be2e..8a382b62c5 100644 --- a/src/tools/addconf.h +++ b/src/tools/addconf.h @@ -35,10 +35,10 @@ #include "typedefs.h" extern -void add_conf(t_atoms *atoms, rvec **x, rvec **v, real **r, bool bSrenew, - int ePBC, matrix box, bool bInsert, +void add_conf(t_atoms *atoms, rvec **x, rvec **v, real **r, gmx_bool bSrenew, + int ePBC, matrix box, gmx_bool bInsert, t_atoms *atoms_solvt,rvec *x_solvt,rvec *v_solvt,real *r_solvt, - bool bVerbose,real rshell,int max_sol, const output_env_t oenv); + gmx_bool bVerbose,real rshell,int max_sol, const output_env_t oenv); /* Add two conformations together, without generating overlap. * When not inserting, don't check overlap in the middle of the box. * If rshell > 0, keep all the residues around the protein (0..natoms_prot-1) diff --git a/src/tools/anadih.c b/src/tools/anadih.c index 069673b5a6..91a67c102c 100644 --- a/src/tools/anadih.c +++ b/src/tools/anadih.c @@ -113,7 +113,7 @@ static int calc_Nbin(real phi, int multiplicity, real core_frac) void ana_dih_trans(const char *fn_trans,const char *fn_histo, real **dih,int nframes,int nangles, - const char *grpname,real t0,real dt,bool bRb, + const char *grpname,real t0,real dt,gmx_bool bRb, const output_env_t oenv) { /* just a wrapper; declare extra args, then chuck away at end. */ @@ -137,11 +137,11 @@ void ana_dih_trans(const char *fn_trans,const char *fn_histo, } -void low_ana_dih_trans(bool bTrans, const char *fn_trans, - bool bHisto, const char *fn_histo, int maxchi, +void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans, + gmx_bool bHisto, const char *fn_histo, int maxchi, real **dih, int nlist, t_dlist dlist[], int nframes, int nangles, const char *grpname, int xity[], - real t0, real dt, bool bRb, real core_frac, + real t0, real dt, gmx_bool bRb, real core_frac, const output_env_t oenv) { FILE *fp; @@ -369,12 +369,12 @@ void mk_chi_lookup (int **lookup, int maxchi, real **dih, void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist, int maxchi, t_dlist dlist[], real time[], - int **lookup, int *xity,bool bRb, bool bNormalize, - real core_frac, bool bAll, const char *fnall, + int **lookup, int *xity,gmx_bool bRb, gmx_bool bNormalize, + real core_frac, gmx_bool bAll, const char *fnall, const output_env_t oenv) { - bool bRotZero, bHaveChi=FALSE; + gmx_bool bRotZero, bHaveChi=FALSE; int accum=0, index, i,j,k,Xi,n,b ; real *chi_prtrj; int *chi_prhist; @@ -652,7 +652,7 @@ void normalize_histo(int npoints,int histo[],real dx,real normhisto[]) } void read_ang_dih(const char *trj_fn, - bool bAngles,bool bSaveAll,bool bRb,bool bPBC, + gmx_bool bAngles,gmx_bool bSaveAll,gmx_bool bRb,gmx_bool bPBC, int maxangstat,int angstat[], int *nframes,real **time, int isize,atom_id index[], diff --git a/src/tools/angstat.h b/src/tools/angstat.h index 32b1f74c09..bac44eb4c7 100644 --- a/src/tools/angstat.h +++ b/src/tools/angstat.h @@ -41,11 +41,11 @@ extern void do_angav(FILE *status, char *title, atom_id index[], int nind, - char *outfile, bool bAT); + char *outfile, gmx_bool bAT); extern void do_dihav(FILE *status, char *title, atom_id index[], int nind, - char *outfile, bool bAT); + char *outfile, gmx_bool bAT); extern void ramachandran(FILE *status,atom_id index[],int nind,char *outfile); diff --git a/src/tools/autocorr.c b/src/tools/autocorr.c index 7305d5419b..5e3a4f2144 100644 --- a/src/tools/autocorr.c +++ b/src/tools/autocorr.c @@ -56,11 +56,11 @@ typedef struct { unsigned long mode; int nrestart,nout,P,fitfn,nskip; - bool bFour,bNormalize; + gmx_bool bFour,bNormalize; real tbeginfit,tendfit; } t_acf; -static bool bACFinit = FALSE; +static gmx_bool bACFinit = FALSE; static t_acf acf; enum { enNorm, enCos, enSin }; @@ -78,7 +78,7 @@ int sffn2effn(const char **sffn) } static void low_do_four_core(int nfour,int nframes,real c1[],real cfour[], - int nCos,bool bPadding) + int nCos,gmx_bool bPadding) { int i=0; real aver,*ans; @@ -239,7 +239,7 @@ void normalize_acf(int nout,real corr[]) } } -void average_acf(bool bVerbose,int n,int nitem,real **c1) +void average_acf(gmx_bool bVerbose,int n,int nitem,real **c1) { real c0; int i,j; @@ -505,13 +505,13 @@ void do_four_core(unsigned long mode,int nfour,int nf2,int nframes, c1[j] = csum[j]/(real)(nframes-j); } -real fit_acf(int ncorr,int fitfn,const output_env_t oenv,bool bVerbose, +real fit_acf(int ncorr,int fitfn,const output_env_t oenv,gmx_bool bVerbose, real tbeginfit,real tendfit,real dt,real c1[],real *fit) { real fitparm[3]; real tStart,tail_corr,sum,sumtot=0,ct_estimate,*sig; int i,j,jmax,nf_int; - bool bPrint; + gmx_bool bPrint; bPrint = bVerbose || bDebugMode(); @@ -588,8 +588,8 @@ real fit_acf(int ncorr,int fitfn,const output_env_t oenv,bool bVerbose, void low_do_autocorr(const char *fn,const output_env_t oenv,const char *title, int nframes,int nitem,int nout,real **c1, real dt,unsigned long mode,int nrestart, - bool bAver,bool bNormalize, - bool bVerbose,real tbeginfit,real tendfit, + gmx_bool bAver,gmx_bool bNormalize, + gmx_bool bVerbose,real tbeginfit,real tendfit, int eFitFn,int nskip) { FILE *fp,*gp=NULL; @@ -597,7 +597,7 @@ void low_do_autocorr(const char *fn,const output_env_t oenv,const char *title, real *csum; real *ctmp,*fit; real c0,sum,Ct2av,Ctav; - bool bFour = acf.bFour; + gmx_bool bFour = acf.bFour; /* Check flags and parameters */ nout = get_acfnout(); @@ -775,7 +775,7 @@ t_pargs *add_acf_pargs(int *npargs,t_pargs *pa) void do_autocorr(const char *fn,const output_env_t oenv,const char *title, int nframes,int nitem,real **c1, - real dt,unsigned long mode,bool bAver) + real dt,unsigned long mode,gmx_bool bAver) { if (!bACFinit) { printf("ACF data structures have not been initialised. Call add_acf_pargs\n"); diff --git a/src/tools/calcpot.c b/src/tools/calcpot.c index ec69221f3f..ebc2d79afd 100644 --- a/src/tools/calcpot.c +++ b/src/tools/calcpot.c @@ -218,7 +218,7 @@ FILE *init_calcpot(const char *log,const char *tpx,const char *table, gmx_localtop_t *ltop; double t,t0,lam0; real lam; - bool bSA; + gmx_bool bSA; int traj=0,xtc_traj=0; t_state *state; rvec mutot; diff --git a/src/tools/cmat.c b/src/tools/cmat.c index 4685c7c999..1c84216807 100644 --- a/src/tools/cmat.c +++ b/src/tools/cmat.c @@ -43,7 +43,7 @@ #include "matio.h" #include "futil.h" -t_mat *init_mat(int n1,bool b1D) +t_mat *init_mat(int n1,gmx_bool b1D) { t_mat *m; diff --git a/src/tools/cmat.h b/src/tools/cmat.h index a4e6396480..d45afb0b50 100644 --- a/src/tools/cmat.h +++ b/src/tools/cmat.h @@ -50,7 +50,7 @@ typedef struct { typedef struct { int n1,nn; int *m_ind; - bool b1D; + gmx_bool b1D; real emat,minrms,maxrms,sumrms; real *erow; real **mat; @@ -59,7 +59,7 @@ typedef struct { /* The matrix is indexed using the matrix index */ #define EROW(m,i) m->erow[i] -extern t_mat *init_mat(int n1,bool b1D); +extern t_mat *init_mat(int n1,gmx_bool b1D); extern void enlarge_mat(t_mat *m,int deltan); diff --git a/src/tools/dlist.c b/src/tools/dlist.c index e91c5daa3d..ce9a61aea8 100644 --- a/src/tools/dlist.c +++ b/src/tools/dlist.c @@ -45,7 +45,7 @@ t_dlist *mk_dlist(FILE *log, t_atoms *atoms, int *nlist, - bool bPhi, bool bPsi, bool bChi, bool bHChi, + gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, gmx_bool bHChi, int maxchi,int r0,int naa,char **aa) { int ires,i,j,k,ii; @@ -213,9 +213,9 @@ t_dlist *mk_dlist(FILE *log, return dl; } -bool has_dihedral(int Dih,t_dlist *dl) +gmx_bool has_dihedral(int Dih,t_dlist *dl) { - bool b = FALSE; + gmx_bool b = FALSE; int ddd; switch (Dih) { @@ -260,7 +260,7 @@ static void pr_ntr_s2(FILE *fp,t_dlist *dl,int nDih,real dt) } void pr_dlist(FILE *fp,int nl,t_dlist dl[],real dt, int printtype, -bool bPhi, bool bPsi,bool bChi,bool bOmega, int maxchi) +gmx_bool bPhi, gmx_bool bPsi,gmx_bool bChi,gmx_bool bOmega, int maxchi) { int i, Xi; diff --git a/src/tools/do_dssp.c b/src/tools/do_dssp.c index e128242682..368a8fcfcd 100644 --- a/src/tools/do_dssp.c +++ b/src/tools/do_dssp.c @@ -55,12 +55,12 @@ #include "viewit.h" static int strip_dssp(char *dsspfile,int nres, - bool bPhobres[],real t, + gmx_bool bPhobres[],real t, real *acc,FILE *fTArea, t_matrix *mat,int average_area[], const output_env_t oenv) { - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; static char *ssbuf; FILE *tapeout; static int xsize,frame; @@ -167,11 +167,11 @@ static int strip_dssp(char *dsspfile,int nres, return nr; } -bool *bPhobics(t_atoms *atoms) +gmx_bool *bPhobics(t_atoms *atoms) { int i,nb; char **cb; - bool *bb; + gmx_bool *bb; nb=get_strings("phbres.dat",&cb); snew(bb,atoms->nres); @@ -230,7 +230,7 @@ static void norm_acc(t_atoms *atoms, int nres, void prune_ss_legend(t_matrix *mat) { - bool *present; + gmx_bool *present; int *newnum; int i,r,f,newnmap; t_mapping *newmap; @@ -367,7 +367,7 @@ int main(int argc,char *argv[]) "these two programs can be used to analyze dihedral properties as a", "function of secondary structure type." }; - static bool bVerbose; + static gmx_bool bVerbose; static const char *ss_string="HEBT"; t_pargs pa[] = { { "-v", FALSE, etBOOL, {&bVerbose}, @@ -386,7 +386,7 @@ int main(int argc,char *argv[]) t_atoms *atoms; t_matrix mat; int nres,nr0,naccr,nres_plus_separators; - bool *bPhbres,bDoAccSurf; + gmx_bool *bPhbres,bDoAccSurf; real t; int i,natoms,nframe=0; matrix box; diff --git a/src/tools/edittop.c b/src/tools/edittop.c index 01342f4c42..2be1f3d753 100644 --- a/src/tools/edittop.c +++ b/src/tools/edittop.c @@ -70,7 +70,7 @@ static void delete_from_interactions(t_idef *idef,int inr) { int i,j,k,nra,nnr; t_iatom *niatoms; - bool bDel; + gmx_bool bDel; /* Delete interactions including atom inr from lists */ for(i=0; (i= effnNR)) @@ -398,7 +398,7 @@ static bool lmfit_exp(int nfit,real x[],real y[],real dy[],real ftol, real do_lmfit(int ndata,real c1[],real sig[],real dt,real x0[], real begintimefit,real endtimefit,const output_env_t oenv, - bool bVerbose, int eFitFn,real fitparms[],int fix) + gmx_bool bVerbose, int eFitFn,real fitparms[],int fix) { FILE *fp; char buf[32]; diff --git a/src/tools/fitahx.c b/src/tools/fitahx.c index 992a3a88ec..42b40d5660 100644 --- a/src/tools/fitahx.c +++ b/src/tools/fitahx.c @@ -66,7 +66,7 @@ static void my_sub_xcm(int nbb,atom_id bbind[],rvec x[],rvec xcm) real fit_ahx(int nres,t_bb bb[],int natoms,int nall,atom_id allindex[], rvec x[],int nca, - atom_id caindex[],matrix box,bool bFit) + atom_id caindex[],matrix box,gmx_bool bFit) { static rvec *xref=NULL; static real *mass=NULL; diff --git a/src/tools/fitahx.h b/src/tools/fitahx.h index 3e2316b177..7194f90612 100644 --- a/src/tools/fitahx.h +++ b/src/tools/fitahx.h @@ -41,6 +41,6 @@ #include "hxprops.h" extern real fit_ahx(int nres,t_bb bb[],int natoms,int nall,atom_id allindex[], - rvec x[],int nca,atom_id caindex[],matrix box,bool bFit); + rvec x[],int nca,atom_id caindex[],matrix box,gmx_bool bFit); #endif diff --git a/src/tools/g_anadock.c b/src/tools/g_anadock.c index df9a1c7703..cc47279c32 100644 --- a/src/tools/g_anadock.c +++ b/src/tools/g_anadock.c @@ -98,7 +98,7 @@ static t_pdbfile **read_em_all(const char *fn,int *npdbf) t_pdbfile **pdbf=0; int i,maxpdbf; char buf[256],name[256]; - bool bExist; + gmx_bool bExist; strcpy(buf,fn); buf[strlen(buf)-4] = '\0'; @@ -125,7 +125,7 @@ static t_pdbfile **read_em_all(const char *fn,int *npdbf) return pdbf; } -static bool bFreeSort=FALSE; +static gmx_bool bFreeSort=FALSE; static int pdbf_comp(const void *a,const void *b) { @@ -193,7 +193,7 @@ static void clust_stat(FILE *fp,int start,int end,t_pdbfile *pdbf[]) sfree(ef); } -static real rmsd_dist(t_pdbfile *pa,t_pdbfile *pb,bool bRMSD) +static real rmsd_dist(t_pdbfile *pa,t_pdbfile *pb,gmx_bool bRMSD) { int i; real rmsd,dist; @@ -229,7 +229,7 @@ static void line(FILE *fp) } static void cluster_em_all(FILE *fp,int npdb,t_pdbfile *pdbf[], - const char *pdbout,bool bFree,bool bRMSD,real cutoff) + const char *pdbout,gmx_bool bFree,gmx_bool bRMSD,real cutoff) { int i,j,k; int *cndx,ncluster; @@ -313,7 +313,7 @@ int main(int argc,char *argv[]) }; output_env_t oenv; #define NFILE asize(fnm) - static bool bFree=FALSE,bRMS=TRUE; + static gmx_bool bFree=FALSE,bRMS=TRUE; static real cutoff = 0.2; t_pargs pa[] = { { "-free", FALSE, etBOOL, {&bFree}, diff --git a/src/tools/g_sigeps.c b/src/tools/g_sigeps.c index 111b37c5f0..fc1202195e 100644 --- a/src/tools/g_sigeps.c +++ b/src/tools/g_sigeps.c @@ -102,7 +102,7 @@ int main(int argc,char *argv[]) const char *legend[] = { "Lennard-Jones", "Buckingham" }; FILE *fp; int i; - bool bBham; + gmx_bool bBham; real qq,x,oldx,minimum,mval,dp[2],pp[2]; int cur=0; #define next (1-cur) diff --git a/src/tools/geminate.c b/src/tools/geminate.c index 4a0452f390..90e33f6b96 100644 --- a/src/tools/geminate.c +++ b/src/tools/geminate.c @@ -615,7 +615,7 @@ static double getLogIndex(const int i, const t_gemParams *params) extern t_gemParams *init_gemParams(const double sigma, const double D, const real *t, const int len, const int nFitPoints, const real begFit, const real endFit, - const real ballistic, const int nBalExp, const bool bDt) + const real ballistic, const int nBalExp, const gmx_bool bDt) { double tDelta; t_gemParams *p; @@ -986,7 +986,7 @@ static int balFunc_fdf(const gsl_vector *params, void *data, /* Removes the ballistic term from the beginning of the ACF, * just like in Omer's paper. */ -extern void takeAwayBallistic(double *ct, double *t, int len, real tMax, int nexp, bool bDerivative) +extern void takeAwayBallistic(double *ct, double *t, int len, real tMax, int nexp, gmx_bool bDerivative) { /* Use nonlinear regression with GSL instead. @@ -999,7 +999,7 @@ extern void takeAwayBallistic(double *ct, double *t, int len, real tMax, int nex *A, /* The fitted parameters. (A1, B1, A2, B2,... C) */ a[2], ddt[2]; - bool sorted; + gmx_bool sorted; size_t n; size_t p; diff --git a/src/tools/geminate.h b/src/tools/geminate.h index 3b33ceedd8..89faf23bad 100644 --- a/src/tools/geminate.h +++ b/src/tools/geminate.h @@ -98,7 +98,7 @@ typedef struct { int len; /* Length of time and ct arrays */ int nExpFit; /* Number of exponentials to fit */ real ballistic; /* Time before which the ballistic term should be fitted */ - bool bDt; /* TRUE => use time derivative at time 0 + gmx_bool bDt; /* TRUE => use time derivative at time 0 * to find fastest component. * FALSE => use coefficient in exponenetial * to find fastest component. */ @@ -122,13 +122,13 @@ typedef struct{ extern void takeAwayBallistic(double *ct, double *t, int len, real tMax, - int nexp, bool bDerivative); + int nexp, gmx_bool bDerivative); extern t_gemParams *init_gemParams(const double sigma, const double D, const real *t, const int len, const int nFitPoints, const real begFit, const real endFit, - const real ballistic, const int nBalExp, const bool bDt); + const real ballistic, const int nBalExp, const gmx_bool bDt); /* Fit to geminate recombination model. Returns root mean square error of fit. */ diff --git a/src/tools/gendr.c b/src/tools/gendr.c index 21bacb8cf3..a3279f337b 100644 --- a/src/tools/gendr.c +++ b/src/tools/gendr.c @@ -106,7 +106,7 @@ char **get_exp(int NEXP,t_expansion expansion[],char **ai,int *nexp) int find_atom(char *ai,char *ri, int resi,int r0, int natoms,char ***aname,t_atom atom[], - int linec,bool bVerbose) + int linec,gmx_bool bVerbose) { int i; @@ -129,12 +129,12 @@ int find_atom(char *ai,char *ri, return -1; } -void conv_dr(FILE *in,FILE *out,char *map,t_atoms *atoms,int r0,bool bXplor, - bool bVerbose) +void conv_dr(FILE *in,FILE *out,char *map,t_atoms *atoms,int r0,gmx_bool bXplor, + gmx_bool bVerbose) { static char *format="%s%d%s%s%d%s%lf%lf"; static char *xplorformat="%d%s%d%s"; - bool bOK; + gmx_bool bOK; int i,j,nc,nindex,ni,nj,nunres; int atomi,atomj,resi,resj; char **aiexp,**ajexp; @@ -267,8 +267,8 @@ int main (int argc,char *argv[]) }; static int r0 = 1; - static bool bXplor = FALSE; - static bool bVerbose = FALSE; + static gmx_bool bXplor = FALSE; + static gmx_bool bVerbose = FALSE; t_pargs pa[] = { { "-r", FALSE, etINT, {&r0}, "starting residue number" }, { "-xplor", FALSE, etBOOL, {&bXplor}, "Use xplor format for input" }, diff --git a/src/tools/gmx_anaeig.c b/src/tools/gmx_anaeig.c index f83b36b8ed..5d2dc5cc07 100644 --- a/src/tools/gmx_anaeig.c +++ b/src/tools/gmx_anaeig.c @@ -135,7 +135,7 @@ static void write_xvgr_graphs(const char *file, int ngraphs, int nsetspergraph, const char *title, const char *subtitle, const char *xlabel, const char **ylabel, int n, real *x, real **y, real ***sy, - real scale_x, bool bZero, bool bSplit, + real scale_x, gmx_bool bZero, gmx_bool bSplit, const output_env_t oenv) { FILE *out; @@ -295,7 +295,7 @@ compare(int natoms,int n1,rvec **eigvec1,int n2,rvec **eigvec2, static void inprod_matrix(const char *matfile,int natoms, int nvec1,int *eignr1,rvec **eigvec1, int nvec2,int *eignr2,rvec **eigvec2, - bool bSelect,int noutvec,int *outvec) + gmx_bool bSelect,int noutvec,int *outvec) { FILE *out; real **mat; @@ -396,12 +396,12 @@ static void overlap(const char *outfile,int natoms, static void project(const char *trajfile,t_topology *top,int ePBC,matrix topbox, const char *projfile,const char *twodplotfile, const char *threedplotfile, const char *filterfile,int skip, - const char *extremefile,bool bExtrAll,real extreme, + const char *extremefile,gmx_bool bExtrAll,real extreme, int nextr, t_atoms *atoms,int natoms,atom_id *index, - bool bFit,rvec *xref,int nfit,atom_id *ifit,real *w_rls, + gmx_bool bFit,rvec *xref,int nfit,atom_id *ifit,real *w_rls, real *sqrtm,rvec *xav, int *eignr,rvec **eigvec, - int noutvec,int *outvec, bool bSplit, + int noutvec,int *outvec, gmx_bool bSplit, const output_env_t oenv) { FILE *xvgrout=NULL; @@ -541,7 +541,7 @@ static void project(const char *trajfile,t_topology *top,int ePBC,matrix topbox, real *b=NULL; matrix box; char *resnm,*atnm, pdbform[STRLEN]; - bool bPDB, b4D; + gmx_bool bPDB, b4D; FILE *out; if (noutvec < 3) @@ -822,7 +822,7 @@ int gmx_anaeig(int argc,char *argv[]) }; static int first=1,last=8,skip=1,nextr=2,nskip=6; static real max=0.0,temp=298.15; - static bool bSplit=FALSE,bEntropy=FALSE; + static gmx_bool bSplit=FALSE,bEntropy=FALSE; t_pargs pa[] = { { "-first", FALSE, etINT, {&first}, "First eigenvector for analysis (-1 is select)" }, @@ -852,7 +852,7 @@ int gmx_anaeig(int argc,char *argv[]) int ePBC=-1; t_atoms *atoms=NULL; rvec *xtop,*xref1,*xref2,*xrefp=NULL; - bool bDMR1,bDMA1,bDMR2,bDMA2; + gmx_bool bDMR1,bDMA1,bDMR2,bDMA2; int nvec1,nvec2,*eignr1=NULL,*eignr2=NULL; rvec *x,*xread,*xav1,*xav2,**eigvec1=NULL,**eigvec2=NULL; matrix topbox; @@ -870,8 +870,8 @@ int gmx_anaeig(int argc,char *argv[]) const char *TwoDPlotFile,*ThreeDPlotFile; const char *FilterFile,*ExtremeFile; const char *OverlapFile,*InpMatFile; - bool bFit1,bFit2,bM,bIndex,bTPS,bTop,bVec2,bProj; - bool bFirstToLast,bFirstLastSet,bTraj,bCompare,bPDB3D; + gmx_bool bFit1,bFit2,bM,bIndex,bTPS,bTop,bVec2,bProj; + gmx_bool bFirstToLast,bFirstLastSet,bTraj,bCompare,bPDB3D; real *eigval1=NULL,*eigval2=NULL; int neig1,neig2; double **xvgdata; diff --git a/src/tools/gmx_analyze.c b/src/tools/gmx_analyze.c index 7040621937..4ebe8bfe13 100644 --- a/src/tools/gmx_analyze.c +++ b/src/tools/gmx_analyze.c @@ -135,7 +135,7 @@ static void plot_coscont(const char *ccfile,int n,int nset,real **val, ffclose(fp); } -static void regression_analysis(int n,bool bXYdy, +static void regression_analysis(int n,gmx_bool bXYdy, real *x,int nset,real **val) { real S,chi2,a,b,da,db,r=0; @@ -330,7 +330,7 @@ static real anal_ee(real *parm,real T,real t) static void estimate_error(const char *eefile,int nb_min,int resol,int n, int nset, double *av,double *sig,real **val,real dt, - bool bFitAc,bool bSingleExpFit,bool bAllowNegLTCorr, + gmx_bool bFitAc,gmx_bool bSingleExpFit,gmx_bool bAllowNegLTCorr, const output_env_t oenv) { FILE *fp; @@ -614,7 +614,7 @@ static void estimate_error(const char *eefile,int nb_min,int resol,int n, } static void luzar_correl(int nn,real *time,int nset,real **val,real temp, - bool bError,real fit_start,real smooth_tail_start, + gmx_bool bError,real fit_start,real smooth_tail_start, const output_env_t oenv) { const real tol = 1e-8; @@ -687,7 +687,7 @@ static void filter(real flen,int n,int nset,real **val,real dt, sfree(filt); } -static void do_fit(FILE *out,int n,bool bYdy,int ny,real *x0,real **val, +static void do_fit(FILE *out,int n,gmx_bool bYdy,int ny,real *x0,real **val, int npargs,t_pargs *ppa,const output_env_t oenv) { real *c1=NULL,*sig=NULL,*fitparm; @@ -773,7 +773,7 @@ static void do_fit(FILE *out,int n,bool bYdy,int ny,real *x0,real **val, static void do_ballistic(const char *balFile, int nData, real *t, real **val, int nSet, real balTime, int nBalExp, - bool bDerivative, + gmx_bool bDerivative, const output_env_t oenv) { double **ctd=NULL, *td=NULL; @@ -967,9 +967,9 @@ int gmx_analyze(int argc,char *argv[]) "from [TT]g_hbond -ac[tt], and then the same result should be produced." }; static real tb=-1,te=-1,frac=0.5,filtlen=0,binwidth=0.1,aver_start=0; - static bool bHaveT=TRUE,bDer=FALSE,bSubAv=TRUE,bAverCorr=FALSE,bXYdy=FALSE; - static bool bEESEF=FALSE,bEENLC=FALSE,bEeFitAc=FALSE,bPower=FALSE; - static bool bIntegrate=FALSE,bRegression=FALSE,bLuzar=FALSE,bLuzarError=FALSE; + static gmx_bool bHaveT=TRUE,bDer=FALSE,bSubAv=TRUE,bAverCorr=FALSE,bXYdy=FALSE; + static gmx_bool bEESEF=FALSE,bEENLC=FALSE,bEeFitAc=FALSE,bPower=FALSE; + static gmx_bool bIntegrate=FALSE,bRegression=FALSE,bLuzar=FALSE,bLuzarError=FALSE; static int nsets_in=1,d=1,nb_min=4,resol=10, nBalExp=4, nFitPoints=100; static real temp=298.15,fit_start=1, fit_end=60, smooth_tail_start=-1, balTime=0.2, diffusion=5e-5,rcut=0.35; diff --git a/src/tools/gmx_angle.c b/src/tools/gmx_angle.c index c44cff8544..6ad41553fb 100644 --- a/src/tools/gmx_angle.c +++ b/src/tools/gmx_angle.c @@ -110,7 +110,7 @@ int gmx_g_angle(int argc,char *argv[]) "input for a PCA analysis using [TT]g_covar[tt]." }; static const char *opt[] = { NULL, "angle", "dihedral", "improper", "ryckaert-bellemans", NULL }; - static bool bALL=FALSE,bChandler=FALSE,bAverCorr=FALSE,bPBC=TRUE; + static gmx_bool bALL=FALSE,bChandler=FALSE,bAverCorr=FALSE,bPBC=TRUE; static real binwidth=1; t_pargs pa[] = { { "-type", FALSE, etENUM, {opt}, @@ -139,7 +139,7 @@ int gmx_g_angle(int argc,char *argv[]) unsigned long mode; int nframes,maxangstat,mult,*angstat; int i,j,total,nangles,natoms,nat2,first,last,angind; - bool bAver,bRb,bPeriodic, + gmx_bool bAver,bRb,bPeriodic, bFrac, /* calculate fraction too? */ bTrans, /* worry about transtions too? */ bCorr; /* correlation function ? */ @@ -295,7 +295,7 @@ int gmx_g_angle(int argc,char *argv[]) if (bChandler) { real dval,sixty=DEG2RAD*60; - bool bTest; + gmx_bool bTest; for(i=0; (inext; - bool inserted=FALSE; + gmx_bool inserted=FALSE; while(bl != bl_head) { @@ -435,11 +435,11 @@ void barsamples_make_hist(barsamples_t *bs, int **bin, double *dx, double *xmin, int nbin_default) { int i,j; - bool dx_set=FALSE; - bool xmin_set=FALSE; + gmx_bool dx_set=FALSE; + gmx_bool xmin_set=FALSE; - bool xmax_set=FALSE; - bool xmax_set_hard=FALSE; /* whether the xmax is bounded by the limits of + gmx_bool xmax_set=FALSE; + gmx_bool xmax_set_hard=FALSE; /* whether the xmax is bounded by the limits of a histogram */ double xmax=-1; @@ -574,7 +574,7 @@ void barlambdas_histogram(barlambda_t *bl_head, const char *filename, barlambda_t *bl; int nsets=0; char **setnames=NULL; - bool first_set=FALSE; + gmx_bool first_set=FALSE; /* histogram data: */ int *hist=NULL; int nbin=0; @@ -666,8 +666,8 @@ static barres_t *barres_list_create(barlambda_t *bl_head, int *nres) int nlambda=0; barres_t *res; int i; - bool dhdl=FALSE; - bool first=TRUE; + gmx_bool dhdl=FALSE; + gmx_bool first=TRUE; /* first count the barlambdas */ bl=bl_head->next; @@ -1132,7 +1132,7 @@ static void calc_dg_stddev(barsamples_t *ba, barsamples_t *bb, static void calc_bar(barres_t *br, double tol, - int npee_min, int npee_max, bool *bEE, + int npee_min, int npee_max, gmx_bool *bEE, double *partsum) { int npee,p; @@ -1305,7 +1305,7 @@ static double bar_err(int nbmin, int nbmax, const double *partsum) } -static double legend2lambda(char *fn,const char *legend,bool bdhdl) +static double legend2lambda(char *fn,const char *legend,gmx_bool bdhdl) { double lambda=0; const char *ptr; @@ -1330,9 +1330,9 @@ static double legend2lambda(char *fn,const char *legend,bool bdhdl) return lambda; } -static bool subtitle2lambda(const char *subtitle,double *lambda) +static gmx_bool subtitle2lambda(const char *subtitle,double *lambda) { - bool bFound; + gmx_bool bFound; char *ptr; bFound = FALSE; @@ -1504,11 +1504,11 @@ static void read_barsim_xvg(char *fn,double begin,double end,real temp, } static void read_edr_rawdh(barsim_t *ba, t_enxblock *blk, int id, - bool lambda_set, double starttime, + gmx_bool lambda_set, double starttime, double endtime) { int j; - bool allocated; + gmx_bool allocated; if (starttime < 0 || endtime < 0) { @@ -1571,7 +1571,7 @@ static void read_edr_rawdh(barsim_t *ba, t_enxblock *blk, int id, } static void read_edr_hist(barsim_t *ba, t_enxblock *blk, int id, - bool lambda_set, + gmx_bool lambda_set, double starttime, double endtime) { int j; @@ -1653,7 +1653,7 @@ static void read_barsim_edr(char *fn,double begin,double end,real temp, ener_file_t fp; t_enxframe *fr; int nblocks=0; - bool lambda_set=FALSE; + gmx_bool lambda_set=FALSE; int nre; gmx_enxnm_t *enm=NULL; @@ -1826,7 +1826,7 @@ int gmx_bar(int argc,char *argv[]) static real begin=0,end=-1,temp=-1; int nd=2,nbmin=5,nbmax=5; int nbin=100; - bool calc_s,calc_v; + gmx_bool calc_s,calc_v; t_pargs pa[] = { { "-b", FALSE, etREAL, {&begin}, "Begin time for BAR" }, { "-e", FALSE, etREAL, {&end}, "End time for BAR" }, @@ -1868,11 +1868,11 @@ int gmx_bar(int argc,char *argv[]) char kteformat[STRLEN], skteformat[STRLEN]; output_env_t oenv; double kT, beta; - bool result_OK=TRUE,bEE=TRUE; + gmx_bool result_OK=TRUE,bEE=TRUE; - bool disc_err=FALSE; + gmx_bool disc_err=FALSE; double sum_disc_err=0.; /* discretization error */ - bool histrange_err=FALSE; + gmx_bool histrange_err=FALSE; double sum_histrange_err=0.; /* histogram range error */ double stat_err=0.; /* statistical error */ diff --git a/src/tools/gmx_bond.c b/src/tools/gmx_bond.c index 769f6c0846..bec7ac68fc 100644 --- a/src/tools/gmx_bond.c +++ b/src/tools/gmx_bond.c @@ -79,8 +79,8 @@ static void make_dist_leg(FILE *fp,int gnx,atom_id index[],t_atoms *atoms, static void do_bonds(FILE *log,const char *fn,const char *fbond, const char *fdist, int gnx,atom_id index[], - real blen,real tol,bool bAver, - t_topology *top,int ePBC,bool bAverDist, + real blen,real tol,gmx_bool bAver, + t_topology *top,int ePBC,gmx_bool bAverDist, const output_env_t oenv) { #define MAXTAB 1000 @@ -243,7 +243,7 @@ int gmx_bond(int argc,char *argv[]) "It should be possible to get bond information from the topology." }; static real blen=-1.0,tol=0.1; - static bool bAver=TRUE,bAverDist=TRUE; + static gmx_bool bAver=TRUE,bAverDist=TRUE; t_pargs pa[] = { { "-blen", FALSE, etREAL, {&blen}, "Bond length. By default length of first bond" }, diff --git a/src/tools/gmx_bundle.c b/src/tools/gmx_bundle.c index 330b20c351..128caa1754 100644 --- a/src/tools/gmx_bundle.c +++ b/src/tools/gmx_bundle.c @@ -84,7 +84,7 @@ static void rotate_ends(t_bundle *bun,rvec axis,int c0,int c1) } static void calc_axes(rvec x[],t_atom atom[],int gnx[],atom_id *index[], - bool bRot,t_bundle *bun) + gmx_bool bRot,t_bundle *bun) { int end,i,div,d; real *mtot,m; @@ -190,7 +190,7 @@ int gmx_bundle(int argc,char *argv[]) "display the reference axis." }; static int n=0; - static bool bZ=FALSE; + static gmx_bool bZ=FALSE; t_pargs pa[] = { { "-na", FALSE, etINT, {&n}, "Number of axes" }, @@ -215,7 +215,7 @@ int gmx_bundle(int argc,char *argv[]) int i,j,gnx[MAX_ENDS]; atom_id *index[MAX_ENDS]; t_bundle bun; - bool bKink; + gmx_bool bKink; rvec va,vb,vc,vr,vl; output_env_t oenv; gmx_rmpbc_t gpbc=NULL; diff --git a/src/tools/gmx_chi.c b/src/tools/gmx_chi.c index a33d1ab45e..e97133fe07 100644 --- a/src/tools/gmx_chi.c +++ b/src/tools/gmx_chi.c @@ -61,7 +61,7 @@ #include "matio.h" #include "gmx_ana.h" -static bool bAllowed(real phi,real psi) +static gmx_bool bAllowed(real phi,real psi) { static const char *map[] = { "1100000000000000001111111000000000001111111111111111111111111", @@ -133,7 +133,7 @@ static bool bAllowed(real phi,real psi) x = INDEX(phi); y = INDEX(psi); #undef INDEX - return (bool) map[x][y]; + return (gmx_bool) map[x][y]; } atom_id *make_chi_ind(int nl,t_dlist dl[],int *ndih) @@ -211,7 +211,7 @@ int bin(real chi,int mult) static void do_dihcorr(const char *fn,int nf,int ndih,real **dih,real dt, int nlist,t_dlist dlist[],real time[],int maxchi, - bool bPhi,bool bPsi,bool bChi,bool bOmega, + gmx_bool bPhi,gmx_bool bPsi,gmx_bool bChi,gmx_bool bOmega, const output_env_t oenv) { char name1[256],name2[256]; @@ -255,7 +255,7 @@ static void do_dihcorr(const char *fn,int nf,int ndih,real **dih,real dt, fprintf(stderr,"\n"); } -static void copy_dih_data(real in[], real out[], int nf, bool bLEAVE) +static void copy_dih_data(real in[], real out[], int nf, gmx_bool bLEAVE) { /* if bLEAVE, do nothing to data in copying to out * otherwise multiply by 180/pi to convert rad to deg */ @@ -272,7 +272,7 @@ static void copy_dih_data(real in[], real out[], int nf, bool bLEAVE) static void dump_em_all(int nlist,t_dlist dlist[],int nf,real time[], real **dih,int maxchi, - bool bPhi,bool bPsi,bool bChi,bool bOmega, bool bRAD, + gmx_bool bPhi,gmx_bool bPsi,gmx_bool bChi,gmx_bool bOmega, gmx_bool bRAD, const output_env_t oenv) { char name[256], titlestr[256], ystr[256]; @@ -389,10 +389,10 @@ static void histogramming(FILE *log,int nbin, int naa,char **aa, int nf,int maxchi,real **dih, int nlist,t_dlist dlist[], atom_id index[], - bool bPhi,bool bPsi,bool bOmega,bool bChi, - bool bNormalize,bool bSSHisto,const char *ssdump, + gmx_bool bPhi,gmx_bool bPsi,gmx_bool bOmega,gmx_bool bChi, + gmx_bool bNormalize,gmx_bool bSSHisto,const char *ssdump, real bfac_max,t_atoms *atoms, - bool bDo_jc, const char *fn, + gmx_bool bDo_jc, const char *fn, const output_env_t oenv) { /* also gets 3J couplings and order parameters S2 */ @@ -423,7 +423,7 @@ static void histogramming(FILE *log,int nbin, int naa,char **aa, int ****his_aa_ss=NULL; int ***his_aa,**his_aa1,*histmp; int i,j,k,m,n,nn,Dih,nres,hindex,angle; - bool bBfac,bOccup; + gmx_bool bBfac,bOccup; char hisfile[256],hhisfile[256],sshisfile[256],title[256],*ss_str=NULL; char **leg; @@ -735,10 +735,10 @@ static FILE *rama_file(const char *fn,const char *title,const char *xaxis, } static void do_rama(int nf,int nlist,t_dlist dlist[],real **dih, - bool bViol,bool bRamOmega,const output_env_t oenv) + gmx_bool bViol,gmx_bool bRamOmega,const output_env_t oenv) { FILE *fp,*gp=NULL; - bool bOm; + gmx_bool bOm; char fn[256]; int i,j,k,Xi1,Xi2,Phi,Psi,Om=0,nlevels; #define NMAT 120 @@ -832,7 +832,7 @@ static void do_rama(int nf,int nlist,t_dlist dlist[],real **dih, static void print_transitions(const char *fn,int maxchi,int nlist, t_dlist dlist[], t_atoms *atoms,rvec x[], - matrix box, bool bPhi,bool bPsi,bool bChi,real dt, + matrix box, gmx_bool bPhi,gmx_bool bPsi,gmx_bool bChi,real dt, const output_env_t oenv) { /* based on order_params below */ @@ -882,7 +882,7 @@ static void order_params(FILE *log, const char *fn,int maxchi,int nlist,t_dlist dlist[], const char *pdbfn,real bfac_init, t_atoms *atoms,rvec x[],int ePBC,matrix box, - bool bPhi,bool bPsi,bool bChi,const output_env_t oenv) + gmx_bool bPhi,gmx_bool bPsi,gmx_bool bChi,const output_env_t oenv) { FILE *fp; int nh[edMax]; @@ -1064,12 +1064,12 @@ int gmx_chi(int argc,char *argv[]) /* defaults */ static int r0=1,ndeg=1,maxchi=2; - static bool bAll=FALSE; - static bool bPhi=FALSE,bPsi=FALSE,bOmega=FALSE; + static gmx_bool bAll=FALSE; + static gmx_bool bPhi=FALSE,bPsi=FALSE,bOmega=FALSE; static real bfac_init=-1.0,bfac_max=0; static const char *maxchistr[] = { NULL, "0", "1", "2", "3", "4", "5", "6", NULL }; - static bool bRama=FALSE,bShift=FALSE,bViol=FALSE,bRamOmega=FALSE; - static bool bNormHisto=TRUE,bChiProduct=FALSE,bHChi=FALSE,bRAD=FALSE,bPBC=TRUE; + static gmx_bool bRama=FALSE,bShift=FALSE,bViol=FALSE,bRamOmega=FALSE; + static gmx_bool bNormHisto=TRUE,bChiProduct=FALSE,bHChi=FALSE,bRAD=FALSE,bPBC=TRUE; static real core_frac=0.5 ; t_pargs pa[] = { { "-r0", FALSE, etINT, {&r0}, @@ -1121,8 +1121,8 @@ int gmx_chi(int argc,char *argv[]) char title[256],grpname[256]; t_dlist *dlist; char **aa; - bool bChi,bCorr,bSSHisto; - bool bDo_rt, bDo_oh, bDo_ot, bDo_jc ; + gmx_bool bChi,bCorr,bSSHisto; + gmx_bool bDo_rt, bDo_oh, bDo_ot, bDo_jc ; real dt=0, traj_t_ns; output_env_t oenv; diff --git a/src/tools/gmx_cluster.c b/src/tools/gmx_cluster.c index f7ec13e343..3f2fd734f8 100644 --- a/src/tools/gmx_cluster.c +++ b/src/tools/gmx_cluster.c @@ -239,7 +239,7 @@ void gather(t_mat *m,real cutoff,t_clusters *clust) t_clustid *c; t_dist *d; int i,j,k,nn,cid,n1,diff; - bool bChange; + gmx_bool bChange; /* First we sort the entries in the RMSD matrix */ n1 = m->nn; @@ -300,9 +300,9 @@ void gather(t_mat *m,real cutoff,t_clusters *clust) sfree(d); } -bool jp_same(int **nnb,int i,int j,int P) +gmx_bool jp_same(int **nnb,int i,int j,int P) { - bool bIn; + gmx_bool bIn; int k,ii,jj,pp; bIn = FALSE; @@ -333,7 +333,7 @@ static void jarvis_patrick(int n1,real **mat,int M,int P, t_clustid *c; int **nnb; int i,j,k,cid,diff,max; - bool bChange; + gmx_bool bChange; real **mcpy=NULL; if (rmsdcut < 0) @@ -390,7 +390,7 @@ static void jarvis_patrick(int n1,real **mat,int M,int P, c = new_clustid(n1); fprintf(stderr,"Linking structures "); - /* Use mcpy for temporary storage of booleans */ + /* Use mcpy for temporary storage of gmx_booleans */ mcpy = mk_matrix(n1,n1,FALSE); for(i=0; i donor id, @@ -314,7 +314,7 @@ static PSTYPE periodicIndex(ivec r, t_gemPeriod *per, bool daSwap) { return per->nper - 1 - (daSwap ? 0:1); } -static t_hbdata *mk_hbdata(bool bHBmap,bool bDAnr,bool oneHB, bool bGem, int gemmode) +static t_hbdata *mk_hbdata(gmx_bool bHBmap,gmx_bool bDAnr,gmx_bool oneHB, gmx_bool bGem, int gemmode) { t_hbdata *hb; @@ -333,7 +333,7 @@ static t_hbdata *mk_hbdata(bool bHBmap,bool bDAnr,bool oneHB, bool bGem, int gem return hb; } -static void mk_hbmap(t_hbdata *hb,bool bTwo) +static void mk_hbmap(t_hbdata *hb,gmx_bool bTwo) { int i,j; @@ -616,7 +616,7 @@ static void add_frames(t_hbdata *hb,int nframes) #define OFFSET(frame) (frame / 32) #define MASK(frame) (1 << (frame % 32)) -static void _set_hb(unsigned int hbexist[],unsigned int frame,bool bValue) +static void _set_hb(unsigned int hbexist[],unsigned int frame,gmx_bool bValue) { if (bValue) hbexist[OFFSET(frame)] |= MASK(frame); @@ -624,7 +624,7 @@ static void _set_hb(unsigned int hbexist[],unsigned int frame,bool bValue) hbexist[OFFSET(frame)] &= ~MASK(frame); } -static bool is_hb(unsigned int hbexist[],int frame) +static gmx_bool is_hb(unsigned int hbexist[],int frame) { return ((hbexist[OFFSET(frame)] & MASK(frame)) != 0) ? 1 : 0; } @@ -691,7 +691,7 @@ static void add_ff(t_hbdata *hbd,int id,int h,int ia,int frame,int ihb, PSTYPE p int maxhydro = min(hbd->maxhydro,hbd->d.nhydro[id]); int wlen = hbd->wordlen; int delta = 32*wlen; - bool bGem = hbd->bGem; + gmx_bool bGem = hbd->bGem; if (!hb->h[0]) { hb->n0 = frame; @@ -779,7 +779,7 @@ static int _donor_index(t_donors *d,int grp,atom_id i,const char *file,int line) } #define donor_index(d,grp,i) _donor_index(d,grp,i,__FILE__,__LINE__) -static bool isInterchangable(t_hbdata *hb, int d, int a, int grpa, int grpd) +static gmx_bool isInterchangable(t_hbdata *hb, int d, int a, int grpa, int grpd) { /* g_hbond doesn't allow overlapping groups */ if (grpa!=grpd) @@ -791,10 +791,10 @@ static bool isInterchangable(t_hbdata *hb, int d, int a, int grpa, int grpd) static void add_hbond(t_hbdata *hb,int d,int a,int h,int grpd,int grpa, - int frame,bool bMerge,int ihb,bool bContact, PSTYPE p) + int frame,gmx_bool bMerge,int ihb,gmx_bool bContact, PSTYPE p) { int k,id,ia,hh; - bool daSwap = FALSE; + gmx_bool daSwap = FALSE; if ((id = hb->d.dptr[d]) == NOTSET) gmx_fatal(FARGS,"No donor atom %d",d+1); @@ -896,10 +896,10 @@ static void add_hbond(t_hbdata *hb,int d,int a,int h,int grpd,int grpa, } /* Now a redundant function. It might find use at some point though. */ -static bool in_list(atom_id selection,int isize,atom_id *index) +static gmx_bool in_list(atom_id selection,int isize,atom_id *index) { int i; - bool bFound; + gmx_bool bFound; bFound=FALSE; for(i=0; (idptr) { snew(ddd->dptr,top->atoms.nr); @@ -1132,7 +1132,7 @@ static void search_donors(t_topology *top, int isize, atom_id *index, } } -static t_gridcell ***init_grid(bool bBox,rvec box[],real rcut,ivec ngrid) +static t_gridcell ***init_grid(gmx_bool bBox,rvec box[],real rcut,ivec ngrid) { t_gridcell ***grid; int i,y,z; @@ -1183,7 +1183,7 @@ static void reset_nhbonds(t_donors *ddd) void pbc_correct_gem(rvec dx,matrix box,rvec hbox); static void build_grid(t_hbdata *hb,rvec x[], rvec xshell, - bool bBox, matrix box, rvec hbox, + gmx_bool bBox, matrix box, rvec hbox, real rcut, real rshell, ivec ngrid, t_gridcell ***grid) { @@ -1192,7 +1192,7 @@ static void build_grid(t_hbdata *hb,rvec x[], rvec xshell, ivec grididx; rvec invdelta,dshell,xtemp={0,0,0}; t_ncell *newgrid; - bool bDoRshell,bInShell,bAcc; + gmx_bool bDoRshell,bInShell,bAcc; real rshell2=0; int gx,gy,gz; int dum = -1; @@ -1258,7 +1258,7 @@ static void build_grid(t_hbdata *hb,rvec x[], rvec xshell, bInShell=FALSE; } } else { - bool bDone = FALSE; + gmx_bool bDone = FALSE; while (!bDone) { bDone = TRUE; @@ -1442,7 +1442,7 @@ static void pbc_correct(rvec dx,matrix box,rvec hbox) void pbc_correct_gem(rvec dx,matrix box,rvec hbox) { int m; - bool bDone = FALSE; + gmx_bool bDone = FALSE; while (!bDone) { bDone = TRUE; for(m=DIM-1; m>=0; m--) { @@ -1464,16 +1464,16 @@ void pbc_correct_gem(rvec dx,matrix box,rvec hbox) */ static int is_hbond(t_hbdata *hb,int grpd,int grpa,int d,int a, real rcut, real r2cut, real ccut, - rvec x[], bool bBox, matrix box,rvec hbox, - real *d_ha, real *ang,bool bDA,int *hhh, - bool bContact, bool bMerge, PSTYPE *p) + rvec x[], gmx_bool bBox, matrix box,rvec hbox, + real *d_ha, real *ang,gmx_bool bDA,int *hhh, + gmx_bool bContact, gmx_bool bMerge, PSTYPE *p) { int h,hh,id,ja,ihb; rvec r_da,r_ha,r_dh, r={0, 0, 0}; ivec ri; real rc2,r2c2,rda2,rha2,ca; - bool HAinrange = FALSE; /* If !bDA. Needed for returning hbDist in a correct way. */ - bool daSwap = FALSE; + gmx_bool HAinrange = FALSE; /* If !bDA. Needed for returning hbDist in a correct way. */ + gmx_bool daSwap = FALSE; if (d == a) return hbNo; @@ -1667,7 +1667,7 @@ static void do_merge(t_hbdata *hb,int ntmp, /* Added argument bContact for nicer output. * Erik Marklund, June 29, 2006 */ -static void merge_hb(t_hbdata *hb,bool bTwo, bool bContact){ +static void merge_hb(t_hbdata *hb,gmx_bool bTwo, gmx_bool bContact){ int i,inrnew,indnew,j,ii,jj,m,id,ia,grp,ogrp,ntmp; unsigned int *htmp,*gtmp; PSTYPE *ptmp; @@ -1756,7 +1756,7 @@ static void do_nhb_dist(FILE *fp,t_hbdata *hb,real t) /* Changed the contact code slightly. * - Erik Marklund, June 29, 2006 */ -static void do_hblife(const char *fn,t_hbdata *hb,bool bMerge,bool bContact, +static void do_hblife(const char *fn,t_hbdata *hb,gmx_bool bMerge,gmx_bool bContact, const output_env_t oenv) { FILE *fp; @@ -1854,12 +1854,12 @@ static void do_hblife(const char *fn,t_hbdata *hb,bool bMerge,bool bContact, /* Changed argument bMerge into oneHB to handle contacts properly. * - Erik Marklund, June 29, 2006 */ -static void dump_ac(t_hbdata *hb,bool oneHB,int nDump) +static void dump_ac(t_hbdata *hb,gmx_bool oneHB,int nDump) { FILE *fp; int i,j,k,m,nd,ihb,idist; int nframes = hb->nframes; - bool bPrint; + gmx_bool bPrint; t_hbond *hbh; if (nDump <= 0) @@ -2121,7 +2121,7 @@ void analyse_corr(int n,real t[],real ct[],real nt[],real kt[], real k=1,kp=1,kow=1; real Q=0,chi22,chi2,dg,dgp,tau_hb,dtau,tau_rlx,e_1,dt,sigma_k,sigma_kp,ddg; double tmp,sn2=0,sc2=0,sk2=0,scn=0,sck=0,snk=0; - bool bError = (sigma_ct != NULL) && (sigma_nt != NULL) && (sigma_kt != NULL); + gmx_bool bError = (sigma_ct != NULL) && (sigma_nt != NULL) && (sigma_kt != NULL); if (smooth_tail_start >= 0) { smooth_tail(n,t,ct,sigma_ct,smooth_tail_start,oenv); @@ -2258,10 +2258,10 @@ static void normalizeACF(real *ct, real *gt, int len) * - Erik Marklund, June 29, 2006 */ static void do_hbac(const char *fn,t_hbdata *hb, - int nDump,bool bMerge,bool bContact, real fit_start, - real temp,bool R2,real smooth_tail_start, const output_env_t oenv, + int nDump,gmx_bool bMerge,gmx_bool bContact, real fit_start, + real temp,gmx_bool R2,real smooth_tail_start, const output_env_t oenv, t_gemParams *params, const char *gemType, int nThreads, - const int NN, const bool bBallistic, const bool bGemFit) + const int NN, const gmx_bool bBallistic, const gmx_bool bGemFit) { FILE *fp; int i,j,k,m,n,o,nd,ihb,idist,n2,nn,iter,nSets; @@ -2273,7 +2273,7 @@ static void do_hbac(const char *fn,t_hbdata *hb, "Ac(t)", "Cc\\scontact,hb\\v{}\\z{}(t)", "-dAc\\sfs\\v{}\\z{}/dt" }; - bool bNorm=FALSE; + gmx_bool bNorm=FALSE; double nhb = 0; int nhbi=0; real *rhbex=NULL,*ht,*gt,*ght,*dght,*kt; @@ -2287,7 +2287,7 @@ static void do_hbac(const char *fn,t_hbdata *hb, t_pShift *pHist; int *ptimes=NULL, *poff=NULL, anhb, n0, mMax=INT_MIN; real **rHbExGem = NULL; - bool c; + gmx_bool c; int acType; t_E *E; double *ctdouble, *timedouble, *fittedct; @@ -2957,14 +2957,14 @@ static void analyse_donor_props(const char *fn,t_hbdata *hb,int nframes,real t, } static void dump_hbmap(t_hbdata *hb, - int nfile,t_filenm fnm[],bool bTwo, - bool bContact, int isize[],int *index[],char *grpnames[], + int nfile,t_filenm fnm[],gmx_bool bTwo, + gmx_bool bContact, int isize[],int *index[],char *grpnames[], t_atoms *atoms) { FILE *fp,*fplog; int ddd,hhh,aaa,i,j,k,m,grp; char ds[32],hs[32],as[32]; - bool first; + gmx_bool first; fp = opt2FILE("-hbn",nfile,fnm,"w"); if (opt2bSet("-g",nfile,fnm)) { @@ -3141,11 +3141,11 @@ int gmx_hbond(int argc,char *argv[]) static real acut=30, abin=1, rcut=0.35, r2cut=0, rbin=0.005, rshell=-1; static real maxnhb=0,fit_start=1,fit_end=60,temp=298.15,smooth_tail_start=-1, D=-1; - static bool bNitAcc=TRUE,bDA=TRUE,bMerge=TRUE; + static gmx_bool bNitAcc=TRUE,bDA=TRUE,bMerge=TRUE; static int nDump=0, nFitPoints=100; static int nThreads = 0, nBalExp=4; - static bool bContact=FALSE, bBallistic=FALSE, bBallisticDt=FALSE, bGemFit=FALSE; + static gmx_bool bContact=FALSE, bBallistic=FALSE, bBallisticDt=FALSE, bGemFit=FALSE; static real logAfterTime = 10, gemBallistic = 0.2; /* ps */ static const char *NNtype[] = {NULL, "none", "binary", "oneOverR3", "dipole", NULL}; @@ -3256,7 +3256,7 @@ int gmx_hbond(int argc,char *argv[]) int xi,yi,zi,ai; int xj,yj,zj,aj,xjj,yjj,zjj; int xk,yk,zk,ak,xkk,ykk,zkk; - bool bSelected,bHBmap,bStop,bTwo,was,bBox,bTric; + gmx_bool bSelected,bHBmap,bStop,bTwo,was,bBox,bTric; int *adist,*rdist; int grp,nabin,nrbin,bin,resdist,ihb; char **leg; @@ -3272,7 +3272,7 @@ int gmx_hbond(int argc,char *argv[]) t_E E; int ii, jj, hh, actual_nThreads; int threadNr=0; - bool bGem, bNN, bParallel; + gmx_bool bGem, bNN, bParallel; t_gemParams *params=NULL; CopyRight(stdout,argv[0]); diff --git a/src/tools/gmx_helix.c b/src/tools/gmx_helix.c index bffcc677e3..eb4da84e3b 100644 --- a/src/tools/gmx_helix.c +++ b/src/tools/gmx_helix.c @@ -157,7 +157,7 @@ int gmx_helix(int argc,char *argv[]) NULL, "RAD", "TWIST", "RISE", "LEN", "NHX", "DIP", "RMS", "CPHI", "RMSA", "PHI", "PSI", "HB3", "HB4", "HB5", "CD222", NULL }; - static bool bCheck=FALSE,bFit=TRUE,bDBG=FALSE,bEV=FALSE; + static gmx_bool bCheck=FALSE,bFit=TRUE,bDBG=FALSE,bEV=FALSE; static int rStart=0,rEnd=0,r0=1; t_pargs pa [] = { { "-r0", FALSE, etINT, {&r0}, @@ -180,7 +180,7 @@ int gmx_helix(int argc,char *argv[]) typedef struct { FILE *fp,*fp2; - bool bfp2; + gmx_bool bfp2; const char *filenm; const char *title; const char *xaxis; @@ -223,7 +223,7 @@ int gmx_helix(int argc,char *argv[]) real rms,fac; matrix box; gmx_rmpbc_t gpbc=NULL; - bool bRange; + gmx_bool bRange; t_filenm fnm[] = { { efTPX, NULL, NULL, ffREAD }, { efNDX, NULL, NULL, ffREAD }, diff --git a/src/tools/gmx_helixorient.c b/src/tools/gmx_helixorient.c index 9099350efb..b4c94eaed5 100644 --- a/src/tools/gmx_helixorient.c +++ b/src/tools/gmx_helixorient.c @@ -137,8 +137,8 @@ int gmx_helixorient(int argc,char *argv[]) output_env_t oenv; gmx_rmpbc_t gpbc=NULL; - static bool bSC=FALSE; - static bool bIncremental = FALSE; + static gmx_bool bSC=FALSE; + static gmx_bool bIncremental = FALSE; static t_pargs pa[] = { { "-sidechain", FALSE, etBOOL, {&bSC}, diff --git a/src/tools/gmx_kinetics.c b/src/tools/gmx_kinetics.c index f55bbdbf1a..52029f6d8b 100644 --- a/src/tools/gmx_kinetics.c +++ b/src/tools/gmx_kinetics.c @@ -68,9 +68,9 @@ typedef struct { int nframe; /* Number of time frames */ int nstate; /* Number of states the system can be in, e.g. F,I,U */ int nparams; /* Is 2, 4 or 8 */ - bool *bMask; /* Determine whether this replica is part of the d2 comp. */ - bool bSum; - bool bDiscrete; /* Use either discrete folding (0/1) or a continuous */ + gmx_bool *bMask; /* Determine whether this replica is part of the d2 comp. */ + gmx_bool bSum; + gmx_bool bDiscrete; /* Use either discrete folding (0/1) or a continuous */ /* criterion */ int nmask; /* Number of replicas taken into account */ real dt; /* Timestep between frames */ @@ -107,7 +107,7 @@ static char *epnm(int nparams,int index) return NULL; } -static bool bBack(t_remd_data *d) +static gmx_bool bBack(t_remd_data *d) { return (d->nparams > 2); } @@ -368,8 +368,8 @@ static void optimize_remd_parameters(FILE *fp,t_remd_data *d,int maxiter, } static void preprocess_remd(FILE *fp,t_remd_data *d,real cutoff,real tref, - real ucut,bool bBack,real Euf,real Efu, - real Ei,real t0,real t1,bool bSum,bool bDiscrete, + real ucut,gmx_bool bBack,real Euf,real Efu, + real Ei,real t0,real t1,gmx_bool bSum,gmx_bool bDiscrete, int nmult) { int i,j,ninter; @@ -698,7 +698,7 @@ int gmx_kinetics(int argc,char *argv[]) static real Euf = 10; static real Efu = 30; static real Ei = 10; - static bool bHaveT = TRUE; + static gmx_bool bHaveT = TRUE; static real t0 = -1; static real t1 = -1; static real tb = 0; @@ -707,10 +707,10 @@ int gmx_kinetics(int argc,char *argv[]) static int maxiter = 100; static int skip = 0; static int nmult = 1; - static bool bBack = TRUE; - static bool bSplit = TRUE; - static bool bSum = TRUE; - static bool bDiscrete = TRUE; + static gmx_bool bBack = TRUE; + static gmx_bool bSplit = TRUE; + static gmx_bool bSum = TRUE; + static gmx_bool bDiscrete = TRUE; t_pargs pa[] = { { "-time", FALSE, etBOOL, {&bHaveT}, "Expect a time in the input" }, diff --git a/src/tools/gmx_lie.c b/src/tools/gmx_lie.c index ccd3e9dd10..b643ef874b 100644 --- a/src/tools/gmx_lie.c +++ b/src/tools/gmx_lie.c @@ -148,7 +148,7 @@ int gmx_lie(int argc,char *argv[]) FILE *out; int nre,nframes=0,ct=0; ener_file_t fp; - bool bCont; + gmx_bool bCont; t_liedata *ld; gmx_enxnm_t *enm=NULL; t_enxframe *fr; diff --git a/src/tools/gmx_mdmat.c b/src/tools/gmx_mdmat.c index 4260a8f840..c97af48078 100644 --- a/src/tools/gmx_mdmat.c +++ b/src/tools/gmx_mdmat.c @@ -163,7 +163,7 @@ int gmx_mdmat(int argc,char *argv[]) "The output can be processed with xpm2ps to make a PostScript (tm) plot." }; static real truncate=1.5; - static bool bAtom=FALSE; + static gmx_bool bAtom=FALSE; static int nlevels=40; t_pargs pa[] = { { "-t", FALSE, etREAL, {&truncate}, @@ -193,7 +193,7 @@ int gmx_mdmat(int argc,char *argv[]) int i,j,nres,natoms,nframes,it,trxnat; t_trxstatus *status; int nr0; - bool bCalcN,bFrames; + gmx_bool bCalcN,bFrames; real t,ratio; char title[256],label[234]; t_rgb rlo,rhi; diff --git a/src/tools/gmx_membed.c b/src/tools/gmx_membed.c index de574c3768..2936f1e0d3 100644 --- a/src/tools/gmx_membed.c +++ b/src/tools/gmx_membed.c @@ -213,7 +213,7 @@ int get_block(int mol_id,int nmblock,gmx_molblock_t *mblock) int get_tpr_version(const char *infile) { char buf[STRLEN]; - bool bDouble; + gmx_bool bDouble; int precision,fver; t_fileio *fio; @@ -266,7 +266,7 @@ int get_mtype_list(t_block *at, gmx_mtop_t *mtop, t_block *tlist) { int i,j,nr,mol_id; int type=0,block=0; - bool bNEW; + gmx_bool bNEW; nr=0; snew(tlist->index,at->nr); @@ -438,7 +438,7 @@ int init_mem_at(mem_t *mem_p, gmx_mtop_t *mtop, rvec *r, matrix box, pos_ins_t * int i,j,at,mol,nmol,nmolbox,count; t_block *mem_a; real z,zmin,zmax,mem_area; - bool bNew; + gmx_bool bNew; atom_id *mol_id; int type=0,block=0; @@ -504,7 +504,7 @@ int init_mem_at(mem_t *mem_p, gmx_mtop_t *mtop, rvec *r, matrix box, pos_ins_t * return mem_p->mem_at.nr; } -void init_resize(t_block *ins_at,rvec *r_ins,pos_ins_t *pos_ins,mem_t *mem_p,rvec *r, bool bALLOW_ASYMMETRY) +void init_resize(t_block *ins_at,rvec *r_ins,pos_ins_t *pos_ins,mem_t *mem_p,rvec *r, gmx_bool bALLOW_ASYMMETRY) { int i,j,at,c,outsidesum,gctr=0; int idxsum=0; @@ -562,13 +562,13 @@ void resize(t_block *ins_at, rvec *r_ins, rvec *r, pos_ins_t *pos_ins,rvec fac) } int gen_rm_list(rm_t *rm_p,t_block *ins_at,t_block *rest_at,t_pbc *pbc, gmx_mtop_t *mtop, - rvec *r, rvec *r_ins, mem_t *mem_p, pos_ins_t *pos_ins, real probe_rad, int low_up_rm, bool bALLOW_ASYMMETRY) + rvec *r, rvec *r_ins, mem_t *mem_p, pos_ins_t *pos_ins, real probe_rad, int low_up_rm, gmx_bool bALLOW_ASYMMETRY) { int i,j,k,l,at,at2,mol_id; int type=0,block=0; int nrm,nupper,nlower; real r_min_rad,z_lip,min_norm; - bool bRM; + gmx_bool bRM; rvec dr,dr_tmp; real *dist; int *order; @@ -704,7 +704,7 @@ void rm_group(t_inputrec *ir, gmx_groups_t *groups, gmx_mtop_t *mtop, rm_t *rm_p rvec *x_tmp,*v_tmp; atom_id *list,*new_mols; unsigned char *new_egrp[egcNR]; - bool bRM; + gmx_bool bRM; snew(list,state->natoms); n=0; @@ -812,7 +812,7 @@ int rm_bonded(t_block *ins_at, gmx_mtop_t *mtop) { int i,j,m; int type,natom,nmol,at,atom1=0,rm_at=0; - bool *bRM,bINS; + gmx_bool *bRM,bINS; /*this routine lives dangerously by assuming that all molecules of a given type are in order in the structure*/ /*this routine does not live as dangerously as it seems. There is namely a check in mdrunner_membed to make *sure that g_membed exits with a warning when there are molecules of the same type not in the @@ -964,7 +964,7 @@ void md_print_warning(const t_commrec *cr,FILE *fplog,const char *buf) negative or zero. */ enum { eglsNABNSB, eglsCHKPT, eglsSTOPCOND, eglsRESETCOUNTERS, eglsNR }; /* Is the signal in one simulation independent of other simulations? */ -bool gs_simlocal[eglsNR] = { TRUE, FALSE, FALSE, TRUE }; +gmx_bool gs_simlocal[eglsNR] = { TRUE, FALSE, FALSE, TRUE }; typedef struct { int nstms; /* The frequency for intersimulation communication */ @@ -976,7 +976,7 @@ typedef struct { static int multisim_min(const gmx_multisim_t *ms,int nmin,int n) { int *buf; - bool bPos,bEqual; + gmx_bool bPos,bEqual; int s,d; snew(buf,ms->nsim); @@ -1140,30 +1140,33 @@ static void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_nrnb *nrnb, t_vcm *vcm, gmx_wallcycle_t wcycle, gmx_enerdata_t *enerd,tensor force_vir, tensor shake_vir, tensor total_vir, tensor pres, rvec mu_tot, gmx_constr_t constr, - globsig_t *gs,bool bInterSimGS, + globsig_t *gs,gmx_bool bInterSimGS, matrix box, gmx_mtop_t *top_global, real *pcurr, - int natoms, bool *bSumEkinhOld, int flags) + int natoms, gmx_bool *bSumEkinhOld, int flags) { int i,gsi; real gs_buf[eglsNR]; tensor corr_vir,corr_pres; - bool bEner,bPres,bTemp; - bool bRerunMD, bStopCM, bGStat, bIterate, + gmx_bool bEner,bPres,bTemp; + gmx_bool bRerunMD, bStopCM, bGStat, bIterate, bFirstIterate,bReadEkin,bEkinAveVel,bScaleEkin, bConstrain; real prescorr,enercorr,dvdlcorr; - /* translate CGLO flags to booleans */ + /* translate CGLO flags to gmx_booleans */ bRerunMD = flags & CGLO_RERUNMD; bStopCM = flags & CGLO_STOPCM; bGStat = flags & CGLO_GSTAT; - bReadEkin = flags & CGLO_READEKIN; - bScaleEkin = flags & CGLO_SCALEEKIN; +/* FIX ME after 4.5 */ +/* temporary hack because we are using gmx_bool (unsigned char) */ + + bReadEkin = (flags & CGLO_READEKIN) != 0; + bScaleEkin = (flags & CGLO_SCALEEKIN) != 0; bEner = flags & CGLO_ENERGY; bTemp = flags & CGLO_TEMPERATURE; - bPres = flags & CGLO_PRESSURE; - bConstrain = flags & CGLO_CONSTRAINT; - bIterate = flags & CGLO_ITERATE; - bFirstIterate = flags & CGLO_FIRSTITERATE; + bPres = (flags & CGLO_PRESSURE) != 0; + bConstrain = (flags & CGLO_CONSTRAINT) != 0; + bIterate = (flags & CGLO_ITERATE) != 0; + bFirstIterate = (flags & CGLO_FIRSTITERATE) != 0; /* we calculate a full state kinetic energy either with full-step velocity verlet or half step where we need the pressure */ @@ -1365,7 +1368,7 @@ typedef struct { real f,fprev,x,xprev; int iter_i; - bool bIterate; + gmx_bool bIterate; real allrelerr[MAXITERCONST+2]; int num_close; /* number of "close" violations, caused by limited precision. */ } gmx_iterate_t; @@ -1387,7 +1390,7 @@ typedef struct /* maximum length of cyclic traps to check, emerging from limited numerical precision */ #define CYCLEMAX 20 -static void gmx_iterate_init(gmx_iterate_t *iterate,bool bIterate) +static void gmx_iterate_init(gmx_iterate_t *iterate,gmx_bool bIterate) { int i; @@ -1400,7 +1403,7 @@ static void gmx_iterate_init(gmx_iterate_t *iterate,bool bIterate) } } -static bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iterate_t *iterate, bool bFirstIterate, real fom, real *newf) +static gmx_bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iterate_t *iterate, gmx_bool bFirstIterate, real fom, real *newf) { /* monitor convergence, and use a secant search to propose new values. @@ -1427,7 +1430,7 @@ static bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iter real relerr,err; char buf[256]; int i; - bool incycle; + gmx_bool incycle; if (bFirstIterate) { @@ -1700,7 +1703,7 @@ void check_ir_old_tpx_versions(t_commrec *cr,FILE *fplog, } typedef struct { - bool bGStatEveryStep; + gmx_bool bGStatEveryStep; gmx_large_int_t step_ns; gmx_large_int_t step_nscheck; gmx_large_int_t nns; @@ -1721,7 +1724,7 @@ static void reset_nlistheuristics(gmx_nlheur_t *nlh,gmx_large_int_t step) } static void init_nlistheuristics(gmx_nlheur_t *nlh, - bool bGStatEveryStep,gmx_large_int_t step) + gmx_bool bGStatEveryStep,gmx_large_int_t step) { nlh->bGStatEveryStep = bGStatEveryStep; nlh->nns = 0; @@ -1783,7 +1786,7 @@ static void update_nliststatistics(gmx_nlheur_t *nlh,gmx_large_int_t step) } } -static void set_nlistheuristics(gmx_nlheur_t *nlh,bool bReset,gmx_large_int_t step) +static void set_nlistheuristics(gmx_nlheur_t *nlh,gmx_bool bReset,gmx_large_int_t step) { int d; @@ -1806,7 +1809,7 @@ static void set_nlistheuristics(gmx_nlheur_t *nlh,bool bReset,gmx_large_int_t st } double do_md_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, gmx_vsite_t *vsite,gmx_constr_t constr, int stepout,t_inputrec *ir, @@ -1828,15 +1831,15 @@ double do_md_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], gmx_large_int_t step,step_rel; double run_time; double t,t0,lam0; - bool bGStatEveryStep,bGStat,bNstEner,bCalcEnerPres; - bool bNS,bNStList,bSimAnn,bStopCM,bRerunMD,bNotLastFrame=FALSE, + gmx_bool bGStatEveryStep,bGStat,bNstEner,bCalcEnerPres; + gmx_bool bNS,bNStList,bSimAnn,bStopCM,bRerunMD,bNotLastFrame=FALSE, bFirstStep,bStateFromTPX,bInitStep,bLastStep, bBornRadii,bStartingFromCpt; - bool bDoDHDL=FALSE; - bool do_ene,do_log,do_verbose,bRerunWarnNoV=TRUE, + gmx_bool bDoDHDL=FALSE; + gmx_bool do_ene,do_log,do_verbose,bRerunWarnNoV=TRUE, bForceUpdate=FALSE,bCPT; int mdof_flags; - bool bMasterState; + gmx_bool bMasterState; int force_flags,cglo_flags; tensor force_vir,shake_vir,total_vir,tmp_vir,pres; int i,m; @@ -1863,18 +1866,18 @@ double do_md_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], t_graph *graph=NULL; globsig_t gs; - bool bFFscan; + gmx_bool bFFscan; gmx_groups_t *groups; gmx_ekindata_t *ekind, *ekind_save; gmx_shellfc_t shellfc; int count,nconverged=0; real timestep=0; double tcount=0; - bool bIonize=FALSE; - bool bTCR=FALSE,bConverged=TRUE,bOK,bSumEkinhOld,bExchanged; - bool bAppend; - bool bResetCountersHalfMaxH=FALSE; - bool bVV,bIterations,bIterate,bFirstIterate,bTemp,bPres,bTrotter; + gmx_bool bIonize=FALSE; + gmx_bool bTCR=FALSE,bConverged=TRUE,bOK,bSumEkinhOld,bExchanged; + gmx_bool bAppend; + gmx_bool bResetCountersHalfMaxH=FALSE; + gmx_bool bVV,bIterations,bIterate,bFirstIterate,bTemp,bPres,bTrotter; real temp0,dvdl; int a0,a1,ii; rvec *xcopy=NULL,*vcopy=NULL,*cbuf=NULL; @@ -3362,7 +3365,7 @@ double do_md_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], /* Output stuff */ if (MASTER(cr)) { - bool do_dr,do_or; + gmx_bool do_dr,do_or; if (!(bStartingFromCpt && (EI_VV(ir->eI)))) { @@ -3565,7 +3568,7 @@ double do_md_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], int mdrunner_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], - const output_env_t oenv, bool bVerbose,bool bCompact, + const output_env_t oenv, gmx_bool bVerbose,gmx_bool bCompact, int nstglobalcomm, ivec ddxyz,int dd_node_order,real rdd,real rconstr, const char *dddlb_opt,real dlb_scale, @@ -3576,7 +3579,7 @@ int mdrunner_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], unsigned long Flags, real xy_fac, real xy_max, real z_fac, real z_max, int it_xy, int it_z, real probe_rad, int low_up_rm, - int pieces, bool bALLOW_ASYMMETRY, int maxwarn) + int pieces, gmx_bool bALLOW_ASYMMETRY, int maxwarn) { double nodetime=0,realtime; t_inputrec *inputrec; @@ -3597,7 +3600,7 @@ int mdrunner_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], int i,m,nChargePerturbed=-1,status,nalloc; char *gro; gmx_wallcycle_t wcycle; - bool bReadRNG,bReadEkin; + gmx_bool bReadRNG,bReadEkin; int list; gmx_runtime_t runtime; int rc; @@ -3618,7 +3621,7 @@ int mdrunner_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[], mem_t *mem_p; rm_t *rm_p; gmx_groups_t *groups; - bool bExcl=FALSE; + gmx_bool bExcl=FALSE; t_atoms atoms; t_pbc *pbc; char **piecename=NULL; @@ -4363,18 +4366,18 @@ int gmx_membed(int argc,char *argv[]) #define NFILE asize(fnm) /* Command line options ! */ - bool bCart = FALSE; - bool bPPPME = FALSE; - bool bPartDec = FALSE; - bool bDDBondCheck = TRUE; - bool bDDBondComm = TRUE; - bool bVerbose = FALSE; - bool bCompact = TRUE; - bool bSepPot = FALSE; - bool bRerunVSite = FALSE; - bool bIonize = FALSE; - bool bConfout = TRUE; - bool bReproducible = FALSE; + gmx_bool bCart = FALSE; + gmx_bool bPPPME = FALSE; + gmx_bool bPartDec = FALSE; + gmx_bool bDDBondCheck = TRUE; + gmx_bool bDDBondComm = TRUE; + gmx_bool bVerbose = FALSE; + gmx_bool bCompact = TRUE; + gmx_bool bSepPot = FALSE; + gmx_bool bRerunVSite = FALSE; + gmx_bool bIonize = FALSE; + gmx_bool bConfout = TRUE; + gmx_bool bReproducible = FALSE; int npme=-1; int nmultisim=0; @@ -4393,8 +4396,8 @@ int gmx_membed(int argc,char *argv[]) real rdd=0.0,rconstr=0.0,dlb_scale=0.8,pforce=-1; char *ddcsx=NULL,*ddcsy=NULL,*ddcsz=NULL; real cpt_period=15.0,max_hours=-1; - bool bAppendFiles=TRUE,bAddPart=TRUE; - bool bResetCountersHalfWay=FALSE; + gmx_bool bAppendFiles=TRUE,bAddPart=TRUE; + gmx_bool bResetCountersHalfWay=FALSE; output_env_t oenv=NULL; const char *deviceOptions = ""; @@ -4408,7 +4411,7 @@ int gmx_membed(int argc,char *argv[]) int low_up_rm = 0; int maxwarn=0; int pieces=1; - bool bALLOW_ASYMMETRY=FALSE; + gmx_bool bALLOW_ASYMMETRY=FALSE; /* arguments relevant to OPENMM only*/ @@ -4499,7 +4502,7 @@ int gmx_membed(int argc,char *argv[]) unsigned long Flags, PCA_Flags; ivec ddxyz; int dd_node_order; - bool HaveCheckpoint; + gmx_bool HaveCheckpoint; FILE *fplog,*fptest; int sim_part,sim_part_fn; const char *part_suffix=".part"; diff --git a/src/tools/gmx_mindist.c b/src/tools/gmx_mindist.c index 1d707f7b05..477d216083 100644 --- a/src/tools/gmx_mindist.c +++ b/src/tools/gmx_mindist.c @@ -103,7 +103,7 @@ static void periodic_dist(matrix box,rvec x[],int n,atom_id index[], static void periodic_mindist_plot(const char *trxfn,const char *outfn, t_topology *top,int ePBC, - int n,atom_id index[],bool bSplit, + int n,atom_id index[],gmx_bool bSplit, const output_env_t oenv) { FILE *out; @@ -114,7 +114,7 @@ static void periodic_mindist_plot(const char *trxfn,const char *outfn, matrix box; int natoms,ind_min[2]={0,0},ind_mini=0,ind_minj=0; real r,rmin,rmax,rmint,tmint; - bool bFirst; + gmx_bool bFirst; gmx_rmpbc_t gpbc=NULL; natoms=read_first_x(oenv,&status,trxfn,&t,&x,box); @@ -164,9 +164,9 @@ static void periodic_mindist_plot(const char *trxfn,const char *outfn, index[ind_mini]+1,index[ind_minj]+1); } -static void calc_dist(real rcut, bool bPBC, int ePBC, matrix box, rvec x[], +static void calc_dist(real rcut, gmx_bool bPBC, int ePBC, matrix box, rvec x[], int nx1,int nx2, atom_id index1[], atom_id index2[], - bool bGroup, + gmx_bool bGroup, real *rmin, real *rmax, int *nmin, int *nmax, int *ixmin, int *jxmin, int *ixmax, int *jxmax) { @@ -252,10 +252,10 @@ static void calc_dist(real rcut, bool bPBC, int ePBC, matrix box, rvec x[], void dist_plot(const char *fn,const char *afile,const char *dfile, const char *nfile,const char *rfile,const char *xfile, - real rcut,bool bMat,t_atoms *atoms, - int ng,atom_id *index[],int gnx[],char *grpn[],bool bSplit, - bool bMin, int nres, atom_id *residue,bool bPBC,int ePBC, - bool bGroup,bool bEachResEachTime, bool bPrintResName, + real rcut,gmx_bool bMat,t_atoms *atoms, + int ng,atom_id *index[],int gnx[],char *grpn[],gmx_bool bSplit, + gmx_bool bMin, int nres, atom_id *residue,gmx_bool bPBC,int ePBC, + gmx_bool bGroup,gmx_bool bEachResEachTime, gmx_bool bPrintResName, const output_env_t oenv) { FILE *atm,*dist,*num; @@ -271,7 +271,7 @@ void dist_plot(const char *fn,const char *afile,const char *dfile, rvec *x0; matrix box; t_trxframe frout; - bool bFirst; + gmx_bool bFirst; FILE *respertime=NULL; if ((natoms=read_first_x(oenv,&status,fn,&t,&x0,box))==0) @@ -503,11 +503,11 @@ int gmx_mindist(int argc,char *argv[]) "The [TT]-pi[tt] option is very slow." }; - static bool bMat=FALSE,bPI=FALSE,bSplit=FALSE,bMax=FALSE,bPBC=TRUE; - static bool bGroup=FALSE; + static gmx_bool bMat=FALSE,bPI=FALSE,bSplit=FALSE,bMax=FALSE,bPBC=TRUE; + static gmx_bool bGroup=FALSE; static real rcutoff=0.6; static int ng=1; - static bool bEachResEachTime=FALSE,bPrintResName=FALSE; + static gmx_bool bEachResEachTime=FALSE,bPrintResName=FALSE; t_pargs pa[] = { { "-matrix", FALSE, etBOOL, {&bMat}, "Calculate half a matrix of group-group distances" }, @@ -537,7 +537,7 @@ int gmx_mindist(int argc,char *argv[]) real t; rvec *x; matrix box; - bool bTop=FALSE; + gmx_bool bTop=FALSE; FILE *atm; int i,j,nres=0; diff --git a/src/tools/gmx_morph.c b/src/tools/gmx_morph.c index c169a414d5..a2734da334 100644 --- a/src/tools/gmx_morph.c +++ b/src/tools/gmx_morph.c @@ -93,7 +93,7 @@ int gmx_morph(int argc,char *argv[]) static int ninterm = 11; static real first = 0.0; static real last = 1.0; - static bool bFit = TRUE; + static gmx_bool bFit = TRUE; t_pargs pa [] = { { "-ninterm", FALSE, etINT, {&ninterm}, "Number of intermediates" }, @@ -114,7 +114,7 @@ int gmx_morph(int argc,char *argv[]) matrix box; real rms1,rms2,fac,*mass; char title[STRLEN],*grpname; - bool bRMS; + gmx_bool bRMS; output_env_t oenv; CopyRight(stderr,argv[0]); diff --git a/src/tools/gmx_msd.c b/src/tools/gmx_msd.c index 5d4dec51b1..e46f6f4077 100644 --- a/src/tools/gmx_msd.c +++ b/src/tools/gmx_msd.c @@ -94,7 +94,7 @@ typedef struct { point. */ } t_corr; -typedef real t_calc_func(t_corr *,int,atom_id[],int,rvec[],rvec,bool,matrix, +typedef real t_calc_func(t_corr *,int,atom_id[],int,rvec[],rvec,gmx_bool,matrix, const output_env_t oenv); static real thistime(t_corr *curr) @@ -102,13 +102,13 @@ static real thistime(t_corr *curr) return curr->time[curr->nframes]; } -static bool in_data(t_corr *curr,int nx00) +static gmx_bool in_data(t_corr *curr,int nx00) { return curr->nframes-curr->n_offs[nx00]; } t_corr *init_corr(int nrgrp,int type,int axis,real dim_factor, - int nmol,bool bTen,bool bMass,real dt,t_topology *top, + int nmol,gmx_bool bTen,gmx_bool bMass,real dt,t_topology *top, real beginfit,real endfit) { t_corr *curr; @@ -170,7 +170,7 @@ static void done_corr(t_corr *curr) sfree(curr->x0); } -static void corr_print(t_corr *curr,bool bTen,const char *fn,const char *title, +static void corr_print(t_corr *curr,gmx_bool bTen,const char *fn,const char *title, const char *yaxis, real msdtime,real beginfit,real endfit, real *DD,real *SigmaD,char *grpname[], @@ -210,7 +210,7 @@ static void corr_print(t_corr *curr,bool bTen,const char *fn,const char *title, /* called from corr_loop, to do the main calculations */ static void calc_corr(t_corr *curr,int nr,int nx,atom_id index[],rvec xc[], - bool bRmCOMM,rvec com,t_calc_func *calc1,bool bTen, + gmx_bool bRmCOMM,rvec com,t_calc_func *calc1,gmx_bool bTen, const output_env_t oenv) { int nx0; @@ -252,7 +252,7 @@ static void calc_corr(t_corr *curr,int nr,int nx,atom_id index[],rvec xc[], /* the non-mass-weighted mean-squared displacement calcuation */ static real calc1_norm(t_corr *curr,int nx,atom_id index[],int nx0,rvec xc[], - rvec dcom,bool bTen,matrix mat, const output_env_t oenv) + rvec dcom,gmx_bool bTen,matrix mat, const output_env_t oenv) { int i,ix,m,m2; real g,r,r2; @@ -324,7 +324,7 @@ static void calc_mol_com(int nmol,int *molindex,t_block *mols,t_atoms *atoms, } static real calc_one_mw(t_corr *curr,int ix,int nx0,rvec xc[],real *tm, - rvec dcom,bool bTen,matrix mat) + rvec dcom,gmx_bool bTen,matrix mat) { real r2,r,mm; rvec rv; @@ -369,7 +369,7 @@ static real calc_one_mw(t_corr *curr,int ix,int nx0,rvec xc[],real *tm, /* the normal, mass-weighted mean-squared displacement calcuation */ static real calc1_mw(t_corr *curr,int nx,atom_id index[],int nx0,rvec xc[], - rvec dcom,bool bTen,matrix mat,const output_env_t oenv) + rvec dcom,gmx_bool bTen,matrix mat,const output_env_t oenv) { int i; real g,tm; @@ -392,7 +392,7 @@ static real calc1_mw(t_corr *curr,int nx,atom_id index[],int nx0,rvec xc[], xcur = the current coordinates xprev = the previous coordinates box = the box matrix */ -static void prep_data(bool bMol,int gnx,atom_id index[], +static void prep_data(gmx_bool bMol,int gnx,atom_id index[], rvec xcur[],rvec xprev[],matrix box) { int i,m,ind; @@ -426,7 +426,7 @@ static void prep_data(bool bMol,int gnx,atom_id index[], box = the box matrix atoms = atom data (for mass) com(output) = center of mass */ -static void calc_com(bool bMol, int gnx, atom_id index[], +static void calc_com(gmx_bool bMol, int gnx, atom_id index[], rvec xcur[],rvec xprev[],matrix box, t_atoms *atoms, rvec com) { @@ -459,7 +459,7 @@ static void calc_com(bool bMol, int gnx, atom_id index[], static real calc1_mol(t_corr *curr,int nx,atom_id index[],int nx0,rvec xc[], - rvec dcom,bool bTen,matrix mat, const output_env_t oenv) + rvec dcom,gmx_bool bTen,matrix mat, const output_env_t oenv) { int i; real g,tm,gtot,tt; @@ -555,8 +555,8 @@ void printmol(t_corr *curr,const char *fn, * read_next_x */ int corr_loop(t_corr *curr,const char *fn,t_topology *top,int ePBC, - bool bMol,int gnx[],atom_id *index[], - t_calc_func *calc1,bool bTen, int *gnx_com, atom_id *index_com[], + gmx_bool bMol,int gnx[],atom_id *index[], + t_calc_func *calc1,gmx_bool bTen, int *gnx_com, atom_id *index_com[], real dt, real t_pdb,rvec **x_pdb,matrix box_pdb, const output_env_t oenv) { @@ -568,7 +568,7 @@ int corr_loop(t_corr *curr,const char *fn,t_topology *top,int ePBC, t_trxstatus *status; #define prev (1-cur) matrix box; - bool bFirst; + gmx_bool bFirst; gmx_rmpbc_t gpbc=NULL; natoms = read_first_x(oenv,&status,fn,&curr->t0,&(x[cur]),box); @@ -746,7 +746,7 @@ static void index_atom2mol(int *n,int *index,t_block *mols) void do_corr(const char *trx_file, const char *ndx_file, const char *msd_file, const char *mol_file, const char *pdb_file,real t_pdb, int nrgrp, t_topology *top,int ePBC, - bool bTen,bool bMW,bool bRmCOMM, + gmx_bool bTen,gmx_bool bMW,gmx_bool bRmCOMM, int type,real dim_factor,int axis, real dt,real beginfit,real endfit,const output_env_t oenv) { @@ -915,9 +915,9 @@ int gmx_msd(int argc,char *argv[]) static real t_pdb = 0; static real beginfit = -1; static real endfit = -1; - static bool bTen = FALSE; - static bool bMW = TRUE; - static bool bRmCOMM = FALSE; + static gmx_bool bTen = FALSE; + static gmx_bool bMW = TRUE; + static gmx_bool bRmCOMM = FALSE; t_pargs pa[] = { { "-type", FALSE, etENUM, {normtype}, "Compute diffusion coefficient in one direction" }, @@ -957,7 +957,7 @@ int gmx_msd(int argc,char *argv[]) char title[256]; const char *trx_file, *tps_file, *ndx_file, *msd_file, *mol_file, *pdb_file; rvec *xdum; - bool bTop; + gmx_bool bTop; int axis,type; real dim_factor; output_env_t oenv; diff --git a/src/tools/gmx_multipoles.c b/src/tools/gmx_multipoles.c index 4daa01b3ee..1a7b10c587 100644 --- a/src/tools/gmx_multipoles.c +++ b/src/tools/gmx_multipoles.c @@ -153,7 +153,7 @@ void make_rot_mat(int axis,real theta,matrix t_mat){ t_mat[i[ZZ]][i[ZZ]]=c; } -bool test_linear_mol(rvec d) +gmx_bool test_linear_mol(rvec d) { /* d is sorted in descending order */ if ( (d[ZZ] < TOLERANCE) && (d[XX]-d[YY]) < TOLERANCE ) { @@ -350,7 +350,7 @@ void pr_M1(FILE *fp,char *msg,int mol,rvec m1,real time) } /* Print the quadrupole moment components */ -void pr_M2(FILE *fp,char *msg,tensor m2,bool bFull) +void pr_M2(FILE *fp,char *msg,tensor m2,gmx_bool bFull) { int i,j; @@ -371,7 +371,7 @@ void pr_M2(FILE *fp,char *msg,tensor m2,bool bFull) } /* Print the octopole moment components */ -void pr_M3(FILE *fp,char *msg,tensor3 m3,bool bFull) +void pr_M3(FILE *fp,char *msg,tensor3 m3,gmx_bool bFull) { int i,j,k; @@ -396,7 +396,7 @@ void pr_M3(FILE *fp,char *msg,tensor3 m3,bool bFull) } /* Print the hexadecapole moment components */ -void pr_M4(FILE *fp,char *msg,tensor4 m4,bool bFull) +void pr_M4(FILE *fp,char *msg,tensor4 m4,gmx_bool bFull) { int i,j,k,l; @@ -607,7 +607,7 @@ rotate_mol(k0,k1,index,x,r_mat); } /* Does the real work */ -void do_multipoles(char *trjfn,char *topfn,char *molndxfn,bool bFull) +void do_multipoles(char *trjfn,char *topfn,char *molndxfn,gmx_bool bFull) { int i; int gnx; @@ -621,7 +621,7 @@ void do_multipoles(char *trjfn,char *topfn,char *molndxfn,bool bFull) matrix box; real t0,t1,tq; int teller; - bool bCont; + gmx_bool bCont; rvec *x,*m1; tensor *m2; @@ -689,7 +689,7 @@ int gmx_multipoles(int argc,char *argv[]) "The center of mass of the molecule is used as the origin" }; - static bool bFull = FALSE; + static gmx_bool bFull = FALSE; static int ntb=0; t_pargs pa[] = { { "-boxtype",FALSE,etINT,&ntb, "HIDDENbox type 0=rectangular; 1=truncated octahedron (only rectangular boxes are fully implemented)"}, diff --git a/src/tools/gmx_nmeig.c b/src/tools/gmx_nmeig.c index 13614d1f5b..fa80d5ccf0 100644 --- a/src/tools/gmx_nmeig.c +++ b/src/tools/gmx_nmeig.c @@ -66,7 +66,7 @@ static void nma_full_hessian(real * hess, int ndim, - bool bM, + gmx_bool bM, t_topology * top, int begin, int end, @@ -125,7 +125,7 @@ nma_full_hessian(real * hess, static void nma_sparse_hessian(gmx_sparsematrix_t * sparse_hessian, - bool bM, + gmx_bool bM, t_topology * top, int neig, real * eigenvalues, @@ -201,7 +201,7 @@ int gmx_nmeig(int argc,char *argv[]) "standard cartesian norm (But in the mass weighted norm they would be)." }; - static bool bM=TRUE; + static gmx_bool bM=TRUE; static int begin=1,end=50; t_pargs pa[] = { @@ -226,7 +226,7 @@ int gmx_nmeig(int argc,char *argv[]) int natoms,ndim,nrow,ncol,count; char *grpname,title[256]; int i,j,k,l,d,gnx; - bool bSuck; + gmx_bool bSuck; atom_id *index; real value; real factor_gmx_to_omega2; diff --git a/src/tools/gmx_nmens.c b/src/tools/gmx_nmens.c index 855dd02fec..0c069daf3e 100644 --- a/src/tools/gmx_nmens.c +++ b/src/tools/gmx_nmens.c @@ -92,7 +92,7 @@ int gmx_nmens(int argc,char *argv[]) int ePBC; t_atoms *atoms; rvec *xtop,*xref,*xav,*xout1,*xout2; - bool bDMR,bDMA,bFit; + gmx_bool bDMR,bDMA,bFit; int nvec,*eignr=NULL; rvec **eigvec=NULL; matrix box; diff --git a/src/tools/gmx_nmtraj.c b/src/tools/gmx_nmtraj.c index a3860e3de4..e26f5b1ca3 100644 --- a/src/tools/gmx_nmtraj.c +++ b/src/tools/gmx_nmtraj.c @@ -107,7 +107,7 @@ int gmx_nmtraj(int argc,char *argv[]) matrix box; int natoms; int i,j,k,kmode,d,s,v; - bool bDMR,bDMA,bFit; + gmx_bool bDMR,bDMA,bFit; char * indexfile; char * grpname; @@ -121,7 +121,7 @@ int gmx_nmtraj(int argc,char *argv[]) real *out_eigval; rvec * this_eigvec; real omega,Ekin,sum,m,vel; - bool found; + gmx_bool found; int nmodes,nphases; int *imodes; real *amplitude; diff --git a/src/tools/gmx_order.c b/src/tools/gmx_order.c index f2e9614ab8..cd473100ad 100644 --- a/src/tools/gmx_order.c +++ b/src/tools/gmx_order.c @@ -340,9 +340,9 @@ static void check_length(real length, int a, int b) } void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order, - real ***slOrder, real *slWidth, int nslices, bool bSliced, - bool bUnsat, t_topology *top, int ePBC, int ngrps, int axis, - bool permolecule, bool radial, bool distcalc, const char *radfn, + real ***slOrder, real *slWidth, int nslices, gmx_bool bSliced, + gmx_bool bUnsat, t_topology *top, int ePBC, int ngrps, int axis, + gmx_bool permolecule, gmx_bool radial, gmx_bool distcalc, const char *radfn, real ***distvals, const output_env_t oenv) { @@ -370,7 +370,7 @@ void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order, *slCount; /* nr. of atoms in one slice */ real dbangle = 0, /* angle between double bond and axis */ sdbangle = 0;/* sum of these angles */ - bool use_unitvector = FALSE; /* use a specified unit vector instead of axis to specify unit normal*/ + gmx_bool use_unitvector = FALSE; /* use a specified unit vector instead of axis to specify unit normal*/ rvec direction, com,dref,dvec; int comsize, distsize; atom_id *comidx=NULL, *distidx=NULL; @@ -646,8 +646,8 @@ void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order, void order_plot(rvec order[], real *slOrder[], const char *afile, const char *bfile, - const char *cfile, int ngrps, int nslices, real slWidth, bool bSzonly, - bool permolecule, real **distvals, const output_env_t oenv) + const char *cfile, int ngrps, int nslices, real slWidth, gmx_bool bSzonly, + gmx_bool permolecule, real **distvals, const output_env_t oenv) { FILE *ord, *slOrd; /* xvgr files with order parameters */ int atom, slice; /* atom corresponding to order para.*/ @@ -791,12 +791,12 @@ int gmx_order(int argc,char *argv[]) }; static int nslices = 1; /* nr of slices defined */ - static bool bSzonly = FALSE; /* True if only Sz is wanted */ - static bool bUnsat = FALSE; /* True if carbons are unsat. */ + static gmx_bool bSzonly = FALSE; /* True if only Sz is wanted */ + static gmx_bool bUnsat = FALSE; /* True if carbons are unsat. */ static const char *normal_axis[] = { NULL, "z", "x", "y", NULL }; - static bool permolecule = FALSE; /*compute on a per-molecule basis */ - static bool radial = FALSE; /*compute a radial membrane normal */ - static bool distcalc = FALSE; /*calculate distance from a reference group */ + static gmx_bool permolecule = FALSE; /*compute on a per-molecule basis */ + static gmx_bool radial = FALSE; /*compute a radial membrane normal */ + static gmx_bool distcalc = FALSE; /*calculate distance from a reference group */ t_pargs pa[] = { { "-d", FALSE, etENUM, {normal_axis}, "Direction of the normal on the membrane" }, @@ -842,7 +842,7 @@ int gmx_order(int argc,char *argv[]) { efXVG,"-Sgsl","sg-ang-slice", ffOPTWR }, /* xvgr output file */ { efXVG,"-Sksl","sk-dist-slice", ffOPTWR }, /* xvgr output file */ }; - bool bSliced = FALSE; /* True if box is sliced */ + gmx_bool bSliced = FALSE; /* True if box is sliced */ #define NFILE asize(fnm) real **distvals=NULL; const char *sgfnm,*skfnm,*ndxfnm,*tpsfnm,*trxfnm; diff --git a/src/tools/gmx_polystat.c b/src/tools/gmx_polystat.c index 8f42243d0a..9528e36e29 100644 --- a/src/tools/gmx_polystat.c +++ b/src/tools/gmx_polystat.c @@ -120,7 +120,7 @@ int gmx_polystat(int argc,char *argv[]) "the average cos reaches a value of 1/e. This point is determined", "by a linear interpolation of log()." }; - static bool bMW = TRUE, bPC = FALSE; + static gmx_bool bMW = TRUE, bPC = FALSE; t_pargs pa[] = { { "-mw", FALSE, etBOOL, {&bMW}, "Use the mass weighting for radii of gyration" }, diff --git a/src/tools/gmx_potential.c b/src/tools/gmx_potential.c index 6bfcf7a6fd..9abef117ac 100644 --- a/src/tools/gmx_potential.c +++ b/src/tools/gmx_potential.c @@ -99,7 +99,7 @@ void calc_potential(const char *fn, atom_id **index, int gnx[], double ***slField, int *nslices, t_topology *top, int ePBC, int axis, int nr_grps, double *slWidth, - double fudge_z, bool bSpherical, bool bCorrect, + double fudge_z, gmx_bool bSpherical, gmx_bool bCorrect, const output_env_t oenv) { rvec *x0; /* coordinates without pbc */ @@ -394,9 +394,9 @@ int gmx_potential(int argc,char *argv[]) static const char *axtitle="Z"; static int nslices = 10; /* nr of slices defined */ static int ngrps = 1; - static bool bSpherical = FALSE; /* default is bilayer types */ + static gmx_bool bSpherical = FALSE; /* default is bilayer types */ static real fudge_z = 0; /* translate coordinates */ - static bool bCorrect = 0; + static gmx_bool bCorrect = 0; t_pargs pa [] = { { "-d", FALSE, etSTR, {&axtitle}, "Take the normal on the membrane in direction X, Y or Z." }, diff --git a/src/tools/gmx_principal.c b/src/tools/gmx_principal.c index 5a02137190..811fd65085 100644 --- a/src/tools/gmx_principal.c +++ b/src/tools/gmx_principal.c @@ -80,7 +80,7 @@ int gmx_principal(int argc,char *argv[]) "g_principal calculates the three principal axes of inertia for a group", "of atoms.", }; - static bool foo = FALSE; + static gmx_bool foo = FALSE; t_pargs pa[] = { { "-foo", FALSE, etBOOL, {&foo}, "Dummy option to avoid empty array" } diff --git a/src/tools/gmx_rdf.c b/src/tools/gmx_rdf.c index 84327afc4a..d189a5335f 100644 --- a/src/tools/gmx_rdf.c +++ b/src/tools/gmx_rdf.c @@ -72,7 +72,7 @@ static void check_box_c(matrix box) box[ZZ][XX],box[ZZ][YY],box[ZZ][ZZ]); } -static void calc_comg(int is,int *coi,int *index,bool bMass,t_atom *atom, +static void calc_comg(int is,int *coi,int *index,gmx_bool bMass,t_atom *atom, rvec *x,rvec *x_comg) { int c,i,d; @@ -158,8 +158,8 @@ static void split_group(int isize,int *index,char *grpname, static void do_rdf(const char *fnNDX,const char *fnTPS,const char *fnTRX, const char *fnRDF,const char *fnCNRDF, const char *fnHQ, - bool bCM,const char *close, - const char **rdft,bool bXY,bool bPBC,bool bNormalize, + gmx_bool bCM,const char *close, + const char **rdft,gmx_bool bXY,gmx_bool bPBC,gmx_bool bNormalize, real cutoff,real binwidth,real fade,int ng, const output_env_t oenv) { @@ -181,7 +181,7 @@ static void do_rdf(const char *fnNDX,const char *fnTPS,const char *fnTRX, real segvol,spherevol,prev_spherevol,**rdf; rvec *x,dx,*x0=NULL,*x_i1,xi; real *inv_segvol,invvol,invvol_sum,rho; - bool bClose,*bExcl,bTop,bNonSelfExcl; + gmx_bool bClose,*bExcl,bTop,bNonSelfExcl; matrix box,box_pbc; int **npairs; atom_id ix,jx,***pairs; @@ -659,7 +659,7 @@ int gmx_rdf(int argc,char *argv[]) "be computed (option [TT]-sq[tt]). The algorithm uses FFT, the grid", "spacing of which is determined by option [TT]-grid[tt]." }; - static bool bCM=FALSE,bXY=FALSE,bPBC=TRUE,bNormalize=TRUE; + static gmx_bool bCM=FALSE,bXY=FALSE,bPBC=TRUE,bNormalize=TRUE; static real cutoff=0,binwidth=0.002,grid=0.05,fade=0.0,lambda=0.1,distance=10; static int npixel=256,nlevel=20,ngroups=1; static real start_q=0.0, end_q=60.0, energy=12.0; @@ -708,7 +708,7 @@ int gmx_rdf(int argc,char *argv[]) }; #define NPA asize(pa) const char *fnTPS,*fnNDX,*fnDAT=NULL; - bool bSQ,bRDF; + gmx_bool bSQ,bRDF; output_env_t oenv; t_filenm fnm[] = { diff --git a/src/tools/gmx_relax.c b/src/tools/gmx_relax.c index 8baf414b1a..ed15214e27 100644 --- a/src/tools/gmx_relax.c +++ b/src/tools/gmx_relax.c @@ -66,7 +66,7 @@ typedef struct { typedef struct { real rij_3; real rij_6; - bool bNOE; + gmx_bool bNOE; real tauc,dtauc,S2,dS2; complex y2; complex Ylm[5]; @@ -111,7 +111,7 @@ complex c_add(complex c,complex d) complex calc_ylm(int m,rvec rij,real r2,real r_3,real r_6) { - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; static real y0,y1,y2; real x,y,z,xsq,ysq,rxy,r1,cphi,sphi,cth,sth,fac; complex cs; @@ -183,7 +183,7 @@ void myfunc(real x,real a[],real *y,real dyda[],int na) dyda[2] = x*tau1*tau1*(1-a[1])*eee; } -void fit_one(bool bVerbose, +void fit_one(gmx_bool bVerbose, int nframes,real x[],real y[],real dy[],real ftol, real *S2,real *dS2,real *tauc,real *dtauc) { @@ -195,7 +195,7 @@ void fit_one(bool bVerbose, real *a,**covar,**alpha; real chisq,ochisq,alamda; - bool bCont; + gmx_bool bCont; int i,j,ma,mfit,*lista; ma=mfit=2; @@ -248,7 +248,7 @@ void fit_one(bool bVerbose, sfree(lista); } -void calc_tauc(bool bVerbose,int npair,t_pair pair[],real dt, +void calc_tauc(gmx_bool bVerbose,int npair,t_pair pair[],real dt, int nframes,t_sij spec[],real **corr) { FILE *fp; @@ -372,10 +372,10 @@ void plot_spectrum(char *noefn,int npair,t_pair pair[],t_sij *spec,real taum) do_view(noefn,NULL); } -void spectrum(bool bVerbose, - char *trj,char *shifts,bool bAbInitio, +void spectrum(gmx_bool bVerbose, + char *trj,char *shifts,gmx_bool bAbInitio, char *corrfn,char *noefn, - int maxframes,bool bFour,bool bFit,int nrestart, + int maxframes,gmx_bool bFour,gmx_bool bFit,int nrestart, int npair,t_pair pair[],int nat,real chem_shifts[], real taum,real maxdist, real w_rls[],rvec xp[],t_idef *idef) @@ -500,7 +500,7 @@ int gmx_relax(int argc,char *argv[]) static int nlevels = 15; static int nrestart = 1; static int maxframes = 100; - static bool bFFT = TRUE,bFit = TRUE, bVerbose = TRUE; + static gmx_bool bFFT = TRUE,bFit = TRUE, bVerbose = TRUE; t_pargs pa[] = { { "-taum", FALSE, etREAL, &taum, "Rotational correlation time for your molecule. It is obligatory to pass this option" }, diff --git a/src/tools/gmx_rms.c b/src/tools/gmx_rms.c index 5a36160fa5..8f309c0d9e 100644 --- a/src/tools/gmx_rms.c +++ b/src/tools/gmx_rms.c @@ -139,8 +139,8 @@ int gmx_rms(int argc, char *argv[]) "Option [TT]-bm[tt] produces a matrix of average bond angle deviations", "analogously to the [TT]-m[tt] option. Only bonds between atoms in the", "comparison group are considered." }; - static bool bPBC = TRUE, bFitAll = TRUE, bSplit = FALSE; - static bool bDeltaLog = FALSE; + static gmx_bool bPBC = TRUE, bFitAll = TRUE, bSplit = FALSE; + static gmx_bool bDeltaLog = FALSE; static int prev = 0, freq = 1, freq2 = 1, nlevels = 80, avl = 0; static real rmsd_user_max = -1, rmsd_user_min = -1, bond_user_max = -1, bond_user_min = -1, delta_maxy = 0.0; @@ -171,7 +171,7 @@ int gmx_rms(int argc, char *argv[]) const char *fitgraphlabel[efNR + 1] = { NULL, "lsq fit", "translational fit", "no fit" }; static int nrms = 1; - static bool bMassWeighted = TRUE; + static gmx_bool bMassWeighted = TRUE; t_pargs pa[] = { { "-what", FALSE, etENUM, @@ -217,8 +217,8 @@ int gmx_rms(int argc, char *argv[]) #define NFRAME 5000 int maxframe = NFRAME, maxframe2 = NFRAME; real t, *w_rls, *w_rms, *w_rls_m = NULL, *w_rms_m = NULL; - bool bNorm, bAv, bFreq2, bFile2, bMat, bBond, bDelta, bMirror, bMass; - bool bFit, bReset; + gmx_bool bNorm, bAv, bFreq2, bFile2, bMat, bBond, bDelta, bMirror, bMass; + gmx_bool bFit, bReset; t_topology top; int ePBC; t_iatom *iatom = NULL; @@ -237,7 +237,7 @@ int gmx_rms(int argc, char *argv[]) real **delta = NULL, delta_max, delta_scalex = 0, delta_scaley = 0, *delta_tot; int delta_xsize = 0, del_lev = 100, mx, my, abs_my; - bool bA1, bA2, bPrev, bTop, *bInMat = NULL; + gmx_bool bA1, bA2, bPrev, bTop, *bInMat = NULL; int ifit, *irms, ibond = 0, *ind_bond1 = NULL, *ind_bond2 = NULL, n_ind_m = 0; atom_id *ind_fit, **ind_rms, *ind_m = NULL, *rev_ind_m = NULL, *ind_rms_m = diff --git a/src/tools/gmx_rmsdist.c b/src/tools/gmx_rmsdist.c index 65f732fe71..158b3652ea 100644 --- a/src/tools/gmx_rmsdist.c +++ b/src/tools/gmx_rmsdist.c @@ -79,7 +79,7 @@ static void calc_dist(int nind,atom_id index[],rvec x[],int ePBC,matrix box, static void calc_dist_tot(int nind,atom_id index[],rvec x[], int ePBC,matrix box, real **d, real **dtot, real **dtot2, - bool bNMR, real **dtot1_3, real **dtot1_6) + gmx_bool bNMR, real **dtot1_3, real **dtot1_6) { int i,j; real *xi; @@ -212,12 +212,12 @@ static void dump_equiv(FILE *out, int neq, t_equiv **equiv) } } -static bool is_equiv(int neq, t_equiv **equiv, char **nname, +static gmx_bool is_equiv(int neq, t_equiv **equiv, char **nname, int rnr1, char *rname1, char *aname1, int rnr2, char *rname2, char *aname2) { int i,j; - bool bFound; + gmx_bool bFound; bFound=FALSE; /* we can terminate each loop when bFound is true! */ @@ -244,13 +244,13 @@ static bool is_equiv(int neq, t_equiv **equiv, char **nname, static int analyze_noe_equivalent(const char *eq_fn, t_atoms *atoms, int isize, atom_id *index, - bool bSumH, + gmx_bool bSumH, atom_id *noe_index, t_noe_gr *noe_gr) { FILE *fp; int i, j, anmil, anmjl, rnri, rnrj, gi, groupnr, neq; char *anmi, *anmj, **nnm; - bool bMatch,bEquiv; + gmx_bool bMatch,bEquiv; t_equiv **equiv; snew(nnm,isize); @@ -554,12 +554,12 @@ int gmx_rmsdist (int argc,char *argv[]) t_noe **noe=NULL; t_rgb rlo,rhi; char buf[255]; - bool bRMS, bScale, bMean, bNOE, bNMR3, bNMR6, bNMR; + gmx_bool bRMS, bScale, bMean, bNOE, bNMR3, bNMR6, bNMR; static int nlevels=40; static real scalemax=-1.0; - static bool bSumH=TRUE; - static bool bPBC=TRUE; + static gmx_bool bSumH=TRUE; + static gmx_bool bPBC=TRUE; output_env_t oenv; t_pargs pa[] = { diff --git a/src/tools/gmx_rmsf.c b/src/tools/gmx_rmsf.c index 333c2cdf07..d9783b4dba 100644 --- a/src/tools/gmx_rmsf.c +++ b/src/tools/gmx_rmsf.c @@ -190,7 +190,7 @@ int gmx_rmsf(int argc,char *argv[]) "This shows the directions in which the atoms fluctuate the most and", "the least." }; - static bool bRes=FALSE,bAniso=FALSE,bdevX=FALSE,bFit=TRUE; + static gmx_bool bRes=FALSE,bAniso=FALSE,bdevX=FALSE,bFit=TRUE; t_pargs pargs[] = { { "-res", FALSE, etBOOL, {&bRes}, "Calculate averages for each residue" }, @@ -208,7 +208,7 @@ int gmx_rmsf(int argc,char *argv[]) t_topology top; int ePBC; t_atoms *pdbatoms,*refatoms; - bool bCont; + gmx_bool bCont; matrix box,pdbbox; rvec *x,*pdbx,*xref; @@ -222,7 +222,7 @@ int gmx_rmsf(int argc,char *argv[]) const char *devfn,*dirfn; int resind; - bool bReadPDB; + gmx_bool bReadPDB; atom_id *index; int isize; char *grpnames; diff --git a/src/tools/gmx_rotacf.c b/src/tools/gmx_rotacf.c index 58f458dd23..f806c351b2 100644 --- a/src/tools/gmx_rotacf.c +++ b/src/tools/gmx_rotacf.c @@ -78,7 +78,7 @@ int gmx_rotacf(int argc,char *argv[]) "" }; - static bool bVec = FALSE,bAver=TRUE; + static gmx_bool bVec = FALSE,bAver=TRUE; t_pargs pa[] = { { "-d", FALSE, etBOOL, {&bVec}, diff --git a/src/tools/gmx_rotmat.c b/src/tools/gmx_rotmat.c index e63496d8fc..68ffcc6d0a 100644 --- a/src/tools/gmx_rotmat.c +++ b/src/tools/gmx_rotmat.c @@ -61,7 +61,7 @@ static void get_refx(output_env_t oenv,const char *trxfn,int nfitdim,int skip, int gnx,int *index, - bool bMW,t_topology *top,int ePBC,rvec *x_ref) + gmx_bool bMW,t_topology *top,int ePBC,rvec *x_ref) { int natoms,nfr_all,nfr,i,j,a,r,c,min_fr; t_trxstatus *status; @@ -209,7 +209,7 @@ int gmx_rotmat(int argc,char *argv[]) const char *reffit[] = { NULL, "none", "xyz", "xy", NULL }; static int skip=1; - static bool bFitXY=FALSE,bMW=TRUE; + static gmx_bool bFitXY=FALSE,bMW=TRUE; t_pargs pa[] = { { "-ref", FALSE, etENUM, {reffit}, "Determine the optimal reference structure" }, diff --git a/src/tools/gmx_saltbr.c b/src/tools/gmx_saltbr.c index c41c8fd0a0..7f7dbeb3c6 100644 --- a/src/tools/gmx_saltbr.c +++ b/src/tools/gmx_saltbr.c @@ -129,7 +129,7 @@ int gmx_saltbr(int argc,char *argv[]) "option is selected. In this case files are named as [TT]sb-ResnameResnr-Atomnr[tt].", "There may be many such files." }; - static bool bSep=FALSE; + static gmx_bool bSep=FALSE; static real truncate=1000.0; t_pargs pa[] = { { "-t", FALSE, etREAL, {&truncate}, diff --git a/src/tools/gmx_sas.c b/src/tools/gmx_sas.c index e886facae4..573e3968a1 100644 --- a/src/tools/gmx_sas.c +++ b/src/tools/gmx_sas.c @@ -127,7 +127,7 @@ void do_conect(const char *fn,int n,rvec x[]) } void connelly_plot(const char *fn,int ndots,real dots[],rvec x[],t_atoms *atoms, - t_symtab *symtab,int ePBC,matrix box,bool bSave) + t_symtab *symtab,int ePBC,matrix box,gmx_bool bSave) { static const char *atomnm="DOT"; static const char *resnm ="DOT"; @@ -219,8 +219,8 @@ real calc_radius(char *atom) } void sas_plot(int nfile,t_filenm fnm[],real solsize,int ndots, - real qcut,bool bSave,real minarea,bool bPBC, - real dgs_default,bool bFindex, const output_env_t oenv) + real qcut,gmx_bool bSave,real minarea,gmx_bool bPBC, + real dgs_default,gmx_bool bFindex, const output_env_t oenv) { FILE *fp,*fp2,*fp3=NULL,*vp; const char *flegend[] = { "Hydrophobic", "Hydrophilic", @@ -238,11 +238,11 @@ void sas_plot(int nfile,t_filenm fnm[],real solsize,int ndots, t_topology top; char title[STRLEN]; int ePBC; - bool bTop; + gmx_bool bTop; t_atoms *atoms; - bool *bOut,*bPhobic; - bool bConnelly; - bool bResAt,bITP,bDGsol; + gmx_bool *bOut,*bPhobic; + gmx_bool bConnelly; + gmx_bool bResAt,bITP,bDGsol; real *radius,*dgs_factor=NULL,*area=NULL,*surfacedots=NULL; real at_area,*atom_area=NULL,*atom_area2=NULL; real *res_a=NULL,*res_area=NULL,*res_area2=NULL; @@ -592,7 +592,7 @@ int gmx_sas(int argc,char *argv[]) static int ndots = 24; static real qcut = 0.2; static real minarea = 0.5, dgs_default=0; - static bool bSave = TRUE,bPBC=TRUE,bFindex=FALSE; + static gmx_bool bSave = TRUE,bPBC=TRUE,bFindex=FALSE; t_pargs pa[] = { { "-probe", FALSE, etREAL, {&solsize}, "Radius of the solvent probe (nm)" }, diff --git a/src/tools/gmx_sdf.c b/src/tools/gmx_sdf.c index 32cfd14ac6..978dec73cb 100644 --- a/src/tools/gmx_sdf.c +++ b/src/tools/gmx_sdf.c @@ -70,7 +70,7 @@ static void f_write(FILE *output,float value) static void do_sdf(const char *fnNDX,const char *fnTPS,const char *fnTRX, - const char *fnSDF, const char *fnREF, bool bRef, + const char *fnSDF, const char *fnREF, gmx_bool bRef, rvec cutoff, real binwidth, int mode, rvec triangle, rvec dtri, const output_env_t oenv) { @@ -103,7 +103,7 @@ static void do_sdf(const char *fnNDX,const char *fnTPS,const char *fnTRX, gmx_rmpbc_t gpbc=NULL; int ePBC=-1; t_pbc pbc; - bool bTop=FALSE,bRefDone=FALSE,bInGroup=FALSE; + gmx_bool bTop=FALSE,bRefDone=FALSE,bInGroup=FALSE; char title[STRLEN]; @@ -696,7 +696,7 @@ int gmx_sdf(int argc,char *argv[]) "2001, 1702 and the references cited within." }; output_env_t oenv; - static bool bRef=FALSE; + static gmx_bool bRef=FALSE; static int mode=1; static rvec triangle={0.0,0.0,0.0}; static rvec dtri={0.03,0.03,0.03}; diff --git a/src/tools/gmx_select.c b/src/tools/gmx_select.c index 4da648a072..4361af1b73 100644 --- a/src/tools/gmx_select.c +++ b/src/tools/gmx_select.c @@ -52,8 +52,8 @@ typedef struct { - bool bDump; - bool bFracNorm; + gmx_bool bDump; + gmx_bool bFracNorm; const char *routt; int *size; FILE *sfp; @@ -220,9 +220,9 @@ gmx_select(int argc, char *argv[]) "With [TT]-dump[tt], the frame time is omitted from the output.", }; - bool bDump = FALSE; - bool bFracNorm = FALSE; - bool bTotNorm = FALSE; + gmx_bool bDump = FALSE; + gmx_bool bFracNorm = FALSE; + gmx_bool bTotNorm = FALSE; const char *routt[] = {NULL, "number", "index", NULL}; t_pargs pa[] = { {"-dump", FALSE, etBOOL, {&bDump}, diff --git a/src/tools/gmx_sgangle.c b/src/tools/gmx_sgangle.c index 3645c15a13..a64426d759 100644 --- a/src/tools/gmx_sgangle.c +++ b/src/tools/gmx_sgangle.c @@ -465,7 +465,7 @@ int gmx_sgangle(int argc,char *argv[]) t_topology *top; /* topology */ int ePBC; atom_id *index[2]; - static bool bOne = FALSE, bZ=FALSE; + static gmx_bool bOne = FALSE, bZ=FALSE; t_pargs pa[] = { { "-one", FALSE, etBOOL, {&bOne}, "Only one group compute angle between vector at time zero and time t"}, diff --git a/src/tools/gmx_sham.c b/src/tools/gmx_sham.c index d623b9249e..734d0ba73e 100644 --- a/src/tools/gmx_sham.c +++ b/src/tools/gmx_sham.c @@ -201,7 +201,7 @@ static void pick_minima(const char *logfile,int *ibox,int ndim,int len,real W[]) { FILE *fp; int i,j,k,ijk,nmin; - bool bMin; + gmx_bool bMin; t_minimum *mm; snew(mm,len); @@ -268,13 +268,13 @@ static void do_sham(const char *fn,const char *ndx, const char *xpm3,const char *xpm4,const char *pdb, const char *logf, int n,int neig,real **eig, - bool bGE,int nenerT,real **enerT, + gmx_bool bGE,int nenerT,real **enerT, int nmap,real *mapindex,real **map, real Tref, real pmax,real gmax, real *emin,real *emax,int nlevels,real pmin, - const char *mname,bool bSham,int *idim,int *ibox, - bool bXmin,real *xmin,bool bXmax,real *xmax) + const char *mname,gmx_bool bSham,int *idim,int *ibox, + gmx_bool bXmin,real *xmin,gmx_bool bXmax,real *xmax) { FILE *fp; real *min_eig,*max_eig; @@ -288,7 +288,7 @@ static void do_sham(const char *fn,const char *ndx, int i,j,k,imin,len,index,d,*nbin,*bindex,bi; int *nxyz,maxbox; t_blocka *b; - bool bOutside; + gmx_bool bOutside; unsigned int flags; t_rgb rlo = { 0, 0, 0 }; t_rgb rhi = { 1, 1, 1 }; @@ -718,9 +718,9 @@ int gmx_sham(int argc,char *argv[]) "volume." }; static real tb=-1,te=-1,frac=0.5,filtlen=0,binwidth=0.1; - static bool bHaveT=TRUE,bDer=FALSE,bSubAv=TRUE,bAverCorr=FALSE,bXYdy=FALSE; - static bool bEESEF=FALSE,bEENLC=FALSE,bEeFitAc=FALSE,bPower=FALSE; - static bool bShamEner=TRUE,bSham=TRUE; + static gmx_bool bHaveT=TRUE,bDer=FALSE,bSubAv=TRUE,bAverCorr=FALSE,bXYdy=FALSE; + static gmx_bool bEESEF=FALSE,bEENLC=FALSE,bEeFitAc=FALSE,bPower=FALSE; + static gmx_bool bShamEner=TRUE,bSham=TRUE; static real Tref=298.15,pmin=0,ttol=0,pmax=0,gmax=0,emin=0,emax=0; static rvec nrdim = {1,1,1}; static rvec nrbox = {32,32,32}; diff --git a/src/tools/gmx_sorient.c b/src/tools/gmx_sorient.c index 7303164325..4a1f06a54f 100644 --- a/src/tools/gmx_sorient.c +++ b/src/tools/gmx_sorient.c @@ -50,10 +50,10 @@ static void calc_com_pbc(int nrefat,t_topology *top,rvec x[],t_pbc *pbc, - atom_id index[],rvec xref,bool bPBC,matrix box) + atom_id index[],rvec xref,gmx_bool bPBC,matrix box) { const real tol=1e-4; - bool bChanged; + gmx_bool bChanged; int m,j,ai,iter; real mass,mtot; rvec dx,xtest; @@ -115,7 +115,7 @@ int gmx_sorient(int argc,char *argv[]) real inp,outp,two_pi,nav,normfac,rmin2,rmax2,rcut,rcut2,r2,r,mass,mtot; real c1,c2; char str[STRLEN]; - bool bTPS; + gmx_bool bTPS; rvec xref,dx,dxh1,dxh2,outer; gmx_rmpbc_t gpbc=NULL; t_pbc pbc; @@ -148,7 +148,7 @@ int gmx_sorient(int argc,char *argv[]) }; output_env_t oenv; - static bool bCom = FALSE,bVec23=FALSE,bPBC = FALSE; + static gmx_bool bCom = FALSE,bVec23=FALSE,bPBC = FALSE; static real rmin=0.0,rmax=0.5,binwidth=0.02,rbinw=0.02; t_pargs pa[] = { { "-com", FALSE, etBOOL, {&bCom}, diff --git a/src/tools/gmx_spatial.c b/src/tools/gmx_spatial.c index a57d789a50..a06232308f 100644 --- a/src/tools/gmx_spatial.c +++ b/src/tools/gmx_spatial.c @@ -102,12 +102,12 @@ int gmx_spatial(int argc,char *argv[]) "(Number of Additional Bins) option value. \n" }; - static bool bPBC=FALSE; - static bool bSHIFT=FALSE; + static gmx_bool bPBC=FALSE; + static gmx_bool bSHIFT=FALSE; static int iIGNOREOUTER=-1; /*Positive values may help if the surface is spikey */ - static bool bCUTDOWN=TRUE; + static gmx_bool bCUTDOWN=TRUE; static real rBINWIDTH=0.05; /* nm */ - static bool bCALCDIV=TRUE; + static gmx_bool bCALCDIV=TRUE; static int iNAB=4; t_pargs pa[] = { diff --git a/src/tools/gmx_spol.c b/src/tools/gmx_spol.c index 663f38807c..553258c6e5 100644 --- a/src/tools/gmx_spol.c +++ b/src/tools/gmx_spol.c @@ -54,7 +54,7 @@ static void calc_com_pbc(int nrefat,t_topology *top,rvec x[],t_pbc *pbc, atom_id index[],rvec xref,int ePBC,matrix box) { const real tol=1e-4; - bool bChanged; + gmx_bool bChanged; int m,j,ai,iter; real mass,mtot; rvec dx,xtest; @@ -166,7 +166,7 @@ int gmx_spol(int argc,char *argv[]) }; output_env_t oenv; - static bool bCom = FALSE,bPBC = FALSE; + static gmx_bool bCom = FALSE,bPBC = FALSE; static int srefat=1; static real rmin=0.0,rmax=0.32,refdip=0,bw=0.01; t_pargs pa[] = { diff --git a/src/tools/gmx_tcaf.c b/src/tools/gmx_tcaf.c index cbe10ee6ae..daff4839ad 100644 --- a/src/tools/gmx_tcaf.c +++ b/src/tools/gmx_tcaf.c @@ -250,7 +250,7 @@ int gmx_tcaf(int argc,char *argv[]) "is very important for obtaining a good fit." }; - static bool bMol=FALSE,bK34=FALSE; + static gmx_bool bMol=FALSE,bK34=FALSE; static real wt=5; t_pargs pa[] = { { "-mol", FALSE, etBOOL, {&bMol}, @@ -265,7 +265,7 @@ int gmx_tcaf(int argc,char *argv[]) int ePBC; t_trxframe fr; matrix box; - bool bTPS,bTop; /* ,bCubic; */ + gmx_bool bTPS,bTop; /* ,bCubic; */ int gnx; atom_id *index,*atndx=NULL,at; char *grpname; diff --git a/src/tools/gmx_traj.c b/src/tools/gmx_traj.c index 6631c1443d..fee083580b 100644 --- a/src/tools/gmx_traj.c +++ b/src/tools/gmx_traj.c @@ -61,7 +61,7 @@ static void low_print_data(FILE *fp,real time,rvec x[],int n,atom_id *index, - bool bDim[],const char *sffmt) + gmx_bool bDim[],const char *sffmt) { int i,ii,d; @@ -143,8 +143,8 @@ static void average_data(rvec x[],rvec xav[],real *mass, } } -static void print_data(FILE *fp,real time,rvec x[],real *mass,bool bCom, - int ngrps,int isize[],atom_id **index,bool bDim[], +static void print_data(FILE *fp,real time,rvec x[],real *mass,gmx_bool bCom, + int ngrps,int isize[],atom_id **index,gmx_bool bDim[], const char *sffmt) { static rvec *xav=NULL; @@ -164,7 +164,7 @@ static void print_data(FILE *fp,real time,rvec x[],real *mass,bool bCom, } } -static void write_trx_x(t_trxstatus *status,t_trxframe *fr,real *mass,bool bCom, +static void write_trx_x(t_trxstatus *status,t_trxframe *fr,real *mass,gmx_bool bCom, int ngrps,int isize[],atom_id **index) { static rvec *xav=NULL; @@ -206,7 +206,7 @@ static void write_trx_x(t_trxstatus *status,t_trxframe *fr,real *mass,bool bCom, } static void make_legend(FILE *fp,int ngrps,int isize,atom_id index[], - char **name,bool bCom,bool bMol,bool bDim[], + char **name,gmx_bool bCom,gmx_bool bMol,gmx_bool bDim[], const output_env_t oenv) { char **leg; @@ -419,14 +419,14 @@ static void write_pdb_bfac(const char *fname,const char *xname, const char *title,t_atoms *atoms,int ePBC,matrix box, int isize,atom_id *index,int nfr_x,rvec *x, int nfr_v,rvec *sum, - bool bDim[],real scale_factor, + gmx_bool bDim[],real scale_factor, const output_env_t oenv) { FILE *fp; real max,len2,scale; atom_id maxi; int i,m,onedim; - bool bOne; + gmx_bool bOne; if ((nfr_x == 0) || (nfr_v == 0)) { @@ -626,8 +626,8 @@ int gmx_traj(int argc,char *argv[]) "norm of the vector is plotted. In addition in the same graph", "the kinetic energy distribution is given." }; - static bool bMol=FALSE,bCom=FALSE,bPBC=TRUE,bNoJump=FALSE; - static bool bX=TRUE,bY=TRUE,bZ=TRUE,bNorm=FALSE,bFP=FALSE; + static gmx_bool bMol=FALSE,bCom=FALSE,bPBC=TRUE,bNoJump=FALSE; + static gmx_bool bX=TRUE,bY=TRUE,bZ=TRUE,bNorm=FALSE,bFP=FALSE; static int ngroups=1; static real scale=0,binwidth=1; t_pargs pa[] = { @@ -678,8 +678,8 @@ int gmx_traj(int argc,char *argv[]) atom_id **index0,**index; atom_id *atndx; t_block *mols; - bool bTop,bOX,bOXT,bOV,bOF,bOB,bOT,bEKT,bEKR,bCV,bCF; - bool bDim[4],bDum[4],bVD; + gmx_bool bTop,bOX,bOXT,bOV,bOF,bOB,bOT,bEKT,bEKR,bCV,bCF; + gmx_bool bDim[4],bDum[4],bVD; char *sffmt,sffmt6[1024]; const char *box_leg[6] = { "XX", "YY", "ZZ", "YX", "ZX", "ZY" }; output_env_t oenv; diff --git a/src/tools/gmx_trjcat.c b/src/tools/gmx_trjcat.c index be1eb548a5..492bc1df93 100644 --- a/src/tools/gmx_trjcat.c +++ b/src/tools/gmx_trjcat.c @@ -80,7 +80,7 @@ static void scan_trj_files(char **fnms, int nfiles, real *readtime, t_trxstatus *status; real t; t_trxframe fr; - bool ok; + gmx_bool ok; for (i = 0; i < nfiles; i++) { @@ -163,11 +163,11 @@ static void sort_files(char **fnms, real *settime, int nfile) } static void edit_files(char **fnms, int nfiles, real *readtime, real *timestep, - real *settime, int *cont_type, bool bSetTime, - bool bSort, const output_env_t oenv) + real *settime, int *cont_type, gmx_bool bSetTime, + gmx_bool bSort, const output_env_t oenv) { int i; - bool ok; + gmx_bool ok; char inputstring[STRLEN], *chptr; if (bSetTime) @@ -293,7 +293,7 @@ static void do_demux(int nset, char *fnms[], char *fnms_out[], int nval, { int i, j, k, natoms, nnn; t_trxstatus **fp_in, **fp_out; - bool bCont, *bSet; + gmx_bool bCont, *bSet; real t, first_time = 0; t_trxframe *trx; @@ -415,15 +415,15 @@ int gmx_trjcat(int argc, char *argv[]) "are collected into the output trajectory. If the number of frames in", "the trajectory does not match that in the xvg file then the program", "tries to be smart. Beware." }; - static bool bVels = TRUE; + static gmx_bool bVels = TRUE; static int prec = 3; - static bool bCat = FALSE; - static bool bSort = TRUE; - static bool bKeepLast = FALSE; - static bool bKeepLastAppend = FALSE; - static bool bOverwrite = FALSE; - static bool bSetTime = FALSE; - static bool bDeMux; + static gmx_bool bCat = FALSE; + static gmx_bool bSort = TRUE; + static gmx_bool bKeepLast = FALSE; + static gmx_bool bKeepLastAppend = FALSE; + static gmx_bool bOverwrite = FALSE; + static gmx_bool bSetTime = FALSE; + static gmx_bool bDeMux; static real begin = -1; static real end = -1; static real dt = 0; @@ -460,7 +460,7 @@ int gmx_trjcat(int argc, char *argv[]) char **fnms, **fnms_out, *in_file, *out_file; int n_append; t_trxstatus *trxout = NULL; - bool bNewFile, bIndex, bWrite; + gmx_bool bNewFile, bIndex, bWrite; int earliersteps, nfile_in, nfile_out, *cont_type, last_ok_step; real *readtime, *timest, *settime; real first_time = 0, lasttime = NOTSET, last_ok_t = -1, timestep; @@ -470,7 +470,7 @@ int gmx_trjcat(int argc, char *argv[]) char *grpname; real **val = NULL, *t = NULL, dt_remd; int n, nset; - bool bOK; + gmx_bool bOK; gmx_off_t fpos; output_env_t oenv; t_filenm fnm[] = diff --git a/src/tools/gmx_trjconv.c b/src/tools/gmx_trjconv.c index c552e71684..9f0bed1471 100644 --- a/src/tools/gmx_trjconv.c +++ b/src/tools/gmx_trjconv.c @@ -85,13 +85,13 @@ static void calc_pbc_cluster(int ecenter,int nrefat,t_topology *top,int ePBC, rvec clust_com,matrix box) { const real tol=1e-3; - bool bChanged; + gmx_bool bChanged; int m,i,j,j0,j1,jj,ai,iter,is; real fac,Isq,min_dist2; rvec dx,ddx,xtest,xrm,box_center; int nmol,nmol_cl,imol_center; atom_id *molind; - bool *bMol,*bTmp; + gmx_bool *bMol,*bTmp; rvec *m_com,*m_shift,m0; t_pbc pbc; @@ -415,7 +415,7 @@ void do_trunc(const char *fn, real t0) { t_fileio *in; FILE *fp; - bool bStop,bOK; + gmx_bool bStop,bOK; t_trnheader sh; gmx_off_t fpos; char yesno[256]; @@ -629,14 +629,14 @@ int gmx_trjconv(int argc,char *argv[]) { NULL, "none", "rot+trans", "rotxy+transxy", "translation", "transxy", "progressive", NULL }; - static bool bAppend=FALSE,bSeparate=FALSE,bVels=TRUE,bForce=FALSE,bCONECT=FALSE; - static bool bCenter=FALSE; + static gmx_bool bAppend=FALSE,bSeparate=FALSE,bVels=TRUE,bForce=FALSE,bCONECT=FALSE; + static gmx_bool bCenter=FALSE; static int skip_nr=1,ndec=3,nzero=0; static real tzero=0,delta_t=0,timestep=0,ttrunc=-1,tdump=-1,split_t=0; static rvec newbox = {0,0,0}, shift = {0,0,0}, trans = {0,0,0}; static char *exec_command=NULL; static real dropunder=0,dropover=0; - static bool bRound=FALSE; + static gmx_bool bRound=FALSE; t_pargs pa[] = @@ -753,22 +753,22 @@ int gmx_trjconv(int argc,char *argv[]) int ndrop=0,ncol,drop0=0,drop1=0,dropuse=0; double **dropval; real tshift=0,t0=-1,dt=0.001,prec; - bool bFit,bFitXY,bPFit,bReset; + gmx_bool bFit,bFitXY,bPFit,bReset; int nfitdim; gmx_rmpbc_t gpbc=NULL; - bool bRmPBC,bPBCWhole,bPBCcomRes,bPBCcomMol,bPBCcomAtom,bPBC,bNoJump,bCluster; - bool bCopy,bDoIt,bIndex,bTDump,bSetTime,bTPS=FALSE,bDTset=FALSE; - bool bExec,bTimeStep=FALSE,bDumpFrame=FALSE,bSetPrec,bNeedPrec; - bool bHaveFirstFrame,bHaveNextFrame,bSetBox,bSetUR,bSplit=FALSE; - bool bSubTraj=FALSE,bDropUnder=FALSE,bDropOver=FALSE,bTrans=FALSE; - bool bWriteFrame,bSplitHere; + gmx_bool bRmPBC,bPBCWhole,bPBCcomRes,bPBCcomMol,bPBCcomAtom,bPBC,bNoJump,bCluster; + gmx_bool bCopy,bDoIt,bIndex,bTDump,bSetTime,bTPS=FALSE,bDTset=FALSE; + gmx_bool bExec,bTimeStep=FALSE,bDumpFrame=FALSE,bSetPrec,bNeedPrec; + gmx_bool bHaveFirstFrame,bHaveNextFrame,bSetBox,bSetUR,bSplit=FALSE; + gmx_bool bSubTraj=FALSE,bDropUnder=FALSE,bDropOver=FALSE,bTrans=FALSE; + gmx_bool bWriteFrame,bSplitHere; const char *top_file,*in_file,*out_file=NULL; char out_file2[256],*charpt; char *outf_base=NULL; const char *outf_ext=NULL; char top_title[256],title[256],command[256],filemode[5]; int xdr=0; - bool bWarnCompact=FALSE; + gmx_bool bWarnCompact=FALSE; const char *warn; output_env_t oenv; diff --git a/src/tools/gmx_trjorder.c b/src/tools/gmx_trjorder.c index b6c8e32662..a2a4eedfe5 100644 --- a/src/tools/gmx_trjorder.c +++ b/src/tools/gmx_trjorder.c @@ -106,7 +106,7 @@ int gmx_trjorder(int argc,char *argv[]) }; static int na=3,ref_a=1; static real rcut=0; - static bool bCOM=FALSE,bZ=FALSE; + static gmx_bool bCOM=FALSE,bZ=FALSE; t_pargs pa[] = { { "-na", FALSE, etINT, {&na}, "Number of atoms in a molecule" }, @@ -122,7 +122,7 @@ int gmx_trjorder(int argc,char *argv[]) FILE *fp; t_trxstatus *out; t_trxstatus *status; - bool bNShell,bPDBout; + gmx_bool bNShell,bPDBout; t_topology top; int ePBC; rvec *x,*xsol,xcom,dx; diff --git a/src/tools/gmx_tune_pme.c b/src/tools/gmx_tune_pme.c index 4abf04bdf6..4714d7c73f 100644 --- a/src/tools/gmx_tune_pme.c +++ b/src/tools/gmx_tune_pme.c @@ -118,7 +118,7 @@ static int gmx_system_call(char *command) /* Check if string starts with substring */ -static bool str_starts(const char *string, const char *substring) +static gmx_bool str_starts(const char *string, const char *substring) { return ( strncmp(string, substring, strlen(substring)) == 0); } @@ -134,7 +134,7 @@ static void cleandata(t_perf *perfdata, int test_nr) } -static bool is_equal(real a, real b) +static gmx_bool is_equal(real a, real b) { real diff, eps=1.0e-7; @@ -187,8 +187,8 @@ static int parse_logfile(const char *logfile, const char *errfile, float dum1,dum2,dum3; int npme; gmx_large_int_t resetsteps=-1; - bool bFoundResetStr = FALSE; - bool bResetChecked = FALSE; + gmx_bool bFoundResetStr = FALSE; + gmx_bool bResetChecked = FALSE; if (!gmx_fexist(logfile)) @@ -336,7 +336,7 @@ static int parse_logfile(const char *logfile, const char *errfile, } -static bool analyze_data( +static gmx_bool analyze_data( FILE *fp, const char *fn, t_perf **perfdata, @@ -355,7 +355,7 @@ static bool analyze_data( t_perf *pd; char strbuf[STRLEN]; char str_PME_f_load[13]; - bool bCanUseOrigTPR; + gmx_bool bCanUseOrigTPR; if (nrepeats > 1) @@ -503,7 +503,7 @@ static bool analyze_data( /* Get the commands we need to set up the runs from environment variables */ -static void get_program_paths(bool bThreads, char *cmd_mpirun[], char cmd_np[], +static void get_program_paths(gmx_bool bThreads, char *cmd_mpirun[], char cmd_np[], char *cmd_mdrun[], int repeats) { char *command=NULL; @@ -517,8 +517,8 @@ static void get_program_paths(bool bThreads, char *cmd_mpirun[], char cmd_np[], const char match_mpi[] = "NNODES="; const char match_mdrun[]= "Program: "; const char empty_mpirun[] = ""; - bool bMdrun = FALSE; - bool bMPI = FALSE; + gmx_bool bMdrun = FALSE; + gmx_bool bMPI = FALSE; /* Get the commands we need to set up the runs from environment variables */ @@ -616,9 +616,9 @@ static void get_program_paths(bool bThreads, char *cmd_mpirun[], char cmd_np[], static void launch_simulation( - bool bLaunch, /* Should the simulation be launched? */ + gmx_bool bLaunch, /* Should the simulation be launched? */ FILE *fp, /* General log file */ - bool bThreads, /* whether to use threads */ + gmx_bool bThreads, /* whether to use threads */ char *cmd_mpirun, /* Command for mpirun */ char *cmd_np, /* Switch for -np or -nt or empty */ char *cmd_mdrun, /* Command for mdrun */ @@ -925,7 +925,7 @@ static void make_benchmark_tprs( real nlist_buffer; /* Thickness of the buffer regions for PME-switch potentials: */ char buf[200]; rvec box_size; - bool bNote = FALSE; + gmx_bool bNote = FALSE; t_pmegrid *pmegrid=NULL; /* Grid settings for the PME grids to test */ int npmegrid=1; /* Number of grids that can be tested, * normally = ntpr but could be less */ @@ -1130,7 +1130,7 @@ static void make_benchmark_tprs( /* Whether these files are written depends on tpr (or mdp) settings, * not on mdrun command line options! */ -static bool tpr_triggers_file(const char *opt) +static gmx_bool tpr_triggers_file(const char *opt) { if ( (0 == strcmp(opt, "-pf")) || (0 == strcmp(opt, "-px")) ) @@ -1143,7 +1143,7 @@ static bool tpr_triggers_file(const char *opt) /* Rename the files we want to keep to some meaningful filename and * delete the rest */ static void cleanup(const t_filenm *fnm, int nfile, int k, int nnodes, - int nPMEnodes, int nr, bool bKeepStderr) + int nPMEnodes, int nr, gmx_bool bKeepStderr) { char numstring[STRLEN]; char newfilename[STRLEN]; @@ -1360,7 +1360,7 @@ static void do_the_tests( int repeats, /* Repeat each test this often */ int nnodes, /* Total number of nodes = nPP + nPME */ int nr_tprs, /* Total number of tpr files to test */ - bool bThreads, /* Threads or MPI? */ + gmx_bool bThreads, /* Threads or MPI? */ char *cmd_mpirun, /* mpirun command string */ char *cmd_np, /* "-np", "-n", whatever mpirun needs */ char *cmd_mdrun, /* mdrun command string */ @@ -1377,7 +1377,7 @@ static void do_the_tests( int cmdline_length; char *command, *cmd_stub; char buf[STRLEN]; - bool bResetProblem=FALSE; + gmx_bool bResetProblem=FALSE; /* This string array corresponds to the eParselog enum type at the start @@ -1634,7 +1634,7 @@ static void check_input( /* Returns TRUE when "opt" is a switch for g_tune_pme itself */ -static bool is_main_switch(char *opt) +static gmx_bool is_main_switch(char *opt) { if ( (0 == strcmp(opt,"-s" )) || (0 == strcmp(opt,"-p" )) @@ -1660,7 +1660,7 @@ static bool is_main_switch(char *opt) /* Returns TRUE when "opt" is needed at launch time */ -static bool is_launch_option(char *opt, bool bSet) +static gmx_bool is_launch_option(char *opt, gmx_bool bSet) { if (bSet) return TRUE; @@ -1670,7 +1670,7 @@ static bool is_launch_option(char *opt, bool bSet) /* Returns TRUE when "opt" is needed at launch time */ -static bool is_launch_file(char *opt, bool bSet) +static gmx_bool is_launch_file(char *opt, gmx_bool bSet) { /* We need all options that were set on the command line * and that do not start with -b */ @@ -1685,7 +1685,7 @@ static bool is_launch_file(char *opt, bool bSet) /* Returns TRUE when "opt" gives an option needed for the benchmarks runs */ -static bool is_bench_option(char *opt, bool bSet) +static gmx_bool is_bench_option(char *opt, gmx_bool bSet) { /* If option is set, we might need it for the benchmarks. * This includes -cpi */ @@ -1706,7 +1706,7 @@ static bool is_bench_option(char *opt, bool bSet) /* Returns TRUE when "opt" defines a file which is needed for the benchmarks runs */ -static bool is_bench_file(char *opt, bool bSet, bool bOptional, bool bIsOutput) +static gmx_bool is_bench_file(char *opt, gmx_bool bSet, gmx_bool bOptional, gmx_bool bIsOutput) { /* All options starting with "-b" are for _b_enchmark files exclusively */ if (0 == strncmp(opt,"-b", 2)) @@ -1743,7 +1743,7 @@ static void add_to_string(char **str, char *buf) /* Create the command line for the benchmark as well as for the real run */ static void create_command_line_snippets( - bool bThreads, + gmx_bool bThreads, int presteps, int nfile, t_filenm fnm[], @@ -1874,7 +1874,7 @@ static void setopt(const char *opt,int nfile,t_filenm fnm[]) static void couple_files_options(int nfile, t_filenm fnm[]) { int i; - bool bSet,bBench; + gmx_bool bSet,bBench; char *opt; char buf[20]; @@ -1985,9 +1985,9 @@ int gmx_tune_pme(int argc,char *argv[]) gmx_large_int_t new_sim_nsteps=-1; /* -1 indicates: not set by the user */ gmx_large_int_t cpt_steps=0; /* Step counter in .cpt input file */ int presteps=100; /* Do a full cycle reset after presteps steps */ - bool bOverwrite=FALSE, bKeepTPR; - bool bLaunch=FALSE; - bool bPassAll=FALSE; + gmx_bool bOverwrite=FALSE, bKeepTPR; + gmx_bool bLaunch=FALSE; + gmx_bool bPassAll=FALSE; char *ExtraArgs=NULL; char **tpr_names=NULL; const char *simulation_tpr=NULL; @@ -2064,16 +2064,16 @@ int gmx_tune_pme(int argc,char *argv[]) }; /* Command line options of mdrun */ - bool bDDBondCheck = TRUE; - bool bDDBondComm = TRUE; - bool bVerbose = FALSE; - bool bCompact = TRUE; - bool bSepPot = FALSE; - bool bRerunVSite = FALSE; - bool bIonize = FALSE; - bool bConfout = TRUE; - bool bReproducible = FALSE; - bool bThreads = FALSE; + gmx_bool bDDBondCheck = TRUE; + gmx_bool bDDBondComm = TRUE; + gmx_bool bVerbose = FALSE; + gmx_bool bCompact = TRUE; + gmx_bool bSepPot = FALSE; + gmx_bool bRerunVSite = FALSE; + gmx_bool bIonize = FALSE; + gmx_bool bConfout = TRUE; + gmx_bool bReproducible = FALSE; + gmx_bool bThreads = FALSE; int nmultisim=0; int nstglobalcomm=-1; @@ -2095,9 +2095,9 @@ int gmx_tune_pme(int argc,char *argv[]) char *deffnm=NULL; #define STD_CPT_PERIOD (15.0) real cpt_period=STD_CPT_PERIOD,max_hours=-1; - bool bAppendFiles=TRUE; - bool bKeepAndNumCPT=FALSE; - bool bResetCountersHalfWay=FALSE; + gmx_bool bAppendFiles=TRUE; + gmx_bool bKeepAndNumCPT=FALSE; + gmx_bool bResetCountersHalfWay=FALSE; output_env_t oenv=NULL; t_pargs pa[] = { diff --git a/src/tools/gmx_velacc.c b/src/tools/gmx_velacc.c index 5b041bc618..d656889836 100644 --- a/src/tools/gmx_velacc.c +++ b/src/tools/gmx_velacc.c @@ -119,7 +119,7 @@ int gmx_velacc(int argc,char *argv[]) "of molecule numbers instead of atom numbers." }; - static bool bM=FALSE,bMol=FALSE; + static gmx_bool bM=FALSE,bMol=FALSE; t_pargs pa[] = { { "-m", FALSE, etBOOL, {&bM}, "Calculate the momentum autocorrelation function" }, @@ -131,7 +131,7 @@ int gmx_velacc(int argc,char *argv[]) int ePBC=-1; t_trxframe fr; matrix box; - bool bTPS=FALSE,bTop=FALSE; + gmx_bool bTPS=FALSE,bTop=FALSE; int gnx; atom_id *index; char *grpname; diff --git a/src/tools/gmx_wham.c b/src/tools/gmx_wham.c index 8a99ddc3a4..ff7c7a39b0 100644 --- a/src/tools/gmx_wham.c +++ b/src/tools/gmx_wham.c @@ -85,7 +85,7 @@ typedef struct char PullName[4][256]; double UmbPos[4][3]; double UmbCons[4][3]; - bool Flipped[4]; + gmx_bool Flipped[4]; } t_UmbrellaHeader; typedef struct @@ -97,31 +97,31 @@ typedef struct double *pos; double *z; double * N, *Ntot; - bool * Flipped; + gmx_bool * Flipped; double dt; - bool **bContrib; + gmx_bool **bContrib; } t_UmbrellaWindow; typedef struct { const char *fnTpr,*fnPullf,*fnPdo,*fnPullx; - bool bTpr,bPullf,bPdo,bPullx; + gmx_bool bTpr,bPullf,bPdo,bPullx; int bins,cycl; - bool verbose,bShift,bAuto,bBoundsOnly; - bool bFlipProf; + gmx_bool verbose,bShift,bAuto,bBoundsOnly; + gmx_bool bFlipProf; real tmin, tmax, dt; real Temperature,Tolerance; int nBootStrap,histBootStrapBlockLength; real dtBootStrap,zProfZero,alpha; int bsSeed,stepchange; - bool bHistBootStrap,bWeightedCycl,bHistOutOnly; - bool bAutobounds,bNoprof; + gmx_bool bHistBootStrap,bWeightedCycl,bHistOutOnly; + gmx_bool bAutobounds,bNoprof; real min,max,dz; - bool bLog; + gmx_bool bLog; int unit; real zProf0; - bool bProf0Set,bs_verbose; - bool bHistEq, bTab; + gmx_bool bProf0Set,bs_verbose; + gmx_bool bHistEq, bTab; double *tabX,*tabY,tabMin,tabMax,tabDz; int tabNbins; } t_UmbrellaOptions; @@ -309,14 +309,14 @@ static char *fgets3(FILE *fp,char ptr[],int *len) void read_pdo_data(FILE * file, t_UmbrellaHeader * header, int fileno, t_UmbrellaWindow * win, t_UmbrellaOptions *opt, - bool bGetMinMax,real *mintmp,real *maxtmp) + gmx_bool bGetMinMax,real *mintmp,real *maxtmp) { int i,inttemp,bins,count; real min,max,minfound,maxfound; double temp,time,time0=0,dt; char *ptr; t_UmbrellaWindow * window=0; - bool timeok,dt_ok=1; + gmx_bool timeok,dt_ok=1; char *tmpbuf,fmt[256],fmtign[256]; int len=STRLEN,dstep=1; @@ -514,7 +514,7 @@ void setup_acc_wham(t_UmbrellaWindow * window,int nWindows, t_UmbrellaOptions *o { int i,j,k; double U,min=opt->min,dz=opt->dz,temp,ztot_half,distance,ztot,contrib; - bool bAnyContrib; + gmx_bool bAnyContrib; ztot=opt->max-opt->min; @@ -560,7 +560,7 @@ void setup_acc_wham(t_UmbrellaWindow * window,int nWindows, t_UmbrellaOptions *o void calc_profile(double *profile,t_UmbrellaWindow * window, int nWindows, t_UmbrellaOptions *opt, - bool bExact) + gmx_bool bExact) { int i,k,j; double num,ztot_half,ztot,distance,min=opt->min,dz=opt->dz; @@ -604,7 +604,7 @@ void calc_profile(double *profile,t_UmbrellaWindow * window, int nWindows, t_Umb double calc_z(double * profile,t_UmbrellaWindow * window, int nWindows, t_UmbrellaOptions *opt, - bool bExact) + gmx_bool bExact) { int i,j,k; double U=0,min=opt->min,dz=opt->dz,temp,ztot_half,distance,ztot; @@ -655,7 +655,7 @@ double calc_z(double * profile,t_UmbrellaWindow * window, int nWindows, t_Umbrel void cyclicProfByWeightedCorr(double *profile,t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptions * opt, - bool bAppendCorr2File, const char *fn, + gmx_bool bAppendCorr2File, const char *fn, const output_env_t oenv) { int i,j,k,bins=opt->bins; @@ -896,7 +896,7 @@ void create_synthetic_histo(t_UmbrellaWindow *synthWindow, { int nsynth,N,i,nbins,r_index; double r; - static bool bWarnout=0; + static gmx_bool bWarnout=0; N=thisWindow->N[pullid]; @@ -997,7 +997,7 @@ void do_bootstrapping(const char *fnres, const char* fnprof, int i,j,*randomArray=0,winid,pullid,ib; int iAllPull,nAllPull,*allPull_winId,*allPull_pullId; FILE *fp; - bool bExact=FALSE; + gmx_bool bExact=FALSE; /* init random */ @@ -1398,13 +1398,13 @@ double dist_ndim(double **dx,int ndim,int line) void read_pull_xf(const char *fn, const char *fntpr, t_UmbrellaHeader * header, t_UmbrellaWindow * window, - t_UmbrellaOptions *opt, bool bGetMinMax,real *mintmp, + t_UmbrellaOptions *opt, gmx_bool bGetMinMax,real *mintmp, real *maxtmp) { double **y,pos=0.,t,force,time0=0.,dt; int ny,nt,bins,ibin,i,g,dstep=1,nColPerGrp,nColRef,nColExpect; real min,max,minfound,maxfound; - bool dt_ok,timeok,bHaveForce; + gmx_bool dt_ok,timeok,bHaveForce; const char *quantity; minfound=1e20; @@ -1718,7 +1718,7 @@ int gmx_wham(int argc,char *argv[]) }; static t_UmbrellaOptions opt; - static bool bHistOnly=FALSE; + static gmx_bool bHistOnly=FALSE; const char *en_unit[]={NULL,"kJ","kCal","kT",NULL}; const char *en_unit_label[]={"","E (kJ mol\\S-1\\N)","E (kcal mol\\S-1\\N)","E (kT)",}; @@ -1795,7 +1795,7 @@ int gmx_wham(int argc,char *argv[]) t_UmbrellaHeader header; t_UmbrellaWindow * window=NULL; double *profile,maxchange=1e20; - bool bMinSet,bMaxSet,bAutoSet,bExact=FALSE; + gmx_bool bMinSet,bMaxSet,bAutoSet,bExact=FALSE; char **fninTpr,**fninPull,**fninPdo; const char *fnPull; FILE *histout,*profout; diff --git a/src/tools/gmx_wheel.c b/src/tools/gmx_wheel.c index aa60df9a1b..3b1f5e5a94 100644 --- a/src/tools/gmx_wheel.c +++ b/src/tools/gmx_wheel.c @@ -60,11 +60,11 @@ #include "strdb.h" #include "gmx_ana.h" -bool *bPhobics(int nres,char *resnm[]) +gmx_bool *bPhobics(int nres,char *resnm[]) { int i,nb; char **cb; - bool *bb; + gmx_bool *bb; nb=get_strings("phbres.dat",&cb); snew(bb,nres); @@ -87,7 +87,7 @@ void wheel(const char *fn,int nres,char *resnm[],int r0,real rot0,char *title) int i,sl,slen; real ring,inner,outer; real xc,yc,box; - bool *bPh; + gmx_bool *bPh; char **rnms; char sign; @@ -210,7 +210,7 @@ int gmx_wheel(int argc,char *argv[]) }; output_env_t oenv; static real rot0=0; - static bool bNum=TRUE; + static gmx_bool bNum=TRUE; static char *title=NULL; static int r0=1; t_pargs pa [] = { diff --git a/src/tools/gmx_xpm2ps.c b/src/tools/gmx_xpm2ps.c index 7da02a8d2a..cb5aa034da 100644 --- a/src/tools/gmx_xpm2ps.c +++ b/src/tools/gmx_xpm2ps.c @@ -60,7 +60,7 @@ typedef struct { real major; real minor; real offset; - bool first; + gmx_bool first; int lineatzero; real majorticklen; real minorticklen; @@ -75,12 +75,12 @@ typedef struct { int bw; real linewidth; real xoffs,yoffs; - bool bTitle; - bool bTitleOnce; - bool bYonce; + gmx_bool bTitle; + gmx_bool bTitleOnce; + gmx_bool bYonce; real titfontsize; char titfont[STRLEN]; - bool legend; + gmx_bool legend; real legfontsize; char legfont[STRLEN]; char leglabel[STRLEN]; @@ -102,7 +102,7 @@ enum { ecSel, ecHalves, ecAdd, ecSub, ecMult, ecDiv, ecNR }; void get_params(const char *mpin,const char *mpout,t_psrec *psr) { - static const char *bools[BOOL_NR+1] = { "no", "yes", NULL }; + static const char *gmx_bools[BOOL_NR+1] = { "no", "yes", NULL }; /* this must correspond to t_rgb *linecolors[] below */ static const char *colors[] = { "none", "black", "white", NULL }; warninp_t wi; @@ -117,11 +117,11 @@ void get_params(const char *mpin,const char *mpout,t_psrec *psr) } else { inp = NULL; } - ETYPE("black&white", psr->bw, bools); + ETYPE("black&white", psr->bw, gmx_bools); RTYPE("linewidth", psr->linewidth, 1.0); STYPE("titlefont", psr->titfont, "Helvetica"); RTYPE("titlefontsize", psr->titfontsize, 20.0); - ETYPE("legend", psr->legend, bools); + ETYPE("legend", psr->legend, gmx_bools); STYPE("legendfont", psr->legfont, psr->titfont); STYPE("legendlabel", psr->leglabel, ""); STYPE("legend2label", psr->leg2label, psr->leglabel); @@ -138,7 +138,7 @@ void get_params(const char *mpin,const char *mpout,t_psrec *psr) RTYPE("x-major", psr->X.major, NOTSET); RTYPE("x-minor", psr->X.minor, NOTSET); RTYPE("x-firstmajor", psr->X.offset, 0.0); - ETYPE("x-majorat0", psr->X.first, bools); + ETYPE("x-majorat0", psr->X.first, gmx_bools); RTYPE("x-majorticklen", psr->X.majorticklen, 8.0); RTYPE("x-minorticklen", psr->X.minorticklen, 4.0); STYPE("x-label", psr->X.label, ""); @@ -150,7 +150,7 @@ void get_params(const char *mpin,const char *mpout,t_psrec *psr) RTYPE("y-major", psr->Y.major, psr->X.major); RTYPE("y-minor", psr->Y.minor, psr->X.minor); RTYPE("y-firstmajor", psr->Y.offset, psr->X.offset); - ETYPE("y-majorat0", psr->Y.first, bools); + ETYPE("y-majorat0", psr->Y.first, gmx_bools); RTYPE("y-majorticklen", psr->Y.majorticklen, psr->X.majorticklen); RTYPE("y-minorticklen", psr->Y.minorticklen, psr->X.minorticklen); STYPE("y-label", psr->Y.label, psr->X.label); @@ -174,10 +174,10 @@ t_rgb blue = { 0, 0, 1 }; /* this must correspond to *colors[] in get_params */ t_rgb *linecolors[] = { NULL, &black, &white, NULL }; -bool diff_maps(int nmap1,t_mapping *map1,int nmap2,t_mapping *map2) +gmx_bool diff_maps(int nmap1,t_mapping *map1,int nmap2,t_mapping *map2) { int i; - bool bDiff,bColDiff=FALSE; + gmx_bool bDiff,bColDiff=FALSE; if (nmap1 != nmap2) bDiff=TRUE; @@ -287,7 +287,7 @@ static real box_dh(t_psrec *psr) } #define IS_ONCE (i==nmat-1) -static real box_dh_top(bool bOnce, t_psrec *psr) +static real box_dh_top(gmx_bool bOnce, t_psrec *psr) { real dh; @@ -299,12 +299,12 @@ static real box_dh_top(bool bOnce, t_psrec *psr) return dh; } -static bool box_do_all_x_maj_ticks(t_psrec *psr) +static gmx_bool box_do_all_x_maj_ticks(t_psrec *psr) { return (psr->boxspacing>(1.5*psr->X.majorticklen)); } -static bool box_do_all_x_min_ticks(t_psrec *psr) +static gmx_bool box_do_all_x_min_ticks(t_psrec *psr) { return (psr->boxspacing>(1.5*psr->X.minorticklen)); } @@ -474,7 +474,7 @@ static void draw_zerolines(t_psdata out,real x0,real y0,real w, } static void box_dim(int nmat,t_matrix mat[],t_matrix *mat2,t_psrec *psr, - int elegend,bool bFrame, + int elegend,gmx_bool bFrame, real *w,real *h,real *dw,real *dh) { int i,maxytick; @@ -563,7 +563,7 @@ int add_maps(t_mapping **newmap, } void xpm_mat(const char *outf, int nmat,t_matrix *mat,t_matrix *mat2, - bool bDiag,bool bFirstDiag) + gmx_bool bDiag,gmx_bool bFirstDiag) { FILE *out; char buf[100]; @@ -607,7 +607,7 @@ static void tick_spacing(int n, real axis[], real offset, char axisnm, real *major, real *minor) { real space; - bool bTryAgain,bFive; + gmx_bool bTryAgain,bFive; int i,j,t,f=0,ten; #define NFACT 4 real major_fact[NFACT] = {5, 4, 2, 1}; @@ -642,8 +642,8 @@ static void tick_spacing(int n, real axis[], real offset, char axisnm, } void ps_mat(const char *outf,int nmat,t_matrix mat[],t_matrix mat2[], - bool bFrame,bool bDiag,bool bFirstDiag, - bool bTitle,bool bTitleOnce,bool bYonce,int elegend, + gmx_bool bFrame,gmx_bool bDiag,gmx_bool bFirstDiag, + gmx_bool bTitle,gmx_bool bTitleOnce,gmx_bool bYonce,int elegend, real size,real boxx,real boxy,const char *m2p,const char *m2pout, int mapoffset) { @@ -657,7 +657,7 @@ void ps_mat(const char *outf,int nmat,t_matrix mat[],t_matrix mat2[], real w,h,dw,dh; int nmap1=0,nmap2=0,leg_nmap; t_mapping *map1=NULL,*map2=NULL,*leg_map; - bool bMap1,bNextMap1,bDiscrete; + gmx_bool bMap1,bNextMap1,bDiscrete; /* memory leak: */ libm2p = m2p ? gmxlibfn(m2p) : m2p; @@ -987,8 +987,8 @@ void write_combined_matrix(int ecombine, const char *fn, } void do_mat(int nmat,t_matrix *mat,t_matrix *mat2, - bool bFrame,bool bZeroLine,bool bDiag,bool bFirstDiag,bool bTitle, - bool bTitleOnce,bool bYonce,int elegend, + gmx_bool bFrame,gmx_bool bZeroLine,gmx_bool bDiag,gmx_bool bFirstDiag,gmx_bool bTitle, + gmx_bool bTitleOnce,gmx_bool bYonce,int elegend, real size,real boxx,real boxy, const char *epsfile,const char *xpmfile,const char *m2p, const char *m2pout,int skip, int mapoffset) @@ -1045,7 +1045,7 @@ void gradient_mat(rvec grad, int nmat, t_matrix mat[]) gradient_map(grad, mat[m].nmap, mat[m].map); } -void rainbow_map(bool bBlue, int nmap, t_mapping map[]) +void rainbow_map(gmx_bool bBlue, int nmap, t_mapping map[]) { int i; real c,r,g,b; @@ -1079,7 +1079,7 @@ void rainbow_map(bool bBlue, int nmap, t_mapping map[]) } } -void rainbow_mat(bool bBlue, int nmat, t_matrix mat[]) +void rainbow_mat(gmx_bool bBlue, int nmat, t_matrix mat[]) { int m; @@ -1136,8 +1136,8 @@ int gmx_xpm2ps(int argc,char *argv[]) const char *fn,*epsfile=NULL,*xpmfile=NULL; int i,nmat,nmat2,etitle,elegend,ediag,erainbow,ecombine; t_matrix *mat=NULL,*mat2=NULL; - bool bTitle,bTitleOnce,bDiag,bFirstDiag,bGrad; - static bool bFrame=TRUE,bZeroLine=FALSE,bYonce=FALSE,bAdd=FALSE; + gmx_bool bTitle,bTitleOnce,bDiag,bFirstDiag,bGrad; + static gmx_bool bFrame=TRUE,bZeroLine=FALSE,bYonce=FALSE,bAdd=FALSE; static real size=400,boxx=0,boxy=0,cmin=0,cmax=0; static rvec grad={0,0,0}; enum { etSel, etTop, etOnce, etYlabel, etNone, etNR }; diff --git a/src/tools/hxprops.c b/src/tools/hxprops.c index f16fdf4d64..8bd04d4062 100644 --- a/src/tools/hxprops.c +++ b/src/tools/hxprops.c @@ -491,7 +491,7 @@ static void check_ahx(int nres,t_bb bb[],rvec x[], void do_start_end(int nres,t_bb bb[],rvec x[],int *nbb,atom_id bbindex[], int *nca,atom_id caindex[], - bool bRange,int rStart,int rEnd) + gmx_bool bRange,int rStart,int rEnd) { int i,j,hstart=0,hend=0; diff --git a/src/tools/hxprops.h b/src/tools/hxprops.h index 6ff23a6710..6cee696521 100644 --- a/src/tools/hxprops.h +++ b/src/tools/hxprops.h @@ -48,7 +48,7 @@ typedef struct { real phi,psi,pprms2; real jcaha; real d3,d4,d5,rmsa; - bool bHelix; + gmx_bool bHelix; int nhx; int nrms,resno; int Cprev,N,H,CA,C,O,Nnext; @@ -102,7 +102,7 @@ extern t_bb *mkbbind(const char *fn,int *nres,int *nbb,int res0, extern void do_start_end(int nres,t_bb bb[],rvec x[],int *nbb, atom_id bbindex[],int *nca,atom_id caindex[], - bool bRange,int rStart,int rEnd); + gmx_bool bRange,int rStart,int rEnd); extern void calc_hxprops(int nres,t_bb bb[],rvec x[],matrix box); diff --git a/src/tools/levenmar.c b/src/tools/levenmar.c index 1e9bb07f0d..8bdb1299d1 100644 --- a/src/tools/levenmar.c +++ b/src/tools/levenmar.c @@ -42,7 +42,7 @@ #include "types/simple.h" -static void nrerror(const char error_text[], bool bExit) +static void nrerror(const char error_text[], gmx_bool bExit) { fprintf(stderr,"Numerical Recipes run-time error...\n"); fprintf(stderr,"%s\n",error_text); @@ -238,7 +238,7 @@ static void dump_mat(int n,real **a) } } -bool gaussj(real **a, int n, real **b, int m) +gmx_bool gaussj(real **a, int n, real **b, int m) { int *indxc,*indxr,*ipiv; int i,icol=0,irow=0,j,k,l,ll; @@ -384,7 +384,7 @@ static void mrqcof(real x[], real y[], real sig[], int ndata, real a[], } -bool mrqmin(real x[], real y[], real sig[], int ndata, real a[], +gmx_bool mrqmin(real x[], real y[], real sig[], int ndata, real a[], int ma, int lista[], int mfit, real **covar, real **alpha, real *chisq, void (*funcs)(real,real *,real *,real *), @@ -455,7 +455,7 @@ bool mrqmin(real x[], real y[], real sig[], int ndata, real a[], } -bool mrqmin_new(real x[],real y[],real sig[],int ndata,real a[], +gmx_bool mrqmin_new(real x[],real y[],real sig[],int ndata,real a[], int ia[],int ma,real **covar,real **alpha,real *chisq, void (*funcs)(real, real [], real *, real []), real *alamda) @@ -483,7 +483,7 @@ bool mrqmin_new(real x[],real y[],real sig[],int ndata,real a[], */ { void covsrt(real **covar, int ma, int ia[], int mfit); - bool gaussj(real **a, int n, real **b,int m); + gmx_bool gaussj(real **a, int n, real **b,int m); void mrqcof_new(real x[], real y[], real sig[], int ndata, real a[], int ia[], int ma, real **alpha, real beta[], real *chisq, void (*funcs)(real, real [], real *, real [])); diff --git a/src/tools/make_edi.c b/src/tools/make_edi.c index a360e2c011..6324373770 100644 --- a/src/tools/make_edi.c +++ b/src/tools/make_edi.c @@ -68,7 +68,7 @@ typedef struct { real deltaF0; - bool bHarmonic; + gmx_bool bHarmonic; real tau; real deltaF; real kT; @@ -91,8 +91,8 @@ typedef struct edix typedef struct edipar { int nini; /* total Nr of atoms */ - bool fitmas; /* true if trans fit with cm */ - bool pcamas; /* true if mass-weighted PCA */ + gmx_bool fitmas; /* true if trans fit with cm */ + gmx_bool pcamas; /* true if mass-weighted PCA */ int presteps; /* number of steps to run without any * perturbations ... just monitoring */ int outfrq; /* freq (in steps) of writing to edo */ @@ -347,7 +347,7 @@ int read_conffile(const char *confin,char *title,rvec *x[]) void read_eigenvalues(int vecs[],const char *eigfile, real values[], - bool bHesse, real kT) + gmx_bool bHesse, real kT) { int neig,nrow,i; double **eigval; @@ -565,9 +565,9 @@ int main(int argc,char *argv[]) static int* listen[evEND]; static real T=300.0; const real kB = 2.5 / 300.0; /* k_boltzmann in MD units */ - static bool bRestrain = FALSE; - static bool bHesse=FALSE; - static bool bHarmonic=FALSE; + static gmx_bool bRestrain = FALSE; + static gmx_bool bHesse=FALSE; + static gmx_bool bHarmonic=FALSE; t_pargs pa[] = { { "-mon", FALSE, etSTR, {&evSelections[evMON]}, "Indices of eigenvectors for projections of x (e.g. 1,2-5,9) or 1-100:10 means 1 11 21 31 ... 91" }, @@ -645,7 +645,7 @@ int main(int argc,char *argv[]) char title[STRLEN]; matrix topbox; rvec *xtop; - bool bTop, bFit1; + gmx_bool bTop, bFit1; t_filenm fnm[] = { { efTRN, "-f", "eigenvec", ffREAD }, diff --git a/src/tools/make_ndx.c b/src/tools/make_ndx.c index d604927067..15b1bd82a7 100644 --- a/src/tools/make_ndx.c +++ b/src/tools/make_ndx.c @@ -54,13 +54,13 @@ #define MAXNAMES 30 #define NAME_LEN 30 -bool bCase=FALSE; +gmx_bool bCase=FALSE; static int or_groups(atom_id nr1,atom_id *at1,atom_id nr2,atom_id *at2, atom_id *nr,atom_id *at) { atom_id i1,i2,max=0; - bool bNotIncr; + gmx_bool bNotIncr; *nr=0; @@ -123,7 +123,7 @@ static int and_groups(atom_id nr1,atom_id *at1,atom_id nr2,atom_id *at2, return *nr; } -static bool is_name_char(char c) +static gmx_bool is_name_char(char c) { /* This string should contain all characters that can not be * the first letter of a name due to the make_ndx syntax. @@ -164,10 +164,10 @@ static int parse_names(char **string,int *n_names,char **names) return *n_names; } -static bool parse_int_char(char **string,int *nr,char *c) +static gmx_bool parse_int_char(char **string,int *nr,char *c) { char *orig; - bool bRet; + gmx_bool bRet; orig = *string; @@ -202,10 +202,10 @@ static bool parse_int_char(char **string,int *nr,char *c) return bRet; } -static bool parse_int(char **string,int *nr) +static gmx_bool parse_int(char **string,int *nr) { char *orig,c; - bool bRet; + gmx_bool bRet; orig = *string; bRet = parse_int_char(string,nr,&c); @@ -217,12 +217,12 @@ static bool parse_int(char **string,int *nr) return bRet; } -static bool isquote(char c) +static gmx_bool isquote(char c) { return (c == '\"'); } -static bool parse_string(char **string,int *nr, int ngrps, char **grpname) +static gmx_bool parse_string(char **string,int *nr, int ngrps, char **grpname) { char *s, *sp; char c; @@ -409,7 +409,7 @@ static int select_residueindices(char **string,t_atoms *atoms, } -static bool atoms_from_residuenumbers(t_atoms *atoms,int group,t_blocka *block, +static gmx_bool atoms_from_residuenumbers(t_atoms *atoms,int group,t_blocka *block, atom_id *nr,atom_id *index,char *gname) { int i,j,j0,j1,resnr,nres; @@ -437,7 +437,7 @@ static bool atoms_from_residuenumbers(t_atoms *atoms,int group,t_blocka *block, return *nr; } -static bool comp_name(char *name,char *search) +static gmx_bool comp_name(char *name,char *search) { while (name[0] != '\0' && search[0] != '\0') { switch (search[0]) { @@ -495,7 +495,7 @@ static int select_chainnames(t_atoms *atoms,int n_names,char **names, } static int select_atomnames(t_atoms *atoms,int n_names,char **names, - atom_id *nr,atom_id *index,bool bType) + atom_id *nr,atom_id *index,gmx_bool bType) { char *name; int j; @@ -617,7 +617,7 @@ static void remove_group(int nr,int nr2,t_blocka *block,char ***gn) } static void split_group(t_atoms *atoms,int sel_nr,t_blocka *block,char ***gn, - bool bAtom) + gmx_bool bAtom) { char buf[STRLEN],*name; int i,resind; @@ -727,7 +727,7 @@ static int split_chain(t_atoms *atoms,rvec *x, return nchain; } -static bool check_have_atoms(t_atoms *atoms, char *string) +static gmx_bool check_have_atoms(t_atoms *atoms, char *string) { if ( atoms==NULL ) { printf("Can not process '%s' without atoms info\n", string); @@ -736,16 +736,16 @@ static bool check_have_atoms(t_atoms *atoms, char *string) return TRUE; } -static bool parse_entry(char **string,int natoms,t_atoms *atoms, +static gmx_bool parse_entry(char **string,int natoms,t_atoms *atoms, t_blocka *block,char ***gn, atom_id *nr,atom_id *index,char *gname) { static char **names, *ostring; - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; int j,n_names,sel_nr1; atom_id i,nr1,*index1; char c; - bool bRet,bCompl; + gmx_bool bRet,bCompl; if (bFirst) { bFirst=FALSE; @@ -876,7 +876,7 @@ static bool parse_entry(char **string,int natoms,t_atoms *atoms, static void list_residues(t_atoms *atoms) { int i,j,start,end,prev_resind,resind; - bool bDiff; + gmx_bool bDiff; /* Print all the residues, assuming continuous resnr count */ start = atoms->atom[0].resind; @@ -906,15 +906,15 @@ static void list_residues(t_atoms *atoms) printf("\n"); } -static void edit_index(int natoms, t_atoms *atoms,rvec *x,t_blocka *block, char ***gn, bool bVerbose) +static void edit_index(int natoms, t_atoms *atoms,rvec *x,t_blocka *block, char ***gn, gmx_bool bVerbose) { static char **atnames, *ostring; - static bool bFirst=TRUE; + static gmx_bool bFirst=TRUE; char inp_string[STRLEN],*string; char gname[STRLEN],gname1[STRLEN],gname2[STRLEN]; int i,i0,i1,sel_nr,sel_nr2,newgroup; atom_id nr,nr1,nr2,*index,*index1,*index2; - bool bAnd,bOr,bPrintOnce; + gmx_bool bAnd,bOr,bPrintOnce; if (bFirst) { bFirst=FALSE; @@ -1197,7 +1197,7 @@ int main(int argc,char *argv[]) }; static int natoms=0; - static bool bVerbose=FALSE; + static gmx_bool bVerbose=FALSE; t_pargs pa[] = { { "-natoms", FALSE, etINT, {&natoms}, "set number of atoms (default: read from coordinate or index file)" }, @@ -1212,7 +1212,7 @@ int main(int argc,char *argv[]) const char *stxfile; char **ndxinfiles; const char *ndxoutfile; - bool bNatoms; + gmx_bool bNatoms; int i,j; t_atoms *atoms; rvec *x,*v; diff --git a/src/tools/mcprop.c b/src/tools/mcprop.c index 107ce59715..2b0433d920 100644 --- a/src/tools/mcprop.c +++ b/src/tools/mcprop.c @@ -58,7 +58,7 @@ void normalise_vec(int nx,real x[]) x[j]*=fac; } -static real do_step(int nx,real x[],int i,int *ig,real step,bool bPlus) +static real do_step(int nx,real x[],int i,int *ig,real step,gmx_bool bPlus) { static real r=0; @@ -120,7 +120,7 @@ void do_mc(FILE *fp,int nx,real x[],real step,real v0,real tol, FILE *ffp[2]; FILE *ftrj; int i,j,k,m,f,n,ig,cur=0; - bool bConv,bUp; + gmx_bool bConv,bUp; real vtol,r,bmf,*rx[2],valmin,vplusmin[2],stepsize; double dv,val[2]; #define next (1-cur) diff --git a/src/tools/mk_angndx.c b/src/tools/mk_angndx.c index 4d83790694..5d10b4bdc5 100644 --- a/src/tools/mk_angndx.c +++ b/src/tools/mk_angndx.c @@ -119,10 +119,10 @@ static void fill_ft_ind(int nft,int *ft,t_idef *idef, static void fill_ang(int nft,int *ft,int fac, int nr[],int *index[],int ft_ind[],t_topology *top, - bool bNoH,real hq) + gmx_bool bNoH,real hq) { int f,ftype,i,j,indg,nr_fac; - bool bUse; + gmx_bool bUse; t_idef *idef; t_atom *atom; t_iatom *ia; @@ -210,7 +210,7 @@ int main(int argc,char *argv[]) "definitions of the angles, dihedrals etc." }; static const char *opt[] = { NULL, "angle", "dihedral", "improper", "ryckaert-bellemans", NULL }; - static bool bH=TRUE; + static gmx_bool bH=TRUE; static real hq=-1; t_pargs pa[] = { { "-type", FALSE, etENUM, {opt}, diff --git a/src/tools/pp2shift.h b/src/tools/pp2shift.h index b33d40c69b..d0b832a525 100644 --- a/src/tools/pp2shift.h +++ b/src/tools/pp2shift.h @@ -68,15 +68,15 @@ typedef struct { extern void do_pp2shifts(FILE *fp,int nframes, int nlist,t_dlist dlist[],real **dih); -extern bool has_dihedral(int Dih,t_dlist *dl); +extern gmx_bool has_dihedral(int Dih,t_dlist *dl); extern t_dlist *mk_dlist(FILE *log, t_atoms *atoms, int *nlist, - bool bPhi, bool bPsi, bool bChi, int maxchi, + gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, int maxchi, int r0,int naa,char **aa); extern void pr_dlist(FILE *fp,int nl,t_dlist dl[],real dt, int printtype, -bool bPhi, bool bPsi,bool bChi,bool bOmega, int maxchi); +gmx_bool bPhi, gmx_bool bPsi,gmx_bool bChi,gmx_bool bOmega, int maxchi); extern int pr_trans(FILE *fp,int nl,t_dlist dl[],real dt,int Xi); @@ -85,7 +85,7 @@ extern void mk_chi_lookup (int **lookup, int maxchi, real **dih, extern void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,int maxchi, t_dlist dlist[], real time[], - int **lookup,int *xity,bool bRb,bool bNormalize, + int **lookup,int *xity,gmx_bool bRb,gmx_bool bNormalize, real core_frac); #endif diff --git a/src/tools/sas2mat.c b/src/tools/sas2mat.c index babf06d83d..68e33f635b 100644 --- a/src/tools/sas2mat.c +++ b/src/tools/sas2mat.c @@ -58,7 +58,7 @@ int main(int argc,char *argv[]) "dt is the time step, t0 is the starting time, nlevels is the number", "of levels for coloring. By default a greyscale colormap is generated." }; - static bool bCol=FALSE; + static gmx_bool bCol=FALSE; static char *title="Area (nm^2)"; static real ssmin=-1,ssmax=-1,t0=0,dt=1; static int nres=1,nframes=1,r0=0,nlevels=20,nskip=0; @@ -92,7 +92,7 @@ int main(int argc,char *argv[]) double s; real **ss,lo,hi,s1min,s1max; real *resnr,*t; - bool bCheck=TRUE; + gmx_bool bCheck=TRUE; t_rgb rlo,rhi; t_filenm fnm[] = { { efOUT, "-f", "area", ffREAD },