[gmx-users] Re, density

Ali Alizadeh ali.alizadehmojarad at gmail.com
Wed Oct 31 15:21:27 CET 2012


Dear Chris

I find out where you change the trjconv, I have a question

"ecenter" in this code, Where do you use it? and What is the ecenter?


static void center_x(int ecenter,rvec x[],matrix box,int n,int nc,atom_id
ci[])

{
    int i,m,ai;
    rvec cmin,cmax,box_center,dx;

    if (nc > 0) {
        copy_rvec(x[ci[0]],cmin);
        copy_rvec(x[ci[0]],cmax);
        for(i=0; i<nc; i++) {
            ai=ci[i];
            for(m=0; m<DIM; m++) {
                if (x[ai][m] < cmin[m])
                    cmin[m]=x[ai][m];
                else if (x[ai][m] > cmax[m])
                    cmax[m]=x[ai][m];
            }
        }
        calc_box_center(ecenter,box,box_center);
        for(m=0; m<DIM; m++)
            dx[m] = box_center[m]-(cmin[m]+cmax[m])*0.5;

        for(i=0; i<n; i++)
            rvec_inc(x[i],dx);
    }
}


-- 
Sincerely

Ali Alizadeh



More information about the gromacs.org_gmx-users mailing list