* 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.
*/
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);
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,
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:
* 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
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
* - 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(),
/** 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
/** 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
/** 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
}
* Appends the _step<step>.cpt with bNumberAndKeep,
* otherwise moves the previous <fn>.cpt to <fn>_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,
* 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.
* 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
}
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 */
/* 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 */
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 */
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
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 */
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.
*/
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,
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.
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);
* 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);
* 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 */
* 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,
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);
void
cool_quote(char *retstring, int retsize, int *cqnum);
-bool
+gmx_bool
be_cool(void);
/* Return TRUE when the user is COOL, FALSE otherwise */
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[],
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
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[]);
/** 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);
#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.
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 */
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);
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,
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,
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,
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,
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);
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,
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.
/* 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,
* 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.
*/
/* 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.
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,
/* 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. */
#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[]);
* 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
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,
#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
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.
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
/* 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);
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).
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 */
gmx_localtop_t *top,
gmx_genborn_t *born,
t_atomtypes *atype,
- bool bBornRadii,
+ gmx_bool bBornRadii,
matrix box,
real lambda,
t_graph *graph,
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
/* 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 */
-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).
/* 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! */
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
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
}
/* 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);
* 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)
} gmx_lal_t;
typedef struct gmx_ga2la {
- bool bAll;
+ gmx_bool bAll;
int mod;
int nalloc;
gmx_laa_t *laa;
* 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;
/* 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;
/* 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;
MPI_Comm comm[2],
int * slab2index_major,
int * slab2index_minor,
- bool bReproducible);
+ gmx_bool bReproducible);
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);
* 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);
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 */
/* 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);
#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__)
#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__)
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 */
#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
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 */
int nr;
} t_mols;
-bool is_int(double x);
+gmx_bool is_int(double x);
/* Returns TRUE when x is integer */
typedef enum {
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.
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
* (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
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[],
/* 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
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);
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,
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;
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;
/* 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: */
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 '+'
/** 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);
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);
/** 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);
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
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);
/* 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.
*/
* 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).
*
* gmx_ana_indexmap_update() does not take any time if the group is
* actually static.
*/
- bool bMapStatic;
+ gmx_bool bMapStatic;
} gmx_ana_indexmap_t;
/** 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,
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. */
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
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);
/*@}*/
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. */
/** 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. */
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
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.
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.
*/
*/
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.
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.
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.
* 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);
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,
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 */
/* 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,
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);
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;
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,
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[],
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);
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
*/
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,
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 */
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.
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 */
* ...
* }
*/
-bool
+gmx_bool
gmx_mtop_atomloop_all_next(gmx_mtop_atomloop_all_t aloop,
int *at_global,t_atom **atom);
* ...
* }
*/
-bool
+gmx_bool
gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop,
t_atom **atom,int *nmol);
* 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);
* 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);
* 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.
* 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.
*/
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);
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. */
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
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.
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)
#endif
typedef struct {
- bool bShow;
+ gmx_bool bShow;
char *label;
int iphi,ipsi; /* point in the dih array of xr... */
} t_phipsi;
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
}
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,
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 */
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 */
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 */
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);
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.
*/
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.
* 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
* 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
* 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.
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,
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! */
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 */
/* 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.*/
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,
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.
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);
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.
*/
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.
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)
*/
/* 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 */
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.
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
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. */
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
#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,
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
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) */
/* 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
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 */
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
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,
/* 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 */
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);
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[]);
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);
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[],
/** 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). */
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. */
/** 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,
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,
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,
/* 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);
/** 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. */
/** 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.
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,
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,
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);
/* 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
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 */
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.
*/
*/
enum { TBEGIN, TEND, TDELTA, TNR };
-bool bTimeSet(int tcontrol);
+gmx_bool bTimeSet(int tcontrol);
real rTimeValue(int tcontrol);
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 */
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.
*/
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,
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.
*/
#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 t<tbegin or t MOD dt = t0,
* 0 if tbegin <= t <=tend+margin,
* Returns TRUE when succeeded, FALSE otherwise.
*/
-bool read_next_frame(const output_env_t oenv,t_trxstatus *status,
+gmx_bool read_next_frame(const output_env_t oenv,t_trxstatus *status,
t_trxframe *fr);
/* Reads the next frame which is in accordance with fr->flags.
* Returns TRUE when succeeded, FALSE otherwise.
* 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).
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.
*/
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.
*/
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.
*/
/* 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.
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[]);
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
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.
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);
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);
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 */
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.
*/
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.
*/
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.
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
/* 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.
*/
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);
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,
* 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 */
* 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.
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;
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;
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];
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];
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;
/* 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
};
/* 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) *
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;
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 */
int sc_power;
real sc_sigma6_def;
real sc_sigma6_min;
- bool bSepDVDL;
+ gmx_bool bSepDVDL;
/* NS Stuff */
int eeltype;
* 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;
* 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;
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;
tensor vir_el_recip;
/* PME/Ewald stuff */
- bool bEwald;
+ gmx_bool bEwald;
real ewaldcoeff;
ewald_tab_t ewald_table;
/* Non bonded Parameter lists */
int ntype; /* Number of atom types */
- bool bBHAM;
+ gmx_bool bBHAM;
real *nbfp;
/* Energy group pair flags */
real fc_stepsize;
/* Generalized born implicit solvent */
- bool bGB;
+ gmx_bool bGB;
/* Generalized born stuff */
real gb_epsilon_solvent;
/* Table data for GB */
* 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 */
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 */
} 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 */
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 };
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 */
/* 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 */
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 */
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 */
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.*/
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;
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;
} 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;
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;
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];
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;
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 */
#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
*/
typedef struct
{
- bool bUpToDate;
+ gmx_bool bUpToDate;
int ekin_n;
tensor *ekinh;
tensor *ekinf;
* 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.
*/
{
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 */
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;
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,
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,
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 */
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.
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 */
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,
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 */
#ifndef VMDIO_H_
#define VMDIO_H_
-#include "molfile_plugin.h"
-#include "types/simple.h"
+#include <molfile_plugin.h>
+#include <types/simple.h>
#ifdef __cplusplus
extern "C" {
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
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;
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.
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.
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.
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.
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
}
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);
* "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);
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
}
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,
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
* \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 {
* 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
/* 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)"},
/* Define to 1 if you have the <altivec.h> 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. */
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");
char **fn,title[256];
int ***mat,nnb;
real mb;
- bool bConf;
+ gmx_bool bConf;
rvec *x = NULL;
rvec dx;
matrix box;
};
#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" },
#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];
FILE *in,*out;
char ofn[1024],line[MAXS+1],cwd[1024];
char *p,*fn_;
- bool bH;
+ gmx_bool bH;
sprintf(ofn,"%s.bak",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);
*
*******************************************************************/
-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;
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;
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);
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;
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);
}
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" },
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;
}
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;
{ 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},
#include "pdbio.h"
#include "strdb.h"
-bool isword(char c)
+gmx_bool isword(char c)
{
return (isalnum(c) || (c=='-') || (c=='_'));
}
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;
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];
};
#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" },
{ 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
}
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
}
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;
}
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 {
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;
"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" },
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]"
#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))+
}
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]);
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" },
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]);
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;
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,
#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;
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" },
real t,lambda,ewaldcoeff,qtot;
rvec *x,*f,*xbuf;
int *index;
- bool bCont;
+ gmx_bool bCont;
real *charge,*qbuf,*qqbuf;
matrix box;
#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
#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
#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;
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;
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;
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;
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;
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)
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[] = {
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[] = {
#endif
}
-bool zoom_3d(t_3dview *view,real fac)
+gmx_bool zoom_3d(t_3dview *view,real fac)
{
real dr;
real bm,dr1,dr2;
}
-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;
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");
#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;
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);
real p,int line)
{
int i,j;
- bool bExact;
+ gmx_bool bExact;
j = get_prop_index(ap,restype,resnm,atomnm,&bExact);
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)
{
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)) {
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;
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;
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");
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;
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,
}
}
-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;
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;
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)
{
}
-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)
{
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)
{
}
-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)
}
}
-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;
}
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;
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;
}
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;
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;
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;
fr->x = state.x;
state.x = NULL;
}
- fr->bV = (state.flags & (1<<estV));
+/* FIX ME after 4.5 */
+/* temporary hack because we are using gmx_bool (unsigned char) */
+ fr->bV = (state.flags & (1<<estV)) != 0;
if (fr->bV)
{
fr->v = state.v;
}
-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;
}
/* 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;
int nfiles;
gmx_file_position_t *outputfiles;
int nexist,f;
- bool bAppend;
+ gmx_bool bAppend;
char *fn,suf_up[STRLEN];
bAppend = FALSE;
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;
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;
{
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;
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);
FILE *fp;
char word[STRLEN];
int natoms,level,r;
- bool bFoundParticles;
+ gmx_bool bFoundParticles;
natoms = 0;
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;
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;
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;
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;
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;
}
-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
#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;
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);
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;
#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;
/* 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 */
}
-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;
{
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;
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;
}
}
-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);
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);
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;*/
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);
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;
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
}
}
-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;
}
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);
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);
}
#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);
}
} 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
}
-bool is_pipe(FILE *fp)
+gmx_bool is_pipe(FILE *fp)
{
t_pstack *ps;
#ifdef GMX_THREADS
return fp;
}
-bool gmx_fexist(const char *fname)
+gmx_bool gmx_fexist(const char *fname)
{
FILE *test;
}
-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))
{
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);
return buf;
}
-bool make_backup(const char * name)
+gmx_bool make_backup(const char * name)
{
char * env;
int count_max;
#else
FILE *ff=NULL;
char buf[256],*bf,*bufsize=0,*ptr;
- bool bRead;
+ gmx_bool bRead;
int bs;
if (mode[0]=='w') {
-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,
* 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);
#endif
}
-bool get_libdir(char *libdir)
+gmx_bool get_libdir(char *libdir)
{
#define GMX_BINNAME_MAX 512
char bin_name[GMX_BINNAME_MAX];
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)
}
-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 */
-FILE *low_libopen(const char *file,bool bFatal)
+FILE *low_libopen(const char *file,gmx_bool bFatal)
{
FILE *ff;
char *fn;
#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)
/*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;
#include "tmpi.h"
#endif
-static bool bDebug = FALSE;
+static gmx_bool bDebug = FALSE;
static char *fatal_tmp_file = NULL;
static FILE *log_file = NULL;
#endif
-bool bDebugMode(void)
+gmx_bool bDebugMode(void)
{
- bool ret;
+ gmx_bool ret;
/*#ifdef GMX_THREADS*/
#if 0
tMPI_Thread_mutex_lock(&debug_mutex);
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;
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;
t_commrec *cr,gmx_domdec_t *dd,
const char *fmt,...)
{
- bool bFinalize;
+ gmx_bool bFinalize;
va_list ap;
char msg[STRLEN];
#ifdef GMX_MPI
*
*/
FILE *debug=NULL;
-bool gmx_debug_at=FALSE;
+gmx_bool gmx_debug_at=FALSE;
void init_debug (const int dbglevel,const char *dbgfile)
{
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 == '_');
}
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;
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));
}
const char *ptr, *ptr2;
char *name;
char *dname, *dval;
- bool bEOF;
+ gmx_bool bEOF;
if (!handle)
return eCPP_INVALID_HANDLE;
}
/* 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++)
/* 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;
t_fileio *fio = NULL;
int i;
char newmode[5];
- bool bRead, bReadWrite;
+ gmx_bool bRead, bReadWrite;
int xdrid;
if (fn2ftp(fn) == efTPA)
}
-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;
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;
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;
/* 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);
-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!");
}
}
-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;
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() */
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;
/* 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;
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;
/* 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);
{
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 */
*
*******************************************************************/
-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);
}
-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);
}
-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);
/* 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);
}
-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);
/* 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);
}
-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);
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);
}
-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);
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);
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);
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);
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);
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);
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);
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);
/* 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;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
}
-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 ret;
+ gmx_bool ret;
gmx_fio_lock(fio);
ret=fio->iotp->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;i<n;i++)
return ret;
}
-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 ret;
+ gmx_bool ret;
gmx_fio_lock(fio);
ret=fio->iotp->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;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
/* Array writing */
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
return ret;
}
-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 ret;
+ gmx_bool ret;
gmx_fio_lock(fio);
ret=fio->iotp->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;i<n;i++)
}
-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 ret;
+ gmx_bool ret;
gmx_fio_lock(fio);
ret=fio->iotp->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;i<n;i++)
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
/* array read/write functions */
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i,itmp;
gmx_fio_lock(fio);
return ret;
}
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
gmx_fio_lock(fio);
if (fio->bRead)
{
-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;i<n;i++)
-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 ret=TRUE;
+ gmx_bool ret=TRUE;
gmx_fio_lock(fio);
if (fio->bRead)
{
-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;i<n;i++)
-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)
{
- bool ret=TRUE;
+ gmx_bool ret=TRUE;
int i;
gmx_fio_lock(fio);
for(i=0;i<n;i++)
/* file type functions */
-static bool do_xdrread(t_fileio *fio, void *item, int nitem, int eio,
+static gmx_bool do_xdrread(t_fileio *fio, void *item, int nitem, int eio,
const char *desc, const char *srcfile, int line);
-static bool do_xdrwrite(t_fileio *fio, const void *item, int nitem, int eio,
+static gmx_bool do_xdrwrite(t_fileio *fio, const void *item, int nitem, int eio,
const char *desc, const char *srcfile, int line);
#ifdef USE_XDR
-static bool do_xdr(t_fileio *fio, void *item, int nitem, int eio,
+static gmx_bool do_xdr(t_fileio *fio, void *item, int nitem, int eio,
const char *desc, const char *srcfile, int line)
{
unsigned char ucdum, *ucptr;
}
-static bool do_xdrread(t_fileio *fio, void *item, int nitem, int eio,
+static gmx_bool do_xdrread(t_fileio *fio, void *item, int nitem, int eio,
const char *desc, const char *srcfile, int line)
{
return do_xdr(fio, item, nitem, eio, desc, srcfile, line);
}
-static bool do_xdrwrite(t_fileio *fio, const void *item, int nitem, int eio,
+static gmx_bool do_xdrwrite(t_fileio *fio, const void *item, int nitem, int eio,
const char *desc, const char *srcfile, int line)
{
void *it=(void*)item; /* ugh.. */
def_nofc ("DH/DL_CON","dH/dl constr." )
};
-bool have_interaction(t_idef *idef,int ftype)
+gmx_bool have_interaction(t_idef *idef,int ftype)
{
int i;
};
-static bool gmx_ask_yesno(bool bASK)
+static gmx_bool gmx_ask_yesno(gmx_bool bASK)
{
char c;
/* compare index in `a' with group in `b' at `index',
when `index'<0 it is relative to end of `b' */
-static bool grp_cmp(t_blocka *b, int nra, atom_id a[], int index)
+static gmx_bool grp_cmp(t_blocka *b, int nra, atom_id a[], int index)
{
int i;
}
static void
-p_status(const char **restype, int nres, const char **typenames, int ntypes, bool bVerb)
+p_status(const char **restype, int nres, const char **typenames, int ntypes, gmx_bool bVerb)
{
int i,j;
int found;
atom_id *
-mk_aid(t_atoms *atoms,const char ** restype,const char * typestring,int *nra,bool bMatch)
+mk_aid(t_atoms *atoms,const char ** restype,const char * typestring,int *nra,gmx_bool bMatch)
/* Make an array of atom_ids for all atoms with residuetypes matching typestring, or the opposite if bMatch is false */
{
atom_id *a;
typedef struct {
char *rname;
- bool bNeg;
+ gmx_bool bNeg;
char *gname;
} restp_t;
static void analyse_other(const char ** restype,t_atoms *atoms,
- t_blocka *gb,char ***gn,bool bASK,bool bVerb)
+ t_blocka *gb,char ***gn,gmx_bool bASK,gmx_bool bVerb)
{
restp_t *restp=NULL;
char **attp=NULL;
}
static void analyse_prot(const char ** restype,t_atoms *atoms,
- t_blocka *gb,char ***gn,bool bASK,bool bVerb)
+ t_blocka *gb,char ***gn,gmx_bool bASK,gmx_bool bVerb)
{
/* atomnames to be used in constructing index groups: */
static const char *pnoh[] = { "H" };
};
/* construct index group containing (TRUE) or excluding (FALSE)
given atom names */
- const bool complement[NCH] = {
+ const gmx_bool complement[NCH] = {
TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE
};
const int wholename[NCH] = { -1, 0,-1,-1,-1,-1,-1,-1, 11,-1 };
int n,j;
atom_id *aid;
int nra,nnpres,npres;
- bool match;
+ gmx_bool match;
char ndx_name[STRLEN],*atnm;
int i;
-bool
+gmx_bool
gmx_residuetype_is_protein(gmx_residuetype_t rt, const char *resnm)
{
- bool rc;
+ gmx_bool rc;
const char *p_type;
if(gmx_residuetype_get_type(rt,resnm,&p_type)==0 &&
return rc;
}
-bool
+gmx_bool
gmx_residuetype_is_dna(gmx_residuetype_t rt, const char *resnm)
{
- bool rc;
+ gmx_bool rc;
const char *p_type;
if(gmx_residuetype_get_type(rt,resnm,&p_type)==0 &&
return rc;
}
-bool
+gmx_bool
gmx_residuetype_is_rna(gmx_residuetype_t rt, const char *resnm)
{
- bool rc;
+ gmx_bool rc;
const char *p_type;
if(gmx_residuetype_get_type(rt,resnm,&p_type)==0 &&
-void analyse(t_atoms *atoms,t_blocka *gb,char ***gn,bool bASK,bool bVerb)
+void analyse(t_atoms *atoms,t_blocka *gb,char ***gn,gmx_bool bASK,gmx_bool bVerb)
{
gmx_residuetype_t rt;
char *resnm;
{
int aa, i, n;
char string[STRLEN];
- bool bMultiple;
+ gmx_bool bMultiple;
bMultiple = FALSE;
n = strlen(s);
{
char s[STRLEN];
int aa;
- bool bInRange;
+ gmx_bool bInRange;
char *end;
do {
F77_FUNC(xdrfbool,XDRFBOOL)(int *xdrid, int *pb, int *ret)
{
xdr_fortran_lock();
- *ret = xdr_bool(xdridptr[*xdrid], pb);
+ *ret = xdr_gmx_bool(xdridptr[*xdrid], pb);
cnt += XDR_INT_SIZE;
xdr_fortran_unlock();
}
{
int *ip = NULL;
int *buf = NULL;
- bool bRead;
+ gmx_bool bRead;
/* preallocate a small buffer and ip on the stack - if we need more
we can always malloc(). This is faster for small values of size: */
static float xtc_get_next_frame_time(FILE *fp, XDR *xdrs, int natoms,
- bool * bOK)
+ gmx_bool * bOK)
{
gmx_off_t off;
float time;
static float
-xtc_get_current_frame_time(FILE *fp, XDR *xdrs, int natoms, bool * bOK)
+xtc_get_current_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
{
gmx_off_t off;
int step;
/* Currently not used, just for completeness */
static int
-xtc_get_current_frame_number(FILE *fp,XDR *xdrs,int natoms, bool * bOK)
+xtc_get_current_frame_number(FILE *fp,XDR *xdrs,int natoms, gmx_bool * bOK)
{
gmx_off_t off;
int ret;
float
-xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, bool * bOK)
+xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
{
float res;
float tinit;
{
float t;
float dt;
- bool bOK;
+ gmx_bool bOK;
gmx_off_t low = 0;
gmx_off_t high, offset, pos;
int res;
}
float
-xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, bool * bOK)
+xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
{
float time;
gmx_off_t off;
int
-xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, bool * bOK)
+xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
{
int frame;
gmx_off_t off;
/* this is not strictly thread-safe, but it's only written to at the beginning
of the simulation, once by each thread with the same value. We assume
that writing to an int is atomic.*/
-static bool parallel_env_val;
+static gmx_bool parallel_env_val;
#ifdef GMX_THREADS
tMPI_Thread_mutex_t parallel_env_mutex=TMPI_THREAD_MUTEX_INITIALIZER;
#endif
been initialized, for example when checking whether gmx_finalize()
needs to be called. Use PAR(cr) to check whether the simulation actually
has more than one node/thread. */
-bool gmx_parallel_env_initialized(void)
+gmx_bool gmx_parallel_env_initialized(void)
{
- bool ret;
+ gmx_bool ret;
#ifdef GMX_THREADS
tMPI_Thread_mutex_lock(¶llel_env_mutex);
#endif
return ret;
}
-static void set_parallel_env(bool val)
+static void set_parallel_env(gmx_bool val)
{
#ifdef GMX_THREADS
tMPI_Thread_mutex_lock(¶llel_env_mutex);
static void par_fn(char *base,int ftp,const t_commrec *cr,
- bool bAppendSimId,bool bAppendNodeId,
+ gmx_bool bAppendSimId,gmx_bool bAppendNodeId,
char buf[],int bufsize)
{
int n;
const char *name)
{
int *ibuf,p;
- bool bCompatible;
+ gmx_bool bCompatible;
fprintf(log,"Multi-checking %s ... ",name);
sfree(ibuf);
}
-void gmx_log_open(const char *lognm,const t_commrec *cr,bool bMasterOnly,
+void gmx_log_open(const char *lognm,const t_commrec *cr,gmx_bool bMasterOnly,
unsigned long Flags, FILE** fplog)
{
int len,testlen,pid;
FILE *fp=*fplog;
char *tmpnm;
- bool bAppend = Flags & MD_APPENDFILES;
+ gmx_bool bAppend = Flags & MD_APPENDFILES;
debug_gmx();
}
void init_multisystem(t_commrec *cr,int nsim, int nfile,
- const t_filenm fnm[],bool bParFn)
+ const t_filenm fnm[],gmx_bool bParFn)
{
gmx_multisim_t *ms;
int nnodes,nnodpersim,sim,i,ftp;
t_commrec *cr;
char **argv;
int i;
- bool pe=FALSE;
+ gmx_bool pe=FALSE;
snew(cr,1);
#define MAX_XPM_LINELENGTH 4096
-real **mk_matrix(int nx, int ny, bool b1D)
+real **mk_matrix(int nx, int ny, gmx_bool b1D)
{
int i;
real **m;
m[x][y]=0;
}
-bool matelmt_cmp(t_xpmelmt e1, t_xpmelmt e2)
+gmx_bool matelmt_cmp(t_xpmelmt e1, t_xpmelmt e2)
{
return (e1.c1 == e2.c1) && (e1.c2 == e2.c2);
}
int llalloc=0;
unsigned int r,g,b;
double u;
- bool bGetOnWithIt;
+ gmx_bool bGetOnWithIt;
t_xpmelmt c;
mm->flags=0;
void write_xpm_header(FILE *out,
const char *title,const char *legend,
const char *label_x,const char *label_y,
- bool bDiscrete)
+ gmx_bool bDiscrete)
{
fprintf(out, "/* XPM */\n");
fprintf(out, "/* Generated by %s */\n",Program());
void write_xpm_map_split(FILE *out,int n_x,int n_y,
int *nlevel_top,real lo_top,real hi_top,
t_rgb rlo_top,t_rgb rhi_top,
- bool bDiscreteColor,
+ gmx_bool bDiscreteColor,
int *nlevel_bot,real lo_bot,real hi_bot,
t_rgb rlo_bot,t_rgb rhi_bot)
{
}
}
-void write_xpm_axis(FILE *out, const char *axis, bool bSpatial, int n,
+void write_xpm_axis(FILE *out, const char *axis, gmx_bool bSpatial, int n,
real *label)
{
int i;
/* Writes a t_matrix struct to .xpm file */
int i,j;
- bool bOneChar;
+ gmx_bool bOneChar;
t_xpmelmt c;
bOneChar=(m.map[0].code.c2 == 0);
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.
{
int i;
atom_id inda0,inda1;
- bool bFound;
+ gmx_bool bFound;
inda0 = a0 - g->start;
inda1 = a1 - g->start;
}
}
-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_i<g->end; at_i++) {
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);
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;
{
int m,j,ng,ai,aj,g0;
rvec dx,hbox;
- bool bTriclinic;
+ gmx_bool bTriclinic;
ivec is_aj;
t_pbc pbc;
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)
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)
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)
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;
}
void gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop,
- bool bKeepSingleMolCG)
+ gmx_bool bKeepSingleMolCG)
{
int mb,cg;
t_block *cgs_mol;
}
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;
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)
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)
{
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;
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)
{
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;
static void bc_inputrec(const t_commrec *cr,t_inputrec *inputrec)
{
- bool bAlloc=TRUE;
+ gmx_bool bAlloc=TRUE;
int i;
block_bc(cr,*inputrec);
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);
/* 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
int lam_power,
real sigma6_def,
real sigma6_min,
- bool bDoForces,
+ gmx_bool bDoForces,
int * outeriter,
int * inneriter)
{
int lam_power,
real sigma6_def,
real sigma6_min,
- bool bDoForces,
+ gmx_bool bDoForces,
int * outeriter,
int * inneriter);
nb_kernel_bluegene_testprog;
/*! Result of bluegene test */
-static bool
+static gmx_bool
nb_kernel_bluegene_present;
nb_kernel_ia32_sse_testprog;
/*! Result of ia32 SSE test */
-static bool
+static gmx_bool
nb_kernel_ia32_sse_present;
nb_kernel_ia32_sse2_testprog;
/*! Result of ia32 SSE2 test */
-static bool
+static gmx_bool
nb_kernel_ia32_sse2_present;
/*! Result of Altivec test */
-static bool
+static gmx_bool
nb_kernel_ppc_altivec_present;
nb_kernel_x86_64_sse_testprog;
/*! Result of x86_64 SSE test */
-static bool
+static gmx_bool
nb_kernel_x86_64_sse_present;
nb_kernel_x86_64_sse2_testprog;
/*! Result of x86_64 SSE2 test */
-static bool
+static gmx_bool
nb_kernel_x86_64_sse2_present;
void
-gmx_setup_kernels(FILE *fplog,bool bGenericKernelOnly)
+gmx_setup_kernels(FILE *fplog,gmx_bool bGenericKernelOnly)
{
int i;
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;
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;
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;
}
}
-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;
static int search_ff(int thisff[NPP],int ndih,int **ff)
{
int j,k;
- bool bFound=FALSE;
+ gmx_bool bFound=FALSE;
for(j=0; (j<ndih); j++) {
bFound=TRUE;
/***** OUTPUT_ENV MEMBER FUNCTIONS ******/
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)
{
int i;
time[i] *= fact;
}
-bool output_env_get_view(const output_env_t oenv)
+gmx_bool output_env_get_view(const output_env_t oenv)
{
return oenv->view;
}
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);
rvec r,Sr,fij;
real vtot;
const t_oriresdata *od;
- bool bTAV;
+ gmx_bool bTAV;
vtot = 0;
od = &(fcd->orires);
/* 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;
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;
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;
}
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;
#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;
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;
}
/* this one is mostly harmless... */
-static bool bWarnedGuess=FALSE;
+static gmx_bool bWarnedGuess=FALSE;
int guess_ePBC(matrix box)
{
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);
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);
}
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;
int i,j;
rvec dx_start,trial;
real d2min,d2trial;
- bool bRot;
+ gmx_bool bRot;
rvec_sub(x1,x2,dx);
int i,j;
dvec dx_start,trial;
double d2min,d2trial;
- bool bRot;
+ gmx_bool bRot;
dvec_sub(x1,x2,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;
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;
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);
typedef struct gmx_conect_t {
int nconect;
- bool bSorted;
+ gmx_bool bSorted;
gmx_conection_t *conect;
} gmx_conect_t;
/* 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;
}
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];
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;
}
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;
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;
return natom;
}
-bool is_hydrogen(const char *nm)
+gmx_bool is_hydrogen(const char *nm)
{
char buf[30];
return FALSE;
}
-bool is_dummymass(const char *nm)
+gmx_bool is_dummymass(const char *nm)
{
char buf[30];
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;
}
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)
{
}
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;
}
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;
}
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;
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)
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;
* 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
* 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
* 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.
* 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;
********************************************************************/
/*! \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;
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)
}
/*! \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.
* 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;
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;
* 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)
* 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. */
* 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;
* 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)
}
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)
{
* 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;
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 */
}
/*! \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
* 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;
}
/*! \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.
* 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;
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)
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)
{
}
/* 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;
}
/* 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
*/
static void
calculate_mass_charge(t_topology *top, int ngrps, gmx_ana_selection_t *sel[],
- bool bMaskOnly)
+ gmx_bool bMaskOnly)
{
int g, b, i;
* 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;
}
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 */
{
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;
{
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))
* \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;
* 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)
{
* \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)
{
* 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))
* 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)
}
/*! \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.
* \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)
}
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;
}
}
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)
* \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;
* 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
}
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)
{
* 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),
{
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)
* 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;
* 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);
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;
*/
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;
/** 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 {
_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. */
/* 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);
/** 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 *
#undef yytext
#undef yyleng
-static bool
+static gmx_bool
read_stdin_line(gmx_sel_lexer_t *state)
{
char *ptr = state->inputstr;
_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)
}
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)
{
}
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
if (state->nextparam)
{
gmx_ana_selparam_t *param = state->nextparam;
- bool bBoolNo = state->bBoolNo;
+ gmx_bool bBoolNo = state->bBoolNo;
if (state->neom > 0)
{
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)
{
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))
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;
_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);
struct gmx_ana_indexgrps_t *grps;
int nexpsel;
- bool bInteractive;
+ gmx_bool bInteractive;
char *inputstr;
int nalloc_input;
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;
/** 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;
*/
void
gmx_ana_selcollection_set_outpostype(gmx_ana_selcollection_t *sc,
- const char *type, bool bMaskOnly)
+ const char *type, gmx_bool bMaskOnly)
{
if (type)
{
*/
void
gmx_ana_selcollection_set_veloutput(gmx_ana_selcollection_t *sc,
- bool bVelOut)
+ gmx_bool bVelOut)
{
sc->bVelocities = bVelOut;
}
*/
void
gmx_ana_selcollection_set_forceoutput(gmx_ana_selcollection_t *sc,
- bool bForceOut)
+ gmx_bool bForceOut)
{
sc->bForces = bForceOut;
}
* 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;
* 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;
* \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;
/*! \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)
{
* \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),
* \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;
}
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)
* \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;
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 */
/** 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);
/** 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
"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]",
"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]",
*/
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;
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)));
* \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.
* 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;
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;
}
}
* 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 */
* 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)
* 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)
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)
{
size_t i;
int rc;
- bool bOk;
+ gmx_bool bOk;
bOk = TRUE;
for (i = 0; i < asize(smtable_def); ++i)
* 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;
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)
{
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)
{
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
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. */
* \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;
* \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)
{
* \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;
*/
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
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;
{
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)
/** 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. */
*/
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. */
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)
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)
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)
* 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);
}
*/
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;
_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);
typedef struct
{
- bool bFrameTree;
+ gmx_bool bFrameTree;
int nmaxind;
gmx_ana_selcollection_t *sc;
} t_dumpdata;
"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[] = {
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;
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;
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;
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
{
void **aligned=NULL;
void *malloced=NULL;
- bool allocate_fail;
+ gmx_bool allocate_fail;
if (alignment == 0)
{
}
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;
int row,
int col)
{
- bool found = FALSE;
+ gmx_bool found = FALSE;
int i;
real value;
int col,
real difference)
{
- bool found = FALSE;
+ gmx_bool found = FALSE;
int i;
assert(row<A->nrow);
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)));
}
t_border *border;
double tload,tcap;
- bool bSHK;
+ gmx_bool bSHK;
atom_id *shknum,*cgsnum;
natoms = cgs->index[cgs->nr];
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;
*/
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;
* \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)
* 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)
{
*/
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;
* \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);
}
*/
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;
*/
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;
/* 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;
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;
-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;
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 */
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;
};
#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;
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)
{
#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;
return TRUE;
}
-bool get_header(char line[],char *header)
+gmx_bool get_header(char line[],char *header)
{
char temp[STRLEN],*dum;
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.
{
int i;
t_symbuf *symbuf;
- bool bCont;
+ gmx_bool bCont;
if (symtab->symbuf == NULL)
symtab->symbuf=new_symbuf();
/* Globals for trajectory input */
typedef struct {
real t;
- bool bSet;
+ gmx_bool bSet;
} t_timecontrol;
static t_timecontrol timecontrol[TNR] = {
{ 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);
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;
{
void *srcbuf;
#ifdef USE_COLLECTIVE_COPY_BUFFER
- bool decrease_ctr=FALSE;
+ gmx_bool decrease_ctr=FALSE;
#endif
if ( sendsize > recvsize )
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)
{
if (comm1->grp.peers[i] != comm2->grp.peers[i])
{
- bool found=FALSE;
+ gmx_bool found=FALSE;
*result=TMPI_SIMILAR;
for(j=0;j<comm2->grp.N;j++)
int *group)
{
int i,j;
- bool found;
+ gmx_bool found;
/* reset groups */
for(i=0;i<N;i++)
the threads actually suplies
these arrays to the comm
structure) */
- bool i_am_first=FALSE;
+ gmx_bool i_am_first=FALSE;
int myrank=tMPI_Comm_seek_rank(comm, tMPI_Get_current());
struct tmpi_split *spl;
/* Group query & manipulation functions */
-bool tMPI_In_group(tMPI_Group group)
+gmx_bool tMPI_In_group(tMPI_Group group)
{
int i;
struct tmpi_thread *cur;
#ifndef __cplusplus
-typedef int bool;
+typedef int gmx_bool;
#define TRUE 1
#define FALSE 0
#else
size_t bufsize; /* the size of the data to be transmitted */
tMPI_Datatype datatype; /* the data type */
- bool nonblock; /* whether the receiver is non-blocking */
+ gmx_bool nonblock; /* whether the receiver is non-blocking */
/* state, values from enum_envelope_state .
(there's a few busy-waits relying on this flag).
/* prev and next envelopes in the send/recv_envelope_list linked list */
struct envelope *prev,*next;
- bool send; /* whether this is a send envelope (if TRUE), or a receive
+ gmx_bool send; /* whether this is a send envelope (if TRUE), or a receive
envelope (if FALSE) */
#ifdef USE_SEND_RECV_COPY_BUFFER
- bool using_cb; /* whether a copy buffer is (going to be) used */
+ gmx_bool using_cb; /* whether a copy buffer is (going to be) used */
void* cb;/* the allocated copy buffer pointer */
#endif
/* the next and previous envelopes in the request list */
/* the request object for asynchronious operations. */
struct tmpi_req_
{
- bool finished; /* whether it's finished */
+ gmx_bool finished; /* whether it's finished */
struct envelope *ev; /* the envelope */
struct tmpi_thread *source; /* the message source (for receives) */
int tag; /* the tag */
int error; /* error code */
size_t transferred; /* the number of transferred bytes */
- bool cancelled; /* whether the transmission was canceled */
+ gmx_bool cancelled; /* whether the transmission was canceled */
struct tmpi_req_ *next,*prev; /* next,prev request in linked list,
used in the req_list, but also in
size_t *bufsize; /* array of number of bytes to send/recv */
#ifdef USE_COLLECTIVE_COPY_BUFFER
- bool using_cb; /* whether a copy buffer is (going to be) used */
+ gmx_bool using_cb; /* whether a copy buffer is (going to be) used */
tMPI_Atomic_t buf_readcount; /* Number of threads reading from buf
while using_cpbuf is true, but cpbuf
is still NULL. */
and the coll_env_thread is ready for re-use. */
tMPI_Event recv_ev; /* event associated with being a receiving thread. */
- bool *read_data; /* whether we read data from a specific thread. */
+ gmx_bool *read_data; /* whether we read data from a specific thread. */
};
/* Collective communications once sync. These run in parallel with
{
volatile int Ncol_init;
volatile int Ncol_destroy;
- volatile bool can_finish;
+ volatile gmx_bool can_finish;
volatile int *colors;
volatile int *keys;
};
tMPI_Op_fn *op_functions; /* array of op functions for this datatype */
int N_comp; /* number of components */
struct tmpi_datatype_component *comps; /* the components */
- bool committed; /* whether the data type is committed */
+ gmx_bool committed; /* whether the data type is committed */
};
/* just as a shorthand: */
typedef struct tmpi_datatype_ tmpi_dt;
/* check whether we're the main thread */
-bool tMPI_Is_master(void);
+gmx_bool tMPI_Is_master(void);
/* check whether the current process is in a group */
-bool tMPI_In_group(tMPI_Group group);
+gmx_bool tMPI_In_group(tMPI_Group group);
/* find the rank of a thread in a comm */
int tMPI_Comm_seek_rank(tMPI_Comm comm, struct tmpi_thread *th);
/* check for the completion of a single request */
-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);
/* check and wait for the completion of a single request */
static void tMPI_Wait_single(struct tmpi_thread *cur, struct tmpi_req_ *rq);
/* check for the completion of a NULL-delimited doubly linked list of
requests */
-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);
}
-static bool tMPI_Envelope_matches(const struct envelope *sev,
+static gmx_bool tMPI_Envelope_matches(const struct envelope *sev,
const struct envelope *rev)
{
#ifdef TMPI_DEBUG
static struct envelope* tMPI_Prep_send_envelope(struct send_envelope_list *evl,
tMPI_Comm comm, struct tmpi_thread *src,
struct tmpi_thread *dest, void *buf, int count,
- tMPI_Datatype datatype, int tag, bool nonblock)
+ tMPI_Datatype datatype, int tag, gmx_bool nonblock)
{
/* get an envelope from the send-envelope stack */
struct envelope *ev=tMPI_Send_env_list_fetch_new( evl );
static struct envelope* tMPI_Prep_recv_envelope(struct tmpi_thread *cur,
tMPI_Comm comm, struct tmpi_thread *src,
struct tmpi_thread *dest, void *buf, int count,
- tMPI_Datatype datatype, int tag, bool nonblock)
+ tMPI_Datatype datatype, int tag, gmx_bool nonblock)
{
/* get an envelope from the stack */
struct envelope *ev=tMPI_Free_env_list_fetch_recv( &(cur->envelopes) );
#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",
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;
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;
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;
} 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;
while(creq)
{
- bool finished=tMPI_Test_single(cur, creq);
+ gmx_bool finished=tMPI_Test_single(cur, creq);
i++;
/* now do the check */
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;
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 */
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 */
/* 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;
/* 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**));
}
#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)
/* 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)
}
-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**))
{
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;j<lt->N_comp;j++)
{
if ( (lt->comps[j].type != dt->comps[j].type) ||
}
if (dt != *datatype)
{
- bool found=FALSE;
+ gmx_bool found=FALSE;
/* we remove the old one from the list */
for(i=0;i<tmpi_global->N_usertypes;i++)
{
#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)
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,
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;
t_atom *atom;
t_ilist *il;
t_iatom *ia;
- bool bPert;
+ gmx_bool bPert;
ffparams = &mtop->ffparams;
t_iparams *iparams;
t_ilist *ilist;
t_iatom *iatoms;
- bool bPert;
+ gmx_bool bPert;
t_iatom *iabuf;
int iabuf_nalloc;
/* 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) {
* 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);
}
}
-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;
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)
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.
*/
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);
}
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);
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)
/* 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);
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);
}
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)
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);
}
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);
}
}
-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; (j<F_NRE); j++) {
}
static void do_idef(t_fileio *fio, gmx_ffparams_t *ffparams,gmx_moltype_t *molt,
- bool bRead, int file_version)
+ gmx_bool bRead, int file_version)
{
do_ffparams(fio, ffparams,bRead,file_version);
do_ilists(fio, molt->ilist,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; i<MAXNODES; i++)
}
}
-static void do_blocka(t_fileio *fio, t_blocka *block,bool bRead,
+static void do_blocka(t_fileio *fio, t_blocka *block,gmx_bool bRead,
int file_version)
{
int i,idum;
- bool bDum=TRUE;
+ gmx_bool bDum=TRUE;
if (file_version < 44)
for(i=0; i<MAXNODES; i++)
bDum=gmx_fio_ndo_int(fio,block->a,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;
}
}
-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;
}
}
-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;
}
}
-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;
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;
}
}
-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)
{
}
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);
}
}
-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);
}
}
-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;
}
}
-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;
}
}
-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)
{
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;
{
t_ilist *il;
int am,i,mol,a;
- bool bFE;
+ gmx_bool bFE;
gmx_molblock_t *molb;
t_iparams *ip;
}
}
-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;
*
* 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;
}
}
-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;
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);
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;
return ePBC;
}
-bool fn2bTPX(const char *file)
+gmx_bool fn2bTPX(const char *file)
{
switch (fn2ftp(file)) {
case efTPR:
}
}
-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;
*/
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)
{
*/
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)
{
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;
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;
*/
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)
{
*/
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)
{
*/
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)
{
*/
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);
*/
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);
/** Stored position vector. */
rvec x;
/** TRUE if there is something stored. */
- bool bPres;
+ gmx_bool bPres;
} gmx_ana_displpos_t;
/*! \internal \brief
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. */
* \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;
*/
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;
*/
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;
*/
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;
*/
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;
* \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;
* \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)
* 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;
* 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)
* \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;
* \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;
* 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;
*/
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;
*
* 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;
*
* 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;
* 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)
{
* \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)
{
*/
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)
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. */
* \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;
* \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;
/*! \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)
/*! \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;
*
* 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;
/*! \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;
* \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);
* \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]);
* \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);
* \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)
{
* \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))
/** 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
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.
*
* 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;
* \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. */
* \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
* \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)
{
* \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)
* \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)
{
*/
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;
/** 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. */
};
/** 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);
* \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;
* \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;
* \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;
{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)"},
* 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];
* 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;
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)
{
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;
}
}
-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);
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) {
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))
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);
}
}
-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);
eFileFormat eFF;
int NATOMS;
double DT,BOX[3];
- bool bReadBox;
+ gmx_bool bReadBox;
};
static void initcount(t_trxstatus *status)
}
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);
-void clear_trxframe(t_trxframe *fr,bool bFirst)
+void clear_trxframe(t_trxframe *fr,gmx_bool bFirst)
{
fr->not_ok = 0;
fr->bTitle = FALSE;
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;
}
}
-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;
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)
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;
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;
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);
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;*/
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;
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;
}
}
-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;
}
}
-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;
}
}
-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;
}
}
-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;
}
}
-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;
}
static void pr_grp_opts(FILE *out,int indent,const char *title,t_grpopts *opts,
- bool bMDPformat)
+ gmx_bool bMDPformat)
{
int i,m,j;
}
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,
}
static void pr_cosine(FILE *fp,int indent,const char *title,t_cosines *cos,
- bool bMDPformat)
+ gmx_bool bMDPformat)
{
int j;
}
void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
- bool bMDPformat)
+ gmx_bool bMDPformat)
{
const char *infbuf="inf";
int i;
}
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;
}
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;
void pr_ffparams(FILE *fp,int indent,const char *title,
gmx_ffparams_t *ffparams,
- bool bShowNumbers)
+ gmx_bool bShowNumbers)
{
int i,j;
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;
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;
}
}
-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;
}
}
-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;
}
}
-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;
}
}
-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;
}
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;
}
}
-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;
}
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;
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;
}
void pr_atoms(FILE *fp,int indent,const char *title,t_atoms *atoms,
- bool bShownumbers)
+ gmx_bool bShownumbers)
{
if (available(fp,atoms,indent,title))
{
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))
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;
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);
}
void pr_mtop(FILE *fp,int indent,const char *title,gmx_mtop_t *mtop,
- bool bShowNumbers)
+ gmx_bool bShowNumbers)
{
int mt,mb;
}
}
-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);
-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);
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;
}
}
-void done_mtop(gmx_mtop_t *mtop,bool bDoneSymtab)
+void done_mtop(gmx_mtop_t *mtop,gmx_bool bDoneSymtab)
{
int i;
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;
}
}
-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;
ri->chainid = chainid;
}
-void free_t_atoms(t_atoms *atoms,bool bFreeNames)
+void free_t_atoms(t_atoms *atoms,gmx_bool bFreeNames)
{
int i;
}
/*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;
#include "warninp.h"
typedef struct warninp {
- bool bAllowWarnings;
+ gmx_bool bAllowWarnings;
int nwarn_note;
int nwarn_warn;
int nwarn_error;
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;
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" };
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;
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;
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;
}
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];
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;
int nbug,const char **bugs,
t_linkdata *links)
{
- bool bHidden;
+ gmx_bool bHidden;
const char *cls = program;
char *tmp;
int i,j;
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:
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;
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");
#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;
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)
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, "
}
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;
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
{
int magic_number = XTC_MAGIC;
XDR *xd;
- bool bDum;
+ gmx_bool bDum;
int bOK;
xd = gmx_fio_getxdr(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;
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;
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;
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;
}
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;
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;
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;
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];
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);
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 */
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;
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;
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;
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;
}
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)
{
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];
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,
return n;
}
-bool fflib_fexist(const char *file)
+gmx_bool fflib_fexist(const char *file)
{
char *file_fullpath;
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.
* 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);
int nidx,natoms,natoms_out;
matrix box;
int i,frame,resind;
- bool bReadMultiple;
+ gmx_bool bReadMultiple;
output_env_t oenv;
t_filenm fnm[] = {
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;
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;
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;
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;
}
}
-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];
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;
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];
#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[] = {
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];
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];
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];
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];
warninp_t wi;
t_inpfile *inp;
int i,j,ninp,nQ,nLJ,nBU,nIP;
- bool bWrong;
+ gmx_bool bWrong;
wi = init_warning(FALSE,0);
#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)
{
}
-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;
-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)))
}
-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) {
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;
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);
}
}
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);
}
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;
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');
}
}
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;
}
}
-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;
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
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
*/
* and -1 if not found.
*/
int i,res;
- bool found=FALSE;
+ gmx_bool found=FALSE;
for(i=0;i<nvsiteconf && !found;i++) {
found=(!gmx_strcasecmp(vsiteconflist[i].atomtype,atomtype) && (vsiteconflist[i].nhydrogens==2));
}
{
/* Return the dummy mass name if found, or NULL if not set in ddb database */
int i;
- bool found=FALSE;
+ gmx_bool found=FALSE;
for(i=0;i<nvsiteconf && !found;i++) {
found=(!gmx_strcasecmp(vsiteconflist[i].atomtype,atom) &&
!gmx_strcasecmp(vsiteconflist[i].nextheavytype,nextheavy));
gmx_residuetype_t rt)
{
int type;
- bool bNterm;
+ gmx_bool bNterm;
int j;
t_restp *rtpp;
gmx_residuetype_t rt)
{
real mass;
- bool bNterm;
+ gmx_bool bNterm;
int j;
t_restp *rtpp;
int nrheavies, int heavies[])
{
int i,j,ftype,other,moreheavy,bb;
- bool bSwapParity;
+ gmx_bool bSwapParity;
for(i=0; i<nrHatoms; i++) {
ftype=vsite_type[Hatoms[i]];
static int gen_vsites_6ring(t_atoms *at, int *vsite_type[], t_params plist[],
int nrfound, int *ats, real bond_cc, real bond_ch,
- real xcom, real ycom, bool bDoZ)
+ real xcom, real ycom, gmx_bool bDoZ)
{
/* these MUST correspond to the atnms array in do_vsite_aromatics! */
enum { atCG, atCD1, atHD1, atCD2, atHD2, atCE1, atHE1, atCE2, atHE2,
return nvsite;
}
-static bool is_vsite(int vsite_type)
+static gmx_bool is_vsite(int vsite_type)
{
if (vsite_type == NOTSET)
return FALSE;
void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
t_atoms *at, t_symtab *symtab, rvec *x[],
t_params plist[], int *vsite_type[], int *cgnr[],
- real mHmult, bool bVsiteAromatics,
+ real mHmult, gmx_bool bVsiteAromatics,
const char *ffdir)
{
#define MAXATOMSPERRESIDUE 16
int ai,aj,ak,al;
int nrfound=0,needed,nrbonds,nrHatoms,Heavy,nrheavies,tpM,tpHeavy;
int Hatoms[4],heavies[4],bb;
- bool bWARNING,bAddVsiteParam,bFirstWater;
+ gmx_bool bWARNING,bAddVsiteParam,bFirstWater;
matrix tmpmat;
- bool *bResProcessed;
+ gmx_bool *bResProcessed;
real mHtot,mtot,fact,fact2;
rvec rpar,rperp,temp;
char name[10],tpname[32],nexttpname[32],*ch;
int ndb,f;
char **db;
int nvsiteconf,nvsitetop,cmplength;
- bool isN,planarN,bFound;
+ gmx_bool isN,planarN,bFound;
gmx_residuetype_t rt;
t_vsiteconf *vsiteconflist;
const char *resnmsN[resNR] = { "NPHE", "NTRP", "NTYR", "NHIS" };
const char *resnmsC[resNR] = { "CPHE", "CTRP", "CTYR", "CHIS" };
/* HIS can be known as HISH, HIS1, HISA, HID, HIE, HIP, etc. too */
- bool bPartial[resNR] = { FALSE, FALSE, FALSE, TRUE };
+ gmx_bool bPartial[resNR] = { FALSE, FALSE, FALSE, TRUE };
/* the atnms for every residue MUST correspond to the enums in the
gen_vsites_* (one for each residue) routines! */
/* also the atom names in atnms MUST be in the same order as in the .rtp! */
( (nrHatoms == 3) && (nrbonds == 4) ) ) {
/* CH3, NH3 or non-planar NH2 group */
int Hat_vsite_type[3] = { F_VSITE3, F_VSITE3OUT, F_VSITE3OUT };
- bool Hat_SwapParity[3] = { FALSE, TRUE, FALSE };
+ gmx_bool Hat_SwapParity[3] = { FALSE, TRUE, FALSE };
if (debug) fprintf(stderr,"-XH3 or nonplanar NH2 group at %d\n",i+1);
bAddVsiteParam=FALSE; /* we'll do this ourselves! */
}
void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult,
- bool bDeuterate)
+ gmx_bool bDeuterate)
{
int i,j,a;
extern void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
t_atoms *at, t_symtab *symtab, rvec *x[],
t_params plist[], int *dummy_type[], int *cgnr[],
- real mHmult, bool bVSiteAromatics,
+ real mHmult, gmx_bool bVSiteAromatics,
const char *ffdir);
extern void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult,
- bool bDeuterate);
+ gmx_bool bDeuterate);
#endif /* _gen_vsite_h */
}
}
-bool print_ga(FILE *fp,t_genalg *ga,real msf,tensor pres,rvec scale,
+gmx_bool print_ga(FILE *fp,t_genalg *ga,real msf,tensor pres,rvec scale,
real energy,t_range range[],real tol)
{
static int nfeval=0; /* number of function evaluations */
- static bool bImproved;
+ static gmx_bool bImproved;
real trial_cost;
real cvar; /* computes the cost variance */
real cmean; /* mean cost */
extern void update_ga(FILE *fpout_ptr,t_range range[],t_genalg *ga);
-extern bool print_ga(FILE *fp,t_genalg *ga,real msf,tensor pres,rvec scale,
+extern gmx_bool print_ga(FILE *fp,t_genalg *ga,real msf,tensor pres,rvec scale,
real energy,t_range range[],real tol);
extern real cost(tensor P,real MSF,real energy);
}
static atom_id pdbasearch_atom(const char *name,int resind,t_atoms *pdba,
- const char *searchtype,bool bAllowMissing)
+ const char *searchtype,gmx_bool bAllowMissing)
{
int i;
return;
}
-void dump_ab(FILE *out,int natom,int nab[], t_hack *ab[], bool bHeader)
+void dump_ab(FILE *out,int natom,int nab[], t_hack *ab[], gmx_bool bHeader)
{
int i,j;
}
static void expand_hackblocks_one(t_hackblock *hbr, char *atomname,
- int *nabi, t_hack **abi, bool bN, bool bC)
+ int *nabi, t_hack **abi, gmx_bool bN, gmx_bool bC)
{
int j, k, l, d;
- bool bIgnore;
+ gmx_bool bIgnore;
/* we'll recursively add atoms to atoms */
for(j=0; j < hbr->nhack; j++) {
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;
}
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;
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;
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;
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;
{
#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;
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.
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;
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;
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];
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},
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;
rvec *x,*v,*f;
matrix box;
t_trnheader trn;
- bool bOK;
+ gmx_bool bOK;
fpread = open_trn(fn,"r");
fpwrite = open_tpx(NULL,"w");
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;
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);
close_xtc(xd);
}
-void list_trx(const char *fn,bool bXVG)
+void list_trx(const char *fn,gmx_bool bXVG)
{
int ftp;
{
int ndr;
ener_file_t in;
- bool bCont;
+ gmx_bool bCont;
gmx_enxnm_t *enm=NULL;
t_enxframe *fr;
int i,j,nre,b;
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)" },
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);
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;
}
}
-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;
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;
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;
}
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)
}
}
-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;
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];
#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[] = {
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; i<MAXATOMLIST; i++)
return bRet;
}
-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)
{
int i, j;
- bool bBondsRemoved;
+ gmx_bool bBondsRemoved;
bBondsRemoved = FALSE;
for(i=0; i < ebtsNR; i++) {
return -1;
}
-static bool hbond(rvec x[],int i,int j,real distance)
+static gmx_bool hbond(rvec x[],int i,int j,real distance)
{
real tol = distance*distance;
rvec tmp;
}
static void chk_allhb(t_atoms *pdba,rvec x[],t_blocka *hb,
- bool donor[],bool accept[],real dist)
+ gmx_bool donor[],gmx_bool accept[],real dist)
{
int i,j,k,ii,natom;
}
}
-static bool chk_hbonds(int i,t_atoms *pdba, rvec x[],
- bool ad[],bool hbond[],rvec xh,
+static gmx_bool chk_hbonds(int i,t_atoms *pdba, rvec x[],
+ gmx_bool ad[],gmx_bool hbond[],rvec xh,
real angle,real dist)
{
- bool bHB;
+ gmx_bool bHB;
int j,aj,ri,natom;
real d2,dist2,a;
rvec nh,oh;
};
#define NPD asize(prot_don)
- bool *donor,*acceptor;
- bool *hbond,bHaveH=FALSE;
- bool bHDd,bHEd;
+ gmx_bool *donor,*acceptor;
+ gmx_bool *hbond,bHaveH=FALSE;
+ gmx_bool bHDd,bHEd;
rvec xh1,xh2;
int natom;
int i,nd,na,aj,hisind,his0,type=-1;
{
#define NINTP 450
#define prev (1-cur)
- static bool bFirst = TRUE;
+ static gmx_bool bFirst = TRUE;
static real **intp;
static int i,j,cur=1;
real rrr,dx;
return sigma;
}
-bool khole_decay(FILE *fp,t_cross_atom *ca,rvec x[],rvec v[],int ion,
+gmx_bool khole_decay(FILE *fp,t_cross_atom *ca,rvec x[],rvec v[],int ion,
int *seed,real dt)
{
rvec dv;
{
static FILE *xvg,*ion;
static const char *const_leg[] = { "Probability", "Primary Ionization", "Integral over PI", "KHole-Decay", "Integral over KD" };
- static bool bFirst = TRUE;
+ static gmx_bool bFirst = TRUE;
static real t0,imax,width,rho,nphot;
static real interval;
static int dq_tot,nkd_tot,mode,ephot;
real pt,ptot,pphot,pcoll[ecollNR],tmax;
real hboxx,hboxy,rho2;
rvec dv,ddv;
- bool bIonize=FALSE,bKHole,bL,bDOIT;
+ gmx_bool bIonize=FALSE,bKHole,bL,bDOIT;
int i,k,kk,m,nK,nL,dq,nkh,nkdecay;
int *nionize,*nkhole,*ndecay,nbuf[2];
char **leg;
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 */
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);
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 */
{
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;
/* 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;
}
}
-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.
real relerr,err,xmin;
char buf[256];
int i;
- bool incycle;
+ gmx_bool incycle;
if (bFirstIterate)
{
}
typedef struct {
- bool bGStatEveryStep;
+ gmx_bool bGStatEveryStep;
gmx_large_int_t step_ns;
gmx_large_int_t step_nscheck;
gmx_large_int_t nns;
}
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;
}
}
-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;
}
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);
}
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,
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;
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;
/* Output stuff */
if (MASTER(cr))
{
- bool do_dr,do_or;
+ gmx_bool do_dr,do_or;
if (!(bStartingFromCpt && (EI_VV(ir->eI))))
{
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);
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,
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;
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;
#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,
#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;
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 = "";
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";
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;
*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;
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;
{ 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" },
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;
* https://simtk.org/project/xml/downloads.xml?group_id=161#package_id600
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <types/simple.h>
#include <cmath>
#include <set>
#include <iostream>
* \param[out] t Destination variable to convert to.
*/
template <class T>
-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();
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);
}
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. */
};
{
char warn_buf[STRLEN];
- static bool hasLoadedPlugins = false;
+ static gmx_bool hasLoadedPlugins = false;
string usedPluginDir;
int devId;
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)
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
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){}
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;
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);
}
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;
}
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;
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)
{
}
}
-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;
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;
}
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)
{
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;
char chainnum;
int start;
int natom;
- bool bAllWat;
+ gmx_bool bAllWat;
int nterpairs;
int *chainstart;
} t_pdbchain;
typedef struct {
char chainid;
int chainnum;
- bool bAllWat;
+ gmx_bool bAllWat;
int nterpairs;
int *chainstart;
t_hackblock **ntdb;
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;
/* 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 };
{
int j,k,nmiss;
char *name;
- bool bFound, bRet;
+ gmx_bool bFound, bRet;
nmiss = 0;
for (j=0; j<rp->natom; j++)
return nmiss;
}
-bool is_int(double x)
+gmx_bool is_int(double x)
{
const double tol = 1e-4;
int ix;
{
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;
}
void print_top_comment(FILE *out,const char *filename,
- const char *generator,bool bITP)
+ const char *generator,gmx_bool bITP)
{
char tmp[256];
}
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);
}
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! */
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;
}
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;
}
}
-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] == '+');
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;
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;
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);
}
}
-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)
}
}
-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;
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;
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;
int anmnr;
char *start_at,buf[STRLEN];
int start_nr;
- bool bFoundInAdd;
+ gmx_bool bFoundInAdd;
for(i=0; i<pdba->nr; i++)
{
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;
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) {
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);
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,
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)
{
}
}
-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);
}
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)
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];
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.
int nelem,i,j,k,nr;
char *names[EGP_MAX];
char ***gnames;
- bool bSet;
+ gmx_bool bSet;
gnames = groups->grpname;
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)
{
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];
}
}
-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;
{
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;
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;
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;
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 */
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);
/* 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 */
/* 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.
*/
}
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;
}
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;
}
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;
real temp;
int type;
real *q;
- bool bNPT;
+ gmx_bool bNPT;
real *pres;
int *ind;
int nst;
struct gmx_repl_ex *re,int ere,real q)
{
real *qall;
- bool bDiff;
+ gmx_bool bDiff;
int s;
snew(qall,ms->nsim);
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;
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);
}
}
-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;
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
}
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,
}
}
-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;
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;
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);
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;
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]);
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;
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,
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,
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;
#include "pdb2top.h"
#include "vec.h"
-bool yesno(void)
+gmx_bool yesno(void)
{
char c;
}
}
-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;
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;
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",
*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;
#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
#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;
t_restp * restp;
int i,j,n,len,none_idx;
- bool found;
+ gmx_bool found;
char *rtpname_match,*s,*s2,*c;
t_hackblock **list;
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);
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;
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;
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;
break;
case d_molecules: {
int whichmol;
- bool bCouple;
+ gmx_bool bCouple;
push_mol(nmol,*molinfo,pline,&whichmol,&nrcopies,wi);
mi0=&((*molinfo)[whichmol]);
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,
t_inputrec *ir,
int *nmolblock,
gmx_molblock_t **molblock,
- bool bGenborn,
+ gmx_bool bGenborn,
warninp_t wi)
{
/* Tmpfile might contain a long path */
qmexcl;
t_block2
qmexcl2;
- bool
+ gmx_bool
*bQMMM,*blink,bexcl;
/* First we search and select the QM atoms in an qm_arr array that
unsigned char *grpnr;
int mb,mol,nat_mol,i;
gmx_molblock_t *molb;
- bool bQMMM;
+ gmx_bool bQMMM;
grpnr = sys->groups.grpnr[egcQMMM];
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,
t_inputrec *ir,
int *nmolblock,
gmx_molblock_t **molblock,
- bool bGB,
+ gmx_bool bGB,
warninp_t wi);
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);
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];
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.
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) {
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 */
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);
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;
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;
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]= {
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];
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]=
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);
int n,ntype,i,j,k;
t_atom *atom;
t_blocka *excl;
- bool bExcl;
+ gmx_bool bExcl;
t_param param;
n = mol->atoms.nr;
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) {
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[],
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.
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) {
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.
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]);
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;
}
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;
}
}
-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;
}
}
-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 );
}
t_iparams ip1,t_iparams ip2,real ftol,real abstol)
{
int i;
- bool bDiff;
+ gmx_bool bDiff;
bDiff=FALSE;
for(i=0; i<MAXFORCEPARAM && !bDiff; i++)
void cmp_iparm_AB(FILE *fp,const char *s,t_functype ft,t_iparams ip1,real ftol,real abstol)
{
int nrfpA,nrfpB,p0,i;
- bool bDiff;
+ gmx_bool bDiff;
/* Normally the first parameter is perturbable */
p0 = 0;
}
static void cmp_rvecs(FILE *fp,const char *title,int n,rvec x1[],rvec x2[],
- bool bRMSD,real ftol,real abstol)
+ gmx_bool bRMSD,real ftol,real abstol)
{
int i,m;
double d,ssd;
}
static void comp_state(t_state *st1, t_state *st2,
- bool bRMSD,real ftol,real abstol)
+ gmx_bool bRMSD,real ftol,real abstol)
{
int i,j,nc;
}
void comp_tpx(const char *fn1,const char *fn2,
- bool bRMSD,real ftol,real abstol)
+ gmx_bool bRMSD,real ftol,real abstol)
{
const char *ff[2];
t_tpxheader sh[2];
}
void comp_frame(FILE *fp, t_trxframe *fr1, t_trxframe *fr2,
- bool bRMSD, real ftol,real abstol)
+ gmx_bool bRMSD, real ftol,real abstol)
{
fprintf(fp,"\n");
cmp_int(fp,"flags",-1,fr1->flags,fr2->flags);
}
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;
}
}
-static bool enernm_equal(const char *nm1,const char *nm2)
+static gmx_bool enernm_equal(const char *nm1,const char *nm2)
{
int len1,len2;
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);
#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
#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);
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;
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;
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);
gmx_mtop_t *mtop,rvec x[],rvec v[])
{
t_topology top;
- bool *bKeep;
+ gmx_bool *bKeep;
atom_id *invindex;
int i;
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;
/* 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)" },
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;
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;
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 )
* 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*) */
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)
{
* 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);
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)
{
* l = 3d bonded heavy atom |
*/
- bool bSwapParity,bError;
+ gmx_bool bSwapParity,bError;
real bij,aijk;
bSwapParity = ( param->C1 == -1 );
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)
* 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,
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)
{
* 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;
}
-static bool
+static gmx_bool
calc_vsite4fdn_param(t_param *param,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
* 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;
-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;
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;
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)
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]);
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]);
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;
#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 */
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;
int nf;
char **f;
char c,*rnm,atombuf[32],*ptr0,*ptr1;
- bool bReorderedNum,bRenamed,bMatch;
+ gmx_bool bReorderedNum,bRenamed,bMatch;
nxlate = 0;
xlatom = NULL;
*/
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
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;
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;
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;
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;
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[],
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. */
}
}
-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) {
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,",
}
}
-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;
}
}
-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];
}
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;
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;
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;
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)
{
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;
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;
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;
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;
}
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;
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;
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;
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,
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)
real ncons_loc,p_ssd,p_max;
t_pbc pbc,*pbc_null;
rvec dx;
- bool bOK;
+ gmx_bool bOK;
bOK = TRUE;
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;
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,
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;
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);
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;
}
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)
int ncon1;
t_iatom *ia1,*ia2;
int c,con,a1;
- bool bUse;
+ gmx_bool bUse;
t_iatom *ia;
real len,rn0,rn1;
}
-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; mb<mtop->nmolblock && !bInterCG; mb++) {
/* 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 */
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;
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
double *scalefac,dtc;
int *trotter_seq;
rvec sumv,consk;
- bool bCouple;
+ gmx_bool bCouple;
if (trotter_seqno <= ettTSEQ2)
{
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;
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.
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)
{
/* ***************************************************************** */
/* ** */
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;
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 */
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 */
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 */
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;
/* 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;
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;
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));
}
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;
rvec *buf,*sbuf;
ivec vis;
int is;
- bool bPBC,bScrew;
+ gmx_bool bPBC,bScrew;
comm = dd->comm;
rvec dh;
real dist_d,c=0,det;
gmx_domdec_comm_t *comm;
- bool bPBC,bUse;
+ gmx_bool bPBC,bUse;
comm = dd->comm;
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))
{
}
}
-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)
}
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;
}
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;
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]];
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;
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;
}
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;
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;
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;
ivec ind;
real nrcg,inv_ncg,pos_d;
atom_id *cgindex;
- bool bUnbounded,bScrew;
+ gmx_bool bUnbounded,bScrew;
ma = dd->ma;
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;
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;
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;
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)
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;
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;
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)
{
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;
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;
}
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;
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;
}
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;
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)
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);
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;
{
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;
}
}
-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]; i<link->index[cg_gl+1]; i++)
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];
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,
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;
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];
}
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)
{
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))
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;
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--)
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;
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)
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)
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)
{
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);
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;
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;
} 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 */
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) &&
int nprint;
t_ilist *il;
t_iatom *ia;
- bool bFound;
+ gmx_bool bFound;
nril_mol = ril->index[nat_mol];
snew(assigned,nmol*nril_mol);
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; ftype<F_NRE; ftype++)
static int make_reverse_ilist(gmx_moltype_t *molt,
int **vsite_pbc,
- bool bConstr,bool bBCheck,
- bool bLinkToAllAtoms,
+ gmx_bool bConstr,gmx_bool bBCheck,
+ gmx_bool bLinkToAllAtoms,
gmx_reverse_ilist_t *ril_mt)
{
int nat_mt,*count,i,nint_mt;
sfree(ril->il);
}
-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;
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;
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)
{
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)
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;
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)
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;
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]; k<link->index[cg_gl+1]; k++)
}
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)
{
static int have_vsite_molt(gmx_moltype_t *molt)
{
int i;
- bool bVSite;
+ gmx_bool bVSite;
bVSite = FALSE;
for(i=0; i<F_NRE; i++)
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)
{
- bool bExclRequired;
+ gmx_bool bExclRequired;
int mb,cg_offset,at_offset,*at2cg,mol;
t_graph graph;
gmx_vsite_t *vsite;
return index;
}
-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)
{
int i,m;
double e,sum,sigma,invmm,diff;
}
}
-void ebin_increase_count(t_ebin *eb,bool bSum)
+void ebin_increase_count(t_ebin *eb,gmx_bool bSum)
{
eb->nsteps++;
eb->nsteps_sim++;
}
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;
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;
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 */
/* 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 */
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 */
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;
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 */
};
real max_d;
struct t_do_edfit *loc;
- bool bFirst;
+ gmx_bool bFirst;
if(edi->buf->do_edfit != NULL)
bFirst = FALSE;
{
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",
/* 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;
}
-static int read_edint(FILE *file,bool *bEOF)
+static int read_edint(FILE *file,gmx_bool *bEOF)
{
char line[STRLEN+1];
int idum;
}
-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;
/* 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;
{
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. */
int i,j;
real rad=0.0, ratio=0.0;
struct t_do_radcon *loc;
- bool bFirst;
+ gmx_bool bFirst;
rvec vec_dum;
}
/* 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)
{
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 */
-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[],
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)
{
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;
gmx_localtop_t *top,
gmx_genborn_t *born,
t_atomtypes *atype,
- bool bBornRadii,
+ gmx_bool bBornRadii,
matrix box,
real lambda,
t_graph *graph,
{
int i,status;
int donb_flags;
- bool bDoEpot,bSepDVDL,bSB;
+ gmx_bool bDoEpot,bSepDVDL,bSB;
int pme_flags;
matrix boxs;
rvec box_size;
}
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
}
#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;
}
#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;
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.
}
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;
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);
#endif
double csix,ctwelve;
int ntp,*typecount;
- bool bBHAM;
+ gmx_bool bBHAM;
real *nbfp;
ntp = fr->ntype;
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 =
(
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;
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;
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;
}
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;
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;
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;
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;
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;
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;
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;
}
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;
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;
/* 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 */
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 */
int i,npd;
t_xmlrec *xml;
const char *db="qhops.dat";
- bool fna=FALSE;
+ gmx_bool fna=FALSE;
xmlDoValidityCheckingDefaultValue = 0;
if (NULL == fn)
{
wallcc_t *wcc;
/* variables for testing/debugging */
- bool wc_barrier;
+ gmx_bool wc_barrier;
wallcc_t *wcc_all;
int wc_depth;
int ewc_prev;
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();
}
}
}
-static bool subdivision(int ewc)
+static gmx_bool subdivision(int ewc)
{
return (ewc >= ewcPME_REDISTXF && ewc <= ewcPME_SOLVE);
}
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 */
* 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);
#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;
#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;
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);
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,
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
"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)
{
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. */
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 */
};
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)
{
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];
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,
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,
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;
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,
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;
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,
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;
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,
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;
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,
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;
#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)
{
}
-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)
{
{ e[j] = e[j] | (1<<i); }
static void RMEXCL_(t_excl e[],atom_id i,atom_id j)
{ e[j]=e[j] & ~(1<<i); }
-static bool ISEXCL_(t_excl e[],atom_id i,atom_id j)
-{ return (bool)(e[j] & (1<<i)); }
-static bool NOTEXCL_(t_excl e[],atom_id i,atom_id j)
+static gmx_bool ISEXCL_(t_excl e[],atom_id i,atom_id j)
+{ return (gmx_bool)(e[j] & (1<<i)); }
+static gmx_bool NOTEXCL_(t_excl e[],atom_id i,atom_id j)
{ return !(ISEXCL(e,i,j)); }
#else
#define SETEXCL(e,i,j) (e)[((atom_id) (j))] |= (1<<((atom_id) (i)))
#define RMEXCL(e,i,j) (e)[((atom_id) (j))] &= (~(1<<((atom_id) (i))))
-#define ISEXCL(e,i,j) (bool) ((e)[((atom_id) (j))] & (1<<((atom_id) (i))))
+#define ISEXCL(e,i,j) (gmx_bool) ((e)[((atom_id) (j))] & (1<<((atom_id) (i))))
#define NOTEXCL(e,i,j) !(ISEXCL(e,i,j))
#endif
* can set an innerloop index here. The obvious choice for this would have
* been the vdwtype/coultype values in the forcerecord, but unfortunately
* those types are braindead - for instance both Buckingham and normal
- * Lennard-Jones use the same value (evdwCUT), and a separate boolean variable
+ * Lennard-Jones use the same value (evdwCUT), and a separate gmx_boolean variable
* to determine which interaction is used. There is further no special value
* for 'no interaction'. For backward compatibility with old TPR files we won't
* change this in the 3.x series, so when calling this routine you should use:
static void init_nblist(t_nblist *nl_sr,t_nblist *nl_lr,
int maxsr,int maxlr,
int ivdw, int icoul,
- bool bfree, int enlist)
+ gmx_bool bfree, int enlist)
{
t_nblist *nl;
int homenr;
}
}
-static void reset_neighbor_list(t_forcerec *fr,bool bLR,int nls,int eNL)
+static void reset_neighbor_list(t_forcerec *fr,gmx_bool bLR,int nls,int eNL)
{
int n,i;
static inline void new_i_nblist(t_nblist *nlist,
- bool bLR,atom_id i_atom,int shift,int gid)
+ gmx_bool bLR,atom_id i_atom,int shift,int gid)
{
int i,k,nri,nshift;
}
}
-static inline void close_neighbor_list(t_forcerec *fr,bool bLR,int nls,int eNL,
- bool bMakeQMMMnblist)
+static inline void close_neighbor_list(t_forcerec *fr,gmx_bool bLR,int nls,int eNL,
+ gmx_bool bMakeQMMMnblist)
{
int n,i;
}
}
-static inline void add_j_to_nblist(t_nblist *nlist,atom_id j_atom,bool bLR)
+static inline void add_j_to_nblist(t_nblist *nlist,atom_id j_atom,gmx_bool bLR)
{
int nrj=nlist->nrj;
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;
}
typedef void
-put_in_list_t(bool bHaveVdW[],
+put_in_list_t(gmx_bool bHaveVdW[],
int ngid,
t_mdatoms * md,
int icg,
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,
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].
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;
}
static void
-put_in_list_qmmm(bool bHaveVdW[],
+put_in_list_qmmm(gmx_bool bHaveVdW[],
int ngid,
t_mdatoms * md,
int icg,
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];
}
static void
-put_in_list_cg(bool bHaveVdW[],
+put_in_list_cg(gmx_bool bHaveVdW[],
int ngid,
t_mdatoms * md,
int icg,
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;
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;
}
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)
{
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)
{
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)
{
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;
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);
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;
}
}
-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)
{
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;
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;
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;
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;
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;
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)
{
add_to_vsitelist(int **list, int *nitem, int *nalloc,int newitem)
{
int i,idx;
- bool found;
+ gmx_bool found;
found = FALSE;
idx = *nitem;
}
}
-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;
#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;
{
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;
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;
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;
real * work_m2inv;
/* Work data for PME_redist */
- bool redist_init;
+ gmx_bool redist_init;
int * scounts;
int * rcounts;
int * sdispls;
}
}
-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 */
}
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)
{
}
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;
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;
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 */
void gather_f_bsplines(gmx_pme_t pme,real *grid,
- bool bClearF,pme_atomcomm_t *atc,real scale)
+ gmx_bool bClearF,pme_atomcomm_t *atc,real scale)
{
/* sum forces for local particles */
int nn,n,ithx,ithy,ithz,i0,j0,k0;
void make_bsplines(splinevec theta,splinevec dtheta,int order,
rvec fractx[],int nr,real charge[],
- bool bFreeEnergy)
+ gmx_bool bFreeEnergy)
{
/* construct splines for local atoms */
int i,j,k,l;
}
static void init_atomcomm(gmx_pme_t pme,pme_atomcomm_t *atc, t_commrec *cr,
- int dimind,bool bSpread)
+ int dimind,gmx_bool bSpread)
{
int nk,k,s;
int exten;
int nn,nk;
pme_grid_comm_t *pgc;
- bool bCont;
+ gmx_bool bCont;
int fft_start,fft_end,send_index1,recv_index1;
#ifdef GMX_MPI
int nnodes_minor,
t_inputrec * ir,
int homenr,
- bool bFreeEnergy,
- bool bReproducible)
+ gmx_bool bFreeEnergy,
+ gmx_bool bReproducible)
{
gmx_pme_t pme=NULL;
static void spread_on_grid(gmx_pme_t pme,
pme_atomcomm_t *atc,real *grid,
- bool bCalcSplines,bool bSpread)
+ gmx_bool bCalcSplines,gmx_bool bSpread)
{
if (bCalcSplines)
{
int gmx_pmeonly(gmx_pme_t pme,
t_commrec *cr, t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
- real ewaldcoeff, bool bGatherOnly,
+ real ewaldcoeff, gmx_bool bGatherOnly,
t_inputrec *ir)
{
gmx_pme_pp_t pme_pp;
matrix vir;
float cycles;
int count;
- bool bEnerVir;
+ gmx_bool bEnerVir;
gmx_large_int_t step,step_rel;
real *charge=NULL,*q_d,vol;
real energy_AB[2];
matrix vir_AB[2];
- bool bClearF;
+ gmx_bool bClearF;
gmx_parallel_3dfft_t pfft_setup;
real * fftgrid;
t_complex * cfftgrid;
}
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)
{
int flags;
}
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)
{
int flags;
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)
{
gmx_pme_comm_n_box_t cnb;
(*nnz)[i] = i % nz;
}
-static void spread_q(FILE *log,bool bVerbose,
+static void spread_q(FILE *log,gmx_bool bVerbose,
int start,int nr,
rvec x[],real charge[],rvec box,
t_fftgrid *grid,t_nrnb *nrnb)
{
- static bool bFirst = TRUE;
+ static gmx_bool bFirst = TRUE;
static int *nnx,*nny,*nnz;
rvec invh;
real qi,qwt;
return pi;
}
-static real gather_f(FILE *log,bool bVerbose,
+static real gather_f(FILE *log,gmx_bool bVerbose,
int start,int nr,rvec x[],rvec f[],real charge[],rvec box,
real pot[],t_fftgrid *grid,rvec beta,t_nrnb *nrnb)
{
- static bool bFirst=TRUE;
+ static gmx_bool bFirst=TRUE;
static int *nnx,*nny,*nnz;
static int JCXYZ[81];
int i,m;
return energy*0.5;
}
-static void convolution(FILE *fp,bool bVerbose,t_fftgrid *grid,real ***ghat,
+static void convolution(FILE *fp,gmx_bool bVerbose,t_fftgrid *grid,real ***ghat,
t_commrec *cr)
{
int i,j,k,index;
void solve_pppm(FILE *fp,t_commrec *cr,
t_fftgrid *grid,real ***ghat,rvec box,
- bool bVerbose,t_nrnb *nrnb)
+ gmx_bool bVerbose,t_nrnb *nrnb)
{
int ntot,npppm;
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)
{
int nx,ny,nz,m,porder;
ivec grids;
}
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,
#ifndef DISABLE_PPPM
static int gmx_pppm_opt_do(FILE *log, gmx_pme_t pme,
- t_inputrec *ir, bool bVerbose,
+ t_inputrec *ir, gmx_bool bVerbose,
int natoms,
rvec x[], rvec f[],
real charge[], rvec box,
real phi[], t_commrec *cr,
t_nrnb *nrnb, rvec beta,
- t_fftgrid *grid, bool bOld,
+ t_fftgrid *grid, gmx_bool bOld,
real *energy)
{
real ***ghat;
#include "gmx_ga2la.h"
#include "copyrite.h"
-static void pull_print_x_grp(FILE *out,bool bRef,ivec dim,t_pullgrp *pgrp)
+static void pull_print_x_grp(FILE *out,gmx_bool bRef,ivec dim,t_pullgrp *pgrp)
{
int m;
}
static FILE *open_pull_out(const char *fn,t_pull *pull,const output_env_t oenv,
- bool bCoord, unsigned long Flags)
+ gmx_bool bCoord, unsigned long Flags)
{
FILE *fp;
int nsets,g,m;
void get_pullgrp_distance(t_pull *pull,t_pbc *pbc,int g,double t,
dvec dr,dvec dev)
{
- static bool bWarned=FALSE; /* TODO: this should be fixed for thread-safety,
+ static gmx_bool bWarned=FALSE; /* TODO: this should be fixed for thread-safety,
but is fairly benign */
t_pullgrp *pgrp;
int m;
/* Apply constraint using SHAKE */
static void do_constraint(t_pull *pull, t_mdatoms *md, t_pbc *pbc,
rvec *x, rvec *v,
- bool bMaster, tensor vir,
+ gmx_bool bMaster, tensor vir,
double dt, double t)
{
dvec ref,vec;
double d0,inpr;
double lambda, rm, mass, invdt=0;
- bool bConverged = FALSE;
+ gmx_bool bConverged = FALSE;
int niter=0,g,ii,j,m,max_iter=100;
double q,a,b,c; /* for solving the quadratic equation,
see Num. Recipes in C ed 2 p. 184 */
int i,ii,d,nfrozen,ndim;
real m,w,mbd;
double tmass,wmass,wwmass;
- bool bDomDec;
+ gmx_bool bDomDec;
gmx_ga2la_t ga2la=NULL;
gmx_groups_t *groups;
t_atom *atom;
void init_pull(FILE *fplog,t_inputrec *ir,int nfile,const t_filenm fnm[],
gmx_mtop_t *mtop,t_commrec *cr,const output_env_t oenv,
- bool bOutFile, unsigned long Flags)
+ gmx_bool bOutFile, unsigned long Flags)
{
t_pull *pull;
t_pullgrp *pgrp;
int g,start=0,end=0,m;
- bool bCite;
+ gmx_bool bCite;
pull = ir->pull;
-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;
}
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;
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;
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 */
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;
}
}
-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;
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;
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 */
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;
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,
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)
{
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;
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;
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);
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;
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;
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;
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;
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;
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;
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;
{
gmx_mdoutf_t *of;
char filemode[3];
- bool bAppendFiles;
+ gmx_bool bAppendFiles;
snew(of,1);
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+");
typedef struct {
const char *name;
- bool bCoulomb;
+ gmx_bool bCoulomb;
} t_tab_props;
/* This structure holds name and a flag that tells whether
}
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;
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;
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;
/* 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;
#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;
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];
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;
}
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;
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,
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;
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;
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;
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;
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;
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;
}
}
-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[],
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;
}
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;
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;
}
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)
{
t_mdatoms *md)
{
- bool bTCouple=FALSE;
+ gmx_bool bTCouple=FALSE;
real dttc;
int i,start,end,homenr;
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;
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;
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;
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;
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;
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;
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;
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]);
}
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;
}
}
-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;
}
}
-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;
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;
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;
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;
{
static int ebond=-1;
static int ebox=-1;
- bool bOk,bBond=FALSE;
+ gmx_bool bOk,bBond=FALSE;
int nskip,nwait;
t_gmx *gmx;
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:
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:
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; (j<n); j++)
#include "logo.h"
typedef struct {
- bool bMapped;
+ gmx_bool bMapped;
t_dlg *dlg;
} t_dialogs;
buf[i]='\0';
}
-static bool bNotAccClose(const char *buf)
+static gmx_bool bNotAccClose(const char *buf)
{
return (strcmp(buf,"}")!=0);
}
typedef struct {
edlgitem edlg;
- bool bDef;
+ gmx_bool bDef;
int nname;
char **name;
char *set,*get,*def,*help;
float acc; /* Acceleration */
float brake; /* Break */
int lane,oldlane; /* Currently in lane */
- bool bBrake; /* Currently on the brakes */
+ gmx_bool bBrake; /* Currently on the brakes */
unsigned long col; /* Colour */
unsigned long roof; /* Roof Colour */
} t_car;
t_car *cars;
t_input ir;
int step;
- bool bDriving; /* Are we driving ? */
- bool bFog; /* Is it foggy ? */
+ gmx_bool bDriving; /* Are we driving ? */
+ gmx_bool bFog; /* Is it foggy ? */
t_windata main;
t_windata win;
t_windata but[NBUT];
return n;
}
-static float get_dist(int ncars,t_car cars[],int which,bool bFog,
+static float get_dist(int ncars,t_car cars[],int which,gmx_bool bFog,
int dir,int lane,int metres,int *nearest)
{
int i,near;
}
}
-static bool xhwCallBack(struct t_x11 *x11,XEvent *event, Window wd, void *data)
+static gmx_bool xhwCallBack(struct t_x11 *x11,XEvent *event, Window wd, void *data)
{
t_xhighway *xhw;
t_windata *win;
return FALSE;
}
-static bool butCallBack(struct t_x11 *x11,XEvent *event, Window wd, void *data)
+static gmx_bool butCallBack(struct t_x11 *x11,XEvent *event, Window wd, void *data)
{
XSetWindowAttributes attr;
t_xhighway *xhw;
t_col *col;
} t_sc;
-static bool ColCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data)
+static gmx_bool ColCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data)
{
t_col *col;
XColor *xc;
return FALSE;
}
-static bool BCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data)
+static gmx_bool BCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data)
{
t_sc *sc;
return FALSE;
}
-static bool scCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data)
+static gmx_bool scCallBack(struct t_x11 *x11,XEvent *event, Window w, void *data)
{
t_sc *sc;
int i;
typedef struct {
int status;
- bool bShowGly;
- bool *bIsGly;
+ gmx_bool bShowGly;
+ gmx_bool *bIsGly;
t_windata wd;
t_windata xrwd;
t_xrama *xr;
TextInRect(x11,w,pp->label,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;
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;
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;
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;
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
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",
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);
}
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;
}
}
-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;
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;
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);
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)
}
}
-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;
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];
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;
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;
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;
return man->bAnimate;
}
-bool toggle_pbc (t_manager *man)
+gmx_bool toggle_pbc (t_manager *man)
{
man->bPbc=!man->bPbc;
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)*/
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;
/*
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 */
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 */
}
}
-static bool local_pbc_dx(rvec x1, rvec x2)
+static gmx_bool local_pbc_dx(rvec x1, rvec x2)
{
int i;
real dx;
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;
}
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;
}
}
-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;
}
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
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;
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;
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;
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;
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; (i<nnodes); i++)
#define MSIZE 4
-static bool MWCallBack(t_x11 *x11,XEvent *event, Window w, void *data)
+static gmx_bool MWCallBack(t_x11 *x11,XEvent *event, Window w, void *data)
{
t_molwin *mw;
Window To;
XMapWindow(x11->disp,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);
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;
}
}
-static bool local_pbc_dx(rvec x1, rvec x2)
+static gmx_bool local_pbc_dx(rvec x1, rvec x2)
{
int i;
real dx;
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;
{
int i,nobj,nvis,nhide;
atom_id ai;
- bool bAdd,*bVis;
+ gmx_bool bAdd,*bVis;
t_object *obj;
t_object *newobj;
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;
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
*/
#include <xutil.h>
#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;
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;
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;
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;
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;
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,
* 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
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.
#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;
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;
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.
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 && (i<MAXNAMES)); i++)
- bFont=(bool) ((font=XLQF(err,disp,fontnames[i]))!=NULL);
+ bFont=(gmx_bool) ((font=XLQF(err,disp,fontnames[i]))!=NULL);
if (!bFont) {
fontlist=XListFonts(disp,"?",1,&count);
if (count!=0)
- bFont=(bool) ((font=XLQF(err,disp,fontlist[0]))!=NULL);
+ bFont=(gmx_bool) ((font=XLQF(err,disp,fontlist[0]))!=NULL);
}
if (!bFont)
fprintf (err, "Cannot load any suitable font\n");
typedef struct {
Window w;
- bool b;
+ gmx_bool b;
} t_peek;
static Bool TestEvent(Display *disp,XEvent *event,char *arg)
static void MainLoop(t_x11 *x11)
{
- bool bReturn;
+ gmx_bool bReturn;
XEvent event;
t_wlist *curs;
Window w;
char *display;
char *fontname;
char *title,*FG=NULL,*BG=NULL;
- bool bVerbose=FALSE;
+ gmx_bool bVerbose=FALSE;
int i;
title=strdup(argv[0]);
void (*GetNamedColor)(struct t_x11 *x11,const char *name,unsigned long *col);
void (*MainLoop)(struct t_x11 *x11);
void (*RegisterCallback)(struct t_x11 *x11,Window w,Window Parent,
- bool cb CBARGS, void *data);
+ gmx_bool cb CBARGS, void *data);
void (*UnRegisterCallback)(struct t_x11 *x11, Window w);
void (*SetInputMask)(struct t_x11 *x11, Window w, unsigned long mask);
unsigned long (*GetInputMask)(struct t_x11 *x11, Window w);
void (*Flush)(struct t_x11 *x11);
} t_x11;
-typedef bool CallBack CBARGS;
+typedef gmx_bool CallBack CBARGS;
typedef struct t_wlist {
Window w; /* The window itself */
* Routines to manipulate items on a dialog box
*
****************************/
-bool QueryDlgItemSize(t_dlg *dlg,t_id id,int *w,int *h)
+gmx_bool QueryDlgItemSize(t_dlg *dlg,t_id id,int *w,int *h)
{
t_dlgitem *dlgitem;
return FALSE;
}
-bool QueryDlgItemPos(t_dlg *dlg,t_id id,int *x0,int *y0)
+gmx_bool QueryDlgItemPos(t_dlg *dlg,t_id id,int *x0,int *y0)
{
t_dlgitem *dlgitem;
return 0;
}
-bool SetDlgItemSize(t_dlg *dlg,t_id id,int w,int h)
+gmx_bool SetDlgItemSize(t_dlg *dlg,t_id id,int w,int h)
{
t_dlgitem *dlgitem;
#ifdef DEBUG
return FALSE;
}
-bool SetDlgItemPos(t_dlg *dlg,t_id id,int x0,int y0)
+gmx_bool SetDlgItemPos(t_dlg *dlg,t_id id,int x0,int y0)
{
t_dlgitem *dlgitem;
int old_x,old_y;
* after dlg is exec'ed
*
****************************/
-bool IsCBChecked(t_dlg *dlg,t_id id)
+gmx_bool IsCBChecked(t_dlg *dlg,t_id id)
{
t_dlgitem *dlgitem;
void HelpNow(t_dlg *dlg, t_dlgitem *dlgitem)
{
char buf[80];
- bool bCont=TRUE;
+ gmx_bool bCont=TRUE;
int i,nlines=0;
char **lines=NULL;
FreeDlg(dlg);
}
-static bool DlgCB(t_x11 *x11,XEvent *event, Window w, void *data)
+static gmx_bool DlgCB(t_x11 *x11,XEvent *event, Window w, void *data)
{
t_dlg *dlg=(t_dlg *)data;
int i,nWndProc;
return dlg;
}
-void SetDlgSize(t_dlg *dlg,int w,int h, bool bAutoPosition)
+void SetDlgSize(t_dlg *dlg,int w,int h, gmx_bool bAutoPosition)
{
if (bAutoPosition) {
int x,y;
unsigned int xmax,ymax; /* Dimensions of parent window */
unsigned long flags; /* Flags for display */
unsigned long fg,bg; /* The colours */
- bool bPop; /* Should we pop the mouse back */
- bool bGrab; /* Have we grabbed the mouse ? */
+ gmx_bool bPop; /* Should we pop the mouse back */
+ gmx_bool bGrab; /* Have we grabbed the mouse ? */
int nitem; /* The number of items */
t_dlgitem **dlgitem; /* The array of item pointers */
DlgCallback *cb; /* User call back function */
* FALSE will mean most of the time, that item id was not found
*
****************************/
-bool QueryDlgItemSize(t_dlg *dlg,t_id id,int *w,int *h);
+gmx_bool QueryDlgItemSize(t_dlg *dlg,t_id id,int *w,int *h);
-bool QueryDlgItemPos(t_dlg *dlg,t_id id,int *x0,int *y0);
+gmx_bool QueryDlgItemPos(t_dlg *dlg,t_id id,int *x0,int *y0);
int QueryDlgItemX(t_dlg *dlg, t_id id);
int QueryDlgItemH(t_dlg *dlg, t_id id);
-bool SetDlgItemSize(t_dlg *dlg,t_id id,int w,int h);
+gmx_bool SetDlgItemSize(t_dlg *dlg,t_id id,int w,int h);
-bool SetDlgItemPos(t_dlg *dlg,t_id id,int x0,int y0);
+gmx_bool SetDlgItemPos(t_dlg *dlg,t_id id,int x0,int y0);
-void SetDlgSize(t_dlg *dlg,int w,int h, bool bAutoPosition);
+void SetDlgSize(t_dlg *dlg,int w,int h, gmx_bool bAutoPosition);
/*****************************
*
* after dlg is exec'ed
*
****************************/
-bool IsCBChecked(t_dlg *dlg,t_id id);
+gmx_bool IsCBChecked(t_dlg *dlg,t_id id);
t_id RBSelected(t_dlg *dlg,int gid);
t_id *ids;
edlgitem edlg;
char *name;
- bool bBool;
+ gmx_bool bBool;
Pixmap pm;
int nlines,buflen;
char *buf,**lines;
}
static void AddDlgItemGroups(t_dlg *dlg, int gridx, int gridy,
- t_dlgitemlist **grid, bool bAutoPosition)
+ t_dlgitemlist **grid, gmx_bool bAutoPosition)
{
t_dlgitemlist *item;
int x1,y1,w1,h1;
static void AddListFItem(t_x11 *x11, t_dlgitemlist *list,
t_fitem *fitem, t_id GroupID, t_id *ID,
- int x, int *y, int *w,bool bUseMon)
+ int x, int *y, int *w,gmx_bool bUseMon)
{
int i,iSel,slen;
char buf[STRLEN];
}
break;
case edlgCB: {
- bool bCheck;
+ gmx_bool bCheck;
bCheck=gmx_strcasecmp(fitem->def,"TRUE")==0;
AddListItem(list,CreateCheckBox(x11,fitem->name[0],bCheck,
}
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;
}
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;
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;
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 */
return ITEMOK;
}
-static bool insert(char *s, char c, int *pos)
+static gmx_bool insert(char *s, char c, int *pos)
{
int i,sl;
return FALSE;
}
-static bool my_backspace(char *s, int *pos)
+static gmx_bool my_backspace(char *s, int *pos)
{
int i,sl;
return FALSE;
}
-static bool my_delete(char *s, int *pos)
+static gmx_bool my_delete(char *s, int *pos)
{
int i,sl;
*
****************************/
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;
}
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)
{
}
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)
{
#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;
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 {
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;
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);
* 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);
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);
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 */
sfree(old);
}
-bool HelpPressed(XEvent *event)
+gmx_bool HelpPressed(XEvent *event)
{
#define BUFSIZE 24
char buf[BUFSIZE+1];
return (keysym == XK_F1);
}
-bool GrabOK(FILE *out, int err)
+gmx_bool GrabOK(FILE *out, int err)
{
switch (err) {
case GrabSuccess:
Window self,Parent;
unsigned long color;
char *text;
- bool bFocus;
+ gmx_bool bFocus;
int x,y,width,height,bwidth;
Cursor cursor;
} t_windata;
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.
*/
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;
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)
{
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;
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;
#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)
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. */
}
-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;
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;
}
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[],
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);
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 };
}
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;
}
}
-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;
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();
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;
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();
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");
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;
#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;
typedef struct {
int n1,nn;
int *m_ind;
- bool b1D;
+ gmx_bool b1D;
real emat,minrms,maxrms,sumrms;
real *erow;
real **mat;
/* 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);
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;
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) {
}
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;
#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;
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);
void prune_ss_legend(t_matrix *mat)
{
- bool *present;
+ gmx_bool *present;
int *newnum;
int i,r,f,newnmap;
t_mapping *newmap;
"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},
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;
{
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<F_NRE); i++) {
#include "statutil.h"
#include "futil.h"
-void read_eigenvectors(const char *file,int *natoms,bool *bFit,
- rvec **xref,bool *bDMR,
- rvec **xav,bool *bDMA,
+void read_eigenvectors(const char *file,int *natoms,gmx_bool *bFit,
+ rvec **xref,gmx_bool *bDMR,
+ rvec **xav,gmx_bool *bDMA,
int *nvec, int **eignr,
rvec ***eigvec,real **eigval)
{
t_fileio *status;
rvec *x;
matrix box;
- bool bOK;
+ gmx_bool bOK;
*bDMR=FALSE;
void write_eigenvectors(const char *trnname,int natoms,real mat[],
- bool bReverse,int begin,int end,
- int WriteXref,rvec *xref,bool bDMR,
- rvec xav[], bool bDMA,real eigval[])
+ gmx_bool bReverse,int begin,int end,
+ int WriteXref,rvec *xref,gmx_bool bDMR,
+ rvec xav[], gmx_bool bDMA,real eigval[])
{
t_fileio *trnout;
int ndim,i,j,d,vec;
enum { eWXR_NO, eWXR_YES, eWXR_NOFIT };
-extern void read_eigenvectors(const char *file,int *natoms,bool *bFit,
- rvec **xref,bool *bDMR,
- rvec **xav,bool *bDMA,
+extern void read_eigenvectors(const char *file,int *natoms,gmx_bool *bFit,
+ rvec **xref,gmx_bool *bDMR,
+ rvec **xav,gmx_bool *bDMA,
int *nvec, int **eignr, rvec ***eigvec, real **eigval);
/* Read eigenvectors from file into eigvec, the eigenvector numbers */
/* are stored in eignr. */
/* bDMA indicates mass weighted analysis/eigenvectors. */
extern void write_eigenvectors(const char *trnname,int natoms,real mat[],
- bool bReverse,int begin,int end,
- int WriteXref,rvec *xref,bool bDMR,
- rvec xav[],bool bDMA, real *eigval);
+ gmx_bool bReverse,int begin,int end,
+ int WriteXref,rvec *xref,gmx_bool bDMR,
+ rvec xav[],gmx_bool bDMA, real *eigval);
/* Write eigenvectors in mat to a TRN file. */
/* The reference structure is written (t=-1) when WriteXref=eWXR_YES. */
/* When WriteXref==eWXR_NOFIT a zero frame is written (t=-1), */
"y = a2*ee(a1,x) + (1-a2)*ee(a2,x)"
};
-extern bool mrqmin(real x[],real y[],real sig[],int ndata,real a[],
+extern 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 x,real a[],real *y,real dyda[]),
real *alamda);
-extern bool mrqmin_new(real x[],real y[],real sig[],int ndata,real a[],
+extern 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);
}
/* lmfit_exp supports up to 3 parameter fitting of exponential functions */
-static bool lmfit_exp(int nfit,real x[],real y[],real dy[],real ftol,
- real parm[],real dparm[],bool bVerbose,
+static gmx_bool lmfit_exp(int nfit,real x[],real y[],real dy[],real ftol,
+ real parm[],real dparm[],gmx_bool bVerbose,
int eFitFn,int fix)
{
real chisq,ochisq,alamda;
real *a,**covar,**alpha,*dum;
- bool bCont;
+ gmx_bool bCont;
int i,j,ma,mfit,*lista,*ia;
if ((eFitFn < 0) || (eFitFn >= effnNR))
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];
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;
#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
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';
return pdbf;
}
-static bool bFreeSort=FALSE;
+static gmx_bool bFreeSort=FALSE;
static int pdbf_comp(const void *a,const void *b)
{
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;
}
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;
};
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},
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)
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;
/* 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.
*A, /* The fitted parameters. (A1, B1, A2, B2,... C) */
a[2],
ddt[2];
- bool sorted;
+ gmx_bool sorted;
size_t n;
size_t p;
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. */
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. */
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;
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;
};
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" },
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;
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;
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;
real *b=NULL;
matrix box;
char *resnm,*atnm, pdbform[STRLEN];
- bool bPDB, b4D;
+ gmx_bool bPDB, b4D;
FILE *out;
if (noutvec < 3)
};
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)" },
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;
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;
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;
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;
}
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;
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;
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;
"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;
"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},
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 ? */
if (bChandler) {
real dval,sixty=DEG2RAD*60;
- bool bTest;
+ gmx_bool bTest;
for(i=0; (i<nangles); i++)
for(j=0; (j<nframes); j++) {
}
-static bool lambda_same(double lambda1, double lambda2)
+static gmx_bool lambda_same(double lambda1, double lambda2)
{
return gmx_within_tol(lambda1, lambda2, 10*GMX_REAL_EPS);
}
for(i=0; i<nfile; i++)
{
barlambda_t *bl=bl_head->next;
- bool inserted=FALSE;
+ gmx_bool inserted=FALSE;
while(bl != bl_head)
{
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;
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;
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;
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;
}
-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;
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;
}
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)
{
}
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;
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;
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" },
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 */
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
"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" },
}
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;
"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" },
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;
#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",
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)
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];
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 */
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];
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 */
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;
}
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
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 */
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];
/* 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},
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;
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;
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;
t_clustid *c;
int **nnb;
int i,j,k,cid,diff,max;
- bool bChange;
+ gmx_bool bChange;
real **mcpy=NULL;
if (rmsdcut < 0)
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<n1; i++)
for(j=i+1; j<n1; j++)
int iosize, atom_id *outidx,
const char *trxfn, const char *sizefn,
const char *transfn, const char *ntransfn,
- const char *clustidfn, bool bAverage,
+ const char *clustidfn, gmx_bool bAverage,
int write_ncl, int write_nst, real rmsmin,
- bool bFit, FILE *log,t_rgb rlo,t_rgb rhi,
+ gmx_bool bFit, FILE *log,t_rgb rlo,t_rgb rhi,
const output_env_t oenv)
{
FILE *fp=NULL;
t_trxstatus *trxout=NULL;
t_trxstatus *trxsout=NULL;
int i,i1,cl,nstr,*structure,first=0,midstr;
- bool *bWrite=NULL;
+ gmx_bool *bWrite=NULL;
real r,clrmsd,midrmsd;
rvec *xav=NULL;
matrix zerobox;
char *grpname;
real rmsd,**d1,**d2,*time=NULL,time_invfac,*mass=NULL;
char buf[STRLEN],buf1[80],title[STRLEN];
- bool bAnalyze,bUseRmsdCut,bJP_RMSD=FALSE,bReadMat,bReadTraj;
+ gmx_bool bAnalyze,bUseRmsdCut,bJP_RMSD=FALSE,bReadMat,bReadTraj;
int method,ncluster=0;
static const char *methodname[] = {
static t_rgb rhi_bot = { 0.0, 0.0, 1.0 };
static int nlevels=40,skip=1;
static real scalemax=-1.0,rmsdcut=0.1,rmsmin=0.0;
- static bool bRMSdist=FALSE,bBinary=FALSE,bAverage=FALSE,bFit=TRUE;
+ static gmx_bool bRMSdist=FALSE,bBinary=FALSE,bAverage=FALSE,bFit=TRUE;
static int niter=10000,seed=1993,write_ncl=0,write_nst=1,minstruct=1;
static real kT=1e-3;
static int M=10,P=3;
static void clust_size(const char *ndx,const char *trx,const char *xpm,
const char *xpmw,const char *ncl,const char *acl,
const char *mcl,const char *histo,const char *tempf,
- const char *mcn,bool bMol,bool bPBC,const char *tpr,
+ const char *mcn,gmx_bool bMol,gmx_bool bPBC,const char *tpr,
real cut,int nskip,int nlevels,
t_rgb rmid,t_rgb rhi,int ndf,
const output_env_t oenv)
t_pbc pbc;
char *gname;
char timebuf[32];
- bool bSame,bTPRwarn=TRUE;
+ gmx_bool bSame,bTPRwarn=TRUE;
/* Topology stuff */
t_trxframe fr;
t_tpxheader tpxh;
static int nskip = 0;
static int nlevels = 20;
static int ndf = -1;
- static bool bMol = FALSE;
- static bool bPBC = TRUE;
+ static gmx_bool bMol = FALSE;
+ static gmx_bool bPBC = TRUE;
static rvec rlo = { 1.0, 1.0, 0.0 };
static rvec rhi = { 0.0, 0.0, 1.0 };
};
#define NPA asize(pa)
const char *fnNDX,*fnTPR;
- bool bSQ,bRDF;
+ gmx_bool bSQ,bRDF;
t_rgb rgblo,rgbhi;
t_filenm fnm[] = {
int m2,char **atnms2[])
{
int dx, dy, dmax, cmp;
- bool bFW=FALSE;
+ gmx_bool bFW=FALSE;
dx=dy=0;
cmp=NOTSET;
int index2[], t_resinfo *resinfo2)
{
int dx, dy, dmax, cmp, rr1, rr2;
- bool bFW=FALSE,bFF=FALSE;
+ gmx_bool bFW=FALSE,bFF=FALSE;
dx=dy=0;
rr1 = 0;
"(use [TT]rasmol -nmrpdb[tt]). Also in a [TT].pdb[tt] file, B-factors",
"calculated from the atomic MSD values can be written with [TT]-bfac[tt].",
};
- static bool bOne=FALSE,bRmpbc=FALSE,bMW=TRUE,bName=FALSE,
+ static gmx_bool bOne=FALSE,bRmpbc=FALSE,bMW=TRUE,bName=FALSE,
bBfac=FALSE,bFit=TRUE,bLabel=FALSE;
t_pargs pa[] = {
"i.e. for each atom pair the sum of the xx, yy and zz covariances is",
"written."
};
- static bool bFit=TRUE,bRef=FALSE,bM=FALSE,bPBC=TRUE;
+ static gmx_bool bFit=TRUE,bRef=FALSE,bM=FALSE,bPBC=TRUE;
static int end=-1;
t_pargs pa[] = {
{ "-fit", FALSE, etBOOL, {&bFit},
char str[STRLEN],*fitname,*ananame,*pcwd;
int d,dj,nfit;
atom_id *index,*ifit;
- bool bDiffMass1,bDiffMass2;
+ gmx_bool bDiffMass1,bDiffMass2;
time_t now;
char timebuf[STRLEN];
t_rgb rlo,rmi,rhi;
*n = nmol;
}
-static bool precalc(t_topology top,real mass2[],real qmol[]){
+static gmx_bool precalc(t_topology top,real mass2[],real qmol[]){
real mtot;
real qtot;
real qall;
int i,j,k,l;
int ai,ci;
- bool bNEU;
+ gmx_bool bNEU;
ai=0;
ci=0;
qall=0.0;
}
}
-static void calc_mj(t_topology top,int ePBC,matrix box,bool bNoJump,int isize,int index0[],\
+static void calc_mj(t_topology top,int ePBC,matrix box,gmx_bool bNoJump,int isize,int index0[],\
rvec fr[],rvec mj,real mass2[],real qmol[]){
int i,j,k,l;
}
-static real calceps(real prefactor,real md2,real mj2,real cor,real eps_rf,bool bCOR){
+static real calceps(real prefactor,real md2,real mj2,real cor,real eps_rf,gmx_bool bCOR){
/* bCOR determines if the correlation is computed via
* static properties (FALSE) or the correlation integral (TRUE)
static void dielectric(FILE *fmj,FILE *fmd,FILE *outf,FILE *fcur,FILE *mcor,
- FILE *fmjdsp, bool bNoJump,bool bACF,bool bINT,
+ FILE *fmjdsp, gmx_bool bNoJump,gmx_bool bACF,gmx_bool bINT,
int ePBC,t_topology top, t_trxframe fr,real temp,
real trust,real bfit,real efit,real bvit,real evit,
t_trxstatus *status,int isize,int nmols, int nshift,
static real temp=300.0;
static real trust=0.25;
static real eps_rf=0.0;
- static bool bNoJump=TRUE;
+ static gmx_bool bNoJump=TRUE;
static real bfit=100.0;
static real bvit=0.5;
static real efit=400.0;
int isize;
t_trxstatus *status;
int flags = 0;
- bool bTop;
- bool bNEU;
- bool bACF;
- bool bINT;
+ gmx_bool bTop;
+ gmx_bool bNEU;
+ gmx_bool bACF;
+ gmx_bool bINT;
int ePBC=-1;
int natoms;
int nmols;
real ***slDensity, int *nslices, t_topology *top,
int ePBC,
int axis, int nr_grps, real *slWidth,
- t_electron eltab[], int nr,bool bCenter,
+ t_electron eltab[], int nr,gmx_bool bCenter,
const output_env_t oenv)
{
rvec *x0; /* coordinates without pbc */
void calc_density(const char *fn, atom_id **index, int gnx[],
real ***slDensity, int *nslices, t_topology *top, int ePBC,
- int axis, int nr_grps, real *slWidth, bool bCenter,
+ int axis, int nr_grps, real *slWidth, gmx_bool bCenter,
const output_env_t oenv)
{
rvec *x0; /* coordinates without pbc */
void plot_density(real *slDensity[], const char *afile, int nslices,
int nr_grps, char *grpname[], real slWidth,
const char **dens_opt,
- bool bSymmetrize, const output_env_t oenv)
+ gmx_bool bSymmetrize, const output_env_t oenv)
{
FILE *den;
const char *ylabel=NULL;
static const char *axtitle="Z";
static int nslices = 50; /* nr of slices defined */
static int ngrps = 1; /* nr. of groups */
- static bool bSymmetrize=FALSE;
- static bool bCenter=FALSE;
+ static gmx_bool bSymmetrize=FALSE;
+ static gmx_bool bCenter=FALSE;
t_pargs pa[] = {
{ "-d", FALSE, etSTR, {&axtitle},
"Take the normal on the membrane in direction X, Y or Z." },
};
static int n1=0,n2=0;
static real xmin=-1,xmax=-1,bin=0.02,dmin=0,dmax=0,amax=0,rmax=0;
- static bool bMirror=FALSE, bSums=FALSE;
+ static gmx_bool bMirror=FALSE, bSums=FALSE;
static const char *eaver[]={ NULL, "z", "y", "x", NULL };
static const char *eunit[]={ NULL, "nm-3", "nm-2", "count", NULL };
{ "-dmax", FALSE, etREAL, {&dmax},
"Maximum density in output (0 means calculate it)"},
};
- bool bXmin,bXmax,bRadial;
+ gmx_bool bXmin,bXmax,bRadial;
FILE *fp;
t_trxstatus *status;
t_topology top;
{
int i;
real mind,maxd,sum,av,var,prev,width;
- bool bTrans;
+ gmx_bool bTrans;
mind=5400,maxd=-5400,sum=0,av=0,var=0;
"conformations sorted according to occupancy."
};
static int mult = -1;
- static bool bSA = FALSE;
+ static gmx_bool bSA = FALSE;
t_pargs pa[] = {
{ "-sa", FALSE, etBOOL, {&bSA},
"Perform cluster analysis in dihedral space instead of analysing dihedral transitions." },
real spacing,radius;
real *elem;
int *count;
- bool bPhi;
+ gmx_bool bPhi;
int nx,ny;
real **cmap;
} t_gkrbin;
-static t_gkrbin *mk_gkrbin(real radius,real rcmax,bool bPhi,int ndegrees)
+static t_gkrbin *mk_gkrbin(real radius,real rcmax,gmx_bool bPhi,int ndegrees)
{
t_gkrbin *gb;
char *ptr;
ffclose(fp);
}
-bool read_mu_from_enx(ener_file_t fmu,int Vol,ivec iMu,rvec mu,real *vol,
+gmx_bool read_mu_from_enx(ener_file_t fmu,int Vol,ivec iMu,rvec mu,real *vol,
real *t, int nre,t_enxframe *fr)
{
int i;
- bool bCont;
+ gmx_bool bCont;
char buf[22];
bCont = do_enx(fmu,fr);
do_view(oenv,fn,"-autoscale xy -nxy");
}
-static void compute_avercos(int n,rvec dip[],real *dd,rvec axis,bool bPairs)
+static void compute_avercos(int n,rvec dip[],real *dd,rvec axis,gmx_bool bPairs)
{
int i,j,k;
double dc,dc1,d,n5,ddc1,ddc2,ddc3;
const char *out_mtot,const char *out_eps,
const char *out_aver, const char *dipdist,
const char *cosaver, const char *fndip3d,
- const char *fnadip, bool bPairs,
+ const char *fnadip, gmx_bool bPairs,
const char *corrtype,const char *corf,
- bool bGkr, const char *gkrfn,
- bool bPhi, int *nlevels, int ndegrees,
+ gmx_bool bGkr, const char *gkrfn,
+ gmx_bool bPhi, int *nlevels, int ndegrees,
int ncos,
const char *cmap, real rcmax,
- bool bQuad, const char *quadfn,
- bool bMU, const char *mufn,
+ gmx_bool bQuad, const char *quadfn,
+ gmx_bool bMU, const char *mufn,
int *gnx, int *molindex[],
real mu_max, real mu_aver,
real epsilonRF,real temp,
int *gkatom, int skip,
- bool bSlab, int nslices,
+ gmx_bool bSlab, int nslices,
const char *axtitle, const char *slabfn,
const output_env_t oenv)
{
real rcut=0,t,t0,t1,dt,lambda,dd,rms_cos;
rvec dipaxis;
matrix box;
- bool bCorr,bTotal,bCont;
+ gmx_bool bCorr,bTotal,bCont;
double M_diff=0,epsilon,invtel,vol_aver;
double mu_ave,mu_mol,M2_ave=0,M_ave2=0,M_av[DIM],M_av2[DIM];
double M[3],M2[3],M4[3],Gk=0,g_k=0;
};
real mu_max=5, mu_aver=-1,rcmax=0;
real epsilonRF=0.0, temp=300;
- bool bAverCorr=FALSE,bMolCorr=FALSE,bPairs=TRUE,bPhi=FALSE;
+ gmx_bool bAverCorr=FALSE,bMolCorr=FALSE,bPairs=TRUE,bPhi=FALSE;
const char *corrtype[]={NULL, "none", "mol", "molsep", "total", NULL};
const char *axtitle="Z";
int nslices = 10; /* nr of slices defined */
int nFF[2];
atom_id **grpindex;
char **grpname=NULL;
- bool bCorr,bQuad,bGkr,bMU,bSlab;
+ gmx_bool bCorr,bQuad,bGkr,bMU,bSlab;
t_filenm fnm[] = {
{ efEDR, "-en", NULL, ffOPTRD },
{ efTRX, "-f", NULL, ffREAD },
t_iatom *forceatoms;
int i,j,nat,n,type,nviol,ndr,label;
real ener,rt,mviol,tviol,viol,lam,dvdl,drt;
- static bool bFirst=TRUE;
+ static gmx_bool bFirst=TRUE;
lam =0;
dvdl =0;
typedef struct {
int index;
- bool bCore;
+ gmx_bool bCore;
real up1,r,rT3,rT6,viol,violT3,violT6;
} t_dr_stats;
static const char *core[] = { "All restraints", "Core restraints" };
static const char *tp[] = { "linear", "third power", "sixth power" };
real viol_tot,viol_max,viol=0;
- bool bCore;
+ gmx_bool bCore;
int nviol,nrestr;
int i,kkk;
}
}
-static void dump_viol(FILE *log,int ndr,t_dr_stats *drs,bool bLinear)
+static void dump_viol(FILE *log,int ndr,t_dr_stats *drs,gmx_bool bLinear)
{
int i;
}
}
-static bool is_core(int i,int isize,atom_id index[])
+static gmx_bool is_core(int i,int isize,atom_id index[])
{
int kk;
- bool bIC = FALSE;
+ gmx_bool bIC = FALSE;
for(kk=0; !bIC && (kk<isize); kk++)
bIC = (index[kk] == i);
static void dump_disre_matrix(const char *fn,t_dr_result *dr,int ndr,
int nsteps,t_idef *idef,gmx_mtop_t *mtop,
- real max_dr,int nlevels,bool bThird)
+ real max_dr,int nlevels,gmx_bool bThird)
{
FILE *fp;
int *resnr;
static int ntop = 0;
static int nlevels = 20;
static real max_dr = 0;
- static bool bThird = TRUE;
+ static gmx_bool bThird = TRUE;
t_pargs pa[] = {
{ "-ntop", FALSE, etINT, {&ntop},
"Number of large violations that are stored in the log file every step" },
real t;
rvec *x,*f,*xav=NULL;
matrix box;
- bool bPDB;
+ gmx_bool bPDB;
int isize;
atom_id *index=NULL,*ind_fit=NULL;
char *grpname;
rvec *com;
real *mass;
FILE *fp=NULL,*fplt=NULL;
- bool bCutoff,bPrintDist,bLifeTime;
+ gmx_bool bCutoff,bPrintDist,bLifeTime;
t_pbc *pbc;
int *contact_time=NULL,*ccount=NULL,ccount_nalloc=0,sum;
char buf[STRLEN];
static const char *pdbtp[epdbNR] =
{ "ATOM ", "HETATM" };
-real calc_mass(t_atoms *atoms, bool bGetMass, gmx_atomprop_t aps)
+real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
{
real tmass;
int i;
}
real calc_geom(int isize, atom_id *index, rvec *x, rvec geom_center, rvec min,
- rvec max, bool bDiam)
+ rvec max, gmx_bool bDiam)
{
real diam2, d;
char *grpnames;
}
void set_pdb_conf_bfac(int natoms, int nres, t_atoms *atoms, int n_bfac,
- double *bfac, int *bfac_nr, bool peratom)
+ double *bfac, int *bfac_nr, gmx_bool peratom)
{
FILE *out;
real bfac_min, bfac_max;
int i, n;
- bool found;
+ gmx_bool found;
bfac_max = -1e10;
bfac_min = 1e10;
"For complex molecules, the periodicity removal routine may break down, ",
"in that case you can use trjconv." };
static real dist = 0.0, rbox = 0.0, to_diam = 0.0;
- static bool bNDEF = FALSE, bRMPBC = FALSE, bCenter = FALSE, bReadVDW =
+ static gmx_bool bNDEF = FALSE, bRMPBC = FALSE, bCenter = FALSE, bReadVDW =
FALSE, bCONECT = FALSE;
- static bool peratom = FALSE, bLegend = FALSE, bOrient = FALSE, bMead =
+ static gmx_bool peratom = FALSE, bLegend = FALSE, bOrient = FALSE, bMead =
FALSE, bGrasp = FALSE, bSig56 = FALSE;
static rvec scale =
{ 1, 1, 1 }, newbox =
int ePBC;
matrix box,rotmatrix,trans;
rvec princd,tmpvec;
- bool bIndex, bSetSize, bSetAng, bCubic, bDist, bSetCenter, bAlign;
- bool bHaveV, bScale, bRho, bTranslate, bRotate, bCalcGeom, bCalcDiam;
+ gmx_bool bIndex, bSetSize, bSetAng, bCubic, bDist, bSetCenter, bAlign;
+ gmx_bool bHaveV, bScale, bRho, bTranslate, bRotate, bCalcGeom, bCalcDiam;
real xs, ys, zs, xcent, ycent, zcent, diam = 0, mass = 0, d, vdw;
gmx_atomprop_t aps;
gmx_conect conect;
static int *select_it(int nre,gmx_enxnm_t *nm,int *nset)
{
- bool *bE;
+ gmx_bool *bE;
int n,k,j,i;
int *set;
- bool bVerbose = TRUE;
+ gmx_bool bVerbose = TRUE;
if ((getenv("VERBOSE")) != NULL)
bVerbose = FALSE;
return set;
}
-static bool same_time(real t1,real t2)
+static gmx_bool same_time(real t1,real t2)
{
const real tol=1e-5;
}
-bool bRgt(double a,double b)
+gmx_bool bRgt(double a,double b)
{
double tol = 1e-6;
static void edit_files(char **fnms,int nfiles,real *readtime,
- real *settime,int *cont_type,bool bSetTime,bool bSort)
+ real *settime,int *cont_type,gmx_bool bSetTime,gmx_bool bSort)
{
int i;
- bool ok;
+ gmx_bool ok;
char inputstring[STRLEN],*chptr;
if(bSetTime) {
char **fnms;
real *readtime,*settime,timestep,t1,tadjust;
char inputstring[STRLEN],*chptr,buf[22],buf2[22],buf3[22];
- bool ok;
+ gmx_bool ok;
int *cont_type;
- bool bNewFile,bFirst,bNewOutput;
+ gmx_bool bNewFile,bFirst,bNewOutput;
output_env_t oenv;
t_filenm fnm[] = {
};
#define NFILE asize(fnm)
- bool bWrite;
+ gmx_bool bWrite;
static real delta_t=0.0, toffset=0,scalefac=1;
- static bool bSetTime=FALSE;
- static bool bSort=TRUE,bError=TRUE;
+ static gmx_bool bSetTime=FALSE;
+ static gmx_bool bSort=TRUE,bError=TRUE;
static real begin=-1;
static real end=-1;
"(e.g. residue number) in the [TT]-groups[tt] will be ignored",
"in the comparison."
};
- static bool bSum=FALSE;
- static bool bMeanEmtx=TRUE;
+ static gmx_bool bSum=FALSE;
+ static gmx_bool bMeanEmtx=TRUE;
static int skip=0,nlevels=20;
static real cutmax=1e20,cutmin=-1e20,reftemp=300.0;
- static bool bCoulSR=TRUE,bCoulLR=FALSE,bCoul14=FALSE;
- static bool bLJSR=TRUE,bLJLR=FALSE,bLJ14=FALSE,bBhamSR=FALSE,bBhamLR=FALSE,
+ static gmx_bool bCoulSR=TRUE,bCoulLR=FALSE,bCoul14=FALSE;
+ static gmx_bool bLJSR=TRUE,bLJLR=FALSE,bLJ14=FALSE,bBhamSR=FALSE,bBhamLR=FALSE,
bFree=TRUE;
t_pargs pa[] = {
{ "-sum", FALSE, etBOOL, {&bSum},
egTotal (total energy) */
#define egTotal egNR
#define egSP 1
- bool egrp_use[egNR+egSP];
+ gmx_bool egrp_use[egNR+egSP];
ener_file_t in;
FILE *out;
int timecheck=0;
t_enxframe *fr;
int teller=0;
real sum;
- bool bCont,bRef;
- bool bCutmax,bCutmin;
+ gmx_bool bCont,bRef;
+ gmx_bool bCutmax,bCutmin;
real **eneset,*time=NULL;
int *set,i,j,k,prevk,m=0,n,nre,nset,nenergy;
char **groups = NULL;
typedef struct {
real *ener;
exactsum_t *es;
- bool bExactStat;
+ gmx_bool bExactStat;
double av;
double rmsd;
double ee;
static int *select_it(int nre,char *nm[],int *nset)
{
- bool *bE;
+ gmx_bool *bE;
int n,k,j,i;
int *set;
- bool bVerbose = TRUE;
+ gmx_bool bVerbose = TRUE;
if ((getenv("VERBOSE")) != NULL)
bVerbose = FALSE;
static int *select_by_name(int nre,gmx_enxnm_t *nm,int *nset)
{
- bool *bE;
+ gmx_bool *bE;
int n,k,kk,j,i,nmatch,nind,nss;
int *set;
- bool bEOF,bVerbose = TRUE,bLong=FALSE;
+ gmx_bool bEOF,bVerbose = TRUE,bLong=FALSE;
char *ptr,buf[STRLEN];
const char *fm4="%3d %-14s";
const char *fm2="%3d %-34s";
gmx_large_int_t steps,np,p,bound_nb;
enerdat_t *ed;
exactsum_t *es;
- bool bAllZero;
+ gmx_bool bAllZero;
double x,sx,sy,sxx,sxy;
ener_ee_t *eee;
return buf;
}
-static void analyse_ener(bool bCorr,const char *corrfn,
- bool bFee,bool bSum,bool bFluct,bool bTempFluct,
- bool bVisco,const char *visfn,int nmol,
+static void analyse_ener(gmx_bool bCorr,const char *corrfn,
+ gmx_bool bFee,gmx_bool bSum,gmx_bool bFluct,gmx_bool bTempFluct,
+ gmx_bool bVisco,const char *visfn,int nmol,
int nconstr,
gmx_large_int_t start_step,double start_t,
gmx_large_int_t step,double t,
double time[], real reftemp,
enerdata_t *edat,
- int nset,int set[],bool *bIsEner,
+ int nset,int set[],gmx_bool *bIsEner,
char **leg,gmx_enxnm_t *enm,
real Vaver,real ezero,
int nbmin,int nbmax,
fprintf(fp,"%12.6f",t);
}
-static void print1(FILE *fp,bool bDp,real e)
+static void print1(FILE *fp,gmx_bool bDp,real e)
{
if (bDp)
fprintf(fp," %16.12f",e);
ener_file_t enx;
int nre,timecheck,step,nenergy,nenergy2,maxenergy;
int i,j;
- bool bCont;
+ gmx_bool bCont;
real aver, beta;
real **eneset2;
double dE, sum;
"the energies must both be calculated from the same trajectory."
};
- static bool bSum=FALSE,bFee=FALSE,bPrAll=FALSE,bFluct=FALSE;
- static bool bDp=FALSE,bMutot=FALSE,bOrinst=FALSE,bOvec=FALSE;
+ static gmx_bool bSum=FALSE,bFee=FALSE,bPrAll=FALSE,bFluct=FALSE;
+ static gmx_bool bDp=FALSE,bMutot=FALSE,bOrinst=FALSE,bOvec=FALSE;
static int skip=0,nmol=1,nconstr=0,nbmin=5,nbmax=5;
static real reftemp=300.0,ezero=0;
t_pargs pa[] = {
real *bounds=NULL,*violaver=NULL,*oobs=NULL,*orient=NULL,*odrms=NULL;
int *index=NULL,*pair=NULL,norsel=0,*orsel=NULL,*or_label=NULL;
int nbounds=0,npairs;
- bool bDisRe,bDRAll,bORA,bORT,bODA,bODR,bODT,bORIRE,bOTEN;
- bool bFoundStart,bCont,bEDR,bVisco;
+ gmx_bool bDisRe,bDRAll,bORA,bORT,bODA,bODR,bODT,bORIRE,bOTEN;
+ gmx_bool bFoundStart,bCont,bEDR,bVisco;
double sum,sumaver,sumt,ener,dbl;
double *time=NULL;
real Vaver;
int *set=NULL,i,j,k,nset,sss;
- bool *bIsEner=NULL;
+ gmx_bool *bIsEner=NULL;
char **pairleg,**odtleg,**otenleg;
char **leg=NULL;
char **nms;
};
static int nf=10;
- static bool bNoJump = TRUE,bFit = FALSE,bLowAll = FALSE;
+ static gmx_bool bNoJump = TRUE,bFit = FALSE,bLowAll = FALSE;
t_pargs pa[] = {
{ "-nf", FALSE, etINT, {&nf},
"Sets the filter length as well as the output interval for low-pass filtering" },
"Fit all frames to a reference structure" }
};
const char *topfile,*lowfile,*highfile;
- bool bTop=FALSE;
+ gmx_bool bTop=FALSE;
t_topology top;
int ePBC=-1;
rvec *xtop;
}
#endif
-static bool in_box(t_pbc *pbc,rvec x)
+static gmx_bool in_box(t_pbc *pbc,rvec x)
{
rvec box_center,dx;
int shift;
char buf[STRLEN],buf2[STRLEN],*temp;
const char *topinout;
int line;
- bool bSystem,bMolecules,bSkip;
+ gmx_bool bSystem,bMolecules,bSkip;
int i,nsol=0;
double mtot;
real vol,mm;
};
/* parameter data */
- bool bSol,bProt,bBox;
+ gmx_bool bSol,bProt,bBox;
const char *conf_prot,*confout;
int bInsert;
real *r;
static int nmol_ins=0,nmol_try=10,seed=1997;
static real r_distance=0.105,r_shell=0;
static rvec new_box={0.0,0.0,0.0};
- static bool bReadV=FALSE;
+ static gmx_bool bReadV=FALSE;
static int max_sol = 0;
output_env_t oenv;
t_pargs pa[] = {
int nres; /* number of molecules? */
int i,j,k,l,m,ndx,nrdx,nx,ny,nz;
t_trxstatus *status;
- bool bTRX;
+ gmx_bool bTRX;
output_env_t oenv;
t_filenm fnm[] = {
static int seed = 0; /* seed for random number generator */
static int nmolat = 3;
static int nblock = 1;
- static bool bShuffle = FALSE;
- static bool bSort = FALSE;
- static bool bRandom = FALSE; /* False: no random rotations */
- static bool bRenum = TRUE; /* renumber residues */
+ static gmx_bool bShuffle = FALSE;
+ static gmx_bool bSort = FALSE;
+ static gmx_bool bRandom = FALSE; /* False: no random rotations */
+ static gmx_bool bRenum = TRUE; /* renumber residues */
static rvec dist = {0,0,0}; /* space added between molecules ? */
static rvec max_rot = {180,180,180}; /* maximum rotation */
t_pargs pa[] = {
#include "gmx_ana.h"
static void insert_ion(int nsa,int *nwater,
- bool bSet[],int repl[],atom_id index[],
+ gmx_bool bSet[],int repl[],atom_id index[],
real pot[],rvec x[],t_pbc *pbc,
int sign,int q,const char *ionname,
t_mdatoms *mdatoms,
- real rmin,bool bRandom,int *seed)
+ real rmin,gmx_bool bRandom,int *seed)
{
int i,ii,ei,owater,wlast,m,nw;
real extr_e,poti,rmin2;
rvec xei,dx;
- bool bSub=FALSE;
+ gmx_bool bSub=FALSE;
int maxrand;
ei=-1;
FILE *fpin,*fpout;
char buf[STRLEN],buf2[STRLEN],*temp,**mol_line=NULL;
int line,i,nsol,nmol_line,sol_line,nsol_last;
- bool bMolecules;
+ gmx_bool bMolecules;
printf("\nProcessing topology\n");
fpin = ffopen(topinout,"r");
static const char *p_name="NA",*n_name="CL";
static real rmin=0.6,scale=0.001,conc=0;
static int seed=1993;
- static bool bRandom=TRUE,bNeutral=FALSE;
+ static gmx_bool bRandom=TRUE,bNeutral=FALSE;
static t_pargs pa[] = {
{ "-np", FALSE, etINT, {&p_num}, "Number of positive ions" },
{ "-pname", FALSE, etSTR, {&p_name},"Name of the positive ion" },
int *repl;
atom_id *index;
char *grpname;
- bool *bSet,bPDB;
+ gmx_bool *bSet,bPDB;
int i,nw,nwa,nsa,nsalt,iqtot;
FILE *fplog;
output_env_t oenv;
static real disre_dist = 0.1;
static real disre_frac = 0.0;
static real disre_up2 = 1.0;
- static bool bDisre=FALSE;
- static bool bConstr=FALSE;
+ static gmx_bool bDisre=FALSE;
+ static gmx_bool bConstr=FALSE;
static real cutoff = -1.0;
t_pargs pa[] = {
char *gn_grp;
char title[STRLEN];
matrix box;
- bool bFreeze;
+ gmx_bool bFreeze;
rvec dx,*x=NULL,*v=NULL;
t_filenm fnm[] = {
real calc_gyro(rvec x[],int gnx,atom_id index[],t_atom atom[],real tm,
- rvec gvec,rvec d,bool bQ,bool bRot,bool bMOI,matrix trans)
+ rvec gvec,rvec d,gmx_bool bQ,gmx_bool bRot,gmx_bool bMOI,matrix trans)
{
int i,ii,m;
real gyro,dx2,m0,Itot;
"of slices along the z-axis are calculated."
};
static int nmol=1,nz=0;
- static bool bQ=FALSE,bRot=FALSE,bMOI=FALSE;
+ static gmx_bool bQ=FALSE,bRot=FALSE,bMOI=FALSE;
t_pargs pa[] = {
{ "-nmol", FALSE, etINT, {&nmol},
"The number of molecules to analyze" },
rvec *x,*x_s;
rvec xcm,gvec,gvec1;
matrix box,trans;
- bool bACF;
+ gmx_bool bACF;
real **moi_trans=NULL;
int max_moi=0,delta_moi=100;
rvec d,d1; /* eigenvalues of inertia tensor */
void calc_h2order(const char *fn, atom_id index[], int ngx, rvec **slDipole,
real **slOrder, real *slWidth, int *nslices,
t_topology *top, int ePBC,
- int axis, bool bMicel, atom_id micel[], int nmic,
+ int axis, gmx_bool bMicel, atom_id micel[], int nmic,
const output_env_t oenv)
{
rvec *x0, /* coordinates with pbc */
int ePBC;
atom_id *index, /* indices for solvent group */
*micelle;
- bool bMicel = FALSE; /* think we're a micel */
+ gmx_bool bMicel = FALSE; /* think we're a micel */
t_filenm fnm[] = { /* files for g_order */
{ efTRX, "-f", NULL, ffREAD }, /* trajectory file */
{ efNDX, NULL, NULL, ffREAD }, /* index file */
static const char *grpnames[grNR] = {"0","1","I" };
-static bool bDebug = FALSE;
+static gmx_bool bDebug = FALSE;
#define HB_NO 0
#define HB_YES 1<<0
} t_hbEmap;
typedef struct {
- bool bHBmap,bDAnr,bGem;
+ gmx_bool bHBmap,bDAnr,bGem;
int wordlen;
/* The following arrays are nframes long */
int nframes,max_frames,maxhydro;
* - Erik Marklund May 29, 2006
*/
-static PSTYPE periodicIndex(ivec r, t_gemPeriod *per, bool daSwap) {
+static PSTYPE periodicIndex(ivec r, t_gemPeriod *per, gmx_bool daSwap) {
/* Try to merge hbonds on the fly. That means that if the
* acceptor and donor are mergable, then:
* 1) store the hb-info so that acceptor id > donor id,
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;
return hb;
}
-static void mk_hbmap(t_hbdata *hb,bool bTwo)
+static void mk_hbmap(t_hbdata *hb,gmx_bool bTwo)
{
int i,j;
#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);
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;
}
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;
}
#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)
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);
}
/* 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; (i<isize) && !bFound; i++)
static void search_acceptors(t_topology *top,int isize,
atom_id *index,t_acceptors *a,int grp,
- bool bNitAcc,
- bool bContact,bool bDoIt, unsigned char *datable)
+ gmx_bool bNitAcc,
+ gmx_bool bContact,gmx_bool bDoIt, unsigned char *datable)
{
int i,n;
}
static void search_donors(t_topology *top, int isize, atom_id *index,
- t_donors *ddd,int grp,bool bContact,bool bDoIt,
+ t_donors *ddd,int grp,gmx_bool bContact,gmx_bool bDoIt,
unsigned char *datable)
{
int i,j,nra,n;
t_functype func_type;
t_ilist *interaction;
atom_id nr1,nr2;
- bool stop;
+ gmx_bool stop;
if (!ddd->dptr) {
snew(ddd->dptr,top->atoms.nr);
}
}
-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;
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)
{
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;
bInShell=FALSE;
}
} else {
- bool bDone = FALSE;
+ gmx_bool bDone = FALSE;
while (!bDone)
{
bDone = TRUE;
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--) {
*/
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;
/* 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;
/* 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;
/* 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)
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);
* - 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;
"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;
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;
}
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)) {
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};
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;
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]);
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},
typedef struct {
FILE *fp,*fp2;
- bool bfp2;
+ gmx_bool bfp2;
const char *filenm;
const char *title;
const char *xaxis;
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 },
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},
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 */
return NULL;
}
-static bool bBack(t_remd_data *d)
+static gmx_bool bBack(t_remd_data *d)
{
return (d->nparams > 2);
}
}
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;
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;
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" },
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;
"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},
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;
int get_tpr_version(const char *infile)
{
char buf[STRLEN];
- bool bDouble;
+ gmx_bool bDouble;
int precision,fver;
t_fileio *fio;
{
int i,j,nr,mol_id;
int type=0,block=0;
- bool bNEW;
+ gmx_bool bNEW;
nr=0;
snew(tlist->index,at->nr);
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;
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;
}
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;
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;
{
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
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 */
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);
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 */
{
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;
/* 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;
}
}
-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.
real relerr,err;
char buf[256];
int i;
- bool incycle;
+ gmx_bool incycle;
if (bFirstIterate)
{
}
typedef struct {
- bool bGStatEveryStep;
+ gmx_bool bGStatEveryStep;
gmx_large_int_t step_ns;
gmx_large_int_t step_nscheck;
gmx_large_int_t nns;
}
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;
}
}
-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;
}
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,
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;
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;
/* Output stuff */
if (MASTER(cr))
{
- bool do_dr,do_or;
+ gmx_bool do_dr,do_or;
if (!(bStartingFromCpt && (EI_VV(ir->eI))))
{
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,
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;
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;
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;
#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;
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 = "";
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*/
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";
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;
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);
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)
{
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;
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)
"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" },
real t;
rvec *x;
matrix box;
- bool bTop=FALSE;
+ gmx_bool bTop=FALSE;
FILE *atm;
int i,j,nres=0;
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" },
matrix box;
real rms1,rms2,fac,*mass;
char title[STRLEN],*grpname;
- bool bRMS;
+ gmx_bool bRMS;
output_env_t oenv;
CopyRight(stderr,argv[0]);
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)
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;
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[],
/* 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;
/* 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;
}
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;
/* 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;
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;
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)
{
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;
* 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)
{
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);
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)
{
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" },
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;
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 ) {
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
matrix box;
real t0,t1,tq;
int teller;
- bool bCont;
+ gmx_bool bCont;
rvec *x,*m1;
tensor *m2;
"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)"},
static void
nma_full_hessian(real * hess,
int ndim,
- bool bM,
+ gmx_bool bM,
t_topology * top,
int begin,
int end,
static void
nma_sparse_hessian(gmx_sparsematrix_t * sparse_hessian,
- bool bM,
+ gmx_bool bM,
t_topology * top,
int neig,
real * eigenvalues,
"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[] =
{
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;
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;
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;
real *out_eigval;
rvec * this_eigvec;
real omega,Ekin,sum,m,vel;
- bool found;
+ gmx_bool found;
int nmodes,nphases;
int *imodes;
real *amplitude;
}
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)
{
*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;
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.*/
};
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" },
{ 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;
"the average cos reaches a value of 1/e. This point is determined",
"by a linear interpolation of log(<cos>)."
};
- 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" },
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 */
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." },
"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" }
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;
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)
{
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;
"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;
};
#define NPA asize(pa)
const char *fnTPS,*fnNDX,*fnDAT=NULL;
- bool bSQ,bRDF;
+ gmx_bool bSQ,bRDF;
output_env_t oenv;
t_filenm fnm[] = {
typedef struct {
real rij_3;
real rij_6;
- bool bNOE;
+ gmx_bool bNOE;
real tauc,dtauc,S2,dS2;
complex y2;
complex Ylm[5];
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;
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)
{
real *a,**covar,**alpha;
real chisq,ochisq,alamda;
- bool bCont;
+ gmx_bool bCont;
int i,j,ma,mfit,*lista;
ma=mfit=2;
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;
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)
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" },
"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;
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,
#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;
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 =
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;
}
}
-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! */
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);
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[] = {
"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" },
t_topology top;
int ePBC;
t_atoms *pdbatoms,*refatoms;
- bool bCont;
+ gmx_bool bCont;
matrix box,pdbbox;
rvec *x,*pdbx,*xref;
const char *devfn,*dirfn;
int resind;
- bool bReadPDB;
+ gmx_bool bReadPDB;
atom_id *index;
int isize;
char *grpnames;
""
};
- static bool bVec = FALSE,bAver=TRUE;
+ static gmx_bool bVec = FALSE,bAver=TRUE;
t_pargs pa[] = {
{ "-d", FALSE, etBOOL, {&bVec},
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;
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" },
"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},
}
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";
}
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",
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;
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)" },
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)
{
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];
"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};
typedef struct
{
- bool bDump;
- bool bFracNorm;
+ gmx_bool bDump;
+ gmx_bool bFracNorm;
const char *routt;
int *size;
FILE *sfp;
"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},
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"},
{
FILE *fp;
int i,j,k,ijk,nmin;
- bool bMin;
+ gmx_bool bMin;
t_minimum *mm;
snew(mm,len);
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;
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 };
"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};
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;
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;
};
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},
"(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[] = {
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;
};
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[] = {
"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},
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;
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;
}
}
-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;
}
}
-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;
}
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;
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))
{
"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[] = {
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;
t_trxstatus *status;
real t;
t_trxframe fr;
- bool ok;
+ gmx_bool ok;
for (i = 0; i < nfiles; i++)
{
}
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)
{
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;
"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;
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;
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[] =
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;
{
t_fileio *in;
FILE *fp;
- bool bStop,bOK;
+ gmx_bool bStop,bOK;
t_trnheader sh;
gmx_off_t fpos;
char yesno[256];
{ 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[] =
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;
};
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" },
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;
/* 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);
}
}
-static bool is_equal(real a, real b)
+static gmx_bool is_equal(real a, real b)
{
real diff, eps=1.0e-7;
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))
}
-static bool analyze_data(
+static gmx_bool analyze_data(
FILE *fp,
const char *fn,
t_perf **perfdata,
t_perf *pd;
char strbuf[STRLEN];
char str_PME_f_load[13];
- bool bCanUseOrigTPR;
+ gmx_bool bCanUseOrigTPR;
if (nrepeats > 1)
/* 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;
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 */
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 */
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 */
/* 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")) )
/* 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];
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 */
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
/* 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" ))
/* 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;
/* 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 */
/* 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 */
/* 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))
/* 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[],
static void couple_files_options(int nfile, t_filenm fnm[])
{
int i;
- bool bSet,bBench;
+ gmx_bool bSet,bBench;
char *opt;
char buf[20];
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;
};
/* 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;
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[] = {
"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" },
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;
char PullName[4][256];
double UmbPos[4][3];
double UmbCons[4][3];
- bool Flipped[4];
+ gmx_bool Flipped[4];
} t_UmbrellaHeader;
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;
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;
{
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;
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;
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;
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;
{
int nsynth,N,i,nbins,r_index;
double r;
- static bool bWarnout=0;
+ static gmx_bool bWarnout=0;
N=thisWindow->N[pullid];
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 */
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;
};
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)",};
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;
#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);
int i,sl,slen;
real ring,inner,outer;
real xc,yc,box;
- bool *bPh;
+ gmx_bool *bPh;
char **rnms;
char sign;
};
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 [] = {
real major;
real minor;
real offset;
- bool first;
+ gmx_bool first;
int lineatzero;
real majorticklen;
real minorticklen;
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];
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;
} 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);
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, "");
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);
/* 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;
}
#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;
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));
}
}
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;
}
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];
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};
}
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)
{
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;
}
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)
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;
}
}
-void rainbow_mat(bool bBlue, int nmat, t_matrix mat[])
+void rainbow_mat(gmx_bool bBlue, int nmat, t_matrix mat[])
{
int m;
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 };
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;
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;
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);
#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);
}
}
-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;
}
-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 *),
}
-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)
*/
{
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 []));
typedef struct
{
real deltaF0;
- bool bHarmonic;
+ gmx_bool bHarmonic;
real tau;
real deltaF;
real kT;
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 */
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;
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" },
char title[STRLEN];
matrix topbox;
rvec *xtop;
- bool bTop, bFit1;
+ gmx_bool bTop, bFit1;
t_filenm fnm[] = {
{ efTRN, "-f", "eigenvec", ffREAD },
#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;
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.
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;
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);
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;
}
-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;
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]) {
}
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;
}
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;
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);
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;
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;
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;
};
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)" },
const char *stxfile;
char **ndxinfiles;
const char *ndxoutfile;
- bool bNatoms;
+ gmx_bool bNatoms;
int i,j;
t_atoms *atoms;
rvec *x,*v;
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;
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)
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;
"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},
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);
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
"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;
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 },