{ 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);
{
for(m=0; (m<DIM); m++)
{
- b_inv[m] = divide(1.0,box_size[m]);
+ b_inv[m] = divide_err(1.0,box_size[m]);
}
bTriclinic = TRICLINIC(box);
}
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;