Tsjerk, your good reference helped me to understand the set_pbc and pbc_dx functions from g_dist... I changed few lines of it and my problem was solved. Thank you.<br><br>Cheers. Fernando.<br><br><br><br><div class="gmail_quote">
2009/4/14 Tsjerk Wassenaar <span dir="ltr">&lt;<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Fernando,<br>
<br>
Just bear in mind that these lattice vectors are just translation<br>
vectors. You can add them to or subtract them from the positional<br>
vectors of the com. That way you&#39;ll get a number of points which you<br>
can use to calculate the distances the regular way. To see where you<br>
went wrong, consider that a vector of the triclinic unit cell may have<br>
more than one non-zero component. You considered only one non-zero<br>
component, based upon the rectangular brick representation. But from<br>
Pythagoras theorem it follows that doing so will make you miss part of<br>
the true distance and come to an underestimate of it.<br>
There is a niftier solution to the smallest distance, which will work<br>
regardless of the separation between particles/coms in the infinite<br>
system. It&#39;s in my thesis (Chapter 3, Appendix C, page 68):<br>
<a href="http://dissertations.ub.rug.nl/faculties/science/2006/t.a.wassenaar/?FullItemRecord=ON" target="_blank">http://dissertations.ub.rug.nl/faculties/science/2006/t.a.wassenaar/?FullItemRecord=ON</a><br>
<br>
Hope it helps,<br>
<font color="#888888"><br>
Tsjerk<br>
</font><div><div></div><div class="h5"><br>
On 4/14/09, Fernando C &lt;<a href="mailto:fernando.cesar.lf@gmail.com">fernando.cesar.lf@gmail.com</a>&gt; wrote:<br>
&gt; Hi Tsjerk and all list!<br>
&gt;<br>
&gt;  &gt; You have to use the three vectors from the tricilinic representation<br>
&gt;  &gt; to obtain the correct distance in the periodic system. Check PBC in<br>
&gt;  &gt; Chapter 3 of the manual.<br>
&gt;<br>
&gt;<br>
&gt;  I used the length values from rectangular box because I&#39;d want believe that<br>
&gt; my problem would be solved easily; I wouldn&#39;t want to fall in question of<br>
&gt; calculate positions and distances in triclinic cells. But here I am: could<br>
&gt; anybody explain to me the algorithm of how such things are calculated?<br>
&gt;<br>
&gt;  Thanks again!<br>
&gt;<br>
&gt;  Fernando.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;  --<br>
&gt;  And Noel Gallagher said: Gromacs is gonna live forever!<br>
&gt;<br>
&gt; 2009/4/13 Tsjerk Wassenaar &lt;<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi Fernando,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt; I&#39;ve obtained the vectors for the rectangular box in g_energy,<br>
&gt; &gt; &gt; using Box_XX, Box_YY and Box_ZZ options; I didn&#39;t use the vectors of the<br>
&gt; &gt; &gt; skewed box.)<br>
&gt; &gt;<br>
&gt; &gt; You have to use the three vectors from the tricilinic representation<br>
&gt; &gt; to obtain the correct distance in the periodic system. Check PBC in<br>
&gt; &gt; Chapter 3 of the manual.<br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt;<br>
&gt; &gt; Tsjerk<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Tsjerk A. Wassenaar, Ph.D.<br>
&gt; &gt; Junior UD (post-doc)<br>
&gt; &gt; Biomolecular NMR, Bijvoet Center<br>
&gt; &gt; Utrecht University<br>
&gt; &gt; Padualaan 8<br>
&gt; &gt; 3584 CH Utrecht<br>
&gt; &gt; The Netherlands<br>
&gt; &gt; P: +31-30-2539931<br>
&gt; &gt; F: +31-30-2537623<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt; &gt; <a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt; &gt; Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
&gt; &gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; &gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt; &gt; Can&#39;t post? Read<br>
&gt; <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt;  gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt;  <a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt;  Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
&gt;  Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt;  www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt;  Can&#39;t post? Read<br>
&gt; <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
&gt;<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Tsjerk A. Wassenaar, Ph.D.<br>
Junior UD (post-doc)<br>
Biomolecular NMR, Bijvoet Center<br>
Utrecht University<br>
Padualaan 8<br>
3584 CH Utrecht<br>
The Netherlands<br>
P: +31-30-2539931<br>
F: +31-30-2537623<br>
_______________________________________________<br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/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/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
</div></div></blockquote></div><br>