I believe it is like this time x1 y1 z1 x2 y2 z2 ... xN yN zN
so you want to average like this: cat thickness.xvg | grep -v '[#|@]' | awk '{s=0;for(i=4;i<=NF;i+=3){s+=$i;n++};avg=s/n;print $1,avg}' Obviously do a sanity check on the output. Still, I agree that the comments at the top of thickness.xvg could be more useful. I'll file a redmine request to improve that Chris. ________________________________________ From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se <gromacs.org_gmx-users-boun...@maillist.sys.kth.se> on behalf of Мижээ Батсайхан <b.mijidd...@gmail.com> Sent: 07 February 2017 22:47:24 To: gromacs.org_gmx-users@maillist.sys.kth.se Subject: Re: [gmx-users] How to choose z component of two groups Dear Justin, Thank you very much for your reply. I have a confusion. There are 66 columns in thickness.xvg, and no header of the columns. How can I know the columns of z component? I think there are number of columns corresponding to x and y components. I averaged the all column, the values are too small and minus. Mijiddorj > > On 2/6/17 9:13 PM, ????? ????????? wrote: > > Dear Justin, > > > > Thank you very much for your reply. > > > > I inspected the thickness.xvg. There are number of columns in this file, > I > > could not realize that which one is Z component of thickness. > > I also got averaged values using -oav option. How can I get the averaged > > values of Z component? > > > > Average the column of thickness.xvg that corresponds to the Z-dimension. > > -Justin > > > > > Best regards, > > > > Mijiddorj > > > > > > > > Dear gmx users, > > > > I am performing analysis of membrane system. I would like to estimate > > membrane thickness. > > > > I toke following command: > > > > gmx distance 0s topol.tpr -f traj.xtc -n selected_P.ndx -oav ave.xvg > -oxyz > > thickness.xvg > > > > > > I do not know how to select z component of the two groups. > > > > Is there any advice, please? > > > > > > Have you inspected the contents of thickness.xvg? I suspect you'll find > > exactlywhat you're looking for. > > > > -Justin > > > > -- > > ================================================== > > > > Justin A. Lemkul, Ph.D. > > Ruth L. Kirschstein NRSA Postdoctoral Fellow > > > > Department of Pharmaceutical Sciences > > School of Pharmacy > > Health Sciences Facility II, Room 629 > > University of Maryland, Baltimore > > 20 Penn St. > > Baltimore, MD 21201 > > jalem...@outerbanks.umaryland.edu | (410) > > 706-7441http://mackerell.umaryland.edu/~jalemkul > > > > ================================================== > > > > -- > ================================================== > > Justin A. Lemkul, Ph.D. > Ruth L. Kirschstein NRSA Postdoctoral Fellow > > Department of Pharmaceutical Sciences > School of Pharmacy > Health Sciences Facility II, Room 629 > University of Maryland, Baltimore > 20 Penn St. > Baltimore, MD 21201 > > jalem...@outerbanks.umaryland.edu | (410) 706-7441 > http://mackerell.umaryland.edu/~jalemkul > > ================================================== > > -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org. -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org.