Merge release-4-5-patches into release-4-6
[alexxy/gromacs.git] / src / tools / anadih.c
index 59a6e8dd0d7a11ea4ef7cddc54a1f443842d15a5..0a9f5a652e1f2bef311e21ec3d3292c2ce1f4dfc 100644 (file)
@@ -119,28 +119,28 @@ void ana_dih_trans(const char *fn_trans,const char *fn_histo,
   /* just a wrapper; declare extra args, then chuck away at end. */ 
   int maxchi = 0 ; 
   t_dlist *dlist ; 
-  int *xity; 
+  int *multiplicity; 
   int nlist = nangles ; 
   int k ; 
 
   snew(dlist,nlist);  
-  snew(xity,nangles); 
+  snew(multiplicity,nangles); 
   for(k=0; (k<nangles); k++) {
-    xity[k]=3 ; 
+    multiplicity[k]=3 ; 
   }
 
   low_ana_dih_trans(TRUE, fn_trans,TRUE, fn_histo, maxchi, 
                     dih, nlist, dlist, nframes,
-                   nangles, grpname, xity, time, bRb, 0.5,oenv);
+                   nangles, grpname, multiplicity, time, bRb, 0.5,oenv);
   sfree(dlist); 
-  sfree(xity); 
+  sfree(multiplicity); 
   
 }
 
 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[],
+                      int nangles, const char *grpname, int multiplicity[],
                       real *time, gmx_bool bRb, real core_frac,
                        const output_env_t oenv)
 {
@@ -185,12 +185,12 @@ void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans,
 #ifdef OLDIE
     mind = maxd = prev = dih[i][0]; 
 #else
-    cur_bin = calc_bin(dih[i][0],xity[i],core_frac);
+    cur_bin = calc_bin(dih[i][0],multiplicity[i],core_frac);
     rot_occ[cur_bin][i]++ ; 
 #endif    
     for (j=1; (j<nframes); j++)
     {
-      new_bin = calc_bin(dih[i][j],xity[i],core_frac);
+      new_bin = calc_bin(dih[i][j],multiplicity[i],core_frac);
       rot_occ[new_bin][i]++ ; 
 #ifndef OLDIE
       if (cur_bin == 0)
@@ -287,11 +287,11 @@ void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans,
 
 }
 
-void mk_multiplicity_lookup (int *xity, int maxchi, real **dih, 
+void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih, 
                             int nlist, t_dlist dlist[],int nangles) 
 {
   /* new by grs - for dihedral j (as in dih[j]) get multiplicity from dlist
-   * and store in xity[j] 
+   * and store in multiplicity[j] 
    */ 
 
   int j, Dih, i ; 
@@ -306,11 +306,11 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
          ((Dih == edOmega) && (has_dihedral(edOmega,&(dlist[i])))) ||
          ((Dih  > edOmega) && (dlist[i].atm.Cn[Dih-NONCHI+3] != -1))) {
        /* default - we will correct the rest below */ 
-       xity[j] = 3 ; 
+       multiplicity[j] = 3 ; 
 
        /* make omegas 2fold, though doesn't make much more sense than 3 */ 
        if (Dih == edOmega && (has_dihedral(edOmega,&(dlist[i])))) {
-         xity[j] = 2 ; 
+         multiplicity[j] = 2 ; 
        } 
 
        /* dihedrals to aromatic rings, COO, CONH2 or guanidinium are 2fold*/
@@ -325,7 +325,7 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
               ((strstr(name,"GLN") != NULL) && (Dih == edChi3))  ||   
               ((strstr(name,"ASN") != NULL) && (Dih == edChi2))  ||   
               ((strstr(name,"ARG") != NULL) && (Dih == edChi4))  ) {
-           xity[j] = 2; 
+           multiplicity[j] = 2; 
          }
        }
        j++ ; 
@@ -337,7 +337,7 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
            j,nangles);
   /* Check for remaining dihedrals */
   for(;(j < nangles); j++)
-    xity[j] = 3;
+    multiplicity[j] = 3;
 
 }
 
@@ -375,7 +375,7 @@ void mk_chi_lookup (int **lookup, int maxchi, real **dih,
 
 void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
                           int maxchi, t_dlist dlist[], real time[], 
-                          int **lookup, int *xity,gmx_bool bRb, gmx_bool bNormalize,
+                          int **lookup, int *multiplicity,gmx_bool bRb, gmx_bool bNormalize,
                           real core_frac, gmx_bool bAll, const char *fnall,
                            const output_env_t oenv) 
 {
@@ -413,7 +413,7 @@ void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
     for (Xi = 0 ; Xi < maxchi ; Xi ++ ) {
       index = lookup[i][Xi] ; /* chi_(Xi+1) of res i (-1 if off end) */ 
       if ( index >= 0 ) {
-       n = xity[index]; 
+       n = multiplicity[index]; 
        nbin = n*nbin ; 
       }
     }
@@ -429,14 +429,14 @@ void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
        bRotZero = TRUE ; 
        bHaveChi = FALSE ; 
       } else {
-       b = calc_bin(dih[index][j],xity[index],core_frac) ; 
+       b = calc_bin(dih[index][j],multiplicity[index],core_frac) ; 
        accum = b - 1 ; 
        if (b == 0 ) 
          bRotZero = TRUE ; 
        for (Xi = 1 ; Xi < maxchi ; Xi ++ ) {
          index = lookup[i][Xi] ; /* chi_(Xi+1) of res i (-1 if off end) */ 
          if ( index >= 0 ) {
-           n = xity[index]; 
+           n = multiplicity[index]; 
            b = calc_bin(dih[index][j],n,core_frac); 
            accum = n * accum + b - 1 ; 
            if (b == 0 )