[gmx-users] g_density

Ali Alizadeh ali.alizadehmojarad at gmail.com
Mon Oct 29 15:42:38 CET 2012


Dear Chris

I saw two your email :

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);
    }
}




and in continuation


rm -rf TEMPORARY_FILES
mkdir -p TEMPORARY_FILES
echo "KSC_DOPC" | trjconv -f bothsides_center_adjusted_*.xtc -o
/dev/shm/tmp.xtc -n cn.ndx

GMXLIB=/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/share/gromacs/top
echo "NE_CZ_NH1_NH2_CB_CG_CD System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-center -pbc mol -f /dev/shm/tmp.xtc -o /dev/shm/tmp2.xtc -s
../../useful/dry.tpr -n cn.ndx
mv /dev/shm/tmp.xtc TEMPORARY_FILES

echo "DOPC System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-center -pbc atom -f /dev/shm/tmp2.xtc -o /dev/shm/tmp3.xtc -s
../../useful/dry.tpr -n cn.ndx
mv /dev/shm/tmp2.xtc TEMPORARY_FILES

## now make a new .tpr file in which the solute is at the center of the box
#first output a single frame
echo "NE_CZ_NH1_NH2_CB_CG_CD System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-f /dev/shm/tmp3.xtc -dump 125000 -o /dev/shm/tmpgro.gro -s
../../useful/dry.tpr -center -pbc mol -n cn.ndx
#make a new .tpr file
touch empty.mdp
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/grompp
-p
/project/pomes/cneale/GPC/fromScratch/ARG/MANY_RUNS/TEMPLATE/FILES/complete_dry.top
-c /dev/shm/tmpgro.gro -f empty.mdp -o centered.tpr -maxwarn
1

echo "NE_CZ_NH1_NH2_CB_CG_CD System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-fit transxy -pbc atom -f /dev/shm/tmp3.xtc -o /dev/shm/tmp4.xtc -s
centered.tpr -n cn.ndx
mv /dev/shm/tmp3.xtc TEMPORARY_FILES

echo "System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-box 6 6 14 -f /dev/shm/tmp4.xtc -o /dev/shm/tmp5.xtc -s centered.tpr
-n cn.ndx
mv /dev/shm/tmp4.xtc TEMPORARY_FILES

echo "DOPC System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-center -pbc none -f /dev/shm/tmp5.xtc -o /dev/shm/tmp6.xtc -s
centered.tpr -n cn.ndx
mv /dev/shm/tmp5.xtc TEMPORARY_FILES

echo "NE_CZ_NH1_NH2_CB_CG_CD System" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-fit transxy -pbc none -f /dev/shm/tmp6.xtc -o /dev/shm/tmp7.xtc -s
centered.tpr -n cn.ndx
mv /dev/shm/tmp6.xtc TEMPORARY_FILES

# Now center the solute at 0 0 0
echo "NE_CZ_NH1_NH2_CB_CG_CD" |
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/g_traj
-f /dev/shm/tmp7.xtc -ox -s ../../useful/dry.tpr -n cn.ndx -com
avg=($(cat coord.xvg|grep -v '[@|#]' | awk '{x+=$2;y+=$3;z+=$4;n++}
END{print -1*x/n,-1*y/n}'))
/project/pomes/cneale/GPC/exe/intel/gromacs-4.5.3_modtrjconv/exec/bin/trjconv
-f /dev/shm/tmp7.xtc -o /dev/shm/tmp8.xtc -trans ${avg[0]} ${avg[1]} 0
mv /dev/shm/tmp7.xtc TEMPORARY_FILES


I confused,

i don't understand connection between two email.
--
Sincerely



More information about the gromacs.org_gmx-users mailing list