Hello All We have been trying to get the charge densities from the trajectory by using our in-house matlab code, which basically the same as a part of gmx_potential.c .
z = x0[index[n][i]][axis]; if (z < 0) z += box[axis][axis]; if (z > box[axis][axis]) z -= box[axis][axis]; /* determine which slice atom is in */ slice = (z / (*slWidth)); (*slCharge)[n][slice] += top->atoms.atom[index[n][i]].q; However, the charge profiles from the g_potential tool and from our code show were not the same even for a single structure. Could you explain how the additional steps might affect? rm_pbc(&(top->idef),top->atoms.nr,box,x0,x0); /* calculate position of center of mass based on group 1 */ calc_xcm(x0, gnx[0], index[0], top->atoms.atom, xcm, FALSE); svmul(-1,xcm,xcm); Thank you in advance Sunjoo _______________________________________________ gmx-users mailing list gmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php