예제 #1
0
static void print_data(FILE *fp,real time,rvec x[],real *mass,bool bCom,
		       int ngrps,int isize[],atom_id **index,bool bDim[])
{
  static rvec *xav=NULL;
  
  if (bCom) {
    if (xav==NULL)
      snew(xav,ngrps);
    average_data(x,xav,mass,ngrps,isize,index);
    low_print_data(fp,time,xav,ngrps,NULL,bDim);
  } else
    low_print_data(fp,time,x,isize[0],index[0],bDim);
}
예제 #2
0
static void print_data(FILE *fp, real time, rvec x[], real *mass, gmx_bool bCom,
                       int ngrps, int isize[], int **index, gmx_bool bDim[],
                       const char *sffmt)
{
    static rvec *xav = NULL;

    if (bCom)
    {
        if (xav == NULL)
        {
            snew(xav, ngrps);
        }
        average_data(x, xav, mass, ngrps, isize, index);
        low_print_data(fp, time, xav, ngrps, NULL, bDim, sffmt);
    }
    else
    {
        low_print_data(fp, time, x, isize[0], index[0], bDim, sffmt);
    }
}