Redefine the default boolean type to gmx_bool.
[alexxy/gromacs.git] / src / kernel / gen_vsite.c
index ed25cc592c0bfd9e8b5e87c2a3399c83d8485fe8..ad743a67321fb2487e17f8a328588af41b3b6462 100644 (file)
@@ -59,7 +59,7 @@
 
 typedef struct {
   char   atomtype[MAXNAME];      /* Type for the XH3/XH2 atom */
-  bool   isplanar;               /* If true, the atomtype above and the three connected
+  gmx_bool   isplanar;               /* If true, the atomtype above and the three connected
                                  * ones are in a planar geometry. The two next entries
                                  * are undefined in that case 
                                  */
@@ -278,7 +278,7 @@ static int nitrogen_is_planar(t_vsiteconf vsiteconflist[],int nvsiteconf,char at
    * and -1 if not found.
    */
   int i,res;
-  bool found=FALSE;
+  gmx_bool found=FALSE;
   for(i=0;i<nvsiteconf && !found;i++) {
     found=(!gmx_strcasecmp(vsiteconflist[i].atomtype,atomtype) && (vsiteconflist[i].nhydrogens==2));
   }
@@ -294,7 +294,7 @@ static char *get_dummymass_name(t_vsiteconf vsiteconflist[],int nvsiteconf,char
 {
   /* 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));
@@ -419,7 +419,7 @@ static int get_atype(int atom, t_atoms *at, int nrtp, t_restp rtp[],
                      gmx_residuetype_t rt)
 {
   int type;
-  bool bNterm;
+  gmx_bool bNterm;
   int  j;
   t_restp *rtpp;
   
@@ -452,7 +452,7 @@ static real get_amass(int atom, t_atoms *at, int nrtp, t_restp rtp[],
                       gmx_residuetype_t rt)
 {
   real mass;
-  bool bNterm;
+  gmx_bool bNterm;
   int  j;
   t_restp *rtpp;
   
@@ -483,7 +483,7 @@ static void add_vsites(t_params plist[], int vsite_type[],
                       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]];
@@ -557,7 +557,7 @@ static void add_vsites(t_params plist[], int vsite_type[],
 
 static int gen_vsites_6ring(t_atoms *at, int *vsite_type[], t_params plist[], 
                          int nrfound, int *ats, real bond_cc, real bond_ch,
-                         real xcom, 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, 
@@ -1309,7 +1309,7 @@ static int gen_vsites_his(t_atoms *at, int *vsite_type[], t_params plist[],
   return nvsite;
 }
 
-static bool is_vsite(int vsite_type)
+static gmx_bool is_vsite(int vsite_type)
 {
   if (vsite_type == NOTSET)
     return FALSE;
@@ -1331,7 +1331,7 @@ static char atomnamesuffix[] = "1234";
 void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype, 
               t_atoms *at, t_symtab *symtab, rvec *x[], 
               t_params plist[], int *vsite_type[], int *cgnr[], 
-              real mHmult, bool bVsiteAromatics,
+              real mHmult, gmx_bool bVsiteAromatics,
               const char *ffdir)
 {
 #define MAXATOMSPERRESIDUE 16
@@ -1339,9 +1339,9 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
   int  ai,aj,ak,al;
   int  nrfound=0,needed,nrbonds,nrHatoms,Heavy,nrheavies,tpM,tpHeavy;
   int  Hatoms[4],heavies[4],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;
@@ -1354,7 +1354,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
   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; 
@@ -1380,7 +1380,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
   const char *resnmsN[resNR]  = {  "NPHE", "NTRP", "NTYR", "NHIS" };
   const char *resnmsC[resNR]  = {  "CPHE", "CTRP", "CTYR", "CHIS" };
   /* HIS can be known as HISH, HIS1, HISA, HID, HIE, HIP, etc. too */
-  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! */
@@ -1625,7 +1625,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
                    ( (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! */
@@ -1863,7 +1863,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
 }
   
 void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult,
-              bool bDeuterate)
+              gmx_bool bDeuterate)
 {
   int i,j,a;