<p>Hi Mohsen,</p>
<p>I think you&#39;ll have to get a bit creative with g_traj to get the COMs, followed by either some simple scripting or nifty usage of paste and awk (something like: paste com1.xvg com2.xvg | awk &#39;/^[^@#;]/{print $2-$6, $3-$7, $4-$8}&#39;).</p>

<p>Hope it helps,</p>
<p>Tsjerk</p>
<p><blockquote type="cite">On Dec 25, 2010 2:40 PM, &quot;mohsen ramezanpour&quot; &lt;<a href="mailto:ramezanpour.mohsen@gmail.com">ramezanpour.mohsen@gmail.com</a>&gt; wrote:<br><br>Dear All<br>How can we measure the distance between COM of two molecules?of course in vector form!<br>
thanks in advance<br>
<br>--<br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br></blockquote></p>